mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1144501 - Take account of orthogonal writing modes when adjusting available size to reflow a child frame. r=smontagu
This commit is contained in:
parent
21b7ceb7e9
commit
a97792aed1
@ -245,10 +245,16 @@ 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 (NS_UNCONSTRAINEDSIZE != aFrameRS.AvailableBSize()) {
|
||||
aFrameRS.AvailableBSize() -= mBStartMargin.get() + aClearance;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user