Bug 1144501 - Take account of orthogonal writing modes when adjusting available size to reflow a child frame. r=smontagu

This commit is contained in:
Jonathan Kew 2015-04-07 15:35:30 +01:00
Родитель 21b7ceb7e9
Коммит a97792aed1
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -245,12 +245,18 @@ nsBlockReflowContext::ReflowBlock(const LogicalRect& aSpace,
printf(" margin => %d, clearance => %d\n", mBStartMargin.get(), aClearance);
#endif
// Adjust the available block size if it's constrained so that the
// Adjust the available size if it's constrained so that the
// child frame doesn't think it can reflow into its margin area.
if (mWritingMode.IsOrthogonalTo(mFrame->GetWritingMode())) {
if (NS_UNCONSTRAINEDSIZE != aFrameRS.AvailableISize()) {
aFrameRS.AvailableISize() -= mBStartMargin.get() + aClearance;
}
} else {
if (NS_UNCONSTRAINEDSIZE != aFrameRS.AvailableBSize()) {
aFrameRS.AvailableBSize() -= mBStartMargin.get() + aClearance;
}
}
}
nscoord tI = 0, tB = 0;
// The values of x and y do not matter for floats, so don't bother