From 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 11 Aug 2009 17:01:47 +0100 Subject: Merge in WebKit r47029. --- WebCore/history/PageCache.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'WebCore/history/PageCache.cpp') diff --git a/WebCore/history/PageCache.cpp b/WebCore/history/PageCache.cpp index 7c25701..8d04f6f 100644 --- a/WebCore/history/PageCache.cpp +++ b/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 prpItem, PassRefPtr cachedPage) { ASSERT(prpItem); -- cgit v1.1