diff options
author | Steve Block <steveblock@google.com> | 2010-08-04 11:41:34 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-08-09 12:04:44 +0100 |
commit | db14019a23d96bc8a444b6576a5da8bd1cfbc8b0 (patch) | |
tree | 9f793c5b0f5e1f2aca8247158920e2c4bf962bbf /WebKitTools/DumpRenderTree/gtk | |
parent | bf916837aa84f1e4b00e6ed6268516c2acd27545 (diff) | |
download | external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.zip external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.gz external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.bz2 |
Merge WebKit at r64523 : Initial merge by git.
Change-Id: Ibb796c6802e757b1d9b40f58205cfbe4da95fcd4
Diffstat (limited to 'WebKitTools/DumpRenderTree/gtk')
-rw-r--r-- | WebKitTools/DumpRenderTree/gtk/EventSender.cpp | 32 | ||||
-rw-r--r-- | WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp | 6 |
2 files changed, 34 insertions, 4 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp index b95fec2..4f4246f 100644 --- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp +++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp @@ -103,6 +103,20 @@ static GdkWindow* gtk_widget_get_window(GtkWidget* widget) } #endif +#if !GTK_CHECK_VERSION(2, 21, 2) +static GdkDragAction gdk_drag_context_get_selected_action(GdkDragContext* context) +{ + g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), static_cast<GdkDragAction>(0)); + return context->action; +} + +static GdkDragAction gdk_drag_context_get_actions(GdkDragContext* context) +{ + g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), GDK_ACTION_DEFAULT); + return context->actions; +} +#endif + static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { return JSValueMakeBoolean(context, dragMode); @@ -371,10 +385,12 @@ static void dispatchEvent(GdkEvent event) // Simulate a drag motion on the top-level GDK window. GtkWidget* parentWidget = gtk_widget_get_parent(GTK_WIDGET(view)); - GdkWindow* parentWidgetWindow = parentWidget->window; + GdkWindow* parentWidgetWindow = gtk_widget_get_window(parentWidget); gdk_drag_motion(currentDragSourceContext, parentWidgetWindow, GDK_DRAG_PROTO_XDND, event.motion.x_root, event.motion.y_root, - currentDragSourceContext->action, currentDragSourceContext->actions, GDK_CURRENT_TIME); + gdk_drag_context_get_selected_action(currentDragSourceContext), + gdk_drag_context_get_actions(currentDragSourceContext), + GDK_CURRENT_TIME); } else if (currentDragSourceContext && event.type == GDK_BUTTON_RELEASE) { // We've released the mouse button, we should just be able to spin the @@ -456,9 +472,13 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS gdkKeySym = GDK_KP_Home; else if (JSStringIsEqualToUTF8CString(character, "end")) gdkKeySym = GDK_KP_End; + else if (JSStringIsEqualToUTF8CString(character, "insert")) + gdkKeySym = GDK_KP_Insert; + else if (JSStringIsEqualToUTF8CString(character, "delete")) + gdkKeySym = GDK_KP_Delete; else - // Assume we only get arrow/pgUp/pgDn/home/end keys with - // location=NUMPAD for now. + // If we get some other key specified with the numpad location, + // crash here, so we add it sooner rather than later. g_assert_not_reached(); } else { if (JSStringIsEqualToUTF8CString(character, "leftArrow")) @@ -477,8 +497,12 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS gdkKeySym = GDK_Home; else if (JSStringIsEqualToUTF8CString(character, "end")) gdkKeySym = GDK_End; + else if (JSStringIsEqualToUTF8CString(character, "insert")) + gdkKeySym = GDK_Insert; else if (JSStringIsEqualToUTF8CString(character, "delete")) gdkKeySym = GDK_Delete; + else if (JSStringIsEqualToUTF8CString(character, "printScreen")) + gdkKeySym = GDK_Print; else if (JSStringIsEqualToUTF8CString(character, "F1")) gdkKeySym = GDK_F1; else if (JSStringIsEqualToUTF8CString(character, "F2")) diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp index 5c942d3..2aece10 100644 --- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp +++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp @@ -442,6 +442,12 @@ void LayoutTestController::disableImageLoading() // Also need to make sure image loading is re-enabled for each new test. } +void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma) +{ + // FIXME: Implement for DeviceOrientation layout tests. + // See https://bugs.webkit.org/show_bug.cgi?id=30335. +} + void LayoutTestController::setMockGeolocationPosition(double latitude, double longitude, double accuracy) { // FIXME: Implement for Geolocation layout tests. |