From ba6a9318c37e8d4e60d86e84524ed817064270f6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 29 Oct 2022 13:16:32 +0200 Subject: [PATCH] LibWeb: Don't update style/layout in template contents owner documents These helper documents don't actually get rendered, so computing style and doing layout for them is a complete waste of work. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 91e6a333b5..865bf0338f 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -809,6 +809,10 @@ void Document::update_layout() if (!m_needs_layout && m_layout_root) return; + // NOTE: If this is a document hosting