[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 12:15:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2ca2f778a15dbddceb77a2cf33c8795560de8f23
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 17 23:40:00 2010 +0000
2010-08-17 Mihai Parparita <mihaip at chromium.org>
Reviewed by Darin Fisher.
Back button after Google search result click broken
https://bugs.webkit.org/show_bug.cgi?id=44086
Added a reduced test case of Google search result click behavior,
renamed gesture-before-onload-target.html to redirect-target.html
since it's useful for this test too.
* fast/history/gesture-before-onload-form-submit-expected.txt:
* fast/history/gesture-before-onload-form-submit.html:
* fast/history/gesture-before-onload-location-href-expected.txt:
* fast/history/gesture-before-onload-location-href.html:
* fast/history/redirect-via-iframe-expected.txt: Added.
* fast/history/redirect-via-iframe.html: Added.
* fast/history/resources/iframe-redirect.html: Added.
* fast/history/resources/redirect-target.html: Renamed from LayoutTests/fast/history/resources/gesture-before-onload-target.html.
2010-08-17 Mihai Parparita <mihaip at chromium.org>
Reviewed by Darin Fisher.
Back button after Google search result click broken
https://bugs.webkit.org/show_bug.cgi?id=44086
Test: fast/history/redirect-via-iframe.html
isLoadingInAPISense doesn't quite map to onload (it also returns true
if frames are loading, even after the parent frame has fired its onload
handler). Instead, add a flag for the onload event being fired, and
use that.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::handledOnloadEvents):
(WebCore::DocumentLoader::wasOnloadHandled):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handledOnloadEvents):
* loader/RedirectScheduler.cpp:
(WebCore::RedirectScheduler::mustLockBackForwardList):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 092aff5..665dcf5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-08-17 Mihai Parparita <mihaip at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Back button after Google search result click broken
+ https://bugs.webkit.org/show_bug.cgi?id=44086
+
+ Added a reduced test case of Google search result click behavior,
+ renamed gesture-before-onload-target.html to redirect-target.html
+ since it's useful for this test too.
+
+ * fast/history/gesture-before-onload-form-submit-expected.txt:
+ * fast/history/gesture-before-onload-form-submit.html:
+ * fast/history/gesture-before-onload-location-href-expected.txt:
+ * fast/history/gesture-before-onload-location-href.html:
+ * fast/history/redirect-via-iframe-expected.txt: Added.
+ * fast/history/redirect-via-iframe.html: Added.
+ * fast/history/resources/iframe-redirect.html: Added.
+ * fast/history/resources/redirect-target.html: Renamed from LayoutTests/fast/history/resources/gesture-before-onload-target.html.
+
2010-08-17 Steve Block <steveblock at google.com>
Reviewed by Jeremy Orlow.
diff --git a/LayoutTests/fast/history/gesture-before-onload-form-submit-expected.txt b/LayoutTests/fast/history/gesture-before-onload-form-submit-expected.txt
index 9f968dc..66632ca 100644
--- a/LayoutTests/fast/history/gesture-before-onload-form-submit-expected.txt
+++ b/LayoutTests/fast/history/gesture-before-onload-form-submit-expected.txt
@@ -5,5 +5,5 @@ PASS: History item count should be 2 and is.
============== Back Forward List ==============
(file test):fast/history/gesture-before-onload-form-submit.html **nav target**
-curr-> (file test):fast/history/resources/gesture-before-onload-target.html?#2 **nav target**
+curr-> (file test):fast/history/resources/redirect-target.html?#2 **nav target**
===============================================
diff --git a/LayoutTests/fast/history/gesture-before-onload-form-submit.html b/LayoutTests/fast/history/gesture-before-onload-form-submit.html
index 85f2688..a2d1aec 100644
--- a/LayoutTests/fast/history/gesture-before-onload-form-submit.html
+++ b/LayoutTests/fast/history/gesture-before-onload-form-submit.html
@@ -1,7 +1,7 @@
<head>
</head>
<body onload="onload()">
- <form action="resources/gesture-before-onload-target.html#2">
+ <form action="resources/redirect-target.html#2">
<input type="submit" id="nav-button" value="Navigate">
</form>
<div id="manual-explanation" style="display: none; color: blue">When running this test outside of DRT, please click on the "Navigate" button.</div>
diff --git a/LayoutTests/fast/history/gesture-before-onload-location-href-expected.txt b/LayoutTests/fast/history/gesture-before-onload-location-href-expected.txt
index 94fea11..6e39d6e 100644
--- a/LayoutTests/fast/history/gesture-before-onload-location-href-expected.txt
+++ b/LayoutTests/fast/history/gesture-before-onload-location-href-expected.txt
@@ -5,5 +5,5 @@ PASS: History item count should be 2 and is.
============== Back Forward List ==============
(file test):fast/history/gesture-before-onload-location-href.html **nav target**
-curr-> (file test):fast/history/resources/gesture-before-onload-target.html#2 **nav target**
+curr-> (file test):fast/history/resources/redirect-target.html#2 **nav target**
===============================================
diff --git a/LayoutTests/fast/history/gesture-before-onload-location-href.html b/LayoutTests/fast/history/gesture-before-onload-location-href.html
index 560adcb..4c5754a 100644
--- a/LayoutTests/fast/history/gesture-before-onload-location-href.html
+++ b/LayoutTests/fast/history/gesture-before-onload-location-href.html
@@ -22,7 +22,7 @@
}
function nav() {
- window.location.href = 'resources/gesture-before-onload-target.html#2';
+ window.location.href = 'resources/redirect-target.html#2';
}
function onload() {
diff --git a/LayoutTests/fast/history/redirect-via-iframe-expected.txt b/LayoutTests/fast/history/redirect-via-iframe-expected.txt
new file mode 100644
index 0000000..ff97008
--- /dev/null
+++ b/LayoutTests/fast/history/redirect-via-iframe-expected.txt
@@ -0,0 +1,10 @@
+This page is the target of a redirect.
+
+PASS: History item count should be 2 and is.
+
+
+============== Back Forward List ==============
+ (file test):fast/history/redirect-via-iframe.html **nav target**
+ (file test):fast/history/resources/iframe-redirect.html#2 (in frame "<!--framePath //<!--frame0-->-->")
+curr-> (file test):fast/history/resources/redirect-target.html#2 **nav target**
+===============================================
diff --git a/LayoutTests/fast/history/redirect-via-iframe.html b/LayoutTests/fast/history/redirect-via-iframe.html
new file mode 100644
index 0000000..2588169
--- /dev/null
+++ b/LayoutTests/fast/history/redirect-via-iframe.html
@@ -0,0 +1,26 @@
+<head>
+</head>
+<body onload="onload()">
+</body>
+<script>
+ if (window.layoutTestController) {
+ layoutTestController.clearBackForwardList();
+ layoutTestController.waitUntilDone();
+ }
+
+ function onload() {
+ // Navigate via an iframe redirect (to change the referrer, though we're
+ // not interested in that in this test) should still generate a history
+ // entry, since we're doing it after onload.
+ window.setTimeout(navigate, 0);
+ }
+
+ function navigate()
+ {
+ var redirectIframe = document.createElement('iframe');
+ document.body.appendChild(redirectIframe);
+ redirectIframe.src = 'resources/iframe-redirect.html#2';
+ }
+
+</script>
+
diff --git a/LayoutTests/fast/history/resources/iframe-redirect.html b/LayoutTests/fast/history/resources/iframe-redirect.html
new file mode 100644
index 0000000..b835705
--- /dev/null
+++ b/LayoutTests/fast/history/resources/iframe-redirect.html
@@ -0,0 +1,3 @@
+<script>
+parent.location.href = 'redirect-target.html' + location.hash;
+</script>
diff --git a/LayoutTests/fast/history/resources/gesture-before-onload-target.html b/LayoutTests/fast/history/resources/redirect-target.html
similarity index 100%
rename from LayoutTests/fast/history/resources/gesture-before-onload-target.html
rename to LayoutTests/fast/history/resources/redirect-target.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5d00d16..a2941de 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-08-17 Mihai Parparita <mihaip at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Back button after Google search result click broken
+ https://bugs.webkit.org/show_bug.cgi?id=44086
+
+ Test: fast/history/redirect-via-iframe.html
+
+ isLoadingInAPISense doesn't quite map to onload (it also returns true
+ if frames are loading, even after the parent frame has fired its onload
+ handler). Instead, add a flag for the onload event being fired, and
+ use that.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::DocumentLoader):
+ * loader/DocumentLoader.h:
+ (WebCore::DocumentLoader::handledOnloadEvents):
+ (WebCore::DocumentLoader::wasOnloadHandled):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::handledOnloadEvents):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::mustLockBackForwardList):
+
2010-08-17 Steve Block <steveblock at google.com>
Reviewed by Jeremy Orlow.
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp
index f72495c..9798642 100644
--- a/WebCore/loader/DocumentLoader.cpp
+++ b/WebCore/loader/DocumentLoader.cpp
@@ -82,6 +82,7 @@ DocumentLoader::DocumentLoader(const ResourceRequest& req, const SubstituteData&
, m_gotFirstByte(false)
, m_primaryLoadComplete(false)
, m_isClientRedirect(false)
+ , m_wasOnloadHandled(false)
, m_stopRecordingResponses(false)
, m_substituteResourceDeliveryTimer(this, &DocumentLoader::substituteResourceDeliveryTimerFired)
, m_didCreateGlobalHistoryEntry(false)
diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h
index a83e1a3..8ec3daa 100644
--- a/WebCore/loader/DocumentLoader.h
+++ b/WebCore/loader/DocumentLoader.h
@@ -107,6 +107,8 @@ namespace WebCore {
void prepareForLoadStart();
bool isClientRedirect() const { return m_isClientRedirect; }
void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isClientRedirect; }
+ void handledOnloadEvents() { m_wasOnloadHandled = true; }
+ bool wasOnloadHandled() { return m_wasOnloadHandled; }
bool isLoadingInAPISense() const;
void setPrimaryLoadComplete(bool);
void setTitle(const String&);
@@ -265,6 +267,7 @@ namespace WebCore {
bool m_gotFirstByte;
bool m_primaryLoadComplete;
bool m_isClientRedirect;
+ bool m_wasOnloadHandled;
String m_pageTitle;
String m_pageIconURL;
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 0e5de1e..24888f2 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -2552,10 +2552,12 @@ void FrameLoader::handledOnloadEvents()
{
m_client->dispatchDidHandleOnloadEvents();
+ if (documentLoader()) {
+ documentLoader()->handledOnloadEvents();
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- if (documentLoader())
documentLoader()->applicationCacheHost()->stopDeferringEvents();
#endif
+ }
}
void FrameLoader::frameDetached()
diff --git a/WebCore/loader/RedirectScheduler.cpp b/WebCore/loader/RedirectScheduler.cpp
index aa02c30..d969f30 100644
--- a/WebCore/loader/RedirectScheduler.cpp
+++ b/WebCore/loader/RedirectScheduler.cpp
@@ -255,9 +255,9 @@ void RedirectScheduler::scheduleRedirect(double delay, const String& url)
bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame, bool wasUserGesture)
{
- // Non-user navigation before the page has loaded should not create a new back/forward item.
+ // Non-user navigation before the page has finished firing onload should not create a new back/forward item.
// See https://webkit.org/b/42861 for the original motivation for this.
- if (!wasUserGesture && targetFrame->loader()->documentLoader() && targetFrame->loader()->documentLoader()->isLoadingInAPISense())
+ if (!wasUserGesture && targetFrame->loader()->documentLoader() && !targetFrame->loader()->documentLoader()->wasOnloadHandled())
return true;
// Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list