mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1173689: allow column sets in an orthogonal writing mode to their container to expand in the container's block direction, r=roc
This commit is contained in:
parent
78ffa8b527
commit
fd24391154
@ -1050,8 +1050,14 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
//------------ Handle Incremental Reflow -----------------
|
||||
|
||||
ReflowConfig config = ChooseColumnStrategy(aReflowState);
|
||||
|
||||
// If inline size is unconstrained, set aForceAuto to true to allow
|
||||
// the columns to expand in the inline direction. (This typically
|
||||
// happens in orthogonal flows where the inline direction is the
|
||||
// container's block direction).
|
||||
ReflowConfig config =
|
||||
ChooseColumnStrategy(aReflowState,
|
||||
aReflowState.ComputedISize() == NS_UNCONSTRAINEDSIZE);
|
||||
|
||||
// If balancing, then we allow the last column to grow to unbounded
|
||||
// height during the first reflow. This gives us a way to estimate
|
||||
// what the average column height should be, because we can measure
|
||||
|
@ -440,11 +440,19 @@ nsHTMLReflowState::Init(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
if (AvailableBSize() != NS_UNCONSTRAINEDSIZE && parentReflowState &&
|
||||
if (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;
|
||||
// Orthogonal frames are always reflowed with an unconstrained
|
||||
// dimension to avoid incomplete reflow across an orthogonal
|
||||
// boundary. Normally this is the block-size, but for column sets
|
||||
// with auto-height it's the inline-size, so that they can add
|
||||
// columns in the container's block direction
|
||||
if (type == nsGkAtoms::columnSetFrame &&
|
||||
eStyleUnit_Auto == mStylePosition->ISize(mWritingMode).GetUnit()) {
|
||||
ComputedISize() = NS_UNCONSTRAINEDSIZE;
|
||||
} else {
|
||||
AvailableBSize() = NS_UNCONSTRAINEDSIZE;
|
||||
}
|
||||
}
|
||||
|
||||
LAYOUT_WARN_IF_FALSE((mFrameType == NS_CSS_FRAME_TYPE_INLINE &&
|
||||
|
Loading…
Reference in New Issue
Block a user