summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-05 12:24:36 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-05 12:46:42 +0200
commit94d54069f482479ba5a8f414c4d55d7732ebd63a (patch)
treeb1a5d5a41efa04c0a7e221049e5788c0760f3ad1 /Userland
parente2ae286132ba7b9938201f17c41599dc8aca252c (diff)
downloadserenity-94d54069f482479ba5a8f414c4d55d7732ebd63a.zip
LibWeb: Don't paint non-visible frames
This fixes an issue where iframes hidden with CSS `visibility: none` would still be visible.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp3
1 files changed, 3 insertions, 0 deletions
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) {