LibWeb: Allow to early break from InvalidationSet::for_each_property()

This commit is contained in:
Aliaksandr Kalenik 2025-01-29 01:45:34 +01:00 committed by Andreas Kling
commit 74dc335b28
Notes: github-actions[bot] 2025-01-29 08:31:36 +00:00
4 changed files with 22 additions and 9 deletions

View file

@ -489,8 +489,11 @@ void Node::invalidate_style(StyleInvalidationReason reason, Vector<CSS::Invalida
auto element_has_properties_from_invalidation_set = [&](Element& element) {
bool result = false;
invalidation_set.for_each_property([&](auto const& property) {
if (element.affected_by_invalidation_property(property))
if (element.affected_by_invalidation_property(property)) {
result = true;
return IterationDecision::Break;
}
return IterationDecision::Continue;
});
return result;
};