Tweaked to handle updated line-height calculation code that will now return -1 sometimes
git-svn-id: svn://10.0.0.236/trunk@29986 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
95141d3623
commit
31352557b2
@ -1538,9 +1538,16 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
||||
nsHTMLReflowState::CalcLineHeight(mPresContext, parentFrame);
|
||||
nscoord contentHeight = parentPFD->mBounds.height -
|
||||
parentPFD->mBorderPadding.top - parentPFD->mBorderPadding.bottom;
|
||||
nscoord leading = logicalHeight - contentHeight;
|
||||
psd->mTopLeading = leading / 2;
|
||||
psd->mBottomLeading = leading - psd->mTopLeading;
|
||||
if (logicalHeight > 0) {
|
||||
nscoord leading = logicalHeight - contentHeight;
|
||||
psd->mTopLeading = leading / 2;
|
||||
psd->mBottomLeading = leading - psd->mTopLeading;
|
||||
}
|
||||
else {
|
||||
psd->mTopLeading = 0;
|
||||
psd->mBottomLeading = 0;
|
||||
logicalHeight = contentHeight;
|
||||
}
|
||||
psd->mLogicalHeight = logicalHeight;
|
||||
|
||||
// The initial values for the min and max Y values are in the spans
|
||||
|
||||
@ -1538,9 +1538,16 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
||||
nsHTMLReflowState::CalcLineHeight(mPresContext, parentFrame);
|
||||
nscoord contentHeight = parentPFD->mBounds.height -
|
||||
parentPFD->mBorderPadding.top - parentPFD->mBorderPadding.bottom;
|
||||
nscoord leading = logicalHeight - contentHeight;
|
||||
psd->mTopLeading = leading / 2;
|
||||
psd->mBottomLeading = leading - psd->mTopLeading;
|
||||
if (logicalHeight > 0) {
|
||||
nscoord leading = logicalHeight - contentHeight;
|
||||
psd->mTopLeading = leading / 2;
|
||||
psd->mBottomLeading = leading - psd->mTopLeading;
|
||||
}
|
||||
else {
|
||||
psd->mTopLeading = 0;
|
||||
psd->mBottomLeading = 0;
|
||||
logicalHeight = contentHeight;
|
||||
}
|
||||
psd->mLogicalHeight = logicalHeight;
|
||||
|
||||
// The initial values for the min and max Y values are in the spans
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user