2011-06-04 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 needs to know when a scroll is happening due to the ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=62093
Add additional ChromeClient functions to indicate the beginning and end of
the various ScrollAnimator animations. Change existing notification that a
rubber-band has completed for the main frame to be triggered for all frames.
* page/ChromeClient.h:
(WebCore::ChromeClient::didStartRubberBandForFrame):
(WebCore::ChromeClient::didCompleteRubberBandForFrame):
(WebCore::ChromeClient::didStartAnimatedScroll):
(WebCore::ChromeClient::didCompleteAnimatedScroll):
* page/FrameView.cpp:
(WebCore::FrameView::didStartRubberBand):
(WebCore::FrameView::didCompleteRubberBand):
(WebCore::FrameView::didStartAnimatedScroll):
(WebCore::FrameView::didCompleteAnimatedScroll):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::didStartRubberBand):
(WebCore::ScrollableArea::didStartAnimatedScroll):
(WebCore::ScrollableArea::didCompleteAnimatedScroll):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2011-06-04 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 needs to know when a scroll is happening due to the ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=62093
Stub out new ChromeClient functions regarding the start and end of ScrollAnimator
animated scrolls, and update logic for rubber-band ending to check for main frame
now that it is called for all frames.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didStartRubberBandForFrame):
(WebKit::WebChromeClient::didCompleteRubberBandForFrame):
(WebKit::WebChromeClient::didStartAnimatedScroll):
(WebKit::WebChromeClient::didCompleteAnimatedScroll):
* WebProcess/WebCoreSupport/WebChromeClient.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
index 7b0f5ba..e919cee 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -127,7 +127,12 @@
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 didStartRubberBand(const IntSize&) const { ASSERT_NOT_REACHED(); }
virtual void didCompleteRubberBand(const IntSize&) const { ASSERT_NOT_REACHED(); }
+ virtual void didStartAnimatedScroll() const { }
+ virtual void didCompleteAnimatedScroll() const { }
+
virtual bool shouldSuspendScrollAnimations() const { return true; }
virtual void scrollbarStyleChanged() { }
virtual void setVisibleScrollerThumbRect(const IntRect&) { }