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

Unified Diff: chrome/content/elemHideEmulation.js

Issue 29490698: Issue 5422 - Properly build props selector (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Updated following review. Created Aug. 19, 2017, 2:07 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: chrome/content/elemHideEmulation.js
===================================================================
--- a/chrome/content/elemHideEmulation.js
+++ b/chrome/content/elemHideEmulation.js
@@ -275,16 +275,19 @@
dependsOnStyles: true,
*findPropsSelectors(styles, prefix, regexp)
{
for (let style of styles)
if (regexp.test(style.style))
for (let subSelector of style.subSelectors)
{
+ if (subSelector.startsWith("*") &&
+ !incompletePrefixRegexp.test(prefix))
+ subSelector = subSelector.substr(1);
Wladimir Palant 2017/08/19 07:39:13 Nit: we require brackets around the if body for mu
hub 2017/08/21 15:36:04 Done.
let idx = subSelector.lastIndexOf("::");
if (idx != -1)
subSelector = subSelector.substr(0, idx);
yield prefix + subSelector;
}
},
*getSelectors(prefix, subtree, styles)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld