зеркало из https://github.com/mozilla/pjs.git
Bug 186485. The nsLineBox maximum-width includes the block's left border-padding but not the right. r+sr=roc,a=asa,patch by Hideo Saito
This commit is contained in:
Родитель
6a05d2986b
Коммит
68b56bc54b
|
@ -1454,7 +1454,8 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
aMetrics.mMaximumWidth = aMetrics.width;
|
||||
} else {
|
||||
// We need to add in for the right border/padding
|
||||
// XXXldb Why right and not left?
|
||||
// The maximum width in the reflow state includes the left
|
||||
// border/padding but not the right.
|
||||
aMetrics.mMaximumWidth = aState.mMaximumWidth + borderPadding.right;
|
||||
}
|
||||
#ifdef NOISY_MAXIMUM_WIDTH
|
||||
|
@ -3568,7 +3569,9 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||
// If we asked the block to update its maximum width, then record the
|
||||
// updated value in the line, and update the current maximum width
|
||||
if (aState.GetFlag(BRS_COMPUTEMAXWIDTH)) {
|
||||
aLine->mMaximumWidth = brc.GetMaximumWidth();
|
||||
// The maximum width in the line box includes the left
|
||||
// border/padding of this block, but not the right.
|
||||
aLine->mMaximumWidth = brc.GetMaximumWidth() + availSpace.x;
|
||||
aState.UpdateMaximumWidth(aLine->mMaximumWidth);
|
||||
}
|
||||
PostPlaceLine(aState, aLine, maxElementWidth);
|
||||
|
|
|
@ -245,6 +245,8 @@ public:
|
|||
nsFloatCacheFreeList mBelowCurrentLineFloats;
|
||||
|
||||
nscoord mMaxElementWidth;
|
||||
|
||||
// maximum width includes the left border/padding but not the right
|
||||
nscoord mMaximumWidth;
|
||||
|
||||
nscoord mMinLineHeight;
|
||||
|
|
|
@ -451,6 +451,7 @@ public:
|
|||
nsRect mBounds;
|
||||
nscoord mMaxElementWidth; // width part of max-element-size
|
||||
nscoord mMaximumWidth; // maximum width (needed for incremental reflow of tables)
|
||||
// includes the left border/padding but not the right
|
||||
|
||||
struct FlagBits {
|
||||
PRUint32 mDirty : 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче