summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/ScrollView.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:25:10 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commitab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch)
treedb769fadd053248f85db67434a5b275224defef7 /Source/WebCore/platform/ScrollView.h
parent52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff)
downloadexternal_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/platform/ScrollView.h')
-rw-r--r--Source/WebCore/platform/ScrollView.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WebCore/platform/ScrollView.h b/Source/WebCore/platform/ScrollView.h
index 97b2c47..cb895f6 100644
--- a/Source/WebCore/platform/ScrollView.h
+++ b/Source/WebCore/platform/ScrollView.h
@@ -29,7 +29,7 @@
#include "IntRect.h"
#include "Scrollbar.h"
-#include "ScrollbarClient.h"
+#include "ScrollableArea.h"
#include "ScrollTypes.h"
#include "Widget.h"
@@ -54,16 +54,18 @@ class HostWindow;
class PlatformWheelEvent;
class Scrollbar;
-class ScrollView : public Widget, public ScrollbarClient {
+class ScrollView : public Widget, public ScrollableArea {
public:
~ScrollView();
- // ScrollbarClient functions. FrameView overrides the others.
+ // ScrollableArea functions. FrameView overrides the others.
virtual int scrollSize(ScrollbarOrientation orientation) const;
- virtual void setScrollOffsetFromAnimation(const IntPoint&);
- virtual void valueChanged(Scrollbar*);
- virtual void valueChanged(const IntSize&);
+ virtual int scrollPosition(Scrollbar*) const;
+ virtual void setScrollOffset(const IntPoint&);
+ // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
+ virtual void scrollTo(const IntSize& newOffset);
+
// The window thats hosts the ScrollView. The ScrollView will communicate scrolls and repaints to the
// host window in the window's coordinate space.
virtual HostWindow* hostWindow() const = 0;
@@ -78,8 +80,8 @@ public:
// If the scroll view does not use a native widget, then it will have cross-platform Scrollbars. These functions
// can be used to obtain those scrollbars.
- Scrollbar* horizontalScrollbar() const { return m_horizontalScrollbar.get(); }
- Scrollbar* verticalScrollbar() const { return m_verticalScrollbar.get(); }
+ virtual Scrollbar* horizontalScrollbar() const { return m_horizontalScrollbar.get(); }
+ virtual Scrollbar* verticalScrollbar() const { return m_verticalScrollbar.get(); }
bool isScrollViewScrollbar(const Widget* child) const { return horizontalScrollbar() == child || verticalScrollbar() == child; }
// Functions for setting and retrieving the scrolling mode in each axis (horizontal/vertical). The mode has values of