mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
LibWeb: Build stacking context tree lazily
There's no actual need to build the stacking context tree before performing layout. Instead, make it lazy and build the tree when it's actually needed for something. This avoids a bunch of work in situations where multiple synchronous layouts are forced (typically by JavaScript) without painting or hit testing taking place in between. It also opens up for style invalidations that only target the stacking context tree.
This commit is contained in:
parent
89086c337c
commit
59afdb959f
5 changed files with 23 additions and 8 deletions
|
@ -24,11 +24,11 @@ public:
|
|||
void set_selection(const LayoutRange&);
|
||||
void set_selection_end(const LayoutPosition&);
|
||||
|
||||
void build_stacking_context_tree();
|
||||
|
||||
void build_stacking_context_tree_if_needed();
|
||||
void recompute_selection_states();
|
||||
|
||||
private:
|
||||
void build_stacking_context_tree();
|
||||
virtual bool is_initial_containing_block_box() const override { return true; }
|
||||
|
||||
LayoutRange m_selection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue