Modified: branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp (107585 => 107586)
--- branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp 2012-02-13 18:08:49 UTC (rev 107585)
+++ branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp 2012-02-13 18:54:03 UTC (rev 107586)
@@ -584,12 +584,10 @@
void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHeight, LayoutUnit maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, bool& setLineTop,
LayoutUnit& lineTopIncludingMargins, LayoutUnit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotationsAfter, FontBaseline baselineType)
{
- // We need to snap the top to pixel bounds for positioning inline boxes because we can't round in painting in the inline box tree
- LayoutUnit pixelSnappedTop = top;
bool isRootBox = isRootInlineBox();
if (isRootBox) {
const FontMetrics& fontMetrics = renderer()->style(m_firstLine)->fontMetrics();
- setLogicalTop(pixelSnappedTop + maxAscent - fontMetrics.ascent(baselineType));
+ setLogicalTop(top + maxAscent - fontMetrics.ascent(baselineType));
}
LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;
@@ -611,15 +609,15 @@
InlineFlowBox* inlineFlowBox = curr->isInlineFlowBox() ? toInlineFlowBox(curr) : 0;
bool childAffectsTopBottomPos = true;
if (curr->verticalAlign() == TOP)
- curr->setLogicalTop(pixelSnappedTop);
+ curr->setLogicalTop(top);
else if (curr->verticalAlign() == BOTTOM)
- curr->setLogicalTop(pixelSnappedTop + maxHeight - curr->lineHeight());
+ curr->setLogicalTop(top + maxHeight - curr->lineHeight());
else {
if (!strictMode && inlineFlowBox && !inlineFlowBox->hasTextChildren() && !curr->boxModelObject()->hasInlineDirectionBordersOrPadding()
&& !(inlineFlowBox->descendantsHaveSameLineHeightAndBaseline() && inlineFlowBox->hasTextDescendants()))
childAffectsTopBottomPos = false;
LayoutUnit posAdjust = maxAscent - curr->baselinePosition(baselineType);
- curr->setLogicalTop(curr->logicalTop() + pixelSnappedTop + posAdjust);
+ curr->setLogicalTop(curr->logicalTop() + top + posAdjust);
}
LayoutUnit newLogicalTop = curr->logicalTop();
@@ -691,7 +689,7 @@
// Adjust boxes to use their real box y/height and not the logical height (as dictated by
// line-height).
if (inlineFlowBox)
- inlineFlowBox->placeBoxesInBlockDirection(pixelSnappedTop, maxHeight, maxAscent, strictMode, lineTop, lineBottom, setLineTop,
+ inlineFlowBox->placeBoxesInBlockDirection(top, maxHeight, maxAscent, strictMode, lineTop, lineBottom, setLineTop,
lineTopIncludingMargins, lineBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType);
}