1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibWeb: Don't force relayout on scheduled layout update

If something else has already caused a layout, there's no need to force
a new relayout when the layout timer fires.

This avoids a lot of redundant work on many pages. :^)
This commit is contained in:
Andreas Kling 2023-05-07 18:43:50 +02:00
parent 50413c2326
commit 222a1b8b95

View file

@ -313,7 +313,7 @@ Document::Document(JS::Realm& realm, const AK::URL& url)
});
m_layout_update_timer = Platform::Timer::create_single_shot(0, [this] {
force_layout();
update_layout();
});
}