[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.2.2-27-g91dab87
Gustavo Noronha Silva
gns at gnome.org
Thu Jul 15 21:13:17 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit a752a8f184fc6315a3cd0e7f38222a3a4a388238
Author: darin at chromium.org <darin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 22 22:57:29 2010 +0000
2010-03-22 Darin Fisher <darin at chromium.org>
Reviewed by Brady Eidson.
HistoryController::replaceState() should modify m_currentItem
instead of the current HistoryItem of the BackForwardList.
https://bugs.webkit.org/show_bug.cgi?id=36435
Test: fast/loader/stateobjects/replacestate-in-iframe.html
* loader/HistoryController.cpp:
(WebCore::HistoryController::replaceState):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 081a957..30bf972 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-22 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ HistoryController::replaceState() should modify m_currentItem
+ instead of the current HistoryItem of the BackForwardList.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36435
+
+ * fast/loader/stateobjects/replacestate-in-iframe-expected.txt: Added.
+ * fast/loader/stateobjects/replacestate-in-iframe.html: Added.
+
2010-03-18 Dan Bernstein <mitz at apple.com>
Add missing file from r56186.
diff --git a/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe-expected.txt b/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe-expected.txt
new file mode 100644
index 0000000..05fc70f
--- /dev/null
+++ b/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe-expected.txt
@@ -0,0 +1,11 @@
+main frame - has 1 onunload handler(s)
+frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
+ALERT: Navigating back...
+main frame - has 1 onunload handler(s)
+frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
+default text
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+foo
diff --git a/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe.html b/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe.html
new file mode 100644
index 0000000..42fae08
--- /dev/null
+++ b/LayoutTests/fast/loader/stateobjects/replacestate-in-iframe.html
@@ -0,0 +1,32 @@
+<script>
+if (parent == window && window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpChildFramesAsText();
+ layoutTestController.waitUntilDone();
+}
+
+function runTest() {
+ frames[0].history.replaceState("foo", "foo", "#foo");
+ location = "resources/navigate-back.html";
+}
+
+onpopstate = function(e) {
+ document.body.innerText = e.state;
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+onload = function() {
+ if (parent == window) {
+ var f = document.createElement("iframe");
+ f.src = location;
+ f.onload = function() { setTimeout(runTest, 0); };
+ document.body.appendChild(f);
+ }
+}
+
+onunload = function() {
+ // disable page cache
+}
+</script>
+<body>default text</body>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ec14f8a..78b332d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-22 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ HistoryController::replaceState() should modify m_currentItem
+ instead of the current HistoryItem of the BackForwardList.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36435
+
+ Test: fast/loader/stateobjects/replacestate-in-iframe.html
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::replaceState):
+
2010-03-18 Dan Bernstein <mitz at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index 55b68dc..e065e8e 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -656,15 +656,17 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
- Page* page = m_frame->page();
- ASSERT(page);
- HistoryItem* current = page->backForwardList()->currentItem();
- ASSERT(current);
+ // FIXME: We should always have m_currentItem here!!
+ // https://bugs.webkit.org/show_bug.cgi?id=36464
+ if (!m_currentItem) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
if (!urlString.isEmpty())
- current->setURLString(urlString);
- current->setTitle(title);
- current->setStateObject(stateObject);
+ m_currentItem->setURLString(urlString);
+ m_currentItem->setTitle(title);
+ m_currentItem->setStateObject(stateObject);
}
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list