summaryrefslogtreecommitdiffstats
path: root/WebCore/history/HistoryItem.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-12-15 10:12:09 +0000
committerSteve Block <steveblock@google.com>2009-12-17 17:41:10 +0000
commit643ca7872b450ea4efacab6188849e5aac2ba161 (patch)
tree6982576c228bcd1a7efe98afed544d840751094c /WebCore/history/HistoryItem.cpp
parentd026980fde6eb3b01c1fe49441174e89cd1be298 (diff)
downloadexternal_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip
external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz
external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
Diffstat (limited to 'WebCore/history/HistoryItem.cpp')
-rw-r--r--WebCore/history/HistoryItem.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp
index ba0764c..f6fbd59 100644
--- a/WebCore/history/HistoryItem.cpp
+++ b/WebCore/history/HistoryItem.cpp
@@ -48,6 +48,7 @@ HistoryItem::HistoryItem()
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
+ , m_document(0)
{
}
@@ -60,6 +61,7 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, double ti
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
+ , m_document(0)
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -74,6 +76,7 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, const Str
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
+ , m_document(0)
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -89,6 +92,7 @@ HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa
, m_lastVisitWasFailure(false)
, m_isTargetItem(false)
, m_visitCount(0)
+ , m_document(0)
{
iconDatabase()->retainIconForPageURL(m_urlString);
}
@@ -96,6 +100,7 @@ HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa
HistoryItem::~HistoryItem()
{
ASSERT(!m_cachedPage);
+ ASSERT(!m_document);
iconDatabase()->releaseIconForPageURL(m_urlString);
#if PLATFORM(ANDROID)
if (m_bridge)
@@ -120,10 +125,9 @@ inline HistoryItem::HistoryItem(const HistoryItem& item)
, m_visitCount(item.m_visitCount)
, m_dailyVisitCounts(item.m_dailyVisitCounts)
, m_weeklyVisitCounts(item.m_weeklyVisitCounts)
+ , m_document(0)
, m_formContentType(item.m_formContentType)
{
- ASSERT(!item.m_cachedPage);
-
if (item.m_formData)
m_formData = item.m_formData->copy();
@@ -389,6 +393,35 @@ void HistoryItem::setIsTargetItem(bool flag)
#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
+<<<<<<< HEAD:WebCore/history/HistoryItem.cpp
+=======
+}
+
+void HistoryItem::setStateObject(PassRefPtr<SerializedScriptValue> object)
+{
+ ASSERT(m_document);
+ m_stateObject = object;
+}
+
+void HistoryItem::setDocument(Document* document)
+{
+ if (m_document == document)
+ return;
+
+ if (m_document)
+ m_document->unregisterHistoryItem(this);
+ if (document)
+ document->registerHistoryItem(this);
+
+ m_document = document;
+}
+
+void HistoryItem::documentDetached(Document* document)
+{
+ ASSERT_UNUSED(document, m_document == document);
+ m_document = 0;
+ m_stateObject = 0;
+>>>>>>> webkit.org at r51976:WebCore/history/HistoryItem.cpp
}
void HistoryItem::addChildItem(PassRefPtr<HistoryItem> child)