summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/gtk')
-rw-r--r--WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp14
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.cpp20
-rw-r--r--WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp12
3 files changed, 30 insertions, 16 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index d186ffa..fbdbd23 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "AccessibilityUIElement.h"
+#include "GOwnPtr.h"
#include "GRefPtr.h"
#include <JavaScriptCore/JSStringRef.h>
@@ -198,7 +199,10 @@ JSStringRef AccessibilityUIElement::role()
if (!role)
return JSStringCreateWithCharacters(0, 0);
- return JSStringCreateWithUTF8CString(atk_role_get_name(role));
+ const gchar* roleName = atk_role_get_name(role);
+ GOwnPtr<gchar> axRole(g_strdup_printf("AXRole: %s", roleName));
+
+ return JSStringCreateWithUTF8CString(axRole.get());
}
JSStringRef AccessibilityUIElement::subrole()
@@ -218,7 +222,9 @@ JSStringRef AccessibilityUIElement::title()
if (!name)
return JSStringCreateWithCharacters(0, 0);
- return JSStringCreateWithUTF8CString(name);
+ GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name));
+
+ return JSStringCreateWithUTF8CString(axTitle.get());
}
JSStringRef AccessibilityUIElement::description()
@@ -228,7 +234,9 @@ JSStringRef AccessibilityUIElement::description()
if (!description)
return JSStringCreateWithCharacters(0, 0);
- return JSStringCreateWithUTF8CString(description);
+ GOwnPtr<gchar> axDesc(g_strdup_printf("AXDescription: %s", description));
+
+ return JSStringCreateWithUTF8CString(axDesc.get());
}
JSStringRef AccessibilityUIElement::stringValue()
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index 7836ff0..4936fe5 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -96,6 +96,14 @@ static void gdk_window_get_root_coords(GdkWindow* window, gint x, gint y, gint*
}
#endif
+#if !GTK_CHECK_VERSION(2, 14, 0)
+static GdkWindow* gtk_widget_get_window(GtkWidget* widget)
+{
+ g_return_val_if_fail(GTK_IS_WIDGET(widget), 0);
+ return widget->window;
+}
+#endif
+
static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
return JSValueMakeBoolean(context, dragMode);
@@ -139,13 +147,13 @@ bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber)
event->button.button = gdkButtonNumber;
event->button.x = lastMousePositionX;
event->button.y = lastMousePositionY;
- event->button.window = GTK_WIDGET(view)->window;
+ event->button.window = gtk_widget_get_window(GTK_WIDGET(view));
event->button.device = gdk_device_get_core_pointer();
event->button.state = getStateFlags();
event->button.time = GDK_CURRENT_TIME;
int xRoot, yRoot;
- gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
+ gdk_window_get_root_coords(gtk_widget_get_window(GTK_WIDGET(view)), lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
event->button.x_root = xRoot;
event->button.y_root = yRoot;
@@ -266,12 +274,12 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
event.motion.y = lastMousePositionY;
event.motion.time = GDK_CURRENT_TIME;
- event.motion.window = GTK_WIDGET(view)->window;
+ event.motion.window = gtk_widget_get_window(GTK_WIDGET(view));
event.motion.device = gdk_device_get_core_pointer();
event.motion.state = getStateFlags();
int xRoot, yRoot;
- gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
+ gdk_window_get_root_coords(gtk_widget_get_window(GTK_WIDGET(view)), lastMousePositionX, lastMousePositionY, &xRoot, &yRoot);
event.motion.x_root = xRoot;
event.motion.y_root = yRoot;
@@ -301,7 +309,7 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
event.scroll.x = lastMousePositionX;
event.scroll.y = lastMousePositionY;
event.scroll.time = GDK_CURRENT_TIME;
- event.scroll.window = GTK_WIDGET(view)->window;
+ event.scroll.window = gtk_widget_get_window(GTK_WIDGET(view));
if (horizontal < 0)
event.scroll.direction = GDK_SCROLL_LEFT;
@@ -499,7 +507,7 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
memset(&event, 0, sizeof(event));
event.key.keyval = gdkKeySym;
event.key.state = state;
- event.key.window = GTK_WIDGET(view)->window;
+ event.key.window = gtk_widget_get_window(GTK_WIDGET(view));
// When synthesizing an event, an invalid hardware_keycode value
// can cause it to be badly processed by Gtk+.
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 6f8e637..1814933 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -183,13 +183,7 @@ bool LayoutTestController::isPageBoxVisible(int pageNumber) const
return false;
}
-JSRetainPtr<JSStringRef> LayoutTestController::pageAreaRectInPixels(int pageNumber) const
-{
- // FIXME: implement
- return JSRetainPtr<JSStringRef>();
-}
-
-JSRetainPtr<JSStringRef> LayoutTestController::preferredPageSizeInPixels(int pageNumber) const
+JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const
{
// FIXME: implement
return JSRetainPtr<JSStringRef>();
@@ -729,3 +723,7 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
if (!strcmp(editingBehavior, "mac"))
g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_MAC, NULL);
}
+
+void LayoutTestController::abortModal()
+{
+}