Bug 1163238 - Don't set available block-size to unconstrained for orthogonal-block reflow state until after InitConstraints etc. r=dholbert
authorJonathan Kew <jkew@mozilla.com>
Wed, 03 Jun 2015 11:17:24 +0100
changeset 246979 272c05b16d7654a14c3bce4bf85381a58e4d7555
parent 246978 ad8d961bafef3aea8a29db045c273cb801a9a786
child 246980 3cbe1f9d3557576631ee67de686e57ea6d581403
push id28848
push userryanvm@gmail.com
push dateWed, 03 Jun 2015 20:00:13 +0000
treeherdermozilla-central@0920f2325a6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1163238
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1163238 - Don't set available block-size to unconstrained for orthogonal-block reflow state until after InitConstraints etc. r=dholbert
layout/generic/nsHTMLReflowState.cpp
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -354,23 +354,16 @@ nsHTMLReflowState::Init(nsPresContext* a
     }
   }
 
   NS_WARN_IF_FALSE(AvailableISize() != NS_UNCONSTRAINEDSIZE,
                    "have unconstrained inline-size; this should only result from "
                    "very large sizes, not attempts at intrinsic inline-size "
                    "calculation");
 
-  if (AvailableBSize() != NS_UNCONSTRAINEDSIZE && parentReflowState &&
-      parentReflowState->GetWritingMode().IsOrthogonalTo(mWritingMode)) {
-    // Orthogonal frames are always reflowed with unconstrained block-size,
-    // to avoid incomplete reflow across an orthogonal boundary.
-    AvailableBSize() = NS_UNCONSTRAINEDSIZE;
-  }
-
   mStylePosition = frame->StylePosition();
   mStyleDisplay = frame->StyleDisplay();
   mStyleVisibility = frame->StyleVisibility();
   mStyleBorder = frame->StyleBorder();
   mStyleMargin = frame->StyleMargin();
   mStylePadding = frame->StylePadding();
   mStyleText = frame->StyleText();
 
@@ -434,16 +427,23 @@ nsHTMLReflowState::Init(nsPresContext* a
           break;
         }
       }
     } else {
       frame->RemoveStateBits(NS_FRAME_IN_CONSTRAINED_BSIZE);
     }
   }
 
+  if (AvailableBSize() != NS_UNCONSTRAINEDSIZE && parentReflowState &&
+      parentReflowState->GetWritingMode().IsOrthogonalTo(mWritingMode)) {
+    // Orthogonal frames are always reflowed with unconstrained block-size,
+    // to avoid incomplete reflow across an orthogonal boundary.
+    AvailableBSize() = NS_UNCONSTRAINEDSIZE;
+  }
+
   NS_WARN_IF_FALSE((mFrameType == NS_CSS_FRAME_TYPE_INLINE &&
                     !frame->IsFrameOfType(nsIFrame::eReplaced)) ||
                    type == nsGkAtoms::textFrame ||
                    ComputedISize() != NS_UNCONSTRAINEDSIZE,
                    "have unconstrained inline-size; this should only result from "
                    "very large sizes, not attempts at intrinsic inline-size "
                    "calculation");
 }