Rename pageCache() to PageCache::shared() and return a reference
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 09:33:54 +0000 (09:33 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 09:33:54 +0000 (09:33 +0000)
commitbdf79dfafa5f9ac41859177ae82069eda6e1b15d
tree89c3dda3ecb966c6f2bef37fdb9994b59d4958fb
parente3d5208ebb7975a24f294738659468758abd0af0
Rename pageCache() to PageCache::shared() and return a reference
https://bugs.webkit.org/show_bug.cgi?id=140983

Reviewed by Andreas Kling.

Rename pageCache() to PageCache::shared() as this is a singleton class
and have it return a reference instead of a pointer.

Source/WebCore:

* history/BackForwardList.cpp:
(WebCore::BackForwardList::addItem):
(WebCore::BackForwardList::setCapacity):
(WebCore::BackForwardList::clearAllPageCaches):
(WebCore::BackForwardList::close):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setURL):
* history/PageCache.cpp:
(WebCore::PageCache::shared):
(WebCore::PageCache::get):
(WebCore::pageCache): Deleted.
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
(WebCore::HistoryController::updateForReload):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setPagination):
(WebCore::Page::setVisitedLinkStore):
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged):
* page/Settings.cpp:
(WebCore::Settings::setUsesPageCache):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

Source/WebKit/mac:

* History/WebBackForwardList.mm:
(-[WebBackForwardList pageCacheSize]):
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics cachedPageCount]):
(+[WebCoreStatistics cachedFrameCount]):
* WebCoreSupport/WebVisitedLinkStore.mm:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::removeVisitedLink):
(WebVisitedLinkStore::addVisitedLinkHash):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::cachedPageCount):
(WebCoreStatistics::cachedFrameCount):
* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::addVisitedLinkHash):
* WebView.cpp:
(WebView::setCacheModel):

Source/WebKit2:

* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/history/BackForwardList.cpp
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/PageCache.cpp
Source/WebCore/history/PageCache.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/WebBackForwardList.mm
Source/WebKit/mac/Misc/WebCoreStatistics.mm
Source/WebKit/mac/WebCoreSupport/WebVisitedLinkStore.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreStatistics.cpp
Source/WebKit/win/WebCoreSupport/WebVisitedLinkStore.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/VisitedLinkTableController.cpp
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp