[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:56:35 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 76f47a25257a1c688cbae2743c43a144a8fd5535
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 2 13:14:24 2010 +0000

    2010-09-02  Peter Kasting  <pkasting at google.com>
    
            Reviewed by Dimitri Glazkov.
    
            Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
            https://bugs.webkit.org/show_bug.cgi?id=45073
    
            * platform/chromium/test_expectations.txt: Unskip tests that should now pass.
            * platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html: Convert mouseWheelTo() to mouseScrollBy().
    2010-09-02  Peter Kasting  <pkasting at google.com>
    
            Reviewed by Dimitri Glazkov.
    
            Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
            https://bugs.webkit.org/show_bug.cgi?id=45073
    
            * DumpRenderTree/chromium/EventSender.cpp:
            (EventSender::EventSender):
            (EventSender::mouseScrollBy):
            (EventSender::continuousMouseScrollBy):
            (EventSender::sendCurrentTouchEvent):
            (EventSender::handleMouseWheel):
            * DumpRenderTree/chromium/EventSender.h:
            * DumpRenderTree/gtk/EventSender.cpp:
            (mouseScrollByCallback):
            (continuousMouseScrollByCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7f7a62f..cb8fb5c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-02  Peter Kasting  <pkasting at google.com>
+
+        Reviewed by Dimitri Glazkov.
+
+        Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
+        https://bugs.webkit.org/show_bug.cgi?id=45073
+
+        * platform/chromium/test_expectations.txt: Unskip tests that should now pass.
+        * platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html: Convert mouseWheelTo() to mouseScrollBy().
+
 2010-09-01  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 4959f63..11b1319 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2476,10 +2476,6 @@ BUG_JIANLI MAC : fast/forms/select-style.html = IMAGE PASS
 BUG38375 : plugins/npruntime/round-trip-npobject.html = TEXT
 BUG38376 WIN : editing/deleting/5390681-2.html = IMAGE+TEXT
 
-// WebKit roll 56004 -> 56026
-BUG38278 : fast/events/continuous-platform-wheelevent-in-scrolling-div.html = TIMEOUT
-BUG38278 : fast/events/platform-wheelevent-in-scrolling-div.html = TIMEOUT
-
 // The touch targeting logic was recently changed.
 BUG36415 : fast/events/touch/touch-target.html = TEXT
 
diff --git a/LayoutTests/platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html b/LayoutTests/platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
index 7522fdd..d6de4fb 100644
--- a/LayoutTests/platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
+++ b/LayoutTests/platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
@@ -88,7 +88,7 @@ if (window.eventSender) {
     var x = overflow.offsetLeft + overflow.offsetWidth - 50;
     var y = overflow.offsetTop + overflow.offsetHeight - 50;
     eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseScrollBy(0, -1);
 
     if (overflow.scrollTop != 40 || overflow.scrollLeft != 0)
         failed();
@@ -96,8 +96,8 @@ if (window.eventSender) {
     // Scroll on top of the horizontal scrollbar
     var x = overflow.offsetLeft + overflow.offsetWidth - 50;
     var y = overflow.offsetTop + overflow.offsetHeight - 6;
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseScrollBy(0, -1);
 
     if (overflow.scrollTop != 40 || overflow.scrollLeft != 40)
         failed();
@@ -105,8 +105,8 @@ if (window.eventSender) {
     // Scroll on top of the vertical scrollbar
     var x = overflow.offsetLeft + overflow.offsetWidth - 6;
     var y = overflow.offsetTop + overflow.offsetHeight - 50;
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseScrollBy(0, -1);
 
     if (overflow.scrollTop != 80 || overflow.scrollLeft != 40)
         failed();
@@ -116,8 +116,8 @@ if (window.eventSender) {
     // Scroll inside the div
     var x = styled.offsetLeft + styled.offsetWidth - 50;
     var y = styled.offsetTop + styled.offsetHeight - 50;
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseScrollBy(0, -1);
 
     if (styled.scrollTop != 40 || styled.scrollLeft != 0)
         failed();
@@ -125,8 +125,8 @@ if (window.eventSender) {
     // Scroll on top of the horizontal scrollbar
     var x = styled.offsetLeft + styled.offsetWidth - 50;
     var y = styled.offsetTop + styled.offsetHeight - 6;
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseScrollBy(0, -1);
 
     if (styled.scrollTop != 40 || styled.scrollLeft != 40)
         failed();
@@ -134,8 +134,8 @@ if (window.eventSender) {
     // Scroll on top of the vertical scrollbar
     var x = styled.offsetLeft + styled.offsetWidth - 6;
     var y = styled.offsetTop + styled.offsetHeight - 50;
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseWheelTo(0, 1);
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseScrollBy(0, -1);
 
     if (styled.scrollTop != 80 || styled.scrollLeft != 40)
         failed();
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e465ca2..905a8e2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-02  Peter Kasting  <pkasting at google.com>
+
+        Reviewed by Dimitri Glazkov.
+
+        Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
+        https://bugs.webkit.org/show_bug.cgi?id=45073
+
+        * DumpRenderTree/chromium/EventSender.cpp:
+        (EventSender::EventSender):
+        (EventSender::mouseScrollBy):
+        (EventSender::continuousMouseScrollBy):
+        (EventSender::sendCurrentTouchEvent):
+        (EventSender::handleMouseWheel):
+        * DumpRenderTree/chromium/EventSender.h:
+        * DumpRenderTree/gtk/EventSender.cpp:
+        (mouseScrollByCallback):
+        (continuousMouseScrollByCallback):
+
 2010-09-01  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
index b6b8d6e..49421f6 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
@@ -255,7 +255,6 @@ EventSender::EventSender(TestShell* shell)
     bindMethod("mouseUp", &EventSender::mouseUp);
     bindMethod("contextClick", &EventSender::contextClick);
     bindMethod("mouseMoveTo", &EventSender::mouseMoveTo);
-    bindMethod("mouseWheelTo", &EventSender::mouseWheelTo);
     bindMethod("leapForward", &EventSender::leapForward);
     bindMethod("keyDown", &EventSender::keyDown);
     bindMethod("dispatchMessage", &EventSender::dispatchMessage);
@@ -266,6 +265,8 @@ EventSender::EventSender(TestShell* shell)
     bindMethod("textZoomOut", &EventSender::textZoomOut);
     bindMethod("zoomPageIn", &EventSender::zoomPageIn);
     bindMethod("zoomPageOut", &EventSender::zoomPageOut);
+    bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
+    bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy);
     bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousClick);
     bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles);
     bindMethod("addTouchPoint", &EventSender::addTouchPoint);
@@ -472,32 +473,6 @@ void EventSender::mouseMoveTo(const CppArgumentList& arguments, CppVariant* resu
     }
 }
 
-void EventSender::mouseWheelTo(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-
-    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
-        return;
-
-    // Force a layout here just to make sure every position has been
-    // determined before we send events (as well as all the other methods
-    // that send an event do). The layout test calling this
-    // (scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html, only one
-    // for now) does not rely on this though.
-    webview()->layout();
-
-    int horizontal = arguments[0].toInt32();
-    int vertical = arguments[1].toInt32();
-
-    WebMouseWheelEvent event;
-    initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
-    event.wheelTicksX = static_cast<float>(horizontal);
-    event.wheelTicksY = static_cast<float>(vertical);
-    event.deltaX = -horizontal * scrollbarPixelsPerTick;
-    event.deltaY = -vertical * scrollbarPixelsPerTick;
-    webview()->handleInputEvent(event);
-}
-
 void EventSender::doMouseMove(const WebMouseEvent& e)
 {
     lastMousePos = WebPoint(e.x, e.y);
@@ -714,6 +689,16 @@ void EventSender::zoomPageOut(const CppArgumentList&, CppVariant* result)
     result->setNull();
 }
 
+void EventSender::mouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+    handleMouseWheel(arguments, result, false);
+}
+
+void EventSender::continuousMouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+    handleMouseWheel(arguments, result, true);
+}
+
 void EventSender::replaySavedEvents()
 {
     replayingSavedEvents = true;
@@ -889,6 +874,34 @@ void EventSender::sendCurrentTouchEvent(const WebInputEvent::Type type)
     }
 }
 
+void EventSender::handleMouseWheel(const CppArgumentList& arguments, CppVariant* result, bool continuous)
+{
+    result->setNull();
+
+    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
+        return;
+
+    // Force a layout here just to make sure every position has been
+    // determined before we send events (as well as all the other methods
+    // that send an event do).
+    webview()->layout();
+
+    int horizontal = arguments[0].toInt32();
+    int vertical = arguments[1].toInt32();
+
+    WebMouseWheelEvent event;
+    initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
+    event.wheelTicksX = static_cast<float>(horizontal);
+    event.wheelTicksY = static_cast<float>(vertical);
+    event.deltaX = event.wheelTicksX;
+    event.deltaY = event.wheelTicksY;
+    if (!continuous) {
+        event.deltaX *= scrollbarPixelsPerTick;
+        event.deltaY *= scrollbarPixelsPerTick;
+    }
+    webview()->handleInputEvent(event);
+}
+
 void EventSender::touchEnd(const CppArgumentList&, CppVariant* result)
 {
     result->setNull();
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.h b/WebKitTools/DumpRenderTree/chromium/EventSender.h
index ac475a3..0d8fe5d 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.h
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.h
@@ -66,7 +66,6 @@ public:
     void mouseDown(const CppArgumentList&, CppVariant*);
     void mouseUp(const CppArgumentList&, CppVariant*);
     void mouseMoveTo(const CppArgumentList&, CppVariant*);
-    void mouseWheelTo(const CppArgumentList&, CppVariant*);
     void leapForward(const CppArgumentList&, CppVariant*);
     void keyDown(const CppArgumentList&, CppVariant*);
     void dispatchMessage(const CppArgumentList&, CppVariant*);
@@ -74,6 +73,8 @@ public:
     void textZoomOut(const CppArgumentList&, CppVariant*);
     void zoomPageIn(const CppArgumentList&, CppVariant*);
     void zoomPageOut(const CppArgumentList&, CppVariant*);
+    void mouseScrollBy(const CppArgumentList&, CppVariant*);
+    void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
     void scheduleAsynchronousClick(const CppArgumentList&, CppVariant*);
     void beginDragWithFiles(const CppArgumentList&, CppVariant*);
     CppVariant dragMode;
@@ -137,6 +138,9 @@ private:
     // Compose a touch event from the current touch points and send it.
     void sendCurrentTouchEvent(const WebKit::WebInputEvent::Type);
 
+    // Handle a request to send a wheel event.
+    void handleMouseWheel(const CppArgumentList&, CppVariant*, bool continuous);
+
     ScopedRunnableMethodFactory<EventSender> m_methodFactory;
 
     // Non-owning pointer.  The EventSender is owned by the TestShell.
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index 278a5c9..63a4b81 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -269,7 +269,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
     if (!view)
@@ -294,13 +294,13 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
     g_object_ref(event->scroll.window);
 
     if (horizontal < 0)
-        event->scroll.direction = GDK_SCROLL_LEFT;
-    else if (horizontal > 0)
         event->scroll.direction = GDK_SCROLL_RIGHT;
+    else if (horizontal > 0)
+        event->scroll.direction = GDK_SCROLL_LEFT;
     else if (vertical < 0)
-        event->scroll.direction = GDK_SCROLL_UP;
-    else if (vertical > 0)
         event->scroll.direction = GDK_SCROLL_DOWN;
+    else if (vertical > 0)
+        event->scroll.direction = GDK_SCROLL_UP;
     else
         g_assert_not_reached();
 
@@ -308,6 +308,12 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef continuousMouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    // GTK doesn't support continuous scroll events.
+    return JSValueMakeUndefined(context);
+}
+
 static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     if (argumentCount < 1)
@@ -596,7 +602,8 @@ static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function
 }
 
 static JSStaticFunction staticFunctions[] = {
-    { "mouseWheelTo", mouseWheelToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+    { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+    { "continuousMouseScrollBy", continuousMouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "contextClick", contextClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "mouseUp", mouseUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list