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.
This commit is contained in:
Andreas Kling 2022-03-14 12:52:27 +01:00
commit 5d941ddf3a
Notes: sideshowbarker 2024-07-17 17:21:56 +09:00

View file

@ -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();