mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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:
parent
78d6e2db8c
commit
e30709fca9
Notes:
sideshowbarker
2024-07-16 23:54:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e30709fca9 Pull-request: https://github.com/SerenityOS/serenity/pull/19081
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue