mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibWeb: Make the paint tree a proper standalone tree
Until now, paint trees have been piggybacking on the layout tree for traversal, and paintables didn't actually have their own parent/child pointers. This patch changes that by making Paintable inherit from TreeNode, and adding a new pass to LayoutState::commit() where we recursively build the new paint tree.
This commit is contained in:
parent
4d4dbacfc3
commit
216bd513fa
5 changed files with 33 additions and 46 deletions
|
@ -1003,7 +1003,7 @@ void Document::update_layout()
|
|||
Layout::AvailableSize::make_definite(viewport_rect.height())));
|
||||
}
|
||||
|
||||
layout_state.commit();
|
||||
layout_state.commit(*m_layout_root);
|
||||
|
||||
// Broadcast the current viewport rect to any new paintables, so they know whether they're visible or not.
|
||||
browsing_context()->inform_all_viewport_clients_about_the_current_viewport_rect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue