diff --git a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp index 115b7b10ac6..775877c304a 100644 --- a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp +++ b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp @@ -1,11 +1,12 @@ /* - * Copyright (c) 2022-2023, Andreas Kling + * Copyright (c) 2022-2024, Andreas Kling * Copyright (c) 2024, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #include +#include #include #include #include @@ -209,6 +210,10 @@ void LayoutState::commit(Box& root) node.set_paintable(nullptr); return IterationDecision::Continue; }); + root.document().for_each_shadow_including_inclusive_descendant([&](DOM::Node& node) { + node.set_paintable(nullptr); + return IterationDecision::Continue; + }); HashTable text_nodes;