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

Side by Side Diff: lib/elemHide.js

Issue 6055266931965952: Issue 1273 - Worked around WebKit getter misoptimization on Safari 8 (Closed)
Patch Set: Fixed typo in comment Created Aug. 27, 2014, 12:59 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 | lib/filterClasses.js » ('j') | 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 /** 394 /**
395 * Returns a list of all selectors active on a particular domain (currently 395 * Returns a list of all selectors active on a particular domain (currently
396 * used only in Chrome, Opera and Safari). 396 * used only in Chrome, Opera and Safari).
397 */ 397 */
398 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly) 398 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly)
399 { 399 {
400 let result = []; 400 let result = [];
401 for (let key in filterByKey) 401 for (let key in filterByKey)
402 { 402 {
403 let filter = filterByKey[key]; 403 let filter = filterByKey[key];
404 404 if (specificOnly && (!filter.domains || filter.domains[""]))
405 // it is important to always access filter.domains
406 // here, even if it isn't used, in order to
407 // workaround WebKit bug 132872, also see #419
408 let domains = filter.domains;
409
410 if (specificOnly && (!domains || domains[""]))
411 continue; 405 continue;
412 406
413 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) 407 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain))
414 result.push(filter.selector); 408 result.push(filter.selector);
415 } 409 }
416 return result; 410 return result;
417 } 411 }
418 }; 412 };
OLDNEW
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld