Bug 1292930: stylo: Fix handling of eRestyle_LaterSiblings when not combined with other change hints. draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Fri, 05 Aug 2016 11:55:19 -0700
changeset 397583 e2108f717e1b79119c9bc589caf89460242c1243
parent 397582 f901a82f8ab187f5de008ab4561aee9c423d1edb
child 397584 be4844137e9327d84179481baf63cdedad0d0861
child 397591 b151ff1f8a825f66d45017d6dd7a06eb7a257c3b
push id25335
push userbmo:ealvarez@mozilla.com
push dateSat, 06 Aug 2016 21:57:52 +0000
bugs1292930
milestone51.0a1
Bug 1292930: stylo: Fix handling of eRestyle_LaterSiblings when not combined with other change hints. MozReview-Commit-ID: AeLLm64d5aP
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -185,17 +185,18 @@ ServoRestyleManager::NoteRestyleHint(Ele
   // selector matching on all the descendants. There's a bug on Servo to align
   // meanings here (#12710) to avoid this potential source of confusion.
   } else if (aHint & eRestyle_SomeDescendants) {
     MarkChildrenAsDirtyForServo(aElement);
     MarkParentsAsHavingDirtyDescendants(aElement);
   }
 
   if (aHint & eRestyle_LaterSiblings) {
-    for (nsINode* cur = aElement->GetNextSibling(); cur;
+    MarkParentsAsHavingDirtyDescendants(aElement);
+    for (nsIContent* cur = aElement->GetNextSibling(); cur;
          cur = cur->GetNextSibling()) {
       cur->SetIsDirtyForServo();
     }
   }
 
   // TODO: Handle all other nsRestyleHint values.
   if (aHint & ~HANDLED_RESTYLE_HINTS) {
     NS_WARNING(nsPrintfCString("stylo: Unhandled restyle hint %s",