From 82672da331a593d10c12ad76324afd0109b23fe4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Oct 2021 17:44:48 +0200 Subject: [PATCH] LibWeb: Style update must recurse into nodes with dirty children It's not enough to only visit nodes which are themselves dirty, we have to also visit those with dirty children. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 6be5e0638e..d218e61ece 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -459,7 +459,7 @@ static void update_style_recursively(DOM::Node& node) if (node.child_needs_style_update()) { node.for_each_child([&](auto& child) { - if (child.needs_style_update()) + if (child.needs_style_update() || child.child_needs_style_update()) update_style_recursively(child); return IterationDecision::Continue; });