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: Another nit Created Aug. 19, 2017, 1:13 p.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,21 @@
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);
+ }
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