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

Side by Side Diff: lib/elemHide.js

Issue 29329554: Issue 3208 - Send Private Browsing flag separately from the frame structure (Closed)
Patch Set: Created Oct. 30, 2015, 7:57 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 | « lib/child/utils.js ('k') | 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 fakeFrame = { 215 fakeFrame = {
216 parent: fakeFrame, 216 parent: fakeFrame,
217 location: { 217 location: {
218 href: message.frames[i].location 218 href: message.frames[i].location
219 }, 219 },
220 document: { 220 document: {
221 documentElement: {} 221 documentElement: {}
222 }, 222 },
223 QueryInterface: function() {return this;}, 223 QueryInterface: function() {return this;},
224 getInterface: function() {return this;}, 224 getInterface: function() {return this;},
225 usePrivateBrowsing: (fakeFrame ? fakeFrame.usePrivateBrowsing : message. frames[i].privateBrowsing) 225 usePrivateBrowsing: message.isPrivate
226 }; 226 };
227 fakeFrame.top = fakeFrame.parent || fakeFrame; 227 fakeFrame.top = fakeFrame.parent || fakeFrame;
228 if (!fakeFrame.parent) 228 if (!fakeFrame.parent)
229 fakeFrame.parent = fakeFrame; 229 fakeFrame.parent = fakeFrame;
230 230
231 let sitekey = message.frames[i].sitekey || null; 231 let sitekey = message.frames[i].sitekey || null;
232 fakeFrame.document.documentElement.getAttribute = function(attr) 232 fakeFrame.document.documentElement.getAttribute = function(attr)
233 { 233 {
234 if (attr == "data-adblockkey") 234 if (attr == "data-adblockkey")
235 return sitekey; 235 return sitekey;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 let filter = filterByKey[key]; 438 let filter = filterByKey[key];
439 if (specificOnly && (!filter.domains || filter.domains[""])) 439 if (specificOnly && (!filter.domains || filter.domains[""]))
440 continue; 440 continue;
441 441
442 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) 442 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain))
443 result.push(filter.selector); 443 result.push(filter.selector);
444 } 444 }
445 return result; 445 return result;
446 } 446 }
447 }; 447 };
OLDNEW
« no previous file with comments | « lib/child/utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld