mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:57:35 +00:00
LibWeb: Convert uppercase selector tag names to lowercase internally
This is necessary for some older content to work correctly. There's probably a nicer (and correct-er) way to do this. Deferring to the new CSS parser.
This commit is contained in:
parent
fd32f24753
commit
38d6cc8598
1 changed files with 8 additions and 1 deletions
|
@ -510,10 +510,17 @@ public:
|
||||||
PARSE_ASSERT(!buffer.is_null());
|
PARSE_ASSERT(!buffer.is_null());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto value = String::copy(buffer);
|
||||||
|
|
||||||
|
if (type == Selector::SimpleSelector::Type::TagName) {
|
||||||
|
// Some stylesheets use uppercase tag names, so here's a hack to just lowercase them internally.
|
||||||
|
value = value.to_lowercase();
|
||||||
|
}
|
||||||
|
|
||||||
Selector::SimpleSelector simple_selector {
|
Selector::SimpleSelector simple_selector {
|
||||||
type,
|
type,
|
||||||
Selector::SimpleSelector::PseudoClass::None,
|
Selector::SimpleSelector::PseudoClass::None,
|
||||||
String::copy(buffer),
|
value,
|
||||||
Selector::SimpleSelector::AttributeMatchType::None,
|
Selector::SimpleSelector::AttributeMatchType::None,
|
||||||
String(),
|
String(),
|
||||||
String()
|
String()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue