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

Unified Diff: lib/elemHide.js

Issue 6589722470121472: Issue 419 - Work around WebKit bug which breaks element hiding on Safari (Closed)
Patch Set: Created May 14, 2014, 6:13 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHide.js
===================================================================
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -391,7 +391,7 @@
/**
* Returns a list of all selectors active on a particular domain (currently
- * used only in Chrome).
+ * used only in Chrome, Opera and Safari).
*/
getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly)
{
@@ -399,7 +399,11 @@
for (let key in filterByKey)
{
let filter = filterByKey[key];
- if (specificOnly && (!filter.domains || filter.domains[""]))
+ let domains = filter.domains; // it is important to always access filter.domains
+ // here, even if it isn't used, in order to
+ // workaround WebKit bug 132872, also see #419
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.
+
+ if (specificOnly && (!domains || domains[""]))
continue;
if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld