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

Delta Between Two Patch Sets: lib/elemHide.js

Issue 6589722470121472: Issue 419 - Work around WebKit bug which breaks element hiding on Safari (Closed)
Left Patch Set: Created May 14, 2014, 6:13 a.m.
Right Patch Set: Addressed comment Created May 14, 2014, 6:40 a.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 <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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 /** 392 /**
393 * Returns a list of all selectors active on a particular domain (currently 393 * Returns a list of all selectors active on a particular domain (currently
394 * used only in Chrome, Opera and Safari). 394 * used only in Chrome, Opera and Safari).
395 */ 395 */
396 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly) 396 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly)
397 { 397 {
398 let result = []; 398 let result = [];
399 for (let key in filterByKey) 399 for (let key in filterByKey)
400 { 400 {
401 let filter = filterByKey[key]; 401 let filter = filterByKey[key];
402 let domains = filter.domains; // it is important to always access filter.d omains 402
403 // here, even if it isn't used, in order to 403 // it is important to always access filter.domains
404 // workaround WebKit bug 132872, also see #4 19 404 // here, even if it isn't used, in order to
Wladimir Palant 2014/05/14 06:17:37 Nit: Please always put comments with more than two
Sebastian Noack 2014/05/14 06:40:19 Done.
405 // workaround WebKit bug 132872, also see #419
406 let domains = filter.domains;
405 407
406 if (specificOnly && (!domains || domains[""])) 408 if (specificOnly && (!domains || domains[""]))
407 continue; 409 continue;
408 410
409 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) 411 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain))
410 result.push(filter.selector); 412 result.push(filter.selector);
411 } 413 }
412 return result; 414 return result;
413 } 415 }
414 }; 416 };
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