зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
0e7b37595e
Коммит
8b52a3f2c1
|
@ -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);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче