Bug 372237. Never set TRUNCATED reflow status if the available height is unconstrained, even if the height happens to exceed the constant we use to indicate unconstrained height. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@221756 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
aed2475015
commit
7dd2fd3ff9
@ -2106,3 +2106,16 @@ nsHTMLReflowState::ComputeMinMaxValues(nscoord aContainingBlockWidth,
|
||||
mComputedMaxHeight = mComputedMinHeight;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLReflowState::SetTruncated(const nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus* aStatus) const
|
||||
{
|
||||
if (availableHeight != NS_UNCONSTRAINEDSIZE &&
|
||||
availableHeight < aMetrics.height &&
|
||||
!mFlags.mIsTopOfPage) {
|
||||
*aStatus |= NS_FRAME_TRUNCATED;
|
||||
} else {
|
||||
*aStatus &= ~NS_FRAME_TRUNCATED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -419,6 +419,8 @@ public:
|
||||
nscoord ComputedWidth() const { return mComputedWidth; }
|
||||
void SetComputedWidth(nscoord aComputedWidth);
|
||||
|
||||
void SetTruncated(const nsHTMLReflowMetrics& aMetrics, nsReflowStatus* aStatus) const;
|
||||
|
||||
protected:
|
||||
|
||||
void InitCBReflowState();
|
||||
|
||||
@ -367,11 +367,7 @@ typedef PRUint32 nsReflowStatus;
|
||||
#define NS_FRAME_IS_TRUNCATED(status) \
|
||||
(0 != ((status) & NS_FRAME_TRUNCATED))
|
||||
#define NS_FRAME_SET_TRUNCATION(status, aReflowState, aMetrics) \
|
||||
if (!aReflowState.mFlags.mIsTopOfPage && \
|
||||
aReflowState.availableHeight < aMetrics.height) \
|
||||
status |= NS_FRAME_TRUNCATED; \
|
||||
else \
|
||||
status &= ~NS_FRAME_TRUNCATED;
|
||||
aReflowState.SetTruncated(aMetrics, &status);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user