Drop as invalid unknown argument-based pseudoclass operators

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2442

These invalid pseudoclass operators were still seen as
valid when mixed with procedural pseudoclass operators.
This commit is contained in:
Raymond Hill 2023-01-06 09:54:11 -05:00
parent 7847731e9a
commit d9b50fcd51
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 5 additions and 2 deletions

View File

@ -1750,9 +1750,12 @@ Parser.prototype.SelectorCompiler = class {
case 'IdSelector': case 'IdSelector':
case 'PseudoClassSelector': case 'PseudoClassSelector':
case 'PseudoElementSelector': case 'PseudoElementSelector':
case 'TypeSelector': case 'TypeSelector': {
prelude.push(this.astSerializePart(part)); const component = this.astSerializePart(part);
if ( component === undefined ) { return; }
prelude.push(component);
break; break;
}
case 'ProceduralSelector': { case 'ProceduralSelector': {
if ( prelude.length !== 0 ) { if ( prelude.length !== 0 ) {
let spath = prelude.join(''); let spath = prelude.join('');