summaryrefslogtreecommitdiff
path: root/layout/generic/nsIFrame.h
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2022-06-17 16:05:57 +0800
committerJob Bautista <jobbautista9@protonmail.com>2022-06-17 16:05:57 +0800
commitb3cacb2c3ac849f70a2746b252fe0874ffe41e33 (patch)
treec3c1d0fa9665c5050b958d1c3dc3b4c60abd970e /layout/generic/nsIFrame.h
parent5652238ba898931d9705c9df37259284bb76619e (diff)
downloaduxp-b3cacb2c3ac849f70a2746b252fe0874ffe41e33.tar.gz
Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
Diffstat (limited to 'layout/generic/nsIFrame.h')
-rw-r--r--layout/generic/nsIFrame.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h
index bc5a5fe971..89557a1e35 100644
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -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)
+
//----------------------------------------------------------------------
/**