summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-10-29 13:09:42 +0200
committerAndreas Kling <kling@serenityos.org>2022-10-29 15:16:57 +0200
commitba5e511dc1dbcff2942fed9f9bd26f0f48167969 (patch)
treea6314adcead9a3031a4a27231b6f316d0b5561d3 /Userland/Libraries/LibWeb/DOM
parentc7489e7665a129637d2f8e7bd6e936e15dbafab3 (diff)
downloadserenity-ba5e511dc1dbcff2942fed9f9bd26f0f48167969.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp2
1 files changed, 1 insertions, 1 deletions
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