diff options
author | Luke Wilde <lukew@serenityos.org> | 2023-03-29 23:48:40 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-06 11:36:56 +0200 |
commit | a744ae79ff6db5dee5287127e5ac15471f3e955d (patch) | |
tree | 41942a40555b7bbdbe3ed0fc0872bed6ba44a8c7 /Userland/Libraries/LibWeb/CSS/Selector.h | |
parent | 6ebdb9f824dc772b43cbb1a148dd681c63e69fb4 (diff) | |
download | serenity-a744ae79ff6db5dee5287127e5ac15471f3e955d.zip |
LibWeb: Implement the `:defined` pseudo class
This selects an element if it is either a built-in element, or an
upgraded custom element.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Selector.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Selector.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Selector.h b/Userland/Libraries/LibWeb/CSS/Selector.h index eef67017ee..bd20ad111f 100644 --- a/Userland/Libraries/LibWeb/CSS/Selector.h +++ b/Userland/Libraries/LibWeb/CSS/Selector.h @@ -112,6 +112,7 @@ public: Active, Lang, Scope, + Defined, }; Type type; @@ -295,6 +296,8 @@ constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Ty return "lang"sv; case Selector::SimpleSelector::PseudoClass::Type::Scope: return "scope"sv; + case Selector::SimpleSelector::PseudoClass::Type::Defined: + return "defined"sv; } VERIFY_NOT_REACHED(); } |