Bug 1163238 - Don't set available block-size to unconstrained for orthogonal-block reflow state until after InitConstraints etc. r=dholbert

This commit is contained in:
Jonathan Kew 2015-06-03 11:17:24 +01:00
parent d27ca37fce
commit 0dce4f8719

View File

@ -359,13 +359,6 @@ nsHTMLReflowState::Init(nsPresContext* aPresContext,
"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();
@ -439,6 +432,13 @@ nsHTMLReflowState::Init(nsPresContext* aPresContext,
}
}
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 ||