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

Delta Between Two Patch Sets: lib/elemHide.js

Issue 29945631: Issue 7097 - Make element hiding filter objects ephemeral Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Nov. 18, 2018, 3:22 a.m.
Right Patch Set: Simplify Created Nov. 18, 2018, 6:12 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/filterClasses.js » ('j') | lib/filterClasses.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 if (domain != "") 233 if (domain != "")
234 knownExceptionDomains.add(domain); 234 knownExceptionDomains.add(domain);
235 } 235 }
236 } 236 }
237 237
238 // If this is the first exception for a previously unconditionally applied 238 // If this is the first exception for a previously unconditionally applied
239 // element hiding selector we need to take care to update the lookups. 239 // element hiding selector we need to take care to update the lookups.
240 let unconditionalFilterForSelector = filterBySelector.get(selector); 240 let unconditionalFilterForSelector = filterBySelector.get(selector);
241 if (unconditionalFilterForSelector) 241 if (unconditionalFilterForSelector)
242 { 242 {
243 addToFiltersByDomain(Filter.fromText(unconditionalFilterForSelector)); 243 addToFiltersByDomain(Filter.fromText(unconditionalFilterForSelector,
244 false));
244 filterBySelector.delete(selector); 245 filterBySelector.delete(selector);
245 unconditionalSelectors = null; 246 unconditionalSelectors = null;
246 defaultStyleSheet = null; 247 defaultStyleSheet = null;
247 } 248 }
248 }); 249 });
249 250
250 /** 251 /**
251 * Container for element hiding filters 252 * Container for element hiding filters
252 * @class 253 * @class
253 */ 254 */
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 { 477 {
477 let styleSheet = ""; 478 let styleSheet = "";
478 479
479 for (let selectorGroup of splitSelectors(selectors)) 480 for (let selectorGroup of splitSelectors(selectors))
480 styleSheet += createRule(selectorGroup); 481 styleSheet += createRule(selectorGroup);
481 482
482 return styleSheet; 483 return styleSheet;
483 } 484 }
484 485
485 exports.createStyleSheet = createStyleSheet; 486 exports.createStyleSheet = createStyleSheet;
LEFTRIGHT

Powered by Google App Engine
This is Rietveld