diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /layout/generic/ReflowInput.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/ReflowInput.h')
-rw-r--r-- | layout/generic/ReflowInput.h | 39 |
1 files changed, 10 insertions, 29 deletions
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<mozilla::LogicalMargin>& 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 <typename F> + 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, |