Bug 1369321. Make sure to restyle from all our style roots when rebuilding all style data with stylo. r?bholley draft
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 21 Jun 2017 15:52:56 -0400
changeset 598537 cbe8ec02afef41251ecf2ddc365e726728274385
parent 598474 e990953fc64ff000727cdfb0cebec79081fca9eb
child 598696 418ce459b32bd0313878567b5d1b2db33afd7308
push id65229
push userbzbarsky@mozilla.com
push dateWed, 21 Jun 2017 19:53:16 +0000
reviewersbholley
bugs1369321
milestone56.0a1
Bug 1369321. Make sure to restyle from all our style roots when rebuilding all style data with stylo. r?bholley MozReview-Commit-ID: 5pghPVb2UY1
layout/base/ServoRestyleManager.cpp
layout/reftests/border-dotted/reftest.list
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -116,17 +116,18 @@ ServoRestyleManager::RebuildAllStyleData
 }
 
 void
 ServoRestyleManager::PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
                                                   nsRestyleHint aRestyleHint)
 {
   StyleSet()->ClearDataAndMarkDeviceDirty();
 
-  if (Element* root = mPresContext->Document()->GetRootElement()) {
+  DocumentStyleRootIterator iter(mPresContext->Document());
+  while (Element* root = iter.GetNextStyleRoot()) {
     PostRestyleEvent(root, aRestyleHint, aExtraHint);
   }
 
   // TODO(emilio, bz): Extensions can add/remove stylesheets that can affect
   // non-inheriting anon boxes. It's not clear if we want to support that, but
   // if we do, we need to re-selector-match them here.
 }
 
--- a/layout/reftests/border-dotted/reftest.list
+++ b/layout/reftests/border-dotted/reftest.list
@@ -4,10 +4,10 @@
 # so difference less than 80 is ignorable.
 fuzzy(80,1500) == border-dotted-interaction.html masked.html
 fuzzy(80,1500) == border-dotted-no-radius.html masked.html
 fuzzy(80,1500) == border-dotted-radius.html masked.html
 fuzzy(80,1500) == border-dashed-no-radius.html masked.html
 fuzzy(80,1500) == border-dashed-radius.html masked.html
 fuzzy(80,1500) == border-mixed.html masked.html
 fuzzy(80,1500) == border-dashed-non-integer.html masked.html
-fuzzy(80,1500) fails-if(styloVsGecko) == border-dashed-radius-zoom.html masked-zoom.html
+fuzzy(80,1500) == border-dashed-radius-zoom.html masked-zoom.html
 fuzzy(80,1500) == border-dotted-radius-zero.html masked-small.html