瀏覽代碼

LibWeb: Make invalidate_style() set child-needs-update on shadow hosts

Andreas Kling 3 年之前
父節點
當前提交
b4bda4cdf3
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Libraries/LibWeb/DOM/Node.cpp

+ 1 - 0
Userland/Libraries/LibWeb/DOM/Node.cpp

@@ -181,6 +181,7 @@ void Node::invalidate_style()
         if (node.has_children())
             node.m_child_needs_style_update = true;
         if (auto* shadow_root = node.is_element() ? static_cast<DOM::Element&>(node).shadow_root() : nullptr) {
+            node.m_child_needs_style_update = true;
             shadow_root->m_needs_style_update = true;
             if (shadow_root->has_children())
                 shadow_root->m_child_needs_style_update = true;