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

Side by Side Diff: lib/contentPolicy.js

Issue 5296291500261376: Issue 2151 - Fixed: $sitekey ignored for $elemhide filters (Closed)
Patch Set: Created March 20, 2015, 6:13 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 <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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 let locationText = location.spec; 192 let locationText = location.spec;
193 if (!match && contentType == Policy.type.ELEMHIDE) 193 if (!match && contentType == Policy.type.ELEMHIDE)
194 { 194 {
195 let testWnd = wnd; 195 let testWnd = wnd;
196 let parentWndLocation = getWindowLocation(testWnd); 196 let parentWndLocation = getWindowLocation(testWnd);
197 while (true) 197 while (true)
198 { 198 {
199 let testWndLocation = parentWndLocation; 199 let testWndLocation = parentWndLocation;
200 parentWndLocation = (testWnd == testWnd.parent ? testWndLocation : getWi ndowLocation(testWnd.parent)); 200 parentWndLocation = (testWnd == testWnd.parent ? testWndLocation : getWi ndowLocation(testWnd.parent));
201 let parentDocDomain = getHostname(parentWndLocation); 201 let parentDocDomain = getHostname(parentWndLocation);
202 match = defaultMatcher.matchesAny(testWndLocation, "ELEMHIDE", parentDoc Domain, false); 202 match = defaultMatcher.matchesAny(testWndLocation, "ELEMHIDE", parentDoc Domain, false, sitekey);
203 if (match instanceof WhitelistFilter) 203 if (match instanceof WhitelistFilter)
204 { 204 {
205 FilterStorage.increaseHitCount(match, wnd); 205 FilterStorage.increaseHitCount(match, wnd);
206 RequestNotifier.addNodeData(testWnd.document, topWnd, contentType, par entDocDomain, false, testWndLocation, match); 206 RequestNotifier.addNodeData(testWnd.document, topWnd, contentType, par entDocDomain, false, testWndLocation, match);
207 return true; 207 return true;
208 } 208 }
209 209
210 if (testWnd.parent == testWnd) 210 if (testWnd.parent == testWnd)
211 break; 211 break;
212 else 212 else
(...skipping 566 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