mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: Use invalidation sets for :defined style invalidation
This commit is contained in:
committed by
Andreas Kling
parent
51a5ebb91d
commit
a6bea99959
@@ -2656,9 +2656,6 @@ void StyleComputer::collect_selector_insights(Selector const& selector, Selector
|
||||
if (simple_selector.pseudo_class().type == PseudoClass::Has) {
|
||||
insights.has_has_selectors = true;
|
||||
}
|
||||
if (simple_selector.pseudo_class().type == PseudoClass::Defined) {
|
||||
insights.has_defined_selectors = true;
|
||||
}
|
||||
for (auto const& argument_selector : simple_selector.pseudo_class().argument_selector_list) {
|
||||
collect_selector_insights(*argument_selector, insights);
|
||||
}
|
||||
@@ -3175,13 +3172,4 @@ bool StyleComputer::may_have_has_selectors() const
|
||||
return m_selector_insights->has_has_selectors;
|
||||
}
|
||||
|
||||
bool StyleComputer::may_have_defined_selectors() const
|
||||
{
|
||||
if (!has_valid_rule_cache())
|
||||
return true;
|
||||
|
||||
build_rule_cache_if_needed();
|
||||
return m_selector_insights->has_defined_selectors;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user