Bug 1324661 followup: check our child hint before trying to append it. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 17 Feb 2017 16:36:12 -0500
changeset 372691 abee64d2e5ef553c6df7265b240040a129dd3d99
parent 372690 8bc09da971bfa10290f165b67650c2d688370cc7
child 372692 3f975da9fe342bb87f168fdd3c83dffc5a9ed4b9
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1324661
milestone54.0a1
Bug 1324661 followup: check our child hint before trying to append it. r=bholley MozReview-Commit-ID: 3FIBludwV7j
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -162,18 +162,20 @@ ServoRestyleManager::RecreateStyleContex
       // is actually a _child_ of the primary frame.  In that situation, we want
       // to go ahead and append the changeHint for the _parent_ but also append
       // all the parts of it not handled for descendants for the _child_.
       MOZ_ASSERT(styleFrame, "Or else GetPrimaryFrame() would be null too");
       MOZ_ASSERT(styleFrame->GetParent() == aElement->GetPrimaryFrame(),
                  "How did that happen?");
       aChangeListToProcess.AppendChange(aElement->GetPrimaryFrame(), aElement,
                                         changeHint);
-      aChangeListToProcess.AppendChange(styleFrame, aElement,
-                                        NS_HintsNotHandledForDescendantsIn(changeHint));
+      nsChangeHint childHint = NS_HintsNotHandledForDescendantsIn(changeHint);
+      if (childHint) {
+        aChangeListToProcess.AppendChange(styleFrame, aElement, childHint);
+      }
     } else {
       aChangeListToProcess.AppendChange(styleFrame, aElement, changeHint);
     }
   }
 
   // If our change hint is reconstruct, we delegate to the frame constructor,
   // which consumes the new style and expects the old style to be on the frame.
   //