diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-11 12:08:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-11 12:45:38 +0100 |
commit | 5ff816abbf6060f674e65b7deabd212cdced08a6 (patch) | |
tree | c14a88c56dd897ee58b7e809017a442d19cec707 /Userland/Libraries/LibWeb | |
parent | 1aad64fbe4d96ce3d3a7bc57ea5d59ac98f58bcf (diff) | |
download | serenity-5ff816abbf6060f674e65b7deabd212cdced08a6.zip |
LibWeb: Remove unused CascadeOrigin::Any
This was an ad-hoc concept from before we implemented the CSS cascade.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleComputer.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index ae9df126d6..6dfd4783a3 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -57,12 +57,12 @@ static StyleSheet& quirks_mode_stylesheet() template<typename Callback> void StyleComputer::for_each_stylesheet(CascadeOrigin cascade_origin, Callback callback) const { - if (cascade_origin == CascadeOrigin::Any || cascade_origin == CascadeOrigin::UserAgent) { + if (cascade_origin == CascadeOrigin::UserAgent) { callback(default_stylesheet()); if (document().in_quirks_mode()) callback(quirks_mode_stylesheet()); } - if (cascade_origin == CascadeOrigin::Any || cascade_origin == CascadeOrigin::Author) { + if (cascade_origin == CascadeOrigin::Author) { for (auto const& sheet : document().style_sheets().sheets()) { callback(sheet); } diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.h b/Userland/Libraries/LibWeb/CSS/StyleComputer.h index 799dc05be4..f0524093f1 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.h +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.h @@ -64,7 +64,7 @@ public: Transition, }; - Vector<MatchingRule> collect_matching_rules(DOM::Element const&, CascadeOrigin = CascadeOrigin::Any) const; + Vector<MatchingRule> collect_matching_rules(DOM::Element const&, CascadeOrigin) const; void invalidate_rule_cache(); |