From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- layout/generic/ReflowInput.h | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) (limited to 'layout/generic/ReflowInput.h') diff --git a/layout/generic/ReflowInput.h b/layout/generic/ReflowInput.h index 620ad0f413..ba49edcaf6 100644 --- a/layout/generic/ReflowInput.h +++ b/layout/generic/ReflowInput.h @@ -178,20 +178,6 @@ struct SizeComputationInput { const mozilla::Maybe& aPadding = mozilla::Nothing()); -#ifdef DEBUG - // Reflow trace methods. Defined in nsFrame.cpp so they have access - // to the display-reflow infrastructure. - static void* DisplayInitOffsetsEnter(nsIFrame* aFrame, - SizeComputationInput* aState, - nscoord aPercentBasis, - mozilla::WritingMode aCBWritingMode, - const nsMargin* aBorder, - const nsMargin* aPadding); - static void DisplayInitOffsetsExit(nsIFrame* aFrame, - SizeComputationInput* aState, - void* aValue); -#endif - private: /** * Computes margin values from the specified margin style information, and @@ -367,6 +353,16 @@ struct ReflowInput : public SizeComputationInput { mozilla::LogicalSize AvailableSize() const { return mAvailableSize; } mozilla::LogicalSize ComputedSize() const { return mComputedSize; } + + template + mozilla::LogicalSize ComputedSizeWithBSizeFallback(F&& aFallback) const { + auto size = mComputedSize; + if (size.BSize(mWritingMode) == NS_UNCONSTRAINEDSIZE) { + size.BSize(mWritingMode) = ApplyMinMaxBSize(aFallback()); + } + return size; + } + mozilla::LogicalSize ComputedMinSize() const { return mComputedMinSize; } mozilla::LogicalSize ComputedMaxSize() const { return mComputedMaxSize; } @@ -888,21 +884,6 @@ struct ReflowInput : public SizeComputationInput { LogicalMargin& aMargin, LogicalMargin& aOffsets); -#ifdef DEBUG - // Reflow trace methods. Defined in nsFrame.cpp so they have access - // to the display-reflow infrastructure. - static void* DisplayInitConstraintsEnter(nsIFrame* aFrame, - ReflowInput* aState, - nscoord aCBISize, nscoord aCBBSize, - const nsMargin* aBorder, - const nsMargin* aPadding); - static void DisplayInitConstraintsExit(nsIFrame* aFrame, ReflowInput* aState, - void* aValue); - static void* DisplayInitFrameTypeEnter(nsIFrame* aFrame, ReflowInput* aState); - static void DisplayInitFrameTypeExit(nsIFrame* aFrame, ReflowInput* aState, - void* aValue); -#endif - protected: void InitCBReflowInput(); void InitResizeFlags(nsPresContext* aPresContext, -- cgit v1.2.3