mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibWeb: Remove unused MatchingRule::must_be_hovered flag
This was a vestige from an earlier version of hover selector work avoidance optimizations.
This commit is contained in:
parent
60f667fc5a
commit
ed35f9e7c2
Notes:
github-actions[bot]
2025-04-17 17:47:30 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/ed35f9e7c2b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4388
2 changed files with 0 additions and 21 deletions
|
@ -2809,7 +2809,6 @@ void StyleComputer::make_rule_cache_for_cascade_origin(CascadeOrigin cascade_ori
|
|||
selector.specificity(),
|
||||
cascade_origin,
|
||||
false,
|
||||
false,
|
||||
};
|
||||
|
||||
auto const& qualified_layer_name = matching_rule.qualified_layer_name();
|
||||
|
@ -2833,25 +2832,6 @@ void StyleComputer::make_rule_cache_for_cascade_origin(CascadeOrigin cascade_ori
|
|||
contains_root_pseudo_class = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!matching_rule.must_be_hovered) {
|
||||
if (simple_selector.type == CSS::Selector::SimpleSelector::Type::PseudoClass && simple_selector.pseudo_class().type == CSS::PseudoClass::Hover) {
|
||||
matching_rule.must_be_hovered = true;
|
||||
}
|
||||
if (simple_selector.type == CSS::Selector::SimpleSelector::Type::PseudoClass
|
||||
&& (simple_selector.pseudo_class().type == CSS::PseudoClass::Is
|
||||
|| simple_selector.pseudo_class().type == CSS::PseudoClass::Where)) {
|
||||
auto const& argument_selectors = simple_selector.pseudo_class().argument_selector_list;
|
||||
|
||||
if (argument_selectors.size() == 1) {
|
||||
auto const& simple_argument_selector = argument_selectors.first()->compound_selectors().last().simple_selectors.last();
|
||||
if (simple_argument_selector.type == CSS::Selector::SimpleSelector::Type::PseudoClass
|
||||
&& simple_argument_selector.pseudo_class().type == CSS::PseudoClass::Hover) {
|
||||
matching_rule.must_be_hovered = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selector.contains_hover_pseudo_class()) {
|
||||
|
|
|
@ -86,7 +86,6 @@ struct MatchingRule {
|
|||
u32 specificity { 0 };
|
||||
CascadeOrigin cascade_origin;
|
||||
bool contains_pseudo_element { false };
|
||||
bool must_be_hovered { false };
|
||||
|
||||
// Helpers to deal with the fact that `rule` might be a CSSStyleRule or a CSSNestedDeclarations
|
||||
CSSStyleProperties const& declaration() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue