diff options
author | Andreas Kling <kling@serenityos.org> | 2023-05-27 09:56:00 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-27 11:43:56 +0200 |
commit | e30709fca91715622a613fd5f1d998b760d441df (patch) | |
tree | 621a36f2ecd4130f1f372ce6bcc8b666d671db51 | |
parent | 78d6e2db8c77301ed200315c9d2333b7916593d9 (diff) | |
download | serenity-e30709fca91715622a613fd5f1d998b760d441df.zip |
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.
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index d0f6122ce2..f5ac8a6b78 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -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) |