summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Selector.cpp
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-07-22 15:58:52 +0100
committerAndreas Kling <kling@serenityos.org>2022-07-23 01:45:49 +0200
commitb5febe538c7d68fddc51d1e171759f3f5fe8a92d (patch)
treec750424425fe5a0048cbb3ac0f71530f8ce4ee83 /Userland/Libraries/LibWeb/CSS/Selector.cpp
parent218e6d2f5e96be0f0a3003bd31a535e571635463 (diff)
downloadserenity-b5febe538c7d68fddc51d1e171759f3f5fe8a92d.zip
LibWeb: Parse the -webkit-progress-bar/value pseudo elements
These will be needed for styling progress bars, sadly this can only be done with these non-standard selectors. These are, hovever, in use on real sites such as https://rpcs3.net/compatibility.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Selector.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Selector.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Selector.cpp b/Userland/Libraries/LibWeb/CSS/Selector.cpp
index 5788972027..ca10a764ef 100644
--- a/Userland/Libraries/LibWeb/CSS/Selector.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Selector.cpp
@@ -352,6 +352,10 @@ Optional<Selector::PseudoElement> pseudo_element_from_string(StringView name)
return Selector::PseudoElement::FirstLine;
} else if (name.equals_ignoring_case("marker"sv)) {
return Selector::PseudoElement::Marker;
+ } else if (name.equals_ignoring_case("-webkit-progress-bar"sv)) {
+ return Selector::PseudoElement::ProgressBar;
+ } else if (name.equals_ignoring_case("-webkit-progress-value"sv)) {
+ return Selector::PseudoElement::ProgressValue;
}
return {};
}