Title: [111101] trunk/Source/WebCore
- Revision
- 111101
- Author
- [email protected]
- Date
- 2012-03-16 17:52:17 -0700 (Fri, 16 Mar 2012)
Log Message
GestureTapDown needs to pin in-progress flings
https://bugs.webkit.org/show_bug.cgi?id=80875
Patch by Robert Kroeger <[email protected]> on 2012-03-16
Reviewed by Adam Barth.
* page/EventHandler.cpp:
(WebCore):
(WebCore::EventHandler::handleGestureTapDown):
* page/EventHandler.h:
(EventHandler):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111100 => 111101)
--- trunk/Source/WebCore/ChangeLog 2012-03-17 00:49:27 UTC (rev 111100)
+++ trunk/Source/WebCore/ChangeLog 2012-03-17 00:52:17 UTC (rev 111101)
@@ -1,3 +1,16 @@
+2012-03-16 Robert Kroeger <[email protected]>
+
+ GestureTapDown needs to pin in-progress flings
+ https://bugs.webkit.org/show_bug.cgi?id=80875
+
+ Reviewed by Adam Barth.
+
+ * page/EventHandler.cpp:
+ (WebCore):
+ (WebCore::EventHandler::handleGestureTapDown):
+ * page/EventHandler.h:
+ (EventHandler):
+
2012-03-16 Chris Rogers <[email protected]>
Account for sample-rate in convolution normalization
Modified: trunk/Source/WebCore/page/EventHandler.cpp (111100 => 111101)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-03-17 00:49:27 UTC (rev 111100)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-03-17 00:52:17 UTC (rev 111101)
@@ -2365,6 +2365,24 @@
}
#if ENABLE(GESTURE_EVENTS)
+bool EventHandler::handleGestureTapDown()
+{
+ FrameView* view = m_frame->view();
+ if (!view)
+ return false;
+ view->scrollAnimator()->cancelAnimations();
+ const FrameView::ScrollableAreaSet* areas = view->scrollableAreas();
+ if (!areas)
+ return false;
+ for (FrameView::ScrollableAreaSet::const_iterator it = areas->begin(); it != areas->end(); ++it) {
+ ScrollableArea* sa = *it;
+ ScrollAnimator* animator = sa->scrollAnimator();
+ if (animator)
+ animator->cancelAnimations();
+ }
+ return false;
+}
+
bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
{
// FIXME: A more general scroll system (https://bugs.webkit.org/show_bug.cgi?id=80596) will
@@ -2373,8 +2391,7 @@
switch (gestureEvent.type()) {
case PlatformEvent::GestureTapDown:
- // FIXME: Stop animation here.
- break;
+ return handleGestureTapDown();
case PlatformEvent::GestureTap:
return handleGestureTap(gestureEvent);
case PlatformEvent::GestureScrollUpdate:
Modified: trunk/Source/WebCore/page/EventHandler.h (111100 => 111101)
--- trunk/Source/WebCore/page/EventHandler.h 2012-03-17 00:49:27 UTC (rev 111100)
+++ trunk/Source/WebCore/page/EventHandler.h 2012-03-17 00:52:17 UTC (rev 111101)
@@ -350,6 +350,7 @@
#if ENABLE(GESTURE_EVENTS)
bool handleGestureScrollCore(const PlatformGestureEvent&, PlatformWheelEventGranularity, bool latchedWheel);
+ bool handleGestureTapDown();
#endif
Frame* m_frame;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes