mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibWeb/CSS: Treat at-rule names insensitively to determine context type
`@MeDiA` is entirely valid.
This commit is contained in:
parent
101f6b1d7e
commit
aa9fa88428
Notes:
github-actions[bot]
2025-05-16 10:02:41 +00:00
Author: https://github.com/AtkinsSJ
Commit: aa9fa88428
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4746
1 changed files with 7 additions and 7 deletions
|
@ -42,19 +42,19 @@ RuleContext rule_context_type_for_rule(CSSRule::Type rule_type)
|
|||
|
||||
RuleContext rule_context_type_for_at_rule(FlyString const& name)
|
||||
{
|
||||
if (name == "media")
|
||||
if (name.equals_ignoring_ascii_case("media"sv))
|
||||
return RuleContext::AtMedia;
|
||||
if (name == "font-face")
|
||||
if (name.equals_ignoring_ascii_case("font-face"sv))
|
||||
return RuleContext::AtFontFace;
|
||||
if (name == "keyframes")
|
||||
if (name.equals_ignoring_ascii_case("keyframes"sv))
|
||||
return RuleContext::AtKeyframes;
|
||||
if (name == "supports")
|
||||
if (name.equals_ignoring_ascii_case("supports"sv))
|
||||
return RuleContext::AtSupports;
|
||||
if (name == "layer")
|
||||
if (name.equals_ignoring_ascii_case("layer"sv))
|
||||
return RuleContext::AtLayer;
|
||||
if (name == "property")
|
||||
if (name.equals_ignoring_ascii_case("property"sv))
|
||||
return RuleContext::AtProperty;
|
||||
if (name == "page")
|
||||
if (name.equals_ignoring_ascii_case("page"sv))
|
||||
return RuleContext::AtPage;
|
||||
return RuleContext::Unknown;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue