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

Side by Side Diff: lib/contentPolicy.js

Issue 5320026647166976: Issue 1381 - Element hiding exceptions broken after #432 landing (Closed)
Patch Set: More consistent approach Created Sept. 18, 2014, 1:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 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, thirdP arty, 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
234 if (!match && Prefs.enabled) 234 if (!match && Prefs.enabled)
235 { 235 {
236 match = defaultMatcher.matchesAny(locationText, Policy.typeDescr[contentTy pe] || "", docDomain, thirdParty, sitekey); 236 match = defaultMatcher.matchesAny(locationText, Policy.typeDescr[contentTy pe] || "", docDomain, thirdParty, sitekey);
237 if (match instanceof BlockingFilter && node.ownerDocument && !(contentType in Policy.nonVisual)) 237 if (match instanceof BlockingFilter && node.ownerDocument && !(contentType in Policy.nonVisual))
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 if (!wnd || wnd.closed) 779 if (!wnd || wnd.closed)
780 return; 780 return;
781 781
782 if (entry.type == Policy.type.OBJECT) 782 if (entry.type == Policy.type.OBJECT)
783 { 783 {
784 node.removeEventListener("mouseover", objectMouseEventHander, true); 784 node.removeEventListener("mouseover", objectMouseEventHander, true);
785 node.removeEventListener("mouseout", objectMouseEventHander, true); 785 node.removeEventListener("mouseout", objectMouseEventHander, true);
786 } 786 }
787 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true) ; 787 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true) ;
788 } 788 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld