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

@ -451,10 +451,12 @@ nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
nscoord dy;
// place numerator
dy = 0;
FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dxNum, dy, 0);
FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dxNum, dy,
ReflowChildFlags::Default);
// place denominator
dy = aDesiredSize.Height() - sizeDen.Height();
FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dxDen, dy, 0);
FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dxDen, dy,
ReflowChildFlags::Default);
// place the fraction bar - dy is top of bar
dy = aDesiredSize.BlockStartAscent() - (axisHeight + actualRuleThickness/2);
mLineRect.SetRect(leftSpace, dy, width - (leftSpace + rightSpace),
@ -571,7 +573,8 @@ nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
dx = MirrorIfRTL(aDesiredSize.Width(), sizeNum.Width(),
leadingSpace);
dy = aDesiredSize.BlockStartAscent() - numShift - sizeNum.BlockStartAscent();
FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dx, dy, 0);
FinishReflowChild(frameNum, presContext, sizeNum, nullptr, dx, dy,
ReflowChildFlags::Default);
// place the fraction bar
dx = MirrorIfRTL(aDesiredSize.Width(), mLineRect.width,
@ -584,7 +587,8 @@ nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
dx = MirrorIfRTL(aDesiredSize.Width(), sizeDen.Width(),
leadingSpace + bmNum.width + mLineRect.width);
dy = aDesiredSize.BlockStartAscent() + denShift - sizeDen.BlockStartAscent();
FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dx, dy, 0);
FinishReflowChild(frameDen, presContext, sizeDen, nullptr, dx, dy,
ReflowChildFlags::Default);
}
}