1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

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
parent fdb647c097
commit 5d941ddf3a

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