mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:15:07 +00:00
LibWeb: Invalidate layout on BrowsingContext resize
Even if style didn't change, we still need to force a layout, since the initial containing block depends on the viewport size.
This commit is contained in:
parent
6ad8330102
commit
1ac0116688
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -101,6 +101,7 @@ void BrowsingContext::set_viewport_rect(Gfx::IntRect 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();
|
||||
}
|
||||
did_change = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue