Procházet zdrojové kódy

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.
Andreas Kling před 3 roky
rodič
revize
82672da331
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Userland/Libraries/LibWeb/DOM/Document.cpp

+ 1 - 1
Userland/Libraries/LibWeb/DOM/Document.cpp

@@ -459,7 +459,7 @@ static void update_style_recursively(DOM::Node& node)
 
 
     if (node.child_needs_style_update()) {
     if (node.child_needs_style_update()) {
         node.for_each_child([&](auto& child) {
         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);
                 update_style_recursively(child);
             return IterationDecision::Continue;
             return IterationDecision::Continue;
         });
         });