Correctly implement text-decoration in standards mode by drawing the underline on the element with the text-decoration property set. Refactor painting code a bit to avoid code duplication. Patch by Esben Mose Hansen <esben@oek.dk>, with paint refactoring and some other changes by dbaron. r=dbaron sr=bzbarsky b=1777

git-svn-id: svn://10.0.0.236/trunk@135099 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2002-12-11 04:00:18 +00:00
parent e4a0d80702
commit 10a7236c6a
24 changed files with 1092 additions and 342 deletions

View File

@@ -1822,8 +1822,7 @@ PRBool IsPercentageAwareFrame(nsIPresContext *aPresContext, nsIFrame *aFrame)
void
nsLineLayout::VerticalAlignLine(nsLineBox* aLineBox,
nsSize& aMaxElementSizeResult,
nscoord& aLineBoxAscent)
nsSize& aMaxElementSizeResult)
{
// Synthesize a PerFrameData for the block frame
PerFrameData rootPFD;
@@ -2038,13 +2037,13 @@ nsLineLayout::VerticalAlignLine(nsLineBox* aLineBox,
mFinalLineHeight = lineHeight;
aMaxElementSizeResult.width = maxElementWidth;
aMaxElementSizeResult.height = maxElementHeight;
aLineBoxAscent = baselineY;
aLineBox->SetAscent(baselineY - mTopEdge);
#ifdef NOISY_VERTICAL_ALIGN
printf(
" [line]==> bounds{x,y,w,h}={%d,%d,%d,%d} lh=%d a=%d mes{w,h}={%d,%d}\n",
aLineBox->mBounds.x, aLineBox->mBounds.y,
aLineBox->mBounds.width, aLineBox->mBounds.height,
mFinalLineHeight, aLineBoxAscent,
mFinalLineHeight, aLineBox->GetAscent(),
aMaxElementSizeResult.width, aMaxElementSizeResult.height);
#endif