Title: [109247] branches/subpixellayout/Source/WebCore/rendering
Revision
109247
Author
[email protected]
Date
2012-02-29 13:03:46 -0800 (Wed, 29 Feb 2012)

Log Message

Fixing table border painting and moving the rounding of paint offsets to InlineTextBoxes from RenderBlock.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/InlineTextBox.cpp (109246 => 109247)


--- branches/subpixellayout/Source/WebCore/rendering/InlineTextBox.cpp	2012-02-29 20:49:49 UTC (rev 109246)
+++ branches/subpixellayout/Source/WebCore/rendering/InlineTextBox.cpp	2012-02-29 21:03:46 UTC (rev 109247)
@@ -475,16 +475,16 @@
 
     ASSERT(paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines);
 
+    LayoutPoint adjustedPaintOffset = roundedIntPoint(paintOffset);
+
     LayoutUnit logicalLeftSide = logicalLeftVisualOverflow();
     LayoutUnit logicalRightSide = logicalRightVisualOverflow();
-    LayoutUnit logicalStart = logicalLeftSide + (isHorizontal() ? paintOffset.x() : paintOffset.y());
+    LayoutUnit logicalStart = logicalLeftSide + (isHorizontal() ? adjustedPaintOffset.x() : adjustedPaintOffset.y());
     LayoutUnit logicalExtent = logicalRightSide - logicalLeftSide;
     
     LayoutUnit paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
     LayoutUnit paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
     
-    LayoutPoint adjustedPaintOffset = paintOffset;
-    
     if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
         return;
 

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp (109246 => 109247)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-02-29 20:49:49 UTC (rev 109246)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2012-02-29 21:03:46 UTC (rev 109247)
@@ -2710,13 +2710,10 @@
     if (document()->didLayoutWithPendingStylesheets() && !isRenderView())
         return;
 
-    // We don't want to hand off painting in the line box tree with the accumulated error of the render tree, as this will cause
-    // us to mess up painting aligned things (such as underlines in text) with both the render tree and line box tree's error.
-    LayoutPoint roundedPaintOffset = roundedIntPoint(paintOffset);
     if (childrenInline())
-        m_lineBoxes.paint(this, paintInfo, roundedPaintOffset);
+        m_lineBoxes.paint(this, paintInfo, paintOffset);
     else
-        paintChildren(paintInfo, roundedPaintOffset);
+        paintChildren(paintInfo, paintOffset);
 }
 
 void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderTableCell.cpp (109246 => 109247)


--- branches/subpixellayout/Source/WebCore/rendering/RenderTableCell.cpp	2012-02-29 20:49:49 UTC (rev 109246)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderTableCell.cpp	2012-02-29 21:03:46 UTC (rev 109247)
@@ -979,10 +979,10 @@
     CollapsedBorderValue bottomVal = cachedCollapsedBottomBorder(tableStyle);
      
     // Adjust our x/y/width/height so that we paint the collapsed borders at the correct location.
-    LayoutUnit topWidth = topVal.width();
-    LayoutUnit bottomWidth = bottomVal.width();
-    LayoutUnit leftWidth = leftVal.width();
-    LayoutUnit rightWidth = rightVal.width();
+    int topWidth = topVal.width();
+    int bottomWidth = bottomVal.width();
+    int leftWidth = leftVal.width();
+    int rightWidth = rightVal.width();
     
     IntRect borderRect = pixelSnappedIntRect(paintRect.x() - leftWidth / 2,
         paintRect.y() - topWidth / 2,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to