Title: [88205] trunk/Source/WebCore
Revision
88205
Author
[email protected]
Date
2011-06-06 17:53:16 -0700 (Mon, 06 Jun 2011)

Log Message

2011-06-06  Emil A Eklund  <[email protected]>

        Reviewed by Eric Seidel.

        Update RenderBlock::paint to use IntPoint internally
        https://bugs.webkit.org/show_bug.cgi?id=62140

        Covered by existing tests.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (88204 => 88205)


--- trunk/Source/WebCore/ChangeLog	2011-06-07 00:07:10 UTC (rev 88204)
+++ trunk/Source/WebCore/ChangeLog	2011-06-07 00:53:16 UTC (rev 88205)
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        Update RenderBlock::paint to use IntPoint internally
+        https://bugs.webkit.org/show_bug.cgi?id=62140
+
+        Covered by existing tests.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+
+2011-06-06  Emil A Eklund  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
         Convert RenderBox::absoluteRects to IntPoint
         https://bugs.webkit.org/show_bug.cgi?id=62130
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (88204 => 88205)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-06-07 00:07:10 UTC (rev 88204)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-06-07 00:53:16 UTC (rev 88205)
@@ -2240,8 +2240,7 @@
  
 void RenderBlock::paint(PaintInfo& paintInfo, int tx, int ty)
 {
-    tx += x();
-    ty += y();
+    IntPoint adjustedOffset = location() + IntSize(tx, ty);
     
     PaintPhase phase = paintInfo.phase;
 
@@ -2252,21 +2251,21 @@
         IntRect overflowBox = visualOverflowRect();
         flipForWritingMode(overflowBox);
         overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
-        overflowBox.move(tx, ty);
+        overflowBox.moveBy(adjustedOffset);
         if (!overflowBox.intersects(paintInfo.rect))
             return;
     }
 
-    bool pushedClip = pushContentsClip(paintInfo, IntPoint(tx, ty));
-    paintObject(paintInfo, IntPoint(tx, ty));
+    bool pushedClip = pushContentsClip(paintInfo, adjustedOffset);
+    paintObject(paintInfo, adjustedOffset);
     if (pushedClip)
-        popContentsClip(paintInfo, phase, IntPoint(tx, ty));
+        popContentsClip(paintInfo, phase, adjustedOffset);
 
     // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
     // z-index.  We paint after we painted the background/border, so that the scrollbars will
     // sit above the background/border.
     if (hasOverflowClip() && style()->visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && paintInfo.shouldPaintWithinRoot(this))
-        layer()->paintOverflowControls(paintInfo.context, IntPoint(tx, ty), paintInfo.rect);
+        layer()->paintOverflowControls(paintInfo.context, adjustedOffset, paintInfo.rect);
 }
 
 void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOffset)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to