From 0324144e2ad1d402218cf5a0f10aa5c3b04394c7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 29 Jan 2021 22:03:04 +0100 Subject: LibWeb: Update the ICB's idea of the viewport rect after Frame resize This makes animations start if they are uncovered by a resize. --- Userland/Libraries/LibWeb/Page/Frame.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb') 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) -- cgit v1.2.3