Index: Source/WebCore/rendering/RootInlineBox.cpp |
=================================================================== |
--- Source/WebCore/rendering/RootInlineBox.cpp (revision 123234) |
+++ Source/WebCore/rendering/RootInlineBox.cpp (working copy) |
@@ -868,7 +868,7 @@ |
else if (verticalAlign == TEXT_TOP) |
verticalPosition += renderer->baselinePosition(baselineType(), firstLine, lineDirection) - fontMetrics.ascent(baselineType()); |
else if (verticalAlign == MIDDLE) |
- verticalPosition += -static_cast<int>(fontMetrics.xHeight() / 2) - renderer->lineHeight(firstLine, lineDirection) / 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection); |
+ verticalPosition = (verticalPosition - static_cast<LayoutUnit>(fontMetrics.xHeight() / 2) - renderer->lineHeight(firstLine, lineDirection) / 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection)).round(); |
else if (verticalAlign == TEXT_BOTTOM) { |
verticalPosition += fontMetrics.descent(baselineType()); |
// lineHeight - baselinePosition is always 0 for replaced elements (except inline blocks), so don't bother wasting time in that case. |