summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-22 13:36:28 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-22 13:36:28 +0200
commitc311cf639cc1d6570d67b0a80a8ba04dc992a658 (patch)
tree6e16fefc7ece11ce4ec1e475a58a537a7acebaf8 /Tools/DumpRenderTree
parent5ef7c8a6a70875d4430752d146bdcb069605d71d (diff)
downloadqtwebkit-c311cf639cc1d6570d67b0a80a8ba04dc992a658.tar.gz
Imported WebKit commit 35255d8c2fd37ba4359e75fe0ebe6aec87687f9c (http://svn.webkit.org/repository/webkit/trunk@126284)
New snapshot that includes MSVC 64-bit build fix
Diffstat (limited to 'Tools/DumpRenderTree')
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp3
-rw-r--r--Tools/DumpRenderTree/gtk/DumpRenderTree.cpp1
-rw-r--r--Tools/DumpRenderTree/gtk/EventSender.cpp9
3 files changed, 8 insertions, 5 deletions
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index a67d1e304..3ab8a8639 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -1672,8 +1672,9 @@ void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
{
// Code duplicated from RenderView::DidCommitLoadForFrame.
TestShellExtraData* extraData = static_cast<TestShellExtraData*>(frame->dataSource()->extraData());
+ bool nonBlankPageAfterReset = m_pageId == -1 && strcmp(frame->dataSource()->request().url().spec().data(), "about:blank");
- if (isNewNavigation) {
+ if (isNewNavigation || nonBlankPageAfterReset) {
// New navigation.
updateSessionHistory(frame);
m_pageId = nextPageID++;
diff --git a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
index 75986d82e..73873cd2c 100644
--- a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -450,6 +450,7 @@ static void resetDefaultsToConsistentValues()
"javascript-can-open-windows-automatically", TRUE,
"enable-offline-web-application-cache", TRUE,
"enable-universal-access-from-file-uris", TRUE,
+ "enable-file-access-from-file-uris", TRUE,
"enable-scripts", TRUE,
"enable-dom-paste", TRUE,
"default-font-family", "Times",
diff --git a/Tools/DumpRenderTree/gtk/EventSender.cpp b/Tools/DumpRenderTree/gtk/EventSender.cpp
index 4cc2ab34b..d78db9370 100644
--- a/Tools/DumpRenderTree/gtk/EventSender.cpp
+++ b/Tools/DumpRenderTree/gtk/EventSender.cpp
@@ -157,7 +157,8 @@ static JSValueRef getMenuItemTitleCallback(JSContextRef context, JSObjectRef obj
else
label = gtk_menu_item_get_label(GTK_MENU_ITEM(widget));
- return JSValueMakeString(context, JSStringCreateWithUTF8CString(label.data()));
+ JSRetainPtr<JSStringRef> itemText(Adopt, JSStringCreateWithUTF8CString(label.data()));
+ return JSValueMakeString(context, itemText.get());
}
static bool setMenuItemTitleCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
@@ -216,10 +217,10 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
GtkMenu* gtkMenu = webkit_web_view_get_context_menu(view);
if (gtkMenu) {
- GList* items = gtk_container_get_children(GTK_CONTAINER(gtkMenu));
- JSValueRef arrayValues[g_list_length(items)];
+ GOwnPtr<GList> items(gtk_container_get_children(GTK_CONTAINER(gtkMenu)));
+ JSValueRef arrayValues[g_list_length(items.get())];
int index = 0;
- for (GList* item = g_list_first(items); item; item = g_list_next(item)) {
+ for (GList* item = g_list_first(items.get()); item; item = g_list_next(item)) {
arrayValues[index] = JSObjectMake(context, getMenuItemClass(), item->data);
index++;
}