Bug 1177614 - Provide a utility method on nsHTMLReflowState to return the computed size including border-padding, for use as a container for logical coordinate conversions, or zero if unconstrained. r=dholbert

This commit is contained in:
Jonathan Kew
2015-07-16 10:07:46 +01:00
parent 60de05da69
commit f5df4578f3
7 changed files with 28 additions and 45 deletions

View File

@@ -1266,8 +1266,7 @@ nsHTMLReflowState::CalculateHypotheticalBox(nsPresContext* aPresContext,
// relatively positioned...
WritingMode cbwm = cbrs->GetWritingMode();
nscoord containerWidth = containingBlock->GetStateBits() & NS_FRAME_IN_REFLOW
? cbrs->ComputedWidth() +
cbrs->ComputedLogicalBorderPadding().LeftRight(cbwm)
? cbrs->ComputedSizeAsContainerIfConstrained().width
: containingBlock->GetSize().width;
LogicalPoint placeholderOffset(wm, aPlaceholderFrame->GetOffsetTo(containingBlock),
containerWidth);