Bug 1571250 - Convert flags passed to ReflowChild, FinishReflowChild, SyncFrameViewAfterReflow and from GetXULLayoutFlags / GetLayoutFlags into an enum class. r=TYLin

It seems better to convert this before adding a new flag (in bug
1547759) and risking replacing the wrong 0 with a flag.

Differential Revision: https://phabricator.services.mozilla.com/D40562
This commit is contained in:
L. David Baron
2019-08-08 19:48:19 +00:00
parent 8099e49d64
commit 94e5b517b7
51 changed files with 271 additions and 229 deletions

View File

@@ -394,8 +394,8 @@ void nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
nsOverflowAreas ocBounds;
nsReflowStatus ocStatus;
if (GetPrevInFlow()) {
ReflowOverflowContainerChildren(aPresContext, aReflowInput, ocBounds, 0,
ocStatus);
ReflowOverflowContainerChildren(aPresContext, aReflowInput, ocBounds,
ReflowChildFlags::Default, ocStatus);
}
//------------ Handle Incremental Reflow -----------------
@@ -443,8 +443,8 @@ void nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
// and containerSize passed here are unimportant.
const nsSize dummyContainerSize;
ReflowChild(legend, aPresContext, legendDesiredSize, *legendReflowInput, wm,
LogicalPoint(wm), dummyContainerSize, NS_FRAME_NO_MOVE_FRAME,
aStatus);
LogicalPoint(wm), dummyContainerSize,
ReflowChildFlags::NoMoveFrame, aStatus);
#ifdef NOISY_REFLOW
printf(" returned (%d, %d)\n", legendDesiredSize.Width(),
legendDesiredSize.Height());
@@ -483,7 +483,7 @@ void nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
FinishReflowChild(legend, aPresContext, legendDesiredSize,
legendReflowInput.ptr(), wm, LogicalPoint(wm),
dummyContainerSize, NS_FRAME_NO_MOVE_FRAME);
dummyContainerSize, ReflowChildFlags::NoMoveFrame);
} else if (!legend) {
mLegendRect.SetEmpty();
mLegendSpace = 0;
@@ -535,13 +535,13 @@ void nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
// if necessary.
const nsSize dummyContainerSize;
ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowInput, wm, pt,
dummyContainerSize, 0, aStatus);
dummyContainerSize, ReflowChildFlags::Default, aStatus);
// Update containerSize to account for size of the inner frame, so that
// FinishReflowChild can position it correctly.
containerSize += kidDesiredSize.PhysicalSize();
FinishReflowChild(inner, aPresContext, kidDesiredSize, &kidReflowInput, wm,
pt, containerSize, 0);
pt, containerSize, ReflowChildFlags::Default);
NS_FRAME_TRACE_REFLOW_OUT("FieldSet::Reflow", aStatus);
} else if (inner) {
// |inner| didn't need to be reflowed but we do need to include its size