mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user