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

Unified Diff: lib/content/elemHideEmulation.js

Issue 29712602: Noissue - Fix naming inconsistency in ContainsSelector (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 1, 2018, 1:36 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: lib/content/elemHideEmulation.js
===================================================================
--- a/lib/content/elemHideEmulation.js
+++ b/lib/content/elemHideEmulation.js
@@ -222,19 +222,18 @@
}
PlainSelector.prototype = {
/**
* Generator function returning a pair of selector
* string and subtree.
* @param {string} prefix the prefix for the selector.
* @param {Node} subtree the subtree we work on.
- * @param {StringifiedStyle[]} styles the stringified style objects.
*/
- *getSelectors(prefix, subtree, styles)
+ *getSelectors(prefix, subtree)
{
yield [prefix + this._selector, subtree];
}
};
const incompletePrefixRegexp = /[\s>+~]$/;
function HasSelector(selectors)
@@ -303,23 +302,23 @@
{
this._regexp = makeRegExpParameter(textContent);
}
ContainsSelector.prototype = {
requiresHiding: true,
dependsOnCharacterData: true,
- *getSelectors(prefix, subtree, stylesheet)
+ *getSelectors(prefix, subtree)
{
- for (let element of this.getElements(prefix, subtree, stylesheet))
+ for (let element of this.getElements(prefix, subtree))
yield [makeSelector(element, ""), subtree];
},
- *getElements(prefix, subtree, stylesheet)
+ *getElements(prefix, subtree)
{
let actualPrefix = (!prefix || incompletePrefixRegexp.test(prefix)) ?
prefix + "*" : prefix;
let elements = scopedQuerySelectorAll(subtree, actualPrefix);
if (elements)
{
for (let element of elements)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld