Bug 1145218 - Require a new float manager if a block frame has a different writing-mode to its parent's. r=dbaron

This commit is contained in:
Jonathan Kew 2015-04-01 16:43:59 +01:00
parent cdc02315b6
commit 66747eeaae

View File

@ -6645,8 +6645,19 @@ nsBlockFrame::Init(nsIContent* aContent,
nsBlockFrameSuper::Init(aContent, aParent, aPrevInFlow);
if (!aPrevInFlow ||
aPrevInFlow->GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
aPrevInFlow->GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION) {
AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
}
// If a box has a different block flow direction than its containing block:
// ...
// If the box is a block container, then it establishes a new block
// formatting context.
// (http://dev.w3.org/csswg/css-writing-modes/#block-flow)
if (GetParent() && StyleVisibility()->mWritingMode !=
GetParent()->StyleVisibility()->mWritingMode) {
AddStateBits(NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT);
}
if ((GetStateBits() &
(NS_FRAME_FONT_INFLATION_CONTAINER | NS_BLOCK_FLOAT_MGR)) ==