From 485ef276bd576aa01f83b006cee84a1367c4b7bc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 20 Mar 2022 16:25:54 +0100 Subject: [PATCH] LibWeb: Invalidate style & layout inside iframes when they change size --- Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 71f34b31d9..53aed5d5f2 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -137,8 +137,10 @@ void BrowsingContext::set_size(Gfx::IntSize const& size) return; m_size = size; - if (auto* document = active_document()) - document->set_needs_layout(); + if (auto* document = active_document()) { + document->invalidate_style(); + document->invalidate_layout(); + } for (auto* client : m_viewport_clients) client->browsing_context_did_set_viewport_rect(viewport_rect());