Beautify ::first-letter by using MathML's GetBoundingMetrics, b=21616, r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@165418 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au
2004-11-17 04:12:02 +00:00
parent ed490f566a
commit 64635379a7
4 changed files with 52 additions and 0 deletions

View File

@@ -2052,6 +2052,14 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
nsHTMLReflowState::CalcLineHeight(mPresContext, rc, spanFrame);
nscoord contentHeight = spanFramePFD->mBounds.height -
spanFramePFD->mBorderPadding.top - spanFramePFD->mBorderPadding.bottom;
// Special-case for a ::first-letter frame, set the line height to
// the frame height if the user has left line-height == normal
if (spanFramePFD->GetFlag(PFD_ISLETTERFRAME) && !spanPrevInFlow &&
spanFrame->GetStyleText()->mLineHeight.GetUnit() == eStyleUnit_Normal) {
logicalHeight = spanFramePFD->mBounds.height;
}
nscoord leading = logicalHeight - contentHeight;
psd->mTopLeading = leading / 2;
psd->mBottomLeading = leading - psd->mTopLeading;