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:
parent
78d6e2db8c
commit
e30709fca9
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
Add a link
Reference in a new issue