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

Delta Between Two Patch Sets: lib/contentPolicy.js

Issue 29329547: Issue 3208 - Move isBlockableScheme call from shouldLoad() into processNode() (Closed)
Left Patch Set: Created Oct. 30, 2015, 7:43 p.m.
Right Patch Set: Fixed typo Created Nov. 1, 2015, 12:23 p.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 | no next file » | 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-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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 * Checks whether the location's scheme is blockable. 261 * Checks whether the location's scheme is blockable.
262 * @param location {nsIURI|String} 262 * @param location {nsIURI|String}
263 * @return {Boolean} 263 * @return {Boolean}
264 */ 264 */
265 isBlockableScheme: function(location) 265 isBlockableScheme: function(location)
266 { 266 {
267 let scheme; 267 let scheme;
268 if (typeof location == "string") 268 if (typeof location == "string")
269 { 269 {
270 let match = /^([\w\-]+):/.exec(location); 270 let match = /^([\w\-]+):/.exec(location);
271 scheme = match ? match[0] : null; 271 scheme = match ? match[1] : null;
tschuster 2015/10/31 12:25:11 match[1]
Wladimir Palant 2015/11/01 12:23:37 Done.
272 } 272 }
273 else 273 else
274 scheme = location.scheme; 274 scheme = location.scheme;
275 return !this.whitelistSchemes.has(scheme); 275 return !this.whitelistSchemes.has(scheme);
276 }, 276 },
277 277
278 /** 278 /**
279 * Checks whether a page is whitelisted. 279 * Checks whether a page is whitelisted.
280 * @param {String} url 280 * @param {String} url
281 * @param {String} [parentUrl] location of the parent page 281 * @param {String} [parentUrl] location of the parent page
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 if (!wnd || wnd.closed) 685 if (!wnd || wnd.closed)
686 return; 686 return;
687 687
688 if (entry.type == "OBJECT") 688 if (entry.type == "OBJECT")
689 { 689 {
690 node.removeEventListener("mouseover", objectMouseEventHander, true); 690 node.removeEventListener("mouseover", objectMouseEventHander, true);
691 node.removeEventListener("mouseout", objectMouseEventHander, true); 691 node.removeEventListener("mouseout", objectMouseEventHander, true);
692 } 692 }
693 Policy.processNode(wnd, node, entry.type, entry.location, true); 693 Policy.processNode(wnd, node, entry.type, entry.location, true);
694 } 694 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld