summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 4ffab88..e8b8627 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -39,6 +39,7 @@
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
+#include <cstring>
#include <iostream>
#include <sstream>
#include <stdio.h>
@@ -693,3 +694,14 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
void LayoutTestController::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
{
}
+
+void LayoutTestController::setEditingBehavior(const char* editingBehavior)
+{
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+
+ if (!strcmp(editingBehavior, "win"))
+ g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_WINDOWS, NULL);
+ if (!strcmp(editingBehavior, "mac"))
+ g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_MAC, NULL);
+}