mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibHTML: LayoutNode::set_needs_display() needs to invalidate fragments
If a LayoutNode is split into line box fragments, we need to walk our fragments and invalidate them. It was not enough to do this only for LayoutBox nodes.
This commit is contained in:
parent
43a9843938
commit
5c2b21705a
Notes:
sideshowbarker
2024-07-19 11:41:03 +09:00
Author: https://github.com/awesomekling
Commit: 5c2b21705a
2 changed files with 10 additions and 6 deletions
|
@ -76,4 +76,13 @@ void LayoutNode::split_into_lines(LayoutBlock& container)
|
|||
|
||||
void LayoutNode::set_needs_display()
|
||||
{
|
||||
auto* frame = document().frame();
|
||||
ASSERT(frame);
|
||||
|
||||
for_each_fragment_of_this([&](auto& fragment) {
|
||||
if (&fragment.layout_node() == this || is_ancestor_of(fragment.layout_node())) {
|
||||
const_cast<Frame*>(frame)->set_needs_display(fragment.rect());
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue