mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibWeb: Parse :host() selector
We were already parsing non-function-syntax :host, so let's also do the :host(...) variant. Note that we don't have matching for these yet. This fixes many issues on sites generated by Wix, as they often have selector lists that include some :host() selector, and we'd reject the entire rule after failing to parse it.
This commit is contained in:
parent
ac2d9d9273
commit
64c06c345e
4 changed files with 35 additions and 0 deletions
|
@ -574,6 +574,7 @@ void dump_selector(StringBuilder& builder, CSS::Selector const& selector)
|
|||
builder.join(',', pseudo_class.languages);
|
||||
builder.append(')');
|
||||
} else if (pseudo_class.type == CSS::Selector::SimpleSelector::PseudoClass::Type::Not
|
||||
|| pseudo_class.type == CSS::Selector::SimpleSelector::PseudoClass::Type::Host
|
||||
|| pseudo_class.type == CSS::Selector::SimpleSelector::PseudoClass::Type::Is
|
||||
|| pseudo_class.type == CSS::Selector::SimpleSelector::PseudoClass::Type::Where) {
|
||||
builder.append("(["sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue