[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
beidson at apple.com
beidson at apple.com
Wed Mar 17 18:07:44 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit fab242852a59878a4aaeb6ce69f9541bbbc0fad7
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 1 21:10:10 2010 +0000
REGRESSION: Telling a WebView to go to its current WebHistoryItem is broken.
<rdar://problem/7699371> and https://bugs.webkit.org/show_bug.cgi?id=35532
Reviewed by Sam Weinig.
WebCore:
Test: fast/loader/api-test-go-to-current-back-forward-item.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadItem): If the current item is the same as the target item, don't
consider this to be a same document navigation.
* page/Page.cpp:
(WebCore::Page::goToItem): Hard code the "going to the same item as the current item" relationship
as a precondition for stopping all loaders, as that will be a new document load.
WebKitTools:
* DumpRenderTree/LayoutTestController.cpp:
(apiTestGoToCurrentBackForwardItemCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::apiTestGoToCurrentBackForwardItem):
Stubs for now:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::apiTestGoToCurrentBackForwardItem):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::apiTestGoToCurrentBackForwardItem):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::apiTestGoToCurrentBackForwardItem):
LayoutTests:
* fast/loader/api-test-go-to-current-back-forward-item-expected.txt: Added.
* fast/loader/api-test-go-to-current-back-forward-item.html: Added.
* platform/gtk/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4a7b3fe..3cec27b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-01 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION: Telling a WebView to go to its current WebHistoryItem is broken.
+ <rdar://problem/7699371> and https://bugs.webkit.org/show_bug.cgi?id=35532
+
+ * fast/loader/api-test-go-to-current-back-forward-item-expected.txt: Added.
+ * fast/loader/api-test-go-to-current-back-forward-item.html: Added.
+ * platform/gtk/Skipped:
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+
2010-02-27 Ilya Tikhonovsky <loislo at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item-expected.txt b/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item-expected.txt
new file mode 100644
index 0000000..3764001
--- /dev/null
+++ b/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item-expected.txt
@@ -0,0 +1,9 @@
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+This is an API test that will only work under DumpRenderTree. It tests using the WebKit api [WebView goToBackForwardItem:] to go to the current item. This needs to actually perform a "real" load, and not be treated as a same-document navigation.
diff --git a/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item.html b/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item.html
new file mode 100644
index 0000000..d3a332a
--- /dev/null
+++ b/LayoutTests/fast/loader/api-test-go-to-current-back-forward-item.html
@@ -0,0 +1,23 @@
+<script>
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpFrameLoadCallbacks();
+ if (sessionStorage.api_goto_current_bf_item) {
+ delete sessionStorage.api_goto_current_bf_item;
+ layoutTestController.notifyDone();
+ }
+}
+
+function loaded()
+{
+ if (window.layoutTestController) {
+ sessionStorage.api_goto_current_bf_item = true;
+ layoutTestController.apiTestGoToCurrentBackForwardItem();
+ }
+}
+
+</script>
+<body onload="setTimeout('loaded();', 0);">
+<pre>This is an API test that will only work under DumpRenderTree. It tests using the WebKit api [WebView goToBackForwardItem:] to go to the current item. This needs to actually perform a "real" load, and not be treated as a same-document navigation.</pre>
+</body>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 1c9c375..b8457e7 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5783,8 +5783,9 @@ fast/css/font-face-opentype.html
plugins/iframe-shims.html
fast/loader/loadInProgress.html
-# Needs platform specific API implemented in DRT, probably not relevant for non-Mac and non-Windows ports
+# Needs platform specific API implemented in DRT, maybe not relevant for non-Mac and non-Windows ports
fast/loader/api-test-new-window-data-load-base-url.html
+fast/loader/api-test-go-to-current-back-forward-item.html
# Draws squares in a totally wrong fashion
# See https://bugs.webkit.org/show_bug.cgi?id=35127
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 246baab..eeba642 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5077,8 +5077,9 @@ http/tests/misc/image-checks-for-accept.html
# https://bugs.webkit.org/show_bug.cgi?id=35086
fast/xmlhttprequest/xmlhttprequest-no-file-access.html
-# Needs platform specific API implemented in DRT, probably not relevant for non-Mac and non-Windows ports
+# Needs platform specific API implemented in DRT, maybe not relevant for non-Mac and non-Windows ports
fast/loader/api-test-new-window-data-load-base-url.html
+fast/loader/api-test-go-to-current-back-forward-item.html
# [Qt] editing tests fails after r54980
# https://bugs.webkit.org/show_bug.cgi?id=35145
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 19207cb..e46c472 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -765,7 +765,7 @@ http/tests/misc/image-checks-for-accept.html
websocket/tests/frame-lengths.html
websocket/tests/simple-stress.html
-# Needs platform specific API implemented in DRT, probably not relevant for non-Mac and non-Windows ports
+# Needs platform specific API implemented in DRT, maybe not relevant for non-Mac and non-Windows ports
fast/loader/api-test-new-window-data-load-base-url.html
# DumpRenderTree code to enable Java is currently a no-op. Windows doesn't come with Java by default.
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0544516..1cd15df 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-03-01 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION: Telling a WebView to go to its current WebHistoryItem is broken.
+ <rdar://problem/7699371> and https://bugs.webkit.org/show_bug.cgi?id=35532
+
+ Test: fast/loader/api-test-go-to-current-back-forward-item.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadItem): If the current item is the same as the target item, don't
+ consider this to be a same document navigation.
+
+ * page/Page.cpp:
+ (WebCore::Page::goToItem): Hard code the "going to the same item as the current item" relationship
+ as a precondition for stopping all loaders, as that will be a new document load.
+
2010-03-01 Robert Hogan <robert at webkit.org>
Reviewed by nobody, build fix.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 13396ec..1cff1b3 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -3820,9 +3820,11 @@ void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType)
// - The HistoryItem has a history state object
// - Navigating to an anchor within the page, with no form data stored on the target item or the current history entry,
// and the URLs in the frame tree match the history item for fragment scrolling.
+ // - The HistoryItem is not the same as the current item, because such cases are treated as a new load.
HistoryItem* currentItem = history()->currentItem();
- bool sameDocumentNavigation = (!item->formData() && !(currentItem && currentItem->formData()) && history()->urlsMatchItem(item))
- || (currentItem && item->documentSequenceNumber() == currentItem->documentSequenceNumber());
+ bool sameDocumentNavigation = ((!item->formData() && !(currentItem && currentItem->formData()) && history()->urlsMatchItem(item))
+ || (currentItem && item->documentSequenceNumber() == currentItem->documentSequenceNumber()))
+ && item != currentItem;
#if ENABLE(WML)
// All WML decks should go through the real load mechanism, not the scroll-to-anchor code
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index a11b5de..fd235a7 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -292,7 +292,7 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
{
// Abort any current load unless we're navigating the current document to a new state object
HistoryItem* currentItem = m_mainFrame->loader()->history()->currentItem();
- if (!item->stateObject() || !currentItem || item->documentSequenceNumber() != currentItem->documentSequenceNumber()) {
+ if (!item->stateObject() || !currentItem || item->documentSequenceNumber() != currentItem->documentSequenceNumber() || item == currentItem) {
// Define what to do with any open database connections. By default we stop them and terminate the database thread.
DatabasePolicy databasePolicy = DatabasePolicyStop;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 164a68b..b8c01f5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,25 @@
+2010-03-01 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION: Telling a WebView to go to its current WebHistoryItem is broken.
+ <rdar://problem/7699371> and https://bugs.webkit.org/show_bug.cgi?id=35532
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (apiTestGoToCurrentBackForwardItemCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::apiTestGoToCurrentBackForwardItem):
+
+ Stubs for now:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::apiTestGoToCurrentBackForwardItem):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::apiTestGoToCurrentBackForwardItem):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::apiTestGoToCurrentBackForwardItem):
+
2010-03-01 Dirk Pranke <dpranke at chromium.org>
Reviewed by David Levin.
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index f528b31..0eb553e 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -1278,6 +1278,13 @@ static JSValueRef apiTestNewWindowDataLoadBaseURLCallback(JSContextRef context,
return JSValueMakeUndefined(context);
}
+static JSValueRef apiTestGoToCurrentBackForwardItemCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->apiTestGoToCurrentBackForwardItem();
+ return JSValueMakeUndefined(context);
+}
+
// Static Values
static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
@@ -1355,6 +1362,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "addUserScript", addUserScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "addUserStyleSheet", addUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "apiTestNewWindowDataLoadBaseURL", apiTestNewWindowDataLoadBaseURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "apiTestGoToCurrentBackForwardItem", apiTestGoToCurrentBackForwardItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 3add32a..98765d8 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -237,6 +237,7 @@ public:
// The following API test functions should probably be moved to platform-specific
// unit tests outside of DRT once they exist.
void apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL);
+ void apiTestGoToCurrentBackForwardItem();
static const unsigned maxViewWidth;
static const unsigned maxViewHeight;
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 568ee8d..e405702 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -600,3 +600,8 @@ void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data,
{
}
+
+void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+{
+
+}
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index 66ba5f0..57df071 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -686,3 +686,9 @@ void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data,
[delegate release];
[pool release];
}
+
+void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+{
+ WebView *view = [mainFrame webView];
+ [view goToBackForwardItem:[[view backForwardList] currentItem]];
+}
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index 9f84488..b4125bf 100644
--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1169,3 +1169,20 @@ void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data,
{
}
+
+void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebBackForwardList> backForwardList;
+ if (FAILED(webView->backForwardList(&backForwardList)))
+ return;
+
+ COMPtr<IWebHistoryItem> item;
+ if (FAILED(backForwardList->currentItem(&item)))
+ return;
+
+ webView->goToBackForwardItem(item.get(), 0);
+}
diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
index ce1bda5..b0cd419 100644
--- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
@@ -386,3 +386,8 @@ void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data,
{
}
+
+void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+{
+
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list