Bug 1359834 Part 1: Force changes to shape-outside to trigger float reflow, similar to other float changes. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 12 Jul 2017 12:28:29 -0700
changeset 607747 d5b1851c6a13acb9e0cce808b9027856f532ee9c
parent 607746 bba834715820d662d6e71161869554ad489ad0ea
child 607748 80f50d1e8d74a88cfce9c2e32f760fb1e228e795
push id68098
push userbwerth@mozilla.com
push dateWed, 12 Jul 2017 20:16:39 +0000
bugs1359834
milestone56.0a1
Bug 1359834 Part 1: Force changes to shape-outside to trigger float reflow, similar to other float changes. MozReview-Commit-ID: 7EgYZIu7aZ9
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3521,18 +3521,20 @@ nsStyleDisplay::CalcDifference(const nsS
     // |-moz-appearance:textfield| to get a control without a spinner. (The
     // spinner is present for |-moz-appearance:number-input| but also other
     // values such as 'none'.) We need to reframe since we want to use
     // nsTextControlFrame instead of nsNumberControlFrame if the author
     // specifies 'textfield'.
     return nsChangeHint_ReconstructFrame;
   }
 
-  if (mFloat != aNewData.mFloat) {
-    // Changing which side we float on doesn't affect descendants directly
+  if ((mFloat != aNewData.mFloat) ||
+      (!mShapeOutside.DefinitelyEquals(aNewData.mShapeOutside))) {
+    // Changing which side we float on doesn't affect descendants directly.
+    // Shape outside behaves very similarly.
     hint |= nsChangeHint_AllReflowHints &
             ~(nsChangeHint_ClearDescendantIntrinsics |
               nsChangeHint_NeedDirtyReflow);
   }
 
   if (mVerticalAlign != aNewData.mVerticalAlign) {
     // XXX Can this just be AllReflowHints + RepaintFrame, and be included in
     // the block below?
@@ -3687,18 +3689,17 @@ nsStyleDisplay::CalcDifference(const nsS
        mAnimationTimingFunctionCount != aNewData.mAnimationTimingFunctionCount ||
        mAnimationDurationCount != aNewData.mAnimationDurationCount ||
        mAnimationDelayCount != aNewData.mAnimationDelayCount ||
        mAnimationNameCount != aNewData.mAnimationNameCount ||
        mAnimationDirectionCount != aNewData.mAnimationDirectionCount ||
        mAnimationFillModeCount != aNewData.mAnimationFillModeCount ||
        mAnimationPlayStateCount != aNewData.mAnimationPlayStateCount ||
        mAnimationIterationCountCount != aNewData.mAnimationIterationCountCount ||
-       mScrollSnapCoordinate != aNewData.mScrollSnapCoordinate ||
-       !mShapeOutside.DefinitelyEquals(aNewData.mShapeOutside))) {
+       mScrollSnapCoordinate != aNewData.mScrollSnapCoordinate)) {
     hint |= nsChangeHint_NeutralChange;
   }
 
   return hint;
 }
 
 // --------------------
 // nsStyleVisibility