From 94d54069f482479ba5a8f414c4d55d7732ebd63a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 5 Aug 2022 12:24:36 +0200 Subject: LibWeb: Don't paint non-visible frames This fixes an issue where iframes hidden with CSS `visibility: none` would still be visible. --- Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp index 11da2020b0..42043452a1 100644 --- a/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp @@ -30,6 +30,9 @@ Layout::FrameBox const& NestedBrowsingContextPaintable::layout_box() const void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase phase) const { + if (!layout_box().is_visible()) + return; + PaintableBox::paint(context, phase); if (phase == PaintPhase::Foreground) { -- cgit v1.2.3