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

Delta Between Two Patch Sets: lib/child/elemHide.js

Issue 29356270: Issue 4499 - Consider $generichide exceptions when applying element hiding rules (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Left Patch Set: Created Oct. 6, 2016, 8:52 p.m.
Right Patch Set: Added comment to explain the logic Created Oct. 7, 2016, 10:52 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 | lib/elemHideFF.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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 { 337 {
338 // We are too late, the window is gone already. 338 // We are too late, the window is gone already.
339 return; 339 return;
340 } 340 }
341 341
342 if (enabled) 342 if (enabled)
343 { 343 {
344 let utils = window.QueryInterface(Ci.nsIInterfaceRequestor) 344 let utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
345 .getInterface(Ci.nsIDOMWindowUtils); 345 .getInterface(Ci.nsIDOMWindowUtils);
346 346
347 let specificOnly = filter; 347 // If we have a filter hit at this point then it must be a $generichide
kzar 2016/10/07 09:30:21 I don't understand this line, isn't filter being g
Wladimir Palant 2016/10/07 09:37:49 There are two kinds of filters that we can get in
kzar 2016/10/07 09:53:31 Ah, I finally wrapped my head around it :). Well I
kzar 2016/10/07 10:15:29 (OK, I missed the final `return {enabled: true};`
Wladimir Palant 2016/10/07 10:53:05 Done.
348 // filter - apply only specific element hiding filters.
349 let specificOnly = !!filter;
348 if (!specificOnly) 350 if (!specificOnly)
349 { 351 {
350 if (!this.sheet) 352 if (!this.sheet)
351 { 353 {
352 this.sheet = Utils.styleService.preloadSheet(this.styleURL, 354 this.sheet = Utils.styleService.preloadSheet(this.styleURL,
353 Ci.nsIStyleSheetService.USER_SHEET); 355 Ci.nsIStyleSheetService.USER_SHEET);
354 } 356 }
355 357
356 try 358 try
357 { 359 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 if (filter) 394 if (filter)
393 { 395 {
394 RequestNotifier.addNodeData(window.document, window.top, { 396 RequestNotifier.addNodeData(window.document, window.top, {
395 contentType, docDomain, thirdParty, location, filter, filterType 397 contentType, docDomain, thirdParty, location, filter, filterType
396 }); 398 });
397 } 399 }
398 }); 400 });
399 } 401 }
400 }; 402 };
401 observer.init(); 403 observer.init();
LEFTRIGHT
« no previous file | lib/elemHideFF.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld