diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-21 10:56:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-21 13:03:33 +0100 |
commit | 59afdb959ff20ac8516ceb180c68084997538b70 (patch) | |
tree | 6a336f0ec448a24f114bdc9d42e681ae42a801e1 /Userland/Libraries/LibWeb/DOM | |
parent | 89086c337cd249436a5a77340a9c2e2f8b5bd6dc (diff) | |
download | serenity-59afdb959ff20ac8516ceb180c68084997538b70.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index a08584cf67..b7f357c958 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -585,8 +585,6 @@ void Document::update_layout() root_formatting_context.run(*m_layout_root, Layout::LayoutMode::Normal); formatting_state.commit(); - m_layout_root->build_stacking_context_tree(); - browsing_context()->set_needs_display(); if (browsing_context()->is_top_level()) { |