summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp
diff options
context:
space:
mode:
authorSrikavin Ramkumar <srikavinramkumar@gmail.com>2023-03-20 04:33:22 -0400
committerSam Atkins <atkinssj@gmail.com>2023-03-20 10:15:58 +0000
commitaad4051885c68b1ae353fe29a917732863e9fd94 (patch)
treeb09f877f3ceadc63ae5ccbbbd1649ceceb958d70 /Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp
parentdf30fd623207101123e850221086232fb3c2c000 (diff)
downloadserenity-aad4051885c68b1ae353fe29a917732863e9fd94.zip
LibWeb: Match selected option elements with checked pseudo-class
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp b/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp
index 1d37450b1a..7ad6d480be 100644
--- a/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp
+++ b/Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp
@@ -89,8 +89,10 @@ static inline bool matches_checked_pseudo_class(DOM::Element const& element)
}
}
- // FIXME: - option elements whose selectedness is true
-
+ // - option elements whose selectedness is true
+ if (is<HTML::HTMLOptionElement>(element)) {
+ return static_cast<HTML::HTMLOptionElement const&>(element).selected();
+ }
return false;
}