Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/content/elemHideEmulation.js

Issue 29884580: Issue 6504 - Remove element hiding emulation code related to style sheets (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Sept. 18, 2018, 5:37 p.m.
Right Patch Set: Remove first parameter to constructor Created Sept. 29, 2018, 1:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | test/browser/elemHideEmulation.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 return patterns.some(pattern => pattern.maybeDependsOnAttributes); 598 return patterns.some(pattern => pattern.maybeDependsOnAttributes);
599 } 599 }
600 600
601 function shouldObserveCharacterData(patterns) 601 function shouldObserveCharacterData(patterns)
602 { 602 {
603 return patterns.some(pattern => pattern.dependsOnCharacterData); 603 return patterns.some(pattern => pattern.dependsOnCharacterData);
604 } 604 }
605 605
606 class ElemHideEmulation 606 class ElemHideEmulation
607 { 607 {
608 constructor(addSelectorsFunc, hideElemsFunc) 608 constructor(hideElemsFunc)
609 { 609 {
610 this._filteringInProgress = false; 610 this._filteringInProgress = false;
611 this._lastInvocation = -MIN_INVOCATION_INTERVAL; 611 this._lastInvocation = -MIN_INVOCATION_INTERVAL;
612 this._scheduledProcessing = null; 612 this._scheduledProcessing = null;
613 613
614 this.document = document; 614 this.document = document;
615 this.hideElemsFunc = hideElemsFunc; 615 this.hideElemsFunc = hideElemsFunc;
616 this.observer = new MutationObserver(this.observe.bind(this)); 616 this.observer = new MutationObserver(this.observe.bind(this));
617 } 617 }
618 618
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 characterData: shouldObserveCharacterData(this.patterns), 965 characterData: shouldObserveCharacterData(this.patterns),
966 subtree: true 966 subtree: true
967 } 967 }
968 ); 968 );
969 this.document.addEventListener("load", this.onLoad.bind(this), true); 969 this.document.addEventListener("load", this.onLoad.bind(this), true);
970 } 970 }
971 } 971 }
972 } 972 }
973 973
974 exports.ElemHideEmulation = ElemHideEmulation; 974 exports.ElemHideEmulation = ElemHideEmulation;
LEFTRIGHT

Powered by Google App Engine
This is Rietveld