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

Delta Between Two Patch Sets: lib/contentPolicy.js

Issue 4529242486341632: Issue 235 - Improved performance of ElemHide.getSelectorsForDomain() (Closed)
Left Patch Set: Fixed domain logic and addressed comments Created March 12, 2015, 3:57 p.m.
Right Patch Set: Always consider generic filters Created July 2, 2015, 9:22 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/elemHide.js » ('j') | lib/elemHide.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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 testWnd = testWnd.parent; 213 testWnd = testWnd.parent;
214 } 214 }
215 215
216 match = location; 216 match = location;
217 locationText = match.text.replace(/^.*?#/, '#'); 217 locationText = match.text.replace(/^.*?#/, '#');
218 location = locationText; 218 location = locationText;
219 219
220 if (!match.isActiveOnDomain(docDomain)) 220 if (!match.isActiveOnDomain(docDomain))
221 return true; 221 return true;
222 222
223 let exception = ElemHide.getException(match, docDomain); 223 let exception = ElemHide.getException(match.selector, docDomain);
224 if (exception) 224 if (exception)
225 { 225 {
226 FilterStorage.increaseHitCount(exception, wnd); 226 FilterStorage.increaseHitCount(exception, wnd);
227 RequestNotifier.addNodeData(node, topWnd, contentType, docDomain, false, locationText, exception); 227 RequestNotifier.addNodeData(node, topWnd, contentType, docDomain, false, locationText, exception);
228 return true; 228 return true;
229 } 229 }
230 } 230 }
231 231
232 let thirdParty = (contentType == Policy.type.ELEMHIDE ? false : isThirdParty (location, docDomain)); 232 let thirdParty = (contentType == Policy.type.ELEMHIDE ? false : isThirdParty (location, docDomain));
233 233
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 if (!wnd || wnd.closed) 786 if (!wnd || wnd.closed)
787 return; 787 return;
788 788
789 if (entry.type == Policy.type.OBJECT) 789 if (entry.type == Policy.type.OBJECT)
790 { 790 {
791 node.removeEventListener("mouseover", objectMouseEventHander, true); 791 node.removeEventListener("mouseover", objectMouseEventHander, true);
792 node.removeEventListener("mouseout", objectMouseEventHander, true); 792 node.removeEventListener("mouseout", objectMouseEventHander, true);
793 } 793 }
794 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true) ; 794 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true) ;
795 } 795 }
LEFTRIGHT
« no previous file | lib/elemHide.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld