mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Fix serialization of selectors with universal subject (*)
For seletors whose subject is unversal (i.e selectors that end in "*") we were not serializing the asterisk. Instead "foo bar *" came out as "foo bar foo". This patch fixes that by correctly serializing the last simple selector if it's universal.
This commit is contained in:
parent
8fbe96af45
commit
13c253d2ee
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ String Selector::serialize() const
|
|||
// 1. If there is only one simple selector in the compound selectors which is a universal selector, append the result of serializing the universal selector to s.
|
||||
if (compound_selector.simple_selectors.size() == 1
|
||||
&& compound_selector.simple_selectors.first().type == Selector::SimpleSelector::Type::Universal) {
|
||||
s.append(compound_selectors().first().simple_selectors.first().serialize());
|
||||
s.append(compound_selector.simple_selectors.first().serialize());
|
||||
}
|
||||
// 2. Otherwise, for each simple selector in the compound selectors...
|
||||
// FIXME: ...that is not a universal selector of which the namespace prefix maps to a namespace that is not the default namespace...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue