summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-29 22:03:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-29 22:03:04 +0100
commit0324144e2ad1d402218cf5a0f10aa5c3b04394c7 (patch)
tree1663d8b876baece3c412914a62349ddc80f6b49a /Userland/Libraries/LibWeb
parent40de84ba67ca79d18859a7530993e34bef878907 (diff)
downloadserenity-0324144e2ad1d402218cf5a0f10aa5c3b04394c7.zip
LibWeb: Update the ICB's idea of the viewport rect after Frame resize
This makes animations start if they are uncovered by a resize.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Page/Frame.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Page/Frame.cpp b/Userland/Libraries/LibWeb/Page/Frame.cpp
index 8866fea7ef..2b8d5ddb63 100644
--- a/Userland/Libraries/LibWeb/Page/Frame.cpp
+++ b/Userland/Libraries/LibWeb/Page/Frame.cpp
@@ -110,8 +110,11 @@ void Frame::set_size(const Gfx::IntSize& size)
if (m_size == size)
return;
m_size = size;
- if (m_document)
+ if (m_document) {
m_document->update_layout();
+ if (m_document->layout_node())
+ m_document->layout_node()->did_set_viewport_rect({}, viewport_rect());
+ }
}
void Frame::set_viewport_scroll_offset(const Gfx::IntPoint& offset)