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

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

Issue 29847558: Issue 6504 - Remove useInlineStyles for now (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Remove useInlineStyles flag Created Aug. 14, 2018, 5:45 p.m.
Right Patch Set: Remove one more reference to useInlineStyles Created Aug. 15, 2018, 7:47 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 | no next file » | 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 786
787 let evaluationTargets = targets; 787 let evaluationTargets = targets;
788 788
789 // If the pattern appears to contain any sibling combinators, we can't 789 // If the pattern appears to contain any sibling combinators, we can't
790 // easily optimize based on the mutation targets. Since this is a 790 // easily optimize based on the mutation targets. Since this is a
791 // special case, skip the optimization. By setting it to null here we 791 // special case, skip the optimization. By setting it to null here we
792 // make sure we process the entire DOM. 792 // make sure we process the entire DOM.
793 if (pattern.maybeContainsSiblingCombinators) 793 if (pattern.maybeContainsSiblingCombinators)
794 evaluationTargets = null; 794 evaluationTargets = null;
795 795
796 // Ignore mutation targets when using style sheets, because we may have
797 // to update all the CSS selectors.
798 if (!this.useInlineStyles)
799 evaluationTargets = null;
800
801 generator = evaluate(pattern.selectors, 0, "", 796 generator = evaluate(pattern.selectors, 0, "",
802 this.document, cssStyles, evaluationTargets); 797 this.document, cssStyles, evaluationTargets);
803 } 798 }
804 for (let selector of generator) 799 for (let selector of generator)
805 { 800 {
806 if (selector != null) 801 if (selector != null)
807 { 802 {
808 for (let element of this.document.querySelectorAll(selector)) 803 for (let element of this.document.querySelectorAll(selector))
809 { 804 {
810 elements.push(element); 805 elements.push(element);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 characterData: shouldObserveCharacterData(this.patterns), 965 characterData: shouldObserveCharacterData(this.patterns),
971 subtree: true 966 subtree: true
972 } 967 }
973 ); 968 );
974 this.document.addEventListener("load", this.onLoad.bind(this), true); 969 this.document.addEventListener("load", this.onLoad.bind(this), true);
975 } 970 }
976 } 971 }
977 }; 972 };
978 973
979 exports.ElemHideEmulation = ElemHideEmulation; 974 exports.ElemHideEmulation = ElemHideEmulation;
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld