Title: [89586] branches/chromium/782/Source/WebKit/chromium/src
Revision
89586
Author
[email protected]
Date
2011-06-23 10:38:29 -0700 (Thu, 23 Jun 2011)

Log Message

Merge 89584 - 2011-06-23  John Abd-El-Malek  <[email protected]>

        Reviewed by Tony Chang.

        [chromium] Fix WebScrollBarImpl on Mac after recent smooth scrolling changes
        https://bugs.webkit.org/show_bug.cgi?id=63260

        * src/WebScrollbarImpl.cpp:
        (WebKit::WebScrollbarImpl::visibleHeight):
        (WebKit::WebScrollbarImpl::visibleWidth):
        (WebKit::WebScrollbarImpl::contentsSize):
        (WebKit::WebScrollbarImpl::overhangAmount):
        * src/WebScrollbarImpl.h:


[email protected]
Review URL: http://codereview.chromium.org/7248010

Modified Paths

Diff

Modified: branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.cpp (89585 => 89586)


--- branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.cpp	2011-06-23 17:35:58 UTC (rev 89585)
+++ branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.cpp	2011-06-23 17:38:29 UTC (rev 89586)
@@ -314,4 +314,28 @@
     return m_scrollbar->orientation() == VerticalScrollbar ? m_scrollbar.get() : 0;
 }
 
+int WebScrollbarImpl::visibleHeight() const
+{
+    return m_scrollbar->height();
+}
+
+int WebScrollbarImpl::visibleWidth() const
+{
+    return m_scrollbar->width();
+}
+
+IntSize WebScrollbarImpl::contentsSize() const
+{
+    // This isn't technically correct, since we don't have the contentSize. However it's good enough
+    // to make the ScrollAnimator code happy.
+    int thickness = defaultThickness();
+    int length = m_scrollbar->totalSize();
+    return m_scrollbar->orientation() == VerticalScrollbar ? IntSize(thickness, length) : IntSize(length, thickness);
+}
+
+IntSize WebScrollbarImpl::overhangAmount() const
+{
+    return IntSize();
+}
+
 } // namespace WebKit

Modified: branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.h (89585 => 89586)


--- branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.h	2011-06-23 17:35:58 UTC (rev 89585)
+++ branches/chromium/782/Source/WebKit/chromium/src/WebScrollbarImpl.h	2011-06-23 17:38:29 UTC (rev 89586)
@@ -69,6 +69,10 @@
     virtual void getTickmarks(Vector<WebCore::IntRect>&) const;
     virtual WebCore::Scrollbar* horizontalScrollbar() const;
     virtual WebCore::Scrollbar* verticalScrollbar() const;
+    virtual int visibleHeight() const;
+    virtual int visibleWidth() const;
+    virtual WebCore::IntSize contentsSize() const;
+    virtual WebCore::IntSize overhangAmount() const;
 
 private:
     bool onMouseDown(const WebInputEvent& event);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to