Bug 1290335: Implement dumb versions of RestyleForAppend and RestyleForInsertOrChange draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Mon, 01 Aug 2016 18:32:39 -0700
changeset 396044 841b2c0393aa1b182d9f604fb60d4fd95106a195
parent 396043 396714b39e9d50c5596b4673b0700da612f5cde3
child 396045 c96097ad8d76c02056208f284091eae2e25b5294
push id24903
push userbmo:ealvarez@mozilla.com
push dateWed, 03 Aug 2016 08:18:07 +0000
bugs1290335
milestone51.0a1
Bug 1290335: Implement dumb versions of RestyleForAppend and RestyleForInsertOrChange This lets us take rid of the delay-layout hack on the stylo branch. MozReview-Commit-ID: 9fqhBCQnfYV
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -271,24 +271,26 @@ ServoRestyleManager::ProcessPendingResty
 
   IncrementRestyleGeneration();
 }
 
 void
 ServoRestyleManager::RestyleForInsertOrChange(Element* aContainer,
                                               nsIContent* aChild)
 {
-  NS_WARNING("stylo: ServoRestyleManager::RestyleForInsertOrChange not implemented");
+  // XXX Emilio we can do way better.
+  PostRestyleEvent(aContainer, eRestyle_Subtree, nsChangeHint(0));
 }
 
 void
 ServoRestyleManager::RestyleForAppend(Element* aContainer,
                                       nsIContent* aFirstNewContent)
 {
-  NS_WARNING("stylo: ServoRestyleManager::RestyleForAppend not implemented");
+  // XXX Emilio we can do way better.
+  PostRestyleEvent(aContainer, eRestyle_Subtree, nsChangeHint(0));
 }
 
 void
 ServoRestyleManager::RestyleForRemove(Element* aContainer,
                                       nsIContent* aOldChild,
                                       nsIContent* aFollowingSibling)
 {
   NS_WARNING("stylo: ServoRestyleManager::RestyleForRemove not implemented");