2011-06-06 Levi Weintraub <leviw@chromium.org>
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2011 22:00:10 +0000 (22:00 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jun 2011 22:00:10 +0000 (22:00 +0000)
        Reviewed by Eric Seidel.

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

        Switching paintScrollbar to use IntPoint instead of a pair of ints.

        No new tests since this is simple refactoring.

        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintObject):
        (WebCore::RenderListBox::paintScrollbar):
        * rendering/RenderListBox.h:

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

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

index edd6cf6d457123a06695f22a7967db5e38a995fd..3e446283499001e220114f915ee0b30fd141ef38 100644 (file)
@@ -1,3 +1,19 @@
+2011-06-06  Levi Weintraub  <leviw@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Switch paintScrollbar to use IntPoint
+        https://bugs.webkit.org/show_bug.cgi?id=62151
+
+        Switching paintScrollbar to use IntPoint instead of a pair of ints.
+
+        No new tests since this is simple refactoring.
+
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintObject):
+        (WebCore::RenderListBox::paintScrollbar):
+        * rendering/RenderListBox.h:
+
 2011-06-06  Daniel Cheng  <dcheng@chromium.org>
 
         Reviewed by Tony Chang.
index d1958dd477b0f7d5a04f2a37507ad80d6ed7acf9..56fe777cb02dafa4f46db5f6ee915f409d06b4c6 100644 (file)
@@ -279,11 +279,11 @@ void RenderListBox::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffse
     // get rendered in the foreground or background phases
     case PaintPhaseForeground:
         if (m_vBar->isOverlayScrollbar())
-            paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y());
+            paintScrollbar(paintInfo, paintOffset);
         break;
     case PaintPhaseBlockBackground:
         if (!m_vBar->isOverlayScrollbar())
-            paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y());
+            paintScrollbar(paintInfo, paintOffset);
         break;
     case PaintPhaseChildBlockBackground:
     case PaintPhaseChildBlockBackgrounds: {
@@ -325,11 +325,11 @@ void RenderListBox::addFocusRingRects(Vector<IntRect>& rects, const IntPoint& ad
     }
 }
 
-void RenderListBox::paintScrollbar(PaintInfo& paintInfo, int tx, int ty)
+void RenderListBox::paintScrollbar(PaintInfo& paintInfo, const IntPoint& paintOffset)
 {
     if (m_vBar) {
-        IntRect scrollRect(tx + width() - borderRight() - m_vBar->width(),
-                           ty + borderTop(),
+        IntRect scrollRect(paintOffset.x() + width() - borderRight() - m_vBar->width(),
+                           paintOffset.y() + borderTop(),
                            m_vBar->width(),
                            height() - (borderTop() + borderBottom()));
         m_vBar->setFrameRect(scrollRect);
index 758f3aae4890743ceec40c821743b5d2d242da27..14e0b02323e00665caf4b49d70775af94a8ff4ea 100644 (file)
@@ -132,7 +132,7 @@ private:
     int numVisibleItems() const;
     int numItems() const;
     int listHeight() const;
-    void paintScrollbar(PaintInfo&, int tx, int ty);
+    void paintScrollbar(PaintInfo&, const IntPoint&);
     void paintItemForeground(PaintInfo&, const IntPoint&, int listIndex);
     void paintItemBackground(PaintInfo&, const IntPoint&, int listIndex);
     void scrollToRevealSelection();