Bug 1083104 - Fix misuse of physical instead of logical dimension for line breaking. r=smontagu

This commit is contained in:
Jonathan Kew 2014-10-16 09:40:20 +01:00
parent fbb57fda5c
commit ea15935169

View File

@ -313,8 +313,8 @@ nsLineLayout::UpdateBand(const nsRect& aNewAvailSpace,
#ifdef NOISY_REFLOW
nsFrame::ListTag(stdout, mBlockReflowState->frame);
printf(": UpdateBand: %d,%d,%d,%d deltaISize=%d deltaICoord=%d\n",
aNewAvailSpace.x, aNewAvailSpace.y,
aNewAvailSpace.width, aNewAvailSpace.height, deltaISize, deltaICoord);
aNewAvailSpace.IStart(lineWM), aNewAvailSpace.BStart(lineWM),
aNewAvailSpace.ISize(lineWM), aNewAvailSpace.BSize(lineWM), deltaISize, deltaICoord);
#endif
// Update the root span position
@ -795,8 +795,9 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
nsHTMLReflowState& reflowState = *reflowStateHolder;
reflowState.mLineLayout = this;
reflowState.mFlags.mIsTopOfPage = mIsTopOfPage;
if (reflowState.ComputedWidth() == NS_UNCONSTRAINEDSIZE)
reflowState.AvailableWidth() = availableSpaceOnLine;
if (reflowState.ComputedISize() == NS_UNCONSTRAINEDSIZE) {
reflowState.AvailableISize() = availableSpaceOnLine;
}
WritingMode stateWM = reflowState.GetWritingMode();
pfd->mMargin =
reflowState.ComputedLogicalMargin().ConvertTo(frameWM, stateWM);