mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibWeb: Allow to early break from InvalidationSet::for_each_property()
This commit is contained in:
parent
3295ed17ea
commit
74dc335b28
Notes:
github-actions[bot]
2025-01-29 08:31:36 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 74dc335b28
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3391
4 changed files with 22 additions and 9 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue