Title: [100870] trunk/Source/WebKit/chromium
- Revision
- 100870
- Author
- [email protected]
- Date
- 2011-11-20 08:38:57 -0800 (Sun, 20 Nov 2011)
Log Message
[Chromium] Add GestureFlingStart and GestureFlingCancel to WebGestureEvent for Android
https://bugs.webkit.org/show_bug.cgi?id=72819
Reviewed by Darin Fisher.
These gesture types are used with FlingAnimator for scrolling.
* public/WebInputEvent.h:
(WebKit::WebInputEvent::isScrollGestureEventType):
(WebKit::WebGestureEvent::WebGestureEvent):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::handleInputEvent):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleInputEvent):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (100869 => 100870)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-20 16:36:25 UTC (rev 100869)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-20 16:38:57 UTC (rev 100870)
@@ -1,5 +1,22 @@
2011-11-20 Adam Barth <[email protected]>
+ [Chromium] Add GestureFlingStart and GestureFlingCancel to WebGestureEvent for Android
+ https://bugs.webkit.org/show_bug.cgi?id=72819
+
+ Reviewed by Darin Fisher.
+
+ These gesture types are used with FlingAnimator for scrolling.
+
+ * public/WebInputEvent.h:
+ (WebKit::WebInputEvent::isScrollGestureEventType):
+ (WebKit::WebGestureEvent::WebGestureEvent):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::handleInputEvent):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleInputEvent):
+
+2011-11-20 Adam Barth <[email protected]>
+
[Chromium] Add WebInputEventFactory for Android
https://bugs.webkit.org/show_bug.cgi?id=67890
Modified: trunk/Source/WebKit/chromium/public/WebInputEvent.h (100869 => 100870)
--- trunk/Source/WebKit/chromium/public/WebInputEvent.h 2011-11-20 16:36:25 UTC (rev 100869)
+++ trunk/Source/WebKit/chromium/public/WebInputEvent.h 2011-11-20 16:38:57 UTC (rev 100870)
@@ -104,6 +104,8 @@
GestureScrollBegin,
GestureScrollEnd,
GestureScrollUpdate,
+ GestureFlingStart,
+ GestureFlingCancel,
GestureTap,
// WebTouchEvent
@@ -181,6 +183,17 @@
|| type == TouchStart
|| type == TouchEnd;
}
+
+ // Returns true if the WebInputEvent |type| should be handled as scroll gesture.
+ static bool isScrollGestureEventType(int type)
+ {
+ return type == GestureScrollBegin
+ || type == GestureScrollEnd
+ || type == GestureScrollUpdate
+ || type == GestureFlingStart
+ || type == GestureFlingCancel
+ || type == GestureTap; // FIXME: Why is GestureTap on this list?
+ }
};
// WebKeyboardEvent -----------------------------------------------------------
@@ -339,7 +352,8 @@
float deltaY;
WebGestureEvent(unsigned sizeParam = sizeof(WebGestureEvent))
- : x(0)
+ : WebInputEvent(sizeParam)
+ , x(0)
, y(0)
, globalX(0)
, globalY(0)
Modified: trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp (100869 => 100870)
--- trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp 2011-11-20 16:36:25 UTC (rev 100869)
+++ trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp 2011-11-20 16:38:57 UTC (rev 100870)
@@ -275,6 +275,8 @@
case WebInputEvent::GestureScrollBegin:
case WebInputEvent::GestureScrollEnd:
case WebInputEvent::GestureScrollUpdate:
+ case WebInputEvent::GestureFlingStart:
+ case WebInputEvent::GestureFlingCancel:
case WebInputEvent::GestureTap:
return GestureEvent(*static_cast<const WebGestureEvent*>(&inputEvent));
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (100869 => 100870)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-11-20 16:36:25 UTC (rev 100869)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-11-20 16:38:57 UTC (rev 100870)
@@ -1379,6 +1379,8 @@
case WebInputEvent::GestureScrollBegin:
case WebInputEvent::GestureScrollEnd:
case WebInputEvent::GestureScrollUpdate:
+ case WebInputEvent::GestureFlingStart:
+ case WebInputEvent::GestureFlingCancel:
case WebInputEvent::GestureTap:
handled = gestureEvent(*static_cast<const WebGestureEvent*>(&inputEvent));
break;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes