summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/history
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/history')
-rw-r--r--src/3rdparty/webkit/WebCore/history/BackForwardList.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/history/BackForwardList.h2
-rw-r--r--src/3rdparty/webkit/WebCore/history/CachedFrame.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/history/CachedFrame.h2
-rw-r--r--src/3rdparty/webkit/WebCore/history/HistoryItem.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/history/PageCache.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/history/PageCache.h6
7 files changed, 38 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp b/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp
index 1b7c80e85..a0636b5e4 100644
--- a/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp
+++ b/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp
@@ -266,11 +266,10 @@ bool BackForwardList::containsItem(HistoryItem* entry)
}
#if ENABLE(WML)
-void BackForwardList::clearWmlPageHistory()
+void BackForwardList::clearWMLPageHistory()
{
- PassRefPtr<HistoryItem> cur = currentItem();
-
- for (unsigned i = 0; i < m_entries.size(); ++i)
+ int size = m_entries.size();
+ for (int i = 0; i < size; ++i)
pageCache()->remove(m_entries[i].get());
m_entries.clear();
diff --git a/src/3rdparty/webkit/WebCore/history/BackForwardList.h b/src/3rdparty/webkit/WebCore/history/BackForwardList.h
index a99d387c8..fdc3360f2 100644
--- a/src/3rdparty/webkit/WebCore/history/BackForwardList.h
+++ b/src/3rdparty/webkit/WebCore/history/BackForwardList.h
@@ -97,7 +97,7 @@ public:
HistoryItemVector& entries();
#if ENABLE(WML)
- void clearWmlPageHistory();
+ void clearWMLPageHistory();
#endif
private:
diff --git a/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp b/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp
index 9a43b9dd6..5f4e746ed 100644
--- a/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp
+++ b/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp
@@ -155,4 +155,13 @@ CachedFramePlatformData* CachedFrame::cachedFramePlatformData()
return m_cachedFramePlatformData.get();
}
+int CachedFrame::descendantFrameCount() const
+{
+ int count = m_childFrames.size();
+ for (size_t i = 0; i < m_childFrames.size(); ++i)
+ count += m_childFrames[i]->descendantFrameCount();
+
+ return count;
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/history/CachedFrame.h b/src/3rdparty/webkit/WebCore/history/CachedFrame.h
index 83c3c3c60..03024444b 100644
--- a/src/3rdparty/webkit/WebCore/history/CachedFrame.h
+++ b/src/3rdparty/webkit/WebCore/history/CachedFrame.h
@@ -60,6 +60,8 @@ public:
void setCachedFramePlatformData(CachedFramePlatformData*);
CachedFramePlatformData* cachedFramePlatformData();
+
+ int descendantFrameCount() const;
private:
CachedFrame(Frame*);
diff --git a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
index e19933728..d2b83cf20 100644
--- a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
+++ b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp
@@ -480,7 +480,7 @@ FormData* HistoryItem::formData()
bool HistoryItem::isCurrentDocument(Document* doc) const
{
// FIXME: We should find a better way to check if this is the current document.
- return urlString() == doc->url();
+ return equalIgnoringRef(url(), doc->url());
}
void HistoryItem::mergeAutoCompleteHints(HistoryItem* otherItem)
diff --git a/src/3rdparty/webkit/WebCore/history/PageCache.cpp b/src/3rdparty/webkit/WebCore/history/PageCache.cpp
index 7c25701c9..8d04f6f9b 100644
--- a/src/3rdparty/webkit/WebCore/history/PageCache.cpp
+++ b/src/3rdparty/webkit/WebCore/history/PageCache.cpp
@@ -63,6 +63,23 @@ void PageCache::setCapacity(int capacity)
prune();
}
+int PageCache::frameCount() const
+{
+ int frameCount = 0;
+ for (HistoryItem* current = m_head; current; current = current->m_next) {
+ ++frameCount;
+ ASSERT(current->m_cachedPage);
+ frameCount += current->m_cachedPage ? current->m_cachedPage->cachedMainFrame()->descendantFrameCount() : 0;
+ }
+
+ return frameCount;
+}
+
+int PageCache::autoreleasedPageCount() const
+{
+ return m_autoreleaseSet.size();
+}
+
void PageCache::add(PassRefPtr<HistoryItem> prpItem, PassRefPtr<CachedPage> cachedPage)
{
ASSERT(prpItem);
diff --git a/src/3rdparty/webkit/WebCore/history/PageCache.h b/src/3rdparty/webkit/WebCore/history/PageCache.h
index ad15ab622..607a87d82 100644
--- a/src/3rdparty/webkit/WebCore/history/PageCache.h
+++ b/src/3rdparty/webkit/WebCore/history/PageCache.h
@@ -37,7 +37,7 @@ namespace WebCore {
class CachedPage;
class HistoryItem;
- class PageCache : Noncopyable {
+ class PageCache : public Noncopyable {
public:
friend PageCache* pageCache();
@@ -49,6 +49,10 @@ namespace WebCore {
CachedPage* get(HistoryItem* item) { return item ? item->m_cachedPage.get() : 0; }
void releaseAutoreleasedPagesNow();
+
+ int pageCount() const { return m_size; }
+ int frameCount() const;
+ int autoreleasedPageCount() const;
private:
typedef HashSet<RefPtr<CachedPage> > CachedPageSet;