[chromium] DRT: Add support for sending gesture scrolls without a begin
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 14:48:05 +0000 (14:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 14:48:05 +0000 (14:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81292

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-03-16
Reviewed by Kent Tamura.

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::EventSender):
(EventSender::gestureScrollFirstPoint):
* DumpRenderTree/chromium/EventSender.h:
(EventSender):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/chromium/EventSender.cpp
Tools/DumpRenderTree/chromium/EventSender.h

index 6efb249bcd3594d27ce621fe745dbeaf0c8772e6..137351e10fc82edeb47d3bb011312616b9c74d33 100644 (file)
@@ -1,3 +1,16 @@
+2012-03-16  Robert Kroeger  <rjkroege@chromium.org>
+
+        [chromium] DRT: Add support for sending gesture scrolls without a begin
+        https://bugs.webkit.org/show_bug.cgi?id=81292
+
+        Reviewed by Kent Tamura.
+
+        * DumpRenderTree/chromium/EventSender.cpp:
+        (EventSender::EventSender):
+        (EventSender::gestureScrollFirstPoint):
+        * DumpRenderTree/chromium/EventSender.h:
+        (EventSender):
+
 2012-03-02  Carlos Garcia Campos  <cgarcia@igalia.com> and Sergio Villar Senin  <svillar@igalia.com>
 
         [GTK] WebKitIconDatabase doesn't keep icons cached
index aaae2c3206ca9f2aa8752a888a3c479c5de7e05b..0fe311fcfed1fb281854b9dcfabfbd403034560f 100644 (file)
@@ -281,6 +281,7 @@ EventSender::EventSender(TestShell* shell)
     bindMethod("updateTouchPoint", &EventSender::updateTouchPoint);
     bindMethod("gestureScrollBegin", &EventSender::gestureScrollBegin);
     bindMethod("gestureScrollEnd", &EventSender::gestureScrollEnd);
+    bindMethod("gestureScrollFirstPoint", &EventSender::gestureScrollFirstPoint);
     bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate);
     bindMethod("gestureTap", &EventSender::gestureTap);
     bindMethod("zoomPageIn", &EventSender::zoomPageIn);
@@ -1086,6 +1087,16 @@ void EventSender::gestureTap(const CppArgumentList& arguments, CppVariant* resul
     gestureEvent(WebInputEvent::GestureTap, arguments);
 }
 
+void EventSender::gestureScrollFirstPoint(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
+        return;
+
+    WebPoint point(arguments[0].toInt32(), arguments[1].toInt32());
+    m_currentGestureLocation = point;
+}
+
 void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList& arguments)
 {
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
index d57a0830ef3fdae730c66b910e5f9b6ad060f659..4520acc5f2e81a7ad380f4cafc59c164026a396a 100644 (file)
@@ -99,6 +99,7 @@ public:
 
     void gestureScrollBegin(const CppArgumentList&, CppVariant*);
     void gestureScrollEnd(const CppArgumentList&, CppVariant*);
+    void gestureScrollFirstPoint(const CppArgumentList&, CppVariant*);
     void gestureScrollUpdate(const CppArgumentList&, CppVariant*);
     void gestureTap(const CppArgumentList&, CppVariant*);
     void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&);