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.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index d831076..181ef9f 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -183,8 +183,16 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
size_t LayoutTestController::webHistoryItemCount()
{
- // FIXME: implement
- return 0;
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView);
+
+ if (!list)
+ return -1;
+
+ // We do not add the current page to the total count as it's not
+ // considered in DRT tests
+ return webkit_web_back_forward_list_get_back_length(list) +
+ webkit_web_back_forward_list_get_forward_length(list);
}
unsigned LayoutTestController::workerThreadCount() const
@@ -423,7 +431,11 @@ void LayoutTestController::setXSSAuditorEnabled(bool flag)
void LayoutTestController::setFrameFlatteningEnabled(bool flag)
{
- // FIXME: implement
+ WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+ ASSERT(view);
+
+ WebKitWebSettings* settings = webkit_web_view_get_settings(view);
+ g_object_set(G_OBJECT(settings), "enable-frame-flattening", flag, NULL);
}
void LayoutTestController::setSpatialNavigationEnabled(bool flag)
@@ -804,3 +816,9 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
void LayoutTestController::abortModal()
{
}
+
+bool LayoutTestController::hasSpellingMarker(int, int)
+{
+ // FIXME: Implement this.
+ return false;
+}