[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
darin at chromium.org
darin at chromium.org
Wed Dec 22 11:37:13 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3ad74adb4593f226ea5a0fc8c788e0ee5c24701a
Author: darin at chromium.org <darin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jul 31 03:19:57 2010 +0000
2010-07-30 Darin Fisher <darin at chromium.org>
Reviewed by Darin Adler.
Eliminate BackForwardList::pushStateItem
https://bugs.webkit.org/show_bug.cgi?id=43282
The layout test was previously disabled because of the assertion being
hit in BackForwardList::pushStateItem. That assertion revealed the need
for this patch.
Test: fast/loader/stateobjects/pushstate-in-iframe.html
* history/BackForwardList.h:
* history/BackForwardListChromium.cpp:
* history/BackForwardListImpl.cpp:
* history/BackForwardListImpl.h:
* loader/HistoryController.cpp: Move the logic, of adding a null state
object to the HistoryItem that was previously the current HistoryItem, to
HistoryController::pushState from BackForwardList::pushStateItem. The
BackForwardList was the wrong place for that logic since it lacked convenient
access to the target HistoryItem. It is just given the top-most HistoryItem
corresponding to the new navigation.
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::pushState):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0a96fcb..38ee360 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-30 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Eliminate BackForwardList::pushStateItem
+ https://bugs.webkit.org/show_bug.cgi?id=43282
+
+ * fast/loader/stateobjects/pushstate-in-iframe.html: Copied from LayoutTests/fast/loader/stateobjects/pushstate-in-iframe.html-disabled.
+ * fast/loader/stateobjects/pushstate-in-iframe.html-disabled: Removed.
+
2010-07-30 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Simon Fraser.
diff --git a/LayoutTests/fast/loader/stateobjects/pushstate-in-iframe.html-disabled b/LayoutTests/fast/loader/stateobjects/pushstate-in-iframe.html
similarity index 100%
rename from LayoutTests/fast/loader/stateobjects/pushstate-in-iframe.html-disabled
rename to LayoutTests/fast/loader/stateobjects/pushstate-in-iframe.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9376af7..84d0e34 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2010-07-30 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Eliminate BackForwardList::pushStateItem
+ https://bugs.webkit.org/show_bug.cgi?id=43282
+
+ The layout test was previously disabled because of the assertion being
+ hit in BackForwardList::pushStateItem. That assertion revealed the need
+ for this patch.
+
+ Test: fast/loader/stateobjects/pushstate-in-iframe.html
+
+ * history/BackForwardList.h:
+ * history/BackForwardListChromium.cpp:
+ * history/BackForwardListImpl.cpp:
+ * history/BackForwardListImpl.h:
+
+ * loader/HistoryController.cpp: Move the logic, of adding a null state
+ object to the HistoryItem that was previously the current HistoryItem, to
+ HistoryController::pushState from BackForwardList::pushStateItem. The
+ BackForwardList was the wrong place for that logic since it lacked convenient
+ access to the target HistoryItem. It is just given the top-most HistoryItem
+ corresponding to the new navigation.
+
+ (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
+ (WebCore::HistoryController::pushState):
+
2010-07-30 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/history/BackForwardList.h b/WebCore/history/BackForwardList.h
index 0813054..861b43b 100644
--- a/WebCore/history/BackForwardList.h
+++ b/WebCore/history/BackForwardList.h
@@ -94,8 +94,6 @@ public:
virtual void removeItem(HistoryItem*) = 0;
virtual HistoryItemVector& entries() = 0;
- virtual void pushStateItem(PassRefPtr<HistoryItem>) = 0;
-
#if ENABLE(WML)
virtual void clearWMLPageHistory() = 0;
#endif
diff --git a/WebCore/history/BackForwardListChromium.cpp b/WebCore/history/BackForwardListChromium.cpp
index ec0f117..dc1efc9 100644
--- a/WebCore/history/BackForwardListChromium.cpp
+++ b/WebCore/history/BackForwardListChromium.cpp
@@ -121,16 +121,6 @@ HistoryItem* BackForwardListImpl::itemAtIndex(int index)
return m_client->itemAtIndex(index);
}
-void BackForwardListImpl::pushStateItem(PassRefPtr<HistoryItem> newItem)
-{
- RefPtr<HistoryItem> current = m_client->currentItem();
-
- addItem(newItem);
-
- if (!current->stateObject())
- current->setStateObject(SerializedScriptValue::create());
-}
-
HistoryItemVector& BackForwardListImpl::entries()
{
static HistoryItemVector noEntries;
diff --git a/WebCore/history/BackForwardListImpl.cpp b/WebCore/history/BackForwardListImpl.cpp
index 9da3cad..cdb888c 100644
--- a/WebCore/history/BackForwardListImpl.cpp
+++ b/WebCore/history/BackForwardListImpl.cpp
@@ -242,20 +242,6 @@ HistoryItemVector& BackForwardListImpl::entries()
return m_entries;
}
-void BackForwardListImpl::pushStateItem(PassRefPtr<HistoryItem> newItem)
-{
- ASSERT(newItem);
- ASSERT(newItem->stateObject());
-
- RefPtr<HistoryItem> current = currentItem();
- ASSERT(current);
-
- addItem(newItem);
-
- if (!current->stateObject())
- current->setStateObject(SerializedScriptValue::create());
-}
-
void BackForwardListImpl::close()
{
int size = m_entries.size();
diff --git a/WebCore/history/BackForwardListImpl.h b/WebCore/history/BackForwardListImpl.h
index 86e1227..ab92710 100644
--- a/WebCore/history/BackForwardListImpl.h
+++ b/WebCore/history/BackForwardListImpl.h
@@ -80,8 +80,6 @@ public:
void removeItem(HistoryItem*);
HistoryItemVector& entries();
- void pushStateItem(PassRefPtr<HistoryItem>);
-
#if ENABLE(WML)
void clearWMLPageHistory();
#endif
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index 3028499..c2df00c 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -619,9 +619,9 @@ void HistoryController::updateBackForwardListClippedAtTarget(bool doClip)
frameLoader->checkDidPerformFirstNavigation();
- RefPtr<HistoryItem> item = frameLoader->history()->createItemTree(m_frame, doClip);
- LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", item.get(), m_frame->loader()->documentLoader()->url().string().ascii().data());
- page->backForwardList()->addItem(item);
+ RefPtr<HistoryItem> topItem = frameLoader->history()->createItemTree(m_frame, doClip);
+ LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", topItem.get(), m_frame->loader()->documentLoader()->url().string().ascii().data());
+ page->backForwardList()->addItem(topItem.release());
}
void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
@@ -635,13 +635,19 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
// Get a HistoryItem tree for the current frame tree.
RefPtr<HistoryItem> topItem = page->mainFrame()->loader()->history()->createItemTree(m_frame, false);
- // Override data in the target item to reflect the pushState() arguments.
- HistoryItem* targetItem = m_frame->loader()->history()->currentItem();
- targetItem->setTitle(title);
- targetItem->setStateObject(stateObject);
- targetItem->setURLString(urlString);
+ // Override data in the current item (created by createItemTree) to reflect
+ // the pushState() arguments.
+ m_currentItem->setTitle(title);
+ m_currentItem->setStateObject(stateObject);
+ m_currentItem->setURLString(urlString);
+
+ // Create a null state object for the previous HistoryItem so that we will
+ // generate a popstate event when navigating back to it.
+ // FIXME: http://webkit.org/b/41372 implies that we shouldn't need this.
+ if (!m_previousItem->stateObject())
+ m_previousItem->setStateObject(SerializedScriptValue::create());
- page->backForwardList()->pushStateItem(topItem.release());
+ page->backForwardList()->addItem(topItem.release());
}
void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index e8a2637..fbe6929 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-30 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Eliminate BackForwardList::pushStateItem
+ https://bugs.webkit.org/show_bug.cgi?id=43282
+
+ * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+ * WebProcess/WebPage/WebBackForwardListProxy.h:
+
2010-07-30 Joseph Pecoraro <joepeck at webkit.org>
Reviewed by David Kilzer.
diff --git a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
index 348c8d5..e61ad87 100644
--- a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
+++ b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
@@ -264,10 +264,6 @@ HistoryItemVector& WebBackForwardListProxy::entries()
return noEntries;
}
-void WebBackForwardListProxy::pushStateItem(PassRefPtr<HistoryItem>)
-{
-}
-
#if ENABLE(WML)
void WebBackForwardListProxy::clearWMLPageHistory()
{
diff --git a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
index 21cac0b..836655c 100644
--- a/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
+++ b/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h
@@ -66,8 +66,6 @@ public:
void removeItem(WebCore::HistoryItem*);
WebCore::HistoryItemVector& entries();
- void pushStateItem(PassRefPtr<WebCore::HistoryItem>);
-
#if ENABLE(WML)
void clearWMLPageHistory();
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list