diff options
author | Luke Wilde <lukew@serenityos.org> | 2022-11-05 15:17:33 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-11-07 14:10:41 +0100 |
commit | 1fbad9caaf07401e3206cd8c355721952bdbfbce (patch) | |
tree | 00e7641e9f8d82764d4c5f99a0e7503d7f42e347 /Userland/Libraries/LibWeb/CSS | |
parent | dfad2d4c13d62d5221f8792ec7ca14a2378a0b17 (diff) | |
download | serenity-1fbad9caaf07401e3206cd8c355721952bdbfbce.zip |
LibWeb: Recognise the ::placeholder pseudo element
This doesn't give it any functionality.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Selector.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Selector.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Selector.cpp b/Userland/Libraries/LibWeb/CSS/Selector.cpp index ca10a764ef..02e3656a30 100644 --- a/Userland/Libraries/LibWeb/CSS/Selector.cpp +++ b/Userland/Libraries/LibWeb/CSS/Selector.cpp @@ -356,6 +356,8 @@ Optional<Selector::PseudoElement> pseudo_element_from_string(StringView name) return Selector::PseudoElement::ProgressBar; } else if (name.equals_ignoring_case("-webkit-progress-value"sv)) { return Selector::PseudoElement::ProgressValue; + } else if (name.equals_ignoring_case("placeholder"sv)) { + return Selector::PseudoElement::Placeholder; } return {}; } diff --git a/Userland/Libraries/LibWeb/CSS/Selector.h b/Userland/Libraries/LibWeb/CSS/Selector.h index 14ebcdadca..81f65191f5 100644 --- a/Userland/Libraries/LibWeb/CSS/Selector.h +++ b/Userland/Libraries/LibWeb/CSS/Selector.h @@ -27,7 +27,8 @@ public: FirstLetter, Marker, ProgressValue, - ProgressBar + ProgressBar, + Placeholder, }; static auto constexpr PseudoElementCount = to_underlying(PseudoElement::ProgressBar) + 1; @@ -224,6 +225,8 @@ constexpr StringView pseudo_element_name(Selector::PseudoElement pseudo_element) return "-webkit-progress-bar"sv; case Selector::PseudoElement::ProgressValue: return "-webkit-progress-value"sv; + case Selector::PseudoElement::Placeholder: + return "placeholder"sv; } VERIFY_NOT_REACHED(); } |