diff options
author | Linus Groh <mail@linusgroh.de> | 2020-05-13 22:17:29 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-14 08:49:51 +0200 |
commit | 2f29e6120389a0752e26d4033d64fbd76bcc88c9 (patch) | |
tree | 0c84f6b1d5f62ee40d6569f12c0b3d8fef04e949 /Libraries | |
parent | 31c178b9b5378732d2ee22b524f071c4d555ddbd (diff) | |
download | serenity-2f29e6120389a0752e26d4033d64fbd76bcc88c9.zip |
LibWeb: Make CSS pseudo classes case-insensitive
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/Parser/CSSParser.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Libraries/LibWeb/Parser/CSSParser.cpp b/Libraries/LibWeb/Parser/CSSParser.cpp index 7820209ae7..5af4284381 100644 --- a/Libraries/LibWeb/Parser/CSSParser.cpp +++ b/Libraries/LibWeb/Parser/CSSParser.cpp @@ -400,19 +400,19 @@ public: if (is_pseudo_element) return {}; - if (pseudo_name == "link") + if (pseudo_name.equals_ignoring_case("link")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::Link; - else if (pseudo_name == "hover") + else if (pseudo_name.equals_ignoring_case("hover")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::Hover; - else if (pseudo_name == "focus") + else if (pseudo_name.equals_ignoring_case("focus")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::Focus; - else if (pseudo_name == "first-child") + else if (pseudo_name.equals_ignoring_case("first-child")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::FirstChild; - else if (pseudo_name == "last-child") + else if (pseudo_name.equals_ignoring_case("last-child")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::LastChild; - else if (pseudo_name == "only-child") + else if (pseudo_name.equals_ignoring_case("only-child")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::OnlyChild; - else if (pseudo_name == "empty") + else if (pseudo_name.equals_ignoring_case("empty")) simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::Empty; } |