WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2007 23:55:56 +0000 (23:55 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2007 23:55:56 +0000 (23:55 +0000)
commit8656296e5e23015c31eb16073c3f8d7c31e17fc6
treef0466d22feb1542ddcb61abe5d1ab4060d0fbb56
parent060db4c3a3a74b01cf5fc227334acc60904a1afe
WebCore:

        Reviewed by Darin

        <rdar://problem/4887095> - PageCache and PageState should be combined

        These two objects are a relic of when the PageCache was split between WebCore and WebKit
        It just makes good sense to combine them now, and the new object is more appropriately
        called "CachedPage"

        This patch is vast in scope, but simple in depth - anywhere a PageCache or PageState object
        was used has been adjusted to use a CachedPage object instead.  The most notable change is
        that HistoryItem - which always used to have a PageCache object which may or may not have
        had a PageState - now may or may not have a CachedPage.  This actually simplifies the
        HistoryItem code a bit while making the role of CachedPage much more clear.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::addItem):
        (WebCore::BackForwardList::setCapacity):
        (WebCore::BackForwardList::setPageCacheSize):
        (WebCore::BackForwardList::clearPageCache):
        (WebCore::BackForwardList::close):

        * history/PageCache.cpp: Removed.
        * history/PageCache.h: Removed.
        * page/PageState.cpp: Removed.
        * page/PageState.h: Removed.
        * history/CachedPage.cpp: Added.
        (WebCore::CachedPage::create):
        (WebCore::CachedPage::CachedPage):
        (WebCore::CachedPage::~CachedPage):
        (WebCore::CachedPage::restore):
        (WebCore::CachedPage::clear):
        (WebCore::CachedPage::setDocumentLoader):
        (WebCore::CachedPage::documentLoader):
        (WebCore::CachedPage::setTimeStamp):
        (WebCore::CachedPage::setTimeStampToNow):
        (WebCore::CachedPage::timeStamp):
        * history/CachedPage.h: Added.
        (WebCore::CachedPage::document):
        (WebCore::CachedPage::mousePressNode):
        (WebCore::CachedPage::URL):

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        (WebCore::HistoryItem::setCachedPage):
        (WebCore::HistoryItem::setURL):
        (WebCore::HistoryItem::alwaysAttemptToUseCachedPage):
        (WebCore::HistoryItem::setAlwaysAttemptToUseCachedPage):
        (WebCore::HistoryItem::cachedPage):
        (WebCore::cachedPagesPendingRelease):
        (WebCore::HistoryItem::releaseCachedPagesOrReschedule):
        (WebCore::HistoryItem::releaseAllPendingCachedPages):
        (WebCore::HistoryItem::scheduleCachedPageForRelease):
        * history/HistoryItem.h:
        * history/mac/HistoryItemMac.mm:

        * history/HistoryItemTimer.cpp:
        (WebCore::HistoryItemTimer::HistoryItemTimer):
        (WebCore::HistoryItemTimer::callReleaseCachedPagesOrReschedule):
        * history/HistoryItemTimer.h:

        * history/mac/PageCacheMac.mm: Removed.
        * history/mac/CachedPageMac.mm: Added.
        (WebCore::CachedPage::close):
        (WebCore::CachedPage::setDocumentView):
        (WebCore::CachedPage::documentView):

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::loadFromCachedPage):
        (WebCore::DocumentLoader::setLoadingFromCachedPage):
        (WebCore::DocumentLoader::isLoadingFromCachedPage):
        * loader/DocumentLoader.h:

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::provisionalLoadStarted):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::open):
        (WebCore::FrameLoader::startLoading):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::opened):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
        (WebCore::FrameLoader::cachePageToHistoryItem):
        (WebCore::FrameLoader::createHistoryItem):
        (WebCore::FrameLoader::purgePageCache):
        (WebCore::FrameLoader::invalidateCurrentItemCachedPage):
        (WebCore::FrameLoader::loadItem):
        (WebCore::FrameLoader::updateHistoryForStandardLoad):
        (WebCore::FrameLoader::updateHistoryForClientRedirect):
        (WebCore::FrameLoader::updateHistoryForBackForwardNavigation):
        (WebCore::FrameLoader::updateHistoryForReload):
        (WebCore::FrameLoader::updateHistoryForInternalLoad):
        (WebCore::FrameLoader::updateHistoryForCommit):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:

        * page/mac/WebCoreFrameBridge.h: Got rid of unused WebCorePageCacheStateKey
        * page/mac/WebCoreFrameBridge.mm: Ditto

        * platform/graphics/svg/SVGImage.cpp:
        * platform/graphics/svg/SVGImageEmptyClients.h: Update to reflect the new names
        (WebCore::SVGEmptyFrameLoaderClient::loadProvisionalItemFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::invalidateCurrentItemCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::loadedFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::clearLoadingFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::isLoadingFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::setDocumentViewFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::saveDocumentViewToCachedPage):

WebKit:

        Reviewed by Darin

        <rdar://problem/4887095> - PageCache and PageState should be combined

        WebKit side of the change to reflect the new object name of CachedPage and new Client method names

        * History/WebHistoryItem.mm:
        (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
        (+[WebHistoryItem _releaseAllPendingPageCaches]):
        (-[WebWindowWatcher windowWillClose:]):

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::setDocumentViewFromCachedPage):
        (WebFrameLoaderClient::loadedFromCachedPage):
        (WebFrameLoaderClient::saveDocumentViewToCachedPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/history/BackForwardList.cpp
WebCore/history/CachedPage.cpp [moved from WebCore/page/PageState.cpp with 84% similarity]
WebCore/history/CachedPage.h [moved from WebCore/history/PageCache.h with 65% similarity]
WebCore/history/HistoryItem.cpp
WebCore/history/HistoryItem.h
WebCore/history/HistoryItemTimer.cpp
WebCore/history/HistoryItemTimer.h
WebCore/history/PageCache.cpp [deleted file]
WebCore/history/mac/CachedPageMac.mm [moved from WebCore/history/mac/PageCacheMac.mm with 85% similarity]
WebCore/history/mac/HistoryItemMac.mm
WebCore/loader/DocumentLoader.cpp
WebCore/loader/DocumentLoader.h
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h
WebCore/loader/FrameLoaderClient.h
WebCore/page/PageState.h [deleted file]
WebCore/page/mac/WebCoreFrameBridge.h
WebCore/page/mac/WebCoreFrameBridge.mm
WebCore/platform/graphics/svg/SVGImage.cpp
WebCore/platform/graphics/svg/SVGImageEmptyClients.h
WebKit/ChangeLog
WebKit/History/WebHistoryItem.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebCoreSupport/WebFrameLoaderClient.mm