mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 12:49:05 +00:00
LibWeb: Fix invalidation of CSS properties that do not affect layout
Recently, we moved the resolution of CSS properties that do not affect layout to occur within LayoutState::commit(). This decision was a mistake as it breaks invalidation. With this change, we now re-resolve all properties that do not affect layout before each repaint.
This commit is contained in:
parent
955d73657e
commit
1af466babf
Notes:
sideshowbarker
2024-07-17 06:40:35 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 1af466babf
Pull-request: https://github.com/SerenityOS/serenity/pull/23047
11 changed files with 314 additions and 250 deletions
|
@ -88,6 +88,18 @@ public:
|
|||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_inclusive_subtree(Callback callback)
|
||||
{
|
||||
if (auto decision = callback(*this); decision != TraversalDecision::Continue)
|
||||
return decision;
|
||||
for (auto* child = first_child(); child; child = child->next_sibling()) {
|
||||
if (child->for_each_in_inclusive_subtree(callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_inclusive_subtree(Callback callback) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue