Implement HTML4 align=middle according to spec. Correct the DOM attribute value mapping for some of the other values as well. b=192077 r+sr=dbaron a=mtschrep

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@180661 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2005-09-20 19:45:10 +00:00
parent 28151f5f5f
commit 52ef7d3b1a
5 changed files with 36 additions and 36 deletions

View File

@@ -25,6 +25,7 @@
* L. David Baron <dbaron@dbaron.org>
* Robert O'Callahan <roc+moz@cs.cmu.edu>
* IBM Corporation
* Mats Palmgren <mats.palmgren@bredband.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@@ -2279,6 +2280,17 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
}
pfd->mVerticalAlign = VALIGN_OTHER;
break;
case NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE:
// Align the midpoint of the frame with the baseline of the parent.
if (frameSpan) {
pfd->mBounds.y = baselineY - pfd->mBounds.height/2;
}
else {
pfd->mBounds.y = baselineY - logicalHeight/2 + pfd->mMargin.top;
}
pfd->mVerticalAlign = VALIGN_OTHER;
break;
}
break;