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

@@ -944,14 +944,9 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
kidReflowState.SetBResize(true);
}
nscoord containerWidth;
if (aReflowState.ComputedWidth() == NS_UNCONSTRAINEDSIZE) {
containerWidth = 0; // avoid passing unconstrained container width to
// ReflowChild; but position will not be valid
} else {
containerWidth = aReflowState.ComputedWidth() +
aReflowState.ComputedPhysicalBorderPadding().LeftRight();
}
nscoord containerWidth =
aReflowState.ComputedSizeAsContainerIfConstrained().width;
LogicalPoint kidOrigin(wm, borderPadding.IStart(wm),
borderPadding.BStart(wm));
nsRect origRect = firstKid->GetRect();