Bug 1055665 part 2 - Make nsLineLayout::VerticalAlignLine not rely on line box. r=roc
This commit is contained in:
@@ -1529,13 +1529,14 @@ nsLineLayout::VerticalAlignLine()
|
|||||||
}
|
}
|
||||||
PlaceTopBottomFrames(psd, -mBStartEdge, lineBSize);
|
PlaceTopBottomFrames(psd, -mBStartEdge, lineBSize);
|
||||||
|
|
||||||
|
mFinalLineBSize = lineBSize;
|
||||||
|
if (mGotLineBox) {
|
||||||
// Fill in returned line-box and max-element-width data
|
// Fill in returned line-box and max-element-width data
|
||||||
mLineBox->SetBounds(lineWM,
|
mLineBox->SetBounds(lineWM,
|
||||||
psd->mIStart, mBStartEdge,
|
psd->mIStart, mBStartEdge,
|
||||||
psd->mICoord - psd->mIStart, lineBSize,
|
psd->mICoord - psd->mIStart, lineBSize,
|
||||||
mContainerWidth);
|
mContainerWidth);
|
||||||
|
|
||||||
mFinalLineBSize = lineBSize;
|
|
||||||
mLineBox->SetLogicalAscent(baselineBCoord - mBStartEdge);
|
mLineBox->SetLogicalAscent(baselineBCoord - mBStartEdge);
|
||||||
#ifdef NOISY_BLOCKDIR_ALIGN
|
#ifdef NOISY_BLOCKDIR_ALIGN
|
||||||
printf(
|
printf(
|
||||||
@@ -1544,6 +1545,7 @@ nsLineLayout::VerticalAlignLine()
|
|||||||
mLineBox->GetBounds().ISize(lineWM), mLineBox->GetBounds().BSize(lineWM),
|
mLineBox->GetBounds().ISize(lineWM), mLineBox->GetBounds().BSize(lineWM),
|
||||||
mFinalLineBSize, mLineBox->GetLogicalAscent());
|
mFinalLineBSize, mLineBox->GetLogicalAscent());
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Place frames with CSS property vertical-align: top or bottom.
|
// Place frames with CSS property vertical-align: top or bottom.
|
||||||
@@ -2154,7 +2156,8 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
|||||||
|
|
||||||
// (1) and (2) above
|
// (1) and (2) above
|
||||||
bool applyMinLH = !psd->mZeroEffectiveSpanBox || mHasBullet;
|
bool applyMinLH = !psd->mZeroEffectiveSpanBox || mHasBullet;
|
||||||
bool isLastLine = (!mLineBox->IsLineWrapped() && !mLineEndsInBR);
|
bool isLastLine = !mGotLineBox ||
|
||||||
|
(!mLineBox->IsLineWrapped() && !mLineEndsInBR);
|
||||||
if (!applyMinLH && isLastLine) {
|
if (!applyMinLH && isLastLine) {
|
||||||
nsIContent* blockContent = mRootSpan->mFrame->mFrame->GetContent();
|
nsIContent* blockContent = mRootSpan->mFrame->mFrame->GetContent();
|
||||||
if (blockContent) {
|
if (blockContent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user