summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/ScrollableArea.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/platform/ScrollableArea.h
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/platform/ScrollableArea.h')
-rw-r--r--Source/WebCore/platform/ScrollableArea.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
index 148ecdb..9839abc 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -33,6 +33,7 @@
namespace WebCore {
class FloatPoint;
+class PlatformGestureEvent;
class PlatformWheelEvent;
class ScrollAnimator;
@@ -47,6 +48,26 @@ public:
void scrollToXOffsetWithoutAnimation(float x);
void scrollToYOffsetWithoutAnimation(float x);
+ void handleWheelEvent(PlatformWheelEvent&);
+#if ENABLE(GESTURE_EVENTS)
+ void handleGestureEvent(const PlatformGestureEvent&);
+#endif
+
+ // Functions for controlling if you can scroll past the end of the document.
+ bool constrainsScrollingToContentEdge() const { return m_constrainsScrollingToContentEdge; }
+ void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEdge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; }
+
+ bool inLiveResize() const { return m_inLiveResize; }
+ void willStartLiveResize();
+ void willEndLiveResize();
+
+ void didAddVerticalScrollbar(Scrollbar*);
+ void willRemoveVerticalScrollbar(Scrollbar*);
+ void didAddHorizontalScrollbar(Scrollbar*);
+ void willRemoveHorizontalScrollbar(Scrollbar*);
+
+ ScrollAnimator* scrollAnimator() const { return m_scrollAnimator.get(); }
+
virtual int scrollSize(ScrollbarOrientation) const = 0;
virtual int scrollPosition(Scrollbar*) const = 0;
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) = 0;
@@ -58,7 +79,6 @@ public:
// scroll of the content.
virtual void setScrollOffset(const IntPoint&) = 0;
-
// Convert points and rects between the scrollbar and its containing view.
// The client needs to implement these in order to be aware of layout effects
// like CSS transforms.
@@ -82,12 +102,28 @@ public:
virtual Scrollbar* horizontalScrollbar() const { return 0; }
virtual Scrollbar* verticalScrollbar() const { return 0; }
+ virtual IntPoint scrollPosition() const { ASSERT_NOT_REACHED(); return IntPoint(); }
+ virtual IntPoint minimumScrollPosition() const { ASSERT_NOT_REACHED(); return IntPoint(); }
+ virtual IntPoint maximumScrollPosition() const { ASSERT_NOT_REACHED(); return IntPoint(); }
+ virtual IntRect visibleContentRect(bool = false) const { ASSERT_NOT_REACHED(); return IntRect(); }
+ virtual int visibleHeight() const { ASSERT_NOT_REACHED(); return 0; }
+ virtual int visibleWidth() const { ASSERT_NOT_REACHED(); return 0; }
+ virtual IntSize contentsSize() const { ASSERT_NOT_REACHED(); return IntSize(); }
+ virtual IntSize overhangAmount() const { ASSERT_NOT_REACHED(); return IntSize(); }
+ virtual IntPoint currentMousePosition() const { return IntPoint(); }
+ virtual void didCompleteRubberBand(const IntSize&) const { ASSERT_NOT_REACHED(); }
+
+ virtual bool scrollbarWillRenderIntoCompositingLayer() const { return false; }
+
private:
// NOTE: Only called from the ScrollAnimator.
friend class ScrollAnimator;
void setScrollOffsetFromAnimation(const IntPoint&);
OwnPtr<ScrollAnimator> m_scrollAnimator;
+ bool m_constrainsScrollingToContentEdge;
+
+ bool m_inLiveResize;
};
} // namespace WebCore