diff options
author | Srikavin Ramkumar <srikavinramkumar@gmail.com> | 2023-03-20 04:33:22 -0400 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-03-20 10:15:58 +0000 |
commit | aad4051885c68b1ae353fe29a917732863e9fd94 (patch) | |
tree | b09f877f3ceadc63ae5ccbbbd1649ceceb958d70 /Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp | |
parent | df30fd623207101123e850221086232fb3c2c000 (diff) | |
download | serenity-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.cpp | 6 |
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; } |