diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-11-24 15:11:59 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-24 22:57:46 +0100 |
commit | 7d5c62627647ceb3cd42f76ab43a1a21bfe0a049 (patch) | |
tree | 9a8147528ac3cd92bbef51fbb1f96147a07df04b /Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | |
parent | b03dac99a53483b04304e9a70ff849708091aec7 (diff) | |
download | serenity-7d5c62627647ceb3cd42f76ab43a1a21bfe0a049.zip |
LibWeb: Add <general-enclosed> support to Media Queries
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/MediaQuery.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp index a22e93a11d..225af000d9 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp @@ -106,6 +106,9 @@ String MediaQuery::MediaCondition::to_string() const case Type::Or: builder.join(" or ", conditions); break; + case Type::GeneralEnclosed: + builder.append(general_enclosed->to_string()); + break; } builder.append(')'); return builder.to_string(); @@ -122,6 +125,8 @@ MatchResult MediaQuery::MediaCondition::evaluate(DOM::Window const& window) cons return evaluate_and(conditions, [&](auto& child) { return child.evaluate(window); }); case Type::Or: return evaluate_or(conditions, [&](auto& child) { return child.evaluate(window); }); + case Type::GeneralEnclosed: + return general_enclosed->evaluate(); } VERIFY_NOT_REACHED(); } |