From 5d941ddf3a78e135cb26c6c682c9fdf64cf43773 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 14 Mar 2022 12:52:27 +0100 Subject: [PATCH] LibWeb: Make style invalidation cross shadow boundaries Before this change, style invalidation didn't propagate upwards across shadow boundaries, so our shadow trees were sitting there with invalid style, never actually getting updated. --- Userland/Libraries/LibWeb/DOM/Node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index 5f65d4a29a..84c80187b8 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -616,7 +616,7 @@ void Node::set_needs_style_update(bool value) m_needs_style_update = value; if (m_needs_style_update) { - for (auto* ancestor = parent(); ancestor; ancestor = ancestor->parent()) { + for (auto* ancestor = parent_or_shadow_host(); ancestor; ancestor = ancestor->parent_or_shadow_host()) { ancestor->m_child_needs_style_update = true; } document().schedule_style_update();