mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWeb: Move set_needs_display() from layout node to paintable
For this method, there is no need to go through the layout node when we can directly reach the paintable.
This commit is contained in:
parent
814bed33b4
commit
7c2713c14f
Notes:
sideshowbarker
2024-07-17 00:53:02 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 7c2713c14f
Pull-request: https://github.com/SerenityOS/serenity/pull/22749
Reviewed-by: https://github.com/awesomekling
21 changed files with 97 additions and 87 deletions
|
@ -24,7 +24,8 @@ PaintableFragment::PaintableFragment(Layout::LineBoxFragment const& fragment)
|
|||
CSSPixelRect const PaintableFragment::absolute_rect() const
|
||||
{
|
||||
CSSPixelRect rect { {}, size() };
|
||||
rect.set_location(m_layout_node->containing_block()->paintable_box()->absolute_position());
|
||||
if (m_layout_node->containing_block() && m_layout_node->containing_block()->paintable_box())
|
||||
rect.set_location(m_layout_node->containing_block()->paintable_box()->absolute_position());
|
||||
rect.translate_by(offset());
|
||||
return rect;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue