Bug 1131451 part 1 - Replace containerWidth with containerSize in logical-coordinate classes and APIs, frame classes, etc. r=dholbert

This commit is contained in:
Jonathan Kew
2015-07-16 10:07:57 +01:00
parent f5df4578f3
commit 7e8bda5a72
46 changed files with 691 additions and 609 deletions

View File

@@ -320,11 +320,12 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
childPos.B(wm) = 0; // This will be set properly later, after reflowing the
// child to determine its size.
// We just pass 0 for containerWidth here, as the child will be repositioned
// later by FinishReflowChild.
// We just pass a dummy containerSize here, as the child will be
// repositioned later by FinishReflowChild.
nsSize dummyContainerSize;
ReflowChild(aFirstKid, aPresContext,
contentsDesiredSize, contentsReflowState,
wm, childPos, 0, 0, contentsReflowStatus);
wm, childPos, dummyContainerSize, 0, contentsReflowStatus);
MOZ_ASSERT(NS_FRAME_IS_COMPLETE(contentsReflowStatus),
"We gave button-contents frame unconstrained available height, "
"so it should be complete");
@@ -373,12 +374,13 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// its focus-padding rect:
childPos.B(wm) += focusPadding.BStart(wm) + clbp.BStart(wm);
nscoord containerWidth = buttonContentBox.Width(wm) + clbp.LeftRight(wm);
nsSize containerSize =
(buttonContentBox + clbp.Size(wm)).GetPhysicalSize(wm);
// Place the child
FinishReflowChild(aFirstKid, aPresContext,
contentsDesiredSize, &contentsReflowState,
wm, childPos, containerWidth, 0);
wm, childPos, containerSize, 0);
// Make sure we have a useful 'ascent' value for the child
if (contentsDesiredSize.BlockStartAscent() ==