From ba5e511dc1dbcff2942fed9f9bd26f0f48167969 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 29 Oct 2022 13:09:42 +0200 Subject: [PATCH] LibWeb: Make layout-after-resize lazy (because why not) There's no need to force a synchronous relayout after the viewport has been resized. By making it lazy, we might be able to coalesce it with other layout work. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index ac1d9ea8ed..91e6a333b5 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1694,7 +1694,7 @@ void Document::run_the_resize_steps() window().dispatch_event(*DOM::Event::create(realm(), UIEvents::EventNames::resize)); - update_layout(); + schedule_layout_update(); } // https://w3c.github.io/csswg-drafts/cssom-view-1/#document-run-the-scroll-steps