1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 23:18:26 +00:00

Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.

Backported from Mozilla bug 1571250.
This commit is contained in:
Job Bautista
2022-06-17 16:05:57 +08:00
committed by roytam1
parent 9cc1870b9f
commit 0423d83560
51 changed files with 364 additions and 302 deletions
+7 -7
View File
@@ -397,8 +397,8 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
nsOverflowAreas ocBounds;
nsReflowStatus ocStatus = NS_FRAME_COMPLETE;
if (GetPrevInFlow()) {
ReflowOverflowContainerChildren(aPresContext, aReflowInput, ocBounds, 0,
ocStatus);
ReflowOverflowContainerChildren(aPresContext, aReflowInput, ocBounds,
ReflowChildFlags::Default, ocStatus);
}
//------------ Handle Incremental Reflow -----------------
@@ -459,7 +459,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
const nsSize dummyContainerSize;
ReflowChild(legend, aPresContext, legendDesiredSize, *legendReflowInput,
wm, LogicalPoint(wm), dummyContainerSize,
NS_FRAME_NO_MOVE_FRAME, aStatus);
ReflowChildFlags::NoMoveFrame, aStatus);
#ifdef NOISY_REFLOW
printf(" returned (%d, %d)\n",
legendDesiredSize.Width(), legendDesiredSize.Height());
@@ -488,7 +488,7 @@ 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;
@@ -540,13 +540,13 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
// if necessary.
const nsSize dummyContainerSize;
ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowInput,
wm, pt, dummyContainerSize, 0, aStatus);
wm, pt, 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);
FinishReflowChild(inner, aPresContext, kidDesiredSize, &kidReflowInput, wm,
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