summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-10 10:38:13 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-11 00:21:49 +0100
commit9f5cbcaad39aa9df43694140613fdd8b3b2fe5b2 (patch)
tree3091144b77cf21e3409d04f2f93f6256538bfc90 /Userland/Libraries/LibWeb/DOM
parentcc8e429126f95aa27c675817f79cbdc8002e18a0 (diff)
downloadserenity-9f5cbcaad39aa9df43694140613fdd8b3b2fe5b2.zip
LibWeb: Hang StackingContext off of the paint boxes
Stacking contexts have nothing to do with layout and everything with painting, so let's keep them in Painting::Box.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 1a5900e831..b71b42c237 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -570,7 +570,6 @@ void Document::update_layout()
Layout::FormattingState formatting_state;
Layout::BlockFormattingContext root_formatting_context(formatting_state, *m_layout_root, nullptr);
- m_layout_root->build_stacking_context_tree();
auto& icb = static_cast<Layout::InitialContainingBlock&>(*m_layout_root);
auto& icb_state = formatting_state.get_mutable(icb);
@@ -583,6 +582,8 @@ void Document::update_layout()
root_formatting_context.run(*m_layout_root, Layout::LayoutMode::Default);
formatting_state.commit();
+ m_layout_root->build_stacking_context_tree();
+
browsing_context()->set_needs_display();
if (browsing_context()->is_top_level()) {