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

@ -235,16 +235,14 @@ nsBox::SetXULBounds(nsBoxLayoutState& aState, const nsRect& aRect, bool aRemoveO
nsRect rect(mRect);
uint32_t flags = GetXULLayoutFlags();
ReflowChildFlags flags = GetXULLayoutFlags() | aState.LayoutFlags();
uint32_t stateFlags = aState.LayoutFlags();
flags |= stateFlags;
if ((flags & NS_FRAME_NO_MOVE_FRAME) == NS_FRAME_NO_MOVE_FRAME)
if ((flags & ReflowChildFlags::NoMoveFrame) ==
ReflowChildFlags::NoMoveFrame) {
SetSize(aRect.Size());
else
} else {
SetRect(aRect);
}
// Nuke the overflow area. The caller is responsible for restoring
// it if necessary.
@ -253,8 +251,7 @@ nsBox::SetXULBounds(nsBoxLayoutState& aState, const nsRect& aRect, bool aRemoveO
ClearOverflowRects();
}
if (!(flags & NS_FRAME_NO_MOVE_VIEW))
{
if (!(flags & ReflowChildFlags::NoMoveView)) {
nsContainerFrame::PositionFrameView(this);
if ((rect.x != aRect.x) || (rect.y != aRect.y))
nsContainerFrame::PositionChildViews(this);
@ -533,11 +530,7 @@ nsBox::SyncLayout(nsBoxLayoutState& aState)
nsPresContext* presContext = aState.PresContext();
uint32_t flags = GetXULLayoutFlags();
uint32_t stateFlags = aState.LayoutFlags();
flags |= stateFlags;
ReflowChildFlags flags = GetXULLayoutFlags() | aState.LayoutFlags();
nsRect visualOverflow;