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
commit 0423d83560
51 changed files with 365 additions and 303 deletions

View file

@ -415,12 +415,13 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
nsReflowStatus frameStatus;
ReflowOutput trackDesiredSize(aReflowInput);
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
trackReflowInput, trackX, trackY, 0, frameStatus);
ReflowChild(trackFrame, aPresContext, trackDesiredSize, trackReflowInput,
trackX, trackY, ReflowChildFlags::Default, frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
&trackReflowInput, trackX, trackY, 0);
&trackReflowInput, trackX, trackY,
ReflowChildFlags::Default);
}
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
@ -437,12 +438,12 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
nsReflowStatus frameStatus;
ReflowOutput thumbDesiredSize(aReflowInput);
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbReflowInput, 0, 0, 0, frameStatus);
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize, thumbReflowInput, 0,
0, ReflowChildFlags::Default, frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
&thumbReflowInput, 0, 0, 0);
&thumbReflowInput, 0, 0, ReflowChildFlags::Default);
DoUpdateThumbPosition(thumbFrame, nsSize(aDesiredSize.Width(),
aDesiredSize.Height()));
}
@ -462,13 +463,13 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
nsReflowStatus frameStatus;
ReflowOutput progressDesiredSize(aReflowInput);
ReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, progressReflowInput, 0, 0,
0, frameStatus);
ReflowChild(rangeProgressFrame, aPresContext, progressDesiredSize,
progressReflowInput, 0, 0, ReflowChildFlags::Default,
frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
FinishReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, &progressReflowInput, 0, 0, 0);
FinishReflowChild(rangeProgressFrame, aPresContext, progressDesiredSize,
&progressReflowInput, 0, 0, ReflowChildFlags::Default);
DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(),
aDesiredSize.Height()));
}