2011-06-03 Levi Weintraub <leviw@chromium.org>
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2011 21:45:05 +0000 (21:45 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2011 21:45:05 +0000 (21:45 +0000)
        Reviewed by Eric Seidel.

        Switch paintCell to use IntPoint
        https://bugs.webkit.org/show_bug.cgi?id=62033

        Switching paintCell to take an IntPoint representing the paint offset
        instead of a pair of ints.

        No new tests since this is simple refactoring.

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paintCell):
        (WebCore::RenderTableSection::paintObject):
        * rendering/RenderTableSection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTableSection.h

index 90f8e6b702f0e874bf1135fc7c20058d430b9725..86bf5c4d5e7e35ffabb93170a0c60d85219966e9 100644 (file)
@@ -1,3 +1,20 @@
+2011-06-03  Levi Weintraub  <leviw@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Switch paintCell to use IntPoint
+        https://bugs.webkit.org/show_bug.cgi?id=62033
+
+        Switching paintCell to take an IntPoint representing the paint offset
+        instead of a pair of ints.
+
+        No new tests since this is simple refactoring.
+
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paintCell):
+        (WebCore::RenderTableSection::paintObject):
+        * rendering/RenderTableSection.h:
+
 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
 
         Reviewed by Dimitri Glazkov.
index f8557a934271eee3c240ce17de802102201ef284..02ba5f0c37720fdbb1b84114fbb20cee01a81167 100644 (file)
@@ -914,9 +914,9 @@ static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell*
     return elem1->row() < elem2->row();
 }
 
-void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, int tx, int ty)
+void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, const IntPoint& paintOffset)
 {
-    IntPoint cellPoint = flipForWritingMode(cell, IntPoint(tx, ty), ParentToChildFlippingAdjustment);
+    IntPoint cellPoint = flipForWritingMode(cell, paintOffset, ParentToChildFlippingAdjustment);
     PaintPhase paintPhase = paintInfo.phase;
     RenderTableRow* row = toRenderTableRow(cell->parent());
 
@@ -1018,7 +1018,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
                     RenderTableCell* cell = current.primaryCell();
                     if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))
                         continue;
-                    paintCell(cell, paintInfo, tx, ty);
+                    paintCell(cell, paintInfo, IntPoint(tx, ty));
                 }
             }
         } else {
@@ -1045,7 +1045,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
             int size = cells.size();
             // Paint the cells.
             for (int i = 0; i < size; ++i)
-                paintCell(cells[i], paintInfo, tx, ty);
+                paintCell(cells[i], paintInfo, IntPoint(tx, ty));
         }
     }
 }
index 38a603b23f64558002c2a7cac4cc324125cc9069..4e7bb7d497b9454caa13bf56d1d6cc49ca5f67d4 100644 (file)
@@ -133,7 +133,7 @@ private:
     virtual void removeChild(RenderObject* oldChild);
 
     virtual void paint(PaintInfo&, int tx, int ty);
-    virtual void paintCell(RenderTableCell*, PaintInfo&, int tx, int ty);
+    virtual void paintCell(RenderTableCell*, PaintInfo&, const IntPoint&);
     virtual void paintObject(PaintInfo&, int tx, int ty);
 
     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);