[GTK] Fix typo in accessing union field in a GdkEvent in a WebKit2 unit test
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 14:56:51 +0000 (14:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 14:56:51 +0000 (14:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=97564

Patch by Simon Pena <spena@igalia.com> on 2012-09-25
Reviewed by Martin Robinson.

In the WebViewTest::moveMouseTo method, the wrong field in
a union was being accessed in a GdkEvent: instead of the button
field, we were supposed to act on the motion one. This patch
fixes the typo.

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::mouseMoveTo):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp

index ce072a3..470332c 100644 (file)
@@ -1,3 +1,18 @@
+2012-09-25  Simon Pena  <spena@igalia.com>
+
+        [GTK] Fix typo in accessing union field in a GdkEvent in a WebKit2 unit test
+        https://bugs.webkit.org/show_bug.cgi?id=97564
+
+        Reviewed by Martin Robinson.
+
+        In the WebViewTest::moveMouseTo method, the wrong field in
+        a union was being accessed in a GdkEvent: instead of the button
+        field, we were supposed to act on the motion one. This patch
+        fixes the typo.
+
+        * UIProcess/API/gtk/tests/WebViewTest.cpp:
+        (WebViewTest::mouseMoveTo):
+
 2012-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Don't use the C API internally in WebKitFindController
index a8d20f8..0474748 100644 (file)
@@ -238,7 +238,7 @@ void WebViewTest::mouseMoveTo(int x, int y, unsigned int mouseModifiers)
     event->motion.time = GDK_CURRENT_TIME;
     event->motion.window = gtk_widget_get_window(viewWidget);
     g_object_ref(event->motion.window);
-    event->button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
+    event->motion.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
     event->motion.state = mouseModifiers;
     event->motion.axes = 0;