1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibWeb: Don't throw away the layout tree on viewport resize

We'll throw it out automatically if some media query changes changes its
evaluation state in response to the resize, and that should be enough.
This commit is contained in:
Andreas Kling 2023-05-27 09:56:00 +02:00
parent 78d6e2db8c
commit e30709fca9

View file

@ -554,7 +554,7 @@ void BrowsingContext::set_viewport_rect(CSSPixelRect const& rect)
if (auto* document = active_document()) {
// NOTE: Resizing the viewport changes the reference value for viewport-relative CSS lengths.
document->invalidate_style();
document->invalidate_layout();
document->set_needs_layout();
}
did_change = true;
}
@ -582,7 +582,7 @@ void BrowsingContext::set_size(CSSPixelSize size)
if (auto* document = active_document()) {
document->invalidate_style();
document->invalidate_layout();
document->set_needs_layout();
}
for (auto* client : m_viewport_clients)