Bug 1151993 - Apply shrink-wrapping to block frames that are orthogonal to their containing block. r=smontagu

This commit is contained in:
Jonathan Kew 2015-04-07 19:56:58 +01:00
Родитель 5da8fb24f9
Коммит e54c9bd678
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -2164,11 +2164,14 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext,
// Make sure legend frames with display:block and width:auto still
// shrink-wrap.
// Also shrink-wrap blocks that are orthogonal to their container.
if (isBlock &&
((aFrameType == nsGkAtoms::legendFrame &&
frame->StyleContext()->GetPseudo() != nsCSSAnonBoxes::scrolledContent) ||
(aFrameType == nsGkAtoms::scrollFrame &&
frame->GetContentInsertionFrame()->GetType() == nsGkAtoms::legendFrame))) {
frame->GetContentInsertionFrame()->GetType() == nsGkAtoms::legendFrame) ||
(mCBReflowState &&
mCBReflowState->GetWritingMode().IsOrthogonalTo(mWritingMode)))) {
computeSizeFlags =
ComputeSizeFlags(computeSizeFlags | ComputeSizeFlags::eShrinkWrap);
}