2011-06-03  Levi Weintraub  <leviw@chromium.org>

        Reviewed by Eric Seidel.

        Switch paintMask and paintObject to use IntPoint
        https://bugs.webkit.org/show_bug.cgi?id=62077

        Switching paintMask and paintObject to use IntPoint for their paint offset instead of
        a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize
        passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&.

        No new tests since this is simple refactoring.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paint):
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderBlock.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintMask):
        (WebCore::RenderBox::pushContentsClip):
        (WebCore::RenderBox::popContentsClip):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::paintObject):
        * rendering/RenderFieldset.cpp:
        (WebCore::RenderFieldset::paintMask):
        * rendering/RenderFieldset.h:
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderFileUploadControl.h:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintObject):
        * rendering/RenderListBox.h:
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::paint):
        * rendering/RenderReplica.cpp:
        (WebCore::RenderReplica::paint):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::paint):
        (WebCore::RenderTable::paintObject):
        (WebCore::RenderTable::paintMask):
        * rendering/RenderTable.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint):
        (WebCore::RenderTableSection::paintObject):
        * rendering/RenderTableSection.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::paintPlaceholder):
        (WebCore::RenderTextControl::paintObject):
        * rendering/RenderTextControl.h:
        * rendering/RenderView.cpp:
        (WebCore::RenderView::paint):
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 02ba5f0..f323dd0 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -904,7 +904,7 @@
 
     PaintPhase phase = paintInfo.phase;
     bool pushedClip = pushContentsClip(paintInfo, tx, ty);
-    paintObject(paintInfo, tx, ty);
+    paintObject(paintInfo, IntPoint(tx, ty));
     if (pushedClip)
         popContentsClip(paintInfo, phase, tx, ty);
 }
@@ -948,7 +948,7 @@
         cell->paint(paintInfo, cellPoint.x(), cellPoint.y());
 }
 
-void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
+void RenderTableSection::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
 {
     // Check which rows and cols are visible and only paint these.
     // FIXME: Could use a binary search here.
@@ -962,7 +962,7 @@
     unsigned endrow = totalRows;
 
     IntRect localRepaintRect = paintInfo.rect;
-    localRepaintRect.move(-tx, -ty);
+    localRepaintRect.moveBy(-paintOffset);
     if (style()->isFlippedBlocksWritingMode()) {
         if (style()->isHorizontalWritingMode())
             localRepaintRect.setY(height() - localRepaintRect.maxY());
@@ -1018,7 +1018,7 @@
                     RenderTableCell* cell = current.primaryCell();
                     if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))
                         continue;
-                    paintCell(cell, paintInfo, IntPoint(tx, ty));
+                    paintCell(cell, paintInfo, paintOffset);
                 }
             }
         } else {
@@ -1045,7 +1045,7 @@
             int size = cells.size();
             // Paint the cells.
             for (int i = 0; i < size; ++i)
-                paintCell(cells[i], paintInfo, IntPoint(tx, ty));
+                paintCell(cells[i], paintInfo, paintOffset);
         }
     }
 }