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

@ -2239,6 +2239,19 @@ public:
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) = 0;
// Option flags for ReflowChild() and FinishReflowChild()
// member functions
enum class ReflowChildFlags : uint32_t {
Default = 0,
NoMoveView = 1 << 0,
NoMoveFrame = (1 << 1) | NoMoveView,
NoSizeView = 1 << 2,
NoVisibility = 1 << 3,
// Only applies to ReflowChild; if true, don't delete the next-in-flow, even
// if the reflow is fully complete.
NoDeleteNextInFlowChild = 1 << 4
};
/**
* Post-reflow hook. After a frame is reflowed this method will be called
* informing the frame that this reflow process is complete, and telling the
@ -3213,8 +3226,9 @@ size_t SizeOfFramePropertiesForTree(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual nsBoxLayout* GetXULLayoutManager() { return nullptr; }
nsresult GetXULClientRect(nsRect& aContentRect);
virtual uint32_t GetXULLayoutFlags()
{ return 0; }
virtual ReflowChildFlags GetXULLayoutFlags() {
return ReflowChildFlags::Default;
}
// For nsSprocketLayout
virtual Valignment GetXULVAlign() const = 0;
@ -3776,6 +3790,8 @@ public:
#endif
};
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(nsIFrame::ReflowChildFlags)
//----------------------------------------------------------------------
/**