Rename PageCache to BackForwardCache
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Oct 2019 01:44:16 +0000 (01:44 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Oct 2019 01:44:16 +0000 (01:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203048

Reviewed by Alex Christensen.

Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache.

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::suspend):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::suspend):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::suspend):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::canSuspendForDocumentSuspension const):
* bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
* bindings/js/WindowProxy.h:
* dom/ActiveDOMObject.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::createRenderTree):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::attachToCachedFrame):
(WebCore::Document::detachFromCachedFrame):
(WebCore::Document::prepareForDestruction):
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::setFocusedElement):
(WebCore::Document::takeDOMWindowFrom):
(WebCore::Document::setBackForwardCacheState):
(WebCore::Document::suspend):
(WebCore::Document::resume):
(WebCore::Document::topDocument const):
* dom/Document.h:
(WebCore::Document::backForwardCacheState const):
* dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::willEnterFullscreen):
(WebCore::FullscreenManager::didEnterFullscreen):
(WebCore::FullscreenManager::willExitFullscreen):
(WebCore::FullscreenManager::didExitFullscreen):
* dom/FullscreenManager.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
* history/BackForwardCache.cpp: Renamed from Source/WebCore/history/PageCache.cpp.
(WebCore::logBackForwardCacheFailureDiagnosticMessage):
(WebCore::canCacheFrame):
(WebCore::canCachePage):
(WebCore::BackForwardCache::singleton):
(WebCore::BackForwardCache::BackForwardCache):
(WebCore::BackForwardCache::dump const):
(WebCore::BackForwardCache::canCache const):
(WebCore::BackForwardCache::pruneToSizeNow):
(WebCore::BackForwardCache::setMaxSize):
(WebCore::BackForwardCache::frameCount const):
(WebCore::BackForwardCache::markPagesForDeviceOrPageScaleChanged):
(WebCore::BackForwardCache::markPagesForContentsSizeChanged):
(WebCore::BackForwardCache::markPagesForCaptionPreferencesChanged):
(WebCore::setBackForwardCacheState):
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::BackForwardCache::take):
(WebCore::BackForwardCache::removeAllItemsForPage):
(WebCore::BackForwardCache::get):
(WebCore::BackForwardCache::remove):
(WebCore::BackForwardCache::prune):
* history/BackForwardCache.h: Renamed from Source/WebCore/history/PageCache.h.
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::clear):
(WebCore::CachedFrame::destroy):
* history/CachedFramePlatformData.h:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setCachedPage):
(WebCore::HistoryItem::setURL):
* history/HistoryItem.h:
(WebCore::HistoryItem::isInBackForwardCache const):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::suspend):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::autoplayPermitted const):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addSubresourceLoader):
* loader/DocumentLoader.h:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::stopForBackForwardCache):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::frameDetached):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::receivedMainResourceError):
(WebCore::FrameLoader::shouldPerformFragmentNavigation):
(WebCore::FrameLoader::dispatchUnloadEvents):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
(WebCore::HistoryController::updateForReload):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::canCacheInBackForwardCache):
* loader/appcache/ApplicationCacheHost.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::suspendForBackForwardCache):
(WebCore::DOMWindow::resumeFromBackForwardCache):
(WebCore::DOMWindow::decrementScrollEventListenersCount):
* page/DOMWindow.h:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::suspendForBackForwardCache):
(WebCore::DOMWindowExtension::resumeFromBackForwardCache):
* page/DOMWindowExtension.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::backForwardCacheKey):
(WebCore::DiagnosticLoggingKeys::backForwardCacheFailureKey):
* page/DiagnosticLoggingKeys.h:
* page/EventSource.cpp:
(WebCore::EventSource::scheduleReconnect):
(WebCore::EventSource::didReceiveResponse):
(WebCore::EventSource::didReceiveData):
(WebCore::EventSource::didFinishLoading):
(WebCore::EventSource::didFail):
(WebCore::EventSource::abortConnectionAttempt):
(WebCore::EventSource::suspend):
(WebCore::EventSource::resume):
(WebCore::EventSource::dispatchMessageEvent):
* page/EventSource.h:
* page/Frame.cpp:
(WebCore::Frame::setView):
(WebCore::Frame::setDocument):
(WebCore::Frame::willDetachPage):
* page/FrameView.cpp:
(WebCore::FrameView::didRestoreFromBackForwardCache):
(WebCore::FrameView::setContentsSize):
* page/FrameView.h:
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::scheduleLayout):
* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):
* page/MemoryRelease.h:
* page/Page.cpp:
(WebCore::Page::~Page):
(WebCore::Page::setViewScaleFactor):
(WebCore::Page::setDeviceScaleFactor):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged):
* page/PerformanceLogging.cpp:
(WebCore::PerformanceLogging::memoryUsageStatistics):
* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::usesBackForwardCacheChanged):
* page/SettingsBase.h:
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc):
* page/animation/CSSAnimationController.cpp:
(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::CSSAnimationController::cancelAnimations):
(WebCore::CSSAnimationController::updateAnimations):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::sendTransitionEvent):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::sendAnimationEvent):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.h:
* rendering/SimpleLineLayoutCoverage.cpp:
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
* testing/Internals.cpp:
(WebCore::Internals::clearBackForwardCache):
(WebCore::Internals::backForwardCacheSize const):
(WebCore::Internals::preventDocumentForEnteringBackForwardCache):
* testing/Internals.h:
* testing/Internals.idl:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::suspend):

Source/WebKit:

* Shared/CacheModel.cpp:
(WebKit::calculateMemoryCacheSizes):
* Shared/CacheModel.h:
* Shared/WebPreferences.yaml:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::willGoToBackForwardListItem):
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPageCacheEnabled):
(WKPreferencesGetPageCacheEnabled):
(WKPreferencesSetPageCacheSupportsPlugins):
(WKPreferencesGetPageCacheSupportsPlugins):
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setUsesPageCache:]):
(-[WKPreferences _usesPageCache]):
(-[WKPreferences _setPageCacheSupportsPlugins:]):
(-[WKPreferences _pageCacheSupportsPlugins]):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration pageCacheEnabled]):
(-[_WKProcessPoolConfiguration setPageCacheEnabled:]):
* UIProcess/API/glib/WebKitSettings.cpp:
(webkit_settings_get_enable_page_cache):
(webkit_settings_set_enable_page_cache):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didFailProvisionalNavigationWithError):
(WebKit::NavigationState::NavigationClient::didCommitNavigation):
(WebKit::NavigationState::NavigationClient::didFinishDocumentLoad):
(WebKit::NavigationState::NavigationClient::didFinishNavigation):
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
(WebKit::NavigationState::NavigationClient::didSameDocumentNavigation):
* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldUseBackForwardCache const):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::updateBackForwardCacheCapacity):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemIsInBackForwardCache):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toBackForwardListItemState):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebKit::WebFrameLoaderClient::didRestoreFromBackForwardCache):
(WebKit::WebFrameLoaderClient::createPlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::suspendForProcessSwap):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setCacheModel):
(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::setBackForwardCacheCapacity):
(WebKit::WebProcess::clearCachedPage):
* WebProcess/WebProcess.h:

Source/WebKitLegacy/ios:

* WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

* History/BackForwardList.mm:
(BackForwardList::addItem):
(BackForwardList::setCapacity):
* History/WebBackForwardList.mm:
(-[WebBackForwardList pageCacheSize]):
* History/WebHistoryItem.mm:
* History/WebHistoryItemPrivate.h:
* Misc/WebCache.mm:
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics cachedPageCount]):
(+[WebCoreStatistics cachedFrameCount]):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache):
(WebFrameLoaderClient::didRestoreFromBackForwardCache):
* WebCoreSupport/WebVisitedLinkStore.mm:
* WebView/WebHTMLView.mm:
(-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
(-[WebHTMLView setNeedsLayout:]):
(-[WebHTMLView setNeedsToApplyStyles:]):
* WebView/WebView.mm:
(-[WebView _close]):
(-[WebView _preferencesChanged:]):
(+[WebView _setCacheModel:]):

Source/WebKitLegacy/win:

* BackForwardList.cpp:
(BackForwardList::addItem):
(BackForwardList::setCapacity):
* WebCoreStatistics.cpp:
(WebCoreStatistics::cachedPageCount):
(WebCoreStatistics::cachedFrameCount):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::didRestoreFromBackForwardCache):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebVisitedLinkStore.cpp:
* WebFrame.cpp:
(WebFrame::accessible const):
* WebView.cpp:
(WebView::setCacheModel):
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestRunner.cpp:
(overridePreferenceCallback):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
(setWebPreferencesForTestOptions):
* TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp:
(TestWebKitAPI::DOMWindowExtensionNoCache::willDisconnectDOMWindowExtensionFromGlobalObject):
(TestWebKitAPI::DOMWindowExtensionNoCache::didReconnectDOMWindowExtensionToGlobalObject):
* TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp:
(TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::DidRemoveFrameFromHiearchyInBackForwardCacheTest):
(TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::didCreatePage):
* TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::overridePreference):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* lldb/lldb_webkit.py:
(WebCoreFrame_SummaryProvider):
(WebCoreDocument_SummaryProvider):
(WebCoreDocumentProvider.page_cache_state):

LayoutTests:

* animations/resume-after-page-cache.html:
* compositing/accelerated-layers-after-back.html:
* compositing/iframes/page-cache-layer-tree.html:
* compositing/page-cache-back-crash.html:
* compositing/show-composited-iframe-on-back-button.html:
* editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
* fast/canvas/webgl/canvas-webgl-page-cache.html:
* fast/css/fontloader-page-cache.html:
* fast/dom/DeviceMotion/no-page-cache.html:
* fast/dom/DeviceOrientation/event-after-navigation.html:
* fast/dom/DeviceOrientation/no-page-cache.html:
* fast/dom/Window/timer-resume-on-navigation-back.html:
* fast/events/onunload-back-to-page-cache.html:
* fast/events/pagehide-timeout.html:
* fast/events/pagehide-xhr-open.html:
* fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
* fast/events/pageshow-pagehide-on-back-cached.html:
* fast/events/suspend-timers.html:
* fast/forms/autocomplete-off-with-default-value-does-not-clear.html:
* fast/frames/frame-crash-with-page-cache.html:
* fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html:
* fast/frames/page-hide-document-open.html:
* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html:
* fast/frames/restoring-page-cache-should-not-run-scripts.html:
* fast/harness/page-cache-crash-on-data-urls.html:
* fast/harness/use-page-cache.html:
* fast/history/back-from-page-with-focused-iframe.html:
* fast/history/go-back-to-iframe-with-plugin.html:
* fast/history/go-back-to-object-subframe.html:
* fast/history/history-back-while-pdf-in-pagecache.html:
* fast/history/page-cache-MessagePort-pending-message.html:
* fast/history/page-cache-after-window-open.html:
* fast/history/page-cache-back-navigation-crash.html:
* fast/history/page-cache-clearing-expected.txt:
* fast/history/page-cache-clearing.html:
* fast/history/page-cache-closed-audiocontext.html:
* fast/history/page-cache-createImageBitmap.html:
* fast/history/page-cache-createObjectURL-using-open-panel.html:
* fast/history/page-cache-createObjectURL.html:
* fast/history/page-cache-destroy-document.html:
* fast/history/page-cache-element-state-focused.html:
* fast/history/page-cache-execute-script-during-restore.html:
* fast/history/page-cache-geolocation-active-oneshot.html:
* fast/history/page-cache-geolocation-active-watcher.html:
* fast/history/page-cache-geolocation.html:
* fast/history/page-cache-iframe-js-url.html:
* fast/history/page-cache-indexed-closed-db.html:
* fast/history/page-cache-indexed-opened-db.html:
* fast/history/page-cache-media-source-closed-2.html:
* fast/history/page-cache-media-source-closed.html:
* fast/history/page-cache-media-source-opened.html:
* fast/history/page-cache-navigate-during-restore.html:
* fast/history/page-cache-notification-non-suspendable.html:
* fast/history/page-cache-notification-suspendable.html:
* fast/history/page-cache-removed-source-buffer.html:
* fast/history/page-cache-running-audiocontext.html:
* fast/history/page-cache-subframes-with-provisional-load.html:
* fast/history/page-cache-suspended-audiocontext.html:
* fast/history/page-cache-webdatabase-no-transaction-db.html:
* fast/history/page-cache-webdatabase-pending-transaction.html:
* fast/history/page-cache-with-opener.html:
* fast/history/pagehide-remove-iframe-crash.html:
* fast/history/resources/page-cache-window-with-iframe.html:
* fast/history/resources/page-cache-window-with-opener.html:
* fast/history/timed-refresh-in-cached-frame.html:
* fast/images/animated-gif-restored-from-bfcache.html:
* fast/loader/frames-with-unload-handlers-in-page-cache.html:
* fast/loader/image-in-page-cache.html:
* fast/loader/input-element-page-cache-crash.html:
* fast/loader/navigate-with-new-target-after-back-forward-navigation.html:
* fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html:
* fast/loader/scroll-position-restored-on-back.html:
* fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
* fast/loader/stateobjects/popstate-fires-with-page-cache.html:
* fast/loader/unschedule-relayout-after-unload.html:
* fast/loader/window-properties-restored-from-page-cache.html:
* fast/mediastream/RTCPeerConnection-page-cache.html:
* fast/overflow/horizontal-scroll-after-back.html:
* fast/scrolling/iframe-scrollable-after-back.html:
* fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html:
* fast/scrolling/ios/scroll-events-back-forward.html:
* fast/scrolling/ios/touch-scroll-back-forward.html:
* fast/scrolling/overflow-scrollable-after-back.html:
* fast/scrolling/page-cache-back-overflow-scroll-restore.html:
* fast/text-autosizing/ios/text-autosizing-after-back.html:
* fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html:
* fast/viewport/viewport-128.html:
* fast/workers/worker-page-cache.html:
* http/tests/cache/display-image-unset-allows-cached-image-load.html:
* http/tests/eventsource/eventsource-page-cache-connected.html:
* http/tests/eventsource/eventsource-page-cache-connecting.html:
* http/tests/loading/main-resource-delegates-on-back-navigation.html:
* http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html:
* http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html:
* http/tests/media/reload-after-dialog.html:
* http/tests/navigation/go-back-to-error-page.html:
* http/tests/navigation/https-in-page-cache.html:
* http/tests/navigation/https-no-store-subframe-in-page-cache.html:
* http/tests/navigation/image-load-in-pagehide-handler.html:
* http/tests/navigation/page-cache-domcache-pending-promise.html:
* http/tests/navigation/page-cache-domcachestorage-pending-promise.html:
* http/tests/navigation/page-cache-failed-xhr.html:
* http/tests/navigation/page-cache-fontfaceset.html:
* http/tests/navigation/page-cache-fragment-referrer.html:
* http/tests/navigation/page-cache-iframe-no-current-historyItem.html:
* http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html:
* http/tests/navigation/page-cache-iframe-provisional-load.html:
* http/tests/navigation/page-cache-pending-image-load-cache-partition.html:
* http/tests/navigation/page-cache-pending-image-load.html:
* http/tests/navigation/page-cache-pending-load.html:
* http/tests/navigation/page-cache-pending-ping-load-cross-origin.html:
* http/tests/navigation/page-cache-pending-ping-load-same-origin.html:
* http/tests/navigation/page-cache-requestAnimationFrame.html:
* http/tests/navigation/page-cache-xhr-in-pagehide.html:
* http/tests/navigation/page-cache-xhr.html:
* http/tests/navigation/resources/https-in-page-cache-3.html:
* http/tests/navigation/subframe-pagehide-handler-starts-load.html:
* http/tests/navigation/subframe-pagehide-handler-starts-load2.html:
* http/tests/security/cross-origin-window-open-insert-script.html:
* http/tests/security/cross-origin-window-open-javascript-url.html:
* http/tests/security/navigate-when-restoring-cached-page.html:
* http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html:
* http/tests/security/xss-DENIED-script-inject-into-inactive-window.html:
* http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html:
* http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html:
* http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html:
* http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html:
* http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html:
* http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html:
* http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html:
* http/tests/workers/service/page-cache-service-worker-pending-promise.https.html:
* http/tests/workers/service/page-caching.html:
* http/wpt/beacon/support/sendBeacon-onpagehide-window.html:
* legacy-animation-engine/animations/resume-after-page-cache.html:
* loader/go-back-cached-main-resource.html:
* loader/go-back-to-different-window-size.html:
* media/crash-closing-page-with-media-as-plugin-fallback.html:
* media/media-source/media-source-page-cache.html:
* media/restore-from-page-cache.html:
* platform/ios/ios/fixed/fixed-back-forward.html:
* plugins/crash-restoring-plugin-page-from-page-cache.html:
* plugins/frameset-with-plugin-frame.html:
* plugins/netscape-plugin-page-cache-works.html:
* storage/indexeddb/IDBRequest-page-cache.html:
* storage/indexeddb/IDBTransaction-page-cache.html:
* swipe/basic-cached-back-swipe.html:
* swipe/main-frame-pinning-requirement.html:
* swipe/pushState-cached-back-swipe.html:
* swipe/pushState-programmatic-back-while-swiping-crash.html:
* swipe/pushstate-with-manual-scrollrestoration.html:
* tiled-drawing/scrolling/null-parent-back-crash.html:
* tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
* webrtc/datachannel/datachannel-page-cache-send.html:
* webrtc/datachannel/datachannel-page-cache.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251220 268f45cc-cd09-0410-ab3c-d52691b4dbfc

298 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/resume-after-page-cache.html
LayoutTests/compositing/accelerated-layers-after-back.html
LayoutTests/compositing/iframes/page-cache-layer-tree.html
LayoutTests/compositing/page-cache-back-crash.html
LayoutTests/compositing/show-composited-iframe-on-back-button.html
LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html
LayoutTests/fast/canvas/webgl/canvas-webgl-page-cache.html
LayoutTests/fast/css/fontloader-page-cache.html
LayoutTests/fast/dom/DeviceMotion/no-page-cache.html
LayoutTests/fast/dom/DeviceOrientation/event-after-navigation.html
LayoutTests/fast/dom/DeviceOrientation/no-page-cache.html
LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
LayoutTests/fast/events/onunload-back-to-page-cache.html
LayoutTests/fast/events/pagehide-timeout.html
LayoutTests/fast/events/pagehide-xhr-open.html
LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
LayoutTests/fast/events/pageshow-pagehide-on-back-cached.html
LayoutTests/fast/events/suspend-timers.html
LayoutTests/fast/forms/autocomplete-off-with-default-value-does-not-clear.html
LayoutTests/fast/frames/frame-crash-with-page-cache.html
LayoutTests/fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html
LayoutTests/fast/frames/page-hide-document-open.html
LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html
LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts.html
LayoutTests/fast/harness/page-cache-crash-on-data-urls.html
LayoutTests/fast/harness/use-page-cache.html
LayoutTests/fast/history/back-from-page-with-focused-iframe.html
LayoutTests/fast/history/go-back-to-iframe-with-plugin.html
LayoutTests/fast/history/go-back-to-object-subframe.html
LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html
LayoutTests/fast/history/page-cache-MessagePort-pending-message.html
LayoutTests/fast/history/page-cache-after-window-open.html
LayoutTests/fast/history/page-cache-back-navigation-crash.html
LayoutTests/fast/history/page-cache-clearing-expected.txt
LayoutTests/fast/history/page-cache-clearing.html
LayoutTests/fast/history/page-cache-closed-audiocontext.html
LayoutTests/fast/history/page-cache-createImageBitmap.html
LayoutTests/fast/history/page-cache-createObjectURL-using-open-panel.html
LayoutTests/fast/history/page-cache-createObjectURL.html
LayoutTests/fast/history/page-cache-destroy-document.html
LayoutTests/fast/history/page-cache-element-state-focused.html
LayoutTests/fast/history/page-cache-execute-script-during-restore.html
LayoutTests/fast/history/page-cache-geolocation-active-oneshot.html
LayoutTests/fast/history/page-cache-geolocation-active-watcher.html
LayoutTests/fast/history/page-cache-geolocation.html
LayoutTests/fast/history/page-cache-iframe-js-url.html
LayoutTests/fast/history/page-cache-indexed-closed-db.html
LayoutTests/fast/history/page-cache-indexed-opened-db.html
LayoutTests/fast/history/page-cache-media-source-closed-2.html
LayoutTests/fast/history/page-cache-media-source-closed.html
LayoutTests/fast/history/page-cache-media-source-opened.html
LayoutTests/fast/history/page-cache-navigate-during-restore.html
LayoutTests/fast/history/page-cache-notification-non-suspendable.html
LayoutTests/fast/history/page-cache-notification-suspendable.html
LayoutTests/fast/history/page-cache-removed-source-buffer.html
LayoutTests/fast/history/page-cache-running-audiocontext.html
LayoutTests/fast/history/page-cache-subframes-with-provisional-load.html
LayoutTests/fast/history/page-cache-suspended-audiocontext.html
LayoutTests/fast/history/page-cache-webdatabase-no-transaction-db.html
LayoutTests/fast/history/page-cache-webdatabase-pending-transaction.html
LayoutTests/fast/history/page-cache-with-opener.html
LayoutTests/fast/history/pagehide-remove-iframe-crash.html
LayoutTests/fast/history/resources/page-cache-window-with-iframe.html
LayoutTests/fast/history/resources/page-cache-window-with-opener.html
LayoutTests/fast/history/timed-refresh-in-cached-frame.html
LayoutTests/fast/images/animated-gif-restored-from-bfcache.html
LayoutTests/fast/loader/frames-with-unload-handlers-in-page-cache.html
LayoutTests/fast/loader/image-in-page-cache.html
LayoutTests/fast/loader/input-element-page-cache-crash.html
LayoutTests/fast/loader/navigate-with-new-target-after-back-forward-navigation.html
LayoutTests/fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html
LayoutTests/fast/loader/scroll-position-restored-on-back.html
LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html
LayoutTests/fast/loader/unschedule-relayout-after-unload.html
LayoutTests/fast/loader/window-properties-restored-from-page-cache.html
LayoutTests/fast/mediastream/RTCPeerConnection-page-cache.html
LayoutTests/fast/overflow/horizontal-scroll-after-back.html
LayoutTests/fast/scrolling/iframe-scrollable-after-back.html
LayoutTests/fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html
LayoutTests/fast/scrolling/ios/scroll-events-back-forward.html
LayoutTests/fast/scrolling/ios/touch-scroll-back-forward.html
LayoutTests/fast/scrolling/overflow-scrollable-after-back.html
LayoutTests/fast/scrolling/page-cache-back-overflow-scroll-restore.html
LayoutTests/fast/text-autosizing/ios/text-autosizing-after-back.html
LayoutTests/fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html
LayoutTests/fast/viewport/viewport-128.html
LayoutTests/fast/workers/worker-page-cache.html
LayoutTests/http/tests/cache/display-image-unset-allows-cached-image-load.html
LayoutTests/http/tests/eventsource/eventsource-page-cache-connected.html
LayoutTests/http/tests/eventsource/eventsource-page-cache-connecting.html
LayoutTests/http/tests/loading/main-resource-delegates-on-back-navigation.html
LayoutTests/http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
LayoutTests/http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html
LayoutTests/http/tests/media/reload-after-dialog.html
LayoutTests/http/tests/navigation/go-back-to-error-page.html
LayoutTests/http/tests/navigation/https-in-page-cache.html
LayoutTests/http/tests/navigation/https-no-store-subframe-in-page-cache.html
LayoutTests/http/tests/navigation/image-load-in-pagehide-handler.html
LayoutTests/http/tests/navigation/page-cache-domcache-pending-promise.html
LayoutTests/http/tests/navigation/page-cache-domcachestorage-pending-promise.html
LayoutTests/http/tests/navigation/page-cache-failed-xhr.html
LayoutTests/http/tests/navigation/page-cache-fontfaceset.html
LayoutTests/http/tests/navigation/page-cache-fragment-referrer.html
LayoutTests/http/tests/navigation/page-cache-iframe-no-current-historyItem.html
LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html
LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html
LayoutTests/http/tests/navigation/page-cache-pending-image-load-cache-partition.html
LayoutTests/http/tests/navigation/page-cache-pending-image-load.html
LayoutTests/http/tests/navigation/page-cache-pending-load.html
LayoutTests/http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
LayoutTests/http/tests/navigation/page-cache-pending-ping-load-same-origin.html
LayoutTests/http/tests/navigation/page-cache-requestAnimationFrame.html
LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html
LayoutTests/http/tests/navigation/page-cache-xhr.html
LayoutTests/http/tests/navigation/resources/https-in-page-cache-3.html
LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load.html
LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2.html
LayoutTests/http/tests/security/cross-origin-window-open-insert-script.html
LayoutTests/http/tests/security/cross-origin-window-open-javascript-url.html
LayoutTests/http/tests/security/navigate-when-restoring-cached-page.html
LayoutTests/http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html
LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window.html
LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html
LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html
LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html
LayoutTests/http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
LayoutTests/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html
LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html
LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html
LayoutTests/http/tests/workers/service/page-cache-service-worker-pending-promise.https.html
LayoutTests/http/tests/workers/service/page-caching.html
LayoutTests/http/wpt/beacon/support/sendBeacon-onpagehide-window.html
LayoutTests/legacy-animation-engine/animations/resume-after-page-cache.html
LayoutTests/loader/go-back-cached-main-resource.html
LayoutTests/loader/go-back-to-different-window-size.html
LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html
LayoutTests/media/media-source/media-source-page-cache.html
LayoutTests/media/restore-from-page-cache.html
LayoutTests/platform/ios/ios/fixed/fixed-back-forward.html
LayoutTests/plugins/crash-restoring-plugin-page-from-page-cache.html
LayoutTests/plugins/frameset-with-plugin-frame.html
LayoutTests/plugins/netscape-plugin-page-cache-works.html
LayoutTests/storage/indexeddb/IDBRequest-page-cache.html
LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html
LayoutTests/swipe/basic-cached-back-swipe.html
LayoutTests/swipe/main-frame-pinning-requirement.html
LayoutTests/swipe/pushState-cached-back-swipe.html
LayoutTests/swipe/pushState-programmatic-back-while-swiping-crash.html
LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html
LayoutTests/tiled-drawing/scrolling/null-parent-back-crash.html
LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
LayoutTests/webrtc/datachannel/datachannel-page-cache-send.html
LayoutTests/webrtc/datachannel/datachannel-page-cache.html
Source/WebCore/ChangeLog
Source/WebCore/Headers.cmake
Source/WebCore/Modules/geolocation/Geolocation.cpp
Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/bindings/js/WindowProxy.cpp
Source/WebCore/bindings/js/WindowProxy.h
Source/WebCore/dom/ActiveDOMObject.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/FullscreenManager.cpp
Source/WebCore/dom/FullscreenManager.h
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/history/BackForwardCache.cpp [moved from Source/WebCore/history/PageCache.cpp with 70% similarity]
Source/WebCore/history/BackForwardCache.h [moved from Source/WebCore/history/PageCache.h with 87% similarity]
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/CachedFramePlatformData.h
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/HistoryItem.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/EmptyFrameLoaderClient.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
Source/WebCore/loader/appcache/ApplicationCacheHost.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindowExtension.cpp
Source/WebCore/page/DOMWindowExtension.h
Source/WebCore/page/DiagnosticLoggingKeys.cpp
Source/WebCore/page/DiagnosticLoggingKeys.h
Source/WebCore/page/EventSource.cpp
Source/WebCore/page/EventSource.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/FrameViewLayoutContext.cpp
Source/WebCore/page/MemoryRelease.cpp
Source/WebCore/page/MemoryRelease.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/PerformanceLogging.cpp
Source/WebCore/page/Settings.yaml
Source/WebCore/page/SettingsBase.cpp
Source/WebCore/page/SettingsBase.h
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/page/animation/CSSAnimationController.cpp
Source/WebCore/page/animation/ImplicitAnimation.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/CacheModel.cpp
Source/WebKit/Shared/CacheModel.h
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
Source/WebKit/UIProcess/Cocoa/NavigationState.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/ViewGestureController.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp
Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h
Source/WebKitLegacy/ios/ChangeLog
Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/History/BackForwardList.mm
Source/WebKitLegacy/mac/History/WebBackForwardList.mm
Source/WebKitLegacy/mac/History/WebHistoryItem.mm
Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h
Source/WebKitLegacy/mac/Misc/WebCache.mm
Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/BackForwardList.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreStatistics.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.cpp
Source/WebKitLegacy/win/WebFrame.cpp
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.cpp
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp
Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp
Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp
Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestOptions.h
Tools/lldb/lldb_webkit.py

index 92e351b..2155eed 100644 (file)
@@ -1,3 +1,167 @@
+2019-10-16  Chris Dumez  <cdumez@apple.com>
+
+        Rename PageCache to BackForwardCache
+        https://bugs.webkit.org/show_bug.cgi?id=203048
+
+        Reviewed by Alex Christensen.
+
+        Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache.
+
+        * animations/resume-after-page-cache.html:
+        * compositing/accelerated-layers-after-back.html:
+        * compositing/iframes/page-cache-layer-tree.html:
+        * compositing/page-cache-back-crash.html:
+        * compositing/show-composited-iframe-on-back-button.html:
+        * editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
+        * fast/canvas/webgl/canvas-webgl-page-cache.html:
+        * fast/css/fontloader-page-cache.html:
+        * fast/dom/DeviceMotion/no-page-cache.html:
+        * fast/dom/DeviceOrientation/event-after-navigation.html:
+        * fast/dom/DeviceOrientation/no-page-cache.html:
+        * fast/dom/Window/timer-resume-on-navigation-back.html:
+        * fast/events/onunload-back-to-page-cache.html:
+        * fast/events/pagehide-timeout.html:
+        * fast/events/pagehide-xhr-open.html:
+        * fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
+        * fast/events/pageshow-pagehide-on-back-cached.html:
+        * fast/events/suspend-timers.html:
+        * fast/forms/autocomplete-off-with-default-value-does-not-clear.html:
+        * fast/frames/frame-crash-with-page-cache.html:
+        * fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html:
+        * fast/frames/page-hide-document-open.html:
+        * fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html:
+        * fast/frames/restoring-page-cache-should-not-run-scripts.html:
+        * fast/harness/page-cache-crash-on-data-urls.html:
+        * fast/harness/use-page-cache.html:
+        * fast/history/back-from-page-with-focused-iframe.html:
+        * fast/history/go-back-to-iframe-with-plugin.html:
+        * fast/history/go-back-to-object-subframe.html:
+        * fast/history/history-back-while-pdf-in-pagecache.html:
+        * fast/history/page-cache-MessagePort-pending-message.html:
+        * fast/history/page-cache-after-window-open.html:
+        * fast/history/page-cache-back-navigation-crash.html:
+        * fast/history/page-cache-clearing-expected.txt:
+        * fast/history/page-cache-clearing.html:
+        * fast/history/page-cache-closed-audiocontext.html:
+        * fast/history/page-cache-createImageBitmap.html:
+        * fast/history/page-cache-createObjectURL-using-open-panel.html:
+        * fast/history/page-cache-createObjectURL.html:
+        * fast/history/page-cache-destroy-document.html:
+        * fast/history/page-cache-element-state-focused.html:
+        * fast/history/page-cache-execute-script-during-restore.html:
+        * fast/history/page-cache-geolocation-active-oneshot.html:
+        * fast/history/page-cache-geolocation-active-watcher.html:
+        * fast/history/page-cache-geolocation.html:
+        * fast/history/page-cache-iframe-js-url.html:
+        * fast/history/page-cache-indexed-closed-db.html:
+        * fast/history/page-cache-indexed-opened-db.html:
+        * fast/history/page-cache-media-source-closed-2.html:
+        * fast/history/page-cache-media-source-closed.html:
+        * fast/history/page-cache-media-source-opened.html:
+        * fast/history/page-cache-navigate-during-restore.html:
+        * fast/history/page-cache-notification-non-suspendable.html:
+        * fast/history/page-cache-notification-suspendable.html:
+        * fast/history/page-cache-removed-source-buffer.html:
+        * fast/history/page-cache-running-audiocontext.html:
+        * fast/history/page-cache-subframes-with-provisional-load.html:
+        * fast/history/page-cache-suspended-audiocontext.html:
+        * fast/history/page-cache-webdatabase-no-transaction-db.html:
+        * fast/history/page-cache-webdatabase-pending-transaction.html:
+        * fast/history/page-cache-with-opener.html:
+        * fast/history/pagehide-remove-iframe-crash.html:
+        * fast/history/resources/page-cache-window-with-iframe.html:
+        * fast/history/resources/page-cache-window-with-opener.html:
+        * fast/history/timed-refresh-in-cached-frame.html:
+        * fast/images/animated-gif-restored-from-bfcache.html:
+        * fast/loader/frames-with-unload-handlers-in-page-cache.html:
+        * fast/loader/image-in-page-cache.html:
+        * fast/loader/input-element-page-cache-crash.html:
+        * fast/loader/navigate-with-new-target-after-back-forward-navigation.html:
+        * fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html:
+        * fast/loader/scroll-position-restored-on-back.html:
+        * fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
+        * fast/loader/stateobjects/popstate-fires-with-page-cache.html:
+        * fast/loader/unschedule-relayout-after-unload.html:
+        * fast/loader/window-properties-restored-from-page-cache.html:
+        * fast/mediastream/RTCPeerConnection-page-cache.html:
+        * fast/overflow/horizontal-scroll-after-back.html:
+        * fast/scrolling/iframe-scrollable-after-back.html:
+        * fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html:
+        * fast/scrolling/ios/scroll-events-back-forward.html:
+        * fast/scrolling/ios/touch-scroll-back-forward.html:
+        * fast/scrolling/overflow-scrollable-after-back.html:
+        * fast/scrolling/page-cache-back-overflow-scroll-restore.html:
+        * fast/text-autosizing/ios/text-autosizing-after-back.html:
+        * fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html:
+        * fast/viewport/viewport-128.html:
+        * fast/workers/worker-page-cache.html:
+        * http/tests/cache/display-image-unset-allows-cached-image-load.html:
+        * http/tests/eventsource/eventsource-page-cache-connected.html:
+        * http/tests/eventsource/eventsource-page-cache-connecting.html:
+        * http/tests/loading/main-resource-delegates-on-back-navigation.html:
+        * http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html:
+        * http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html:
+        * http/tests/media/reload-after-dialog.html:
+        * http/tests/navigation/go-back-to-error-page.html:
+        * http/tests/navigation/https-in-page-cache.html:
+        * http/tests/navigation/https-no-store-subframe-in-page-cache.html:
+        * http/tests/navigation/image-load-in-pagehide-handler.html:
+        * http/tests/navigation/page-cache-domcache-pending-promise.html:
+        * http/tests/navigation/page-cache-domcachestorage-pending-promise.html:
+        * http/tests/navigation/page-cache-failed-xhr.html:
+        * http/tests/navigation/page-cache-fontfaceset.html:
+        * http/tests/navigation/page-cache-fragment-referrer.html:
+        * http/tests/navigation/page-cache-iframe-no-current-historyItem.html:
+        * http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html:
+        * http/tests/navigation/page-cache-iframe-provisional-load.html:
+        * http/tests/navigation/page-cache-pending-image-load-cache-partition.html:
+        * http/tests/navigation/page-cache-pending-image-load.html:
+        * http/tests/navigation/page-cache-pending-load.html:
+        * http/tests/navigation/page-cache-pending-ping-load-cross-origin.html:
+        * http/tests/navigation/page-cache-pending-ping-load-same-origin.html:
+        * http/tests/navigation/page-cache-requestAnimationFrame.html:
+        * http/tests/navigation/page-cache-xhr-in-pagehide.html:
+        * http/tests/navigation/page-cache-xhr.html:
+        * http/tests/navigation/resources/https-in-page-cache-3.html:
+        * http/tests/navigation/subframe-pagehide-handler-starts-load.html:
+        * http/tests/navigation/subframe-pagehide-handler-starts-load2.html:
+        * http/tests/security/cross-origin-window-open-insert-script.html:
+        * http/tests/security/cross-origin-window-open-javascript-url.html:
+        * http/tests/security/navigate-when-restoring-cached-page.html:
+        * http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html:
+        * http/tests/security/xss-DENIED-script-inject-into-inactive-window.html:
+        * http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html:
+        * http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html:
+        * http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html:
+        * http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html:
+        * http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html:
+        * http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html:
+        * http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html:
+        * http/tests/workers/service/page-cache-service-worker-pending-promise.https.html:
+        * http/tests/workers/service/page-caching.html:
+        * http/wpt/beacon/support/sendBeacon-onpagehide-window.html:
+        * legacy-animation-engine/animations/resume-after-page-cache.html:
+        * loader/go-back-cached-main-resource.html:
+        * loader/go-back-to-different-window-size.html:
+        * media/crash-closing-page-with-media-as-plugin-fallback.html:
+        * media/media-source/media-source-page-cache.html:
+        * media/restore-from-page-cache.html:
+        * platform/ios/ios/fixed/fixed-back-forward.html:
+        * plugins/crash-restoring-plugin-page-from-page-cache.html:
+        * plugins/frameset-with-plugin-frame.html:
+        * plugins/netscape-plugin-page-cache-works.html:
+        * storage/indexeddb/IDBRequest-page-cache.html:
+        * storage/indexeddb/IDBTransaction-page-cache.html:
+        * swipe/basic-cached-back-swipe.html:
+        * swipe/main-frame-pinning-requirement.html:
+        * swipe/pushState-cached-back-swipe.html:
+        * swipe/pushState-programmatic-back-while-swiping-crash.html:
+        * swipe/pushstate-with-manual-scrollrestoration.html:
+        * tiled-drawing/scrolling/null-parent-back-crash.html:
+        * tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
+        * webrtc/datachannel/datachannel-page-cache-send.html:
+        * webrtc/datachannel/datachannel-page-cache.html:
+
 2019-10-16  Tim Horton  <timothy_horton@apple.com>
 
         iOS: inputmode=none is not respected with a hardware keyboard attached
index a6622ee..e98c499 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 @-webkit-keyframes bounce {
     from {
index 3b61a44..a5fbc15 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useAcceleratedDrawing=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useAcceleratedDrawing=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
index 96c698f..054aa18 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 8f68bcd..c67f214 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 .outer { position: fixed; }
 .inner { position: absolute; }
index 5695e74..0e68a3d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 38877cb..7b8d792 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <title>Test what happens when navigating from a page with unconfirmed inline input when the page is cacheable</title>
index cba3279..9c7c837 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <style>
index 7a20a0c..98792cc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!doctype html>
 <html>
 <style>
index 59e7383..e6f9ebe 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
index 238b371..3602518 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
index 6651f51..5ec6491 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
index 302a424..2aec848 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 var timeoutValue = 100; //ms
index f0184f3..24c0a1e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
index 4801ee8..a173db3 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script src="../../resources/js-test-pre.js"></script>
 <body>
index a3b9b5c..517f41b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script src="../../resources/js-test-pre.js"></script>
 <body>
index 421286d..f2f3201 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <body>
 Test pageshow/pagehide event behavior when navigating away from a page with frames, putting the page in the page cache, then back to it.
index cf921bf..0cbbaac 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <p>Test pageshow/pagehide event behavior when navigating back to an cached page.</p>
 <script>
 if (window.testRunner) {
index 3c85f48..6ea8981 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index b3fdd2a..4556071 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
index a299cf8..6df0e42 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
index 95c14ab..c50492a 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 Passes if it does not crash.
 <script>
index db1d14e..bd03e93 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -10,7 +10,7 @@ if (window.testRunner) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
     testRunner.setCanOpenWindows();
-    internals.settings.setPageCacheSupportsPlugins(true);
+    internals.settings.setBackForwardCacheSupportsPlugins(true);
 }
 
 let newWindow;
index c145b50..6725e64 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 1187c60..2191eed 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
index a023bca..6054522 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
index 6d3f84b..e80e62f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 3c44ad5..5ddab83 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
   <head>
index f08d056..af0835b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 1b581fa..cfbc067 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index cecf604..a08658e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index fcd5de4..489ff84 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 02f8170..c78d536 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 6279da9..8e79271 100644 (file)
@@ -6,9 +6,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 pageshow - not from cache
 pagehide - entering cache
 pageshow - from cache
-PASS window.internals.pageCacheSize() > 0 is true
-window.internals.clearPageCache()
-PASS window.internals.pageCacheSize() is 0
+PASS window.internals.backForwardCacheSize() > 0 is true
+window.internals.clearBackForwardCache()
+PASS window.internals.backForwardCacheSize() is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 8aa972a..df8b47b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -13,9 +13,9 @@ if (!window.internals)
 window.addEventListener("pageshow", function(event) {
     debug("pageshow - " + (event.persisted ? "" : "not ") + "from cache");
     if (event.persisted) {
-        shouldBeTrue("window.internals.pageCacheSize() > 0");
-        evalAndLog("window.internals.clearPageCache()");
-        shouldBe("window.internals.pageCacheSize()", "0");
+        shouldBeTrue("window.internals.backForwardCacheSize() > 0");
+        evalAndLog("window.internals.clearBackForwardCache()");
+        shouldBe("window.internals.backForwardCacheSize()", "0");
         finishJSTest();
     }
 }, false);
index ffe5b29..aaae510 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 99b6513..696fddc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index bfcc2e9..f0fd6eb 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index a628c82..556c195 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 6d1d7bf..99d5e53 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
index fdef5ef..fcd91e5 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 2e34f49..c47c74e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 0ce4803..8df9808 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 94c0772..30905c6 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 4846ab6..3d06416 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
index ccc6a53..45ec3a6 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index cc09761..d074120 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index caa77cb..7d6bdb2 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index d8e3c4f..d5161cc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 818f026..28a7c1f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 955af95..0b5f6aa 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 97967ae..f488e45 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -13,7 +13,7 @@ if (window.testRunner) {
     testRunner.clearBackForwardList();
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
-    internals.clearPageCache();
+    internals.clearBackForwardCache();
 }
 sessionStorage.testStage = 'initial';
 let persisted = false;
index a62e97b..53dbacb 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 51cba5d..04b7bd6 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 0e28acf..ba1dc74 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 79b5255..49eacfd 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index cb9451f..36d50fd 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 3154401..17ecc0a 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index a4f5655..2d14144 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 0eab23d..55963bc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index f8e40e4..a2fb3bc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 5cc5143..80866d1 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index fd62bd3..494835b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index ba63011..3caf36e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 2428016..03341ac 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <body onload="redirect()">
 <!-- Needs to take two seconds, because a faster refresh would result in not creating a b/f item for the navigation -->
 <iframe src='data:text/html,<meta http-equiv="Refresh" content="2; URL=about:blank"><script>if (window.testRunner) { window.onpagehide=function(e){alert(&apos;pagehide &apos; + e.persisted)}; }</script>'></iframe>
index 828bcba..64b1510 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
     if (window.testRunner)
         testRunner.dumpAsText();
index b81f877..a37d27e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
index 7d43103..97c9bc0 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index c86b258..7f1bfe3 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
index 780ec60..11314a5 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
index 5403c1f..8e4030c 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 692c706..3110eab 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <body>
 <pre id="log"></pre>
index 93435a5..36506e6 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 if (window.testRunner) {
        testRunner.dumpAsText();
index d2e93aa..78b281c 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 14a7d9b..703ce64 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 
index f0065fd..2b847d8 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index e2f9866..c115196 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 1165447..1cda2be 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true enableBackForwardCache=true ] -->
 <html>
 <head>
   <script src="../../../resources/js-test-pre.js"></script>
index 07e135a..1ede661 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 69176a7..6f7df07 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 #puffin {
     font: Ahem 10px;
index e621c88..efeee5f 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
index 9bb3d9a..d8137ba 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
index 3feb00d..46e8382 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
     <head>
         <title>Viewport meta data stored in page cache.</title>
index 3542c36..141631e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <script src="../../resources/js-test.js"></script>
 </head>
index c669f2c..205d9c0 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index b05e474..ed6fa97 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index ca5788e..94cff7a 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 window.onpageshow = function(evt) {
index 3fe6800..a07a03b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
     <head>
index 18bd139..1effc68 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 if (window.testRunner) {
     testRunner.dumpAsText();
index eee9b26..3f09867 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
index 980f20b..23d583d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
index f098f14..903f933 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html><head>
 <title>Image load in pagehide handler</title>
 <script>
index dbe765d..75ebfce 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 72d0bc9..7c91033 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index ef9f5c3..5d62445 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 0267e5d..3dd507d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 01f63bd..185eeda 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 457e217..6df946d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 4595375..176f1b8 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 13b0f92..52490e4 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enablePageCache=true ] -->
+<!DOCTYPE html><!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <body>
 <script src="../../resources/js-test-pre.js"></script>
index 61caf07..699f0bb 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 0b11301..a2f1f4c 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 522d787..373b55d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 7dfff28..e81a053 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 window.onpageshow = function(evt) {
        if (!evt.persisted)
index a344e26..b12b1a2 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body onload="runTest()">
index c3c3755..666475c 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body onload="runTest()">
index 1164b75..aa07b1f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 266ba9c..a6bd442 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index b11a4fa..dd6f8c1 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -63,7 +63,7 @@ function runTest()
 
           // Prevent entering PageCache.
           if (w.internals)
-            w.internals.preventDocumentForEnteringPageCache();
+            w.internals.preventDocumentForEnteringBackForwardCache();
 
           child_frame = w.document.body.appendChild(document.createElement('iframe'));
           child_frame.contentWindow.onunload = () => {
index 6a3bd18..9c92856 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE html><!-- webkit-test-runner [ enableProcessSwapOnNavigation=true enablePageCache=true ] -->
+<!DOCTYPE html><!-- webkit-test-runner [ enableProcessSwapOnNavigation=true enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
index 4f26af9..511ef85 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index cbe1950..a378a54 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index ded3875..b11c0ea 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false enablePageCache=true ] -->
+<!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false enableBackForwardCache=true ] -->
 <style>
 @-webkit-keyframes bounce {
     from {
index 984f640..3555ecc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
     <title>Test resource load callbacks going back to a cached main resource</title>
index 5843e7f..0162baa 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 
index 819591e..c5d8c74 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 var childWindow;
 </script>
@@ -13,7 +13,7 @@ If it doesn't crash, it passes.<br>
 if (window.testRunner && window.internals) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
-    internals.settings.setPageCacheSupportsPlugins(true);
+    internals.settings.setBackForwardCacheSupportsPlugins(true);
     testRunner.setCanOpenWindows(true);
     testRunner.setCloseRemainingWindowsWhenComplete(true);
     var button = document.getElementById("button");
index 012ce4a..c8dc36f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index e950518..1ad2571 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
     <head>
         <script src=media-file.js></script>
index d064043..3561eee 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 6f884f3..10dc994 100644 (file)
@@ -1,10 +1,10 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <script>
 if (window.testRunner && window.internals) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
-    internals.settings.setPageCacheSupportsPlugins(true);
+    internals.settings.setBackForwardCacheSupportsPlugins(true);
 }
 
 function pageShown() {
index ca85bdc..b29906c 100644 (file)
@@ -1,11 +1,11 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script type="text/javascript" charset="utf-8">
     if (window.testRunner && window.internals) {
         testRunner.dumpAsText();
         testRunner.waitUntilDone();
         internals.settings.setFrameFlattening("FullyEnabled")
-        internals.settings.setPageCacheSupportsPlugins(true);
+        internals.settings.setBackForwardCacheSupportsPlugins(true);
     }
 </script>
 
index 4f82341..77f2be4 100644 (file)
@@ -1,10 +1,10 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 if (window.testRunner && window.internals) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
-    internals.settings.setPageCacheSupportsPlugins(true);
+    internals.settings.setBackForwardCacheSupportsPlugins(true);
 }
 
 var savedTestObject = null;
index 6de8063..c7c594b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 2c87891..bbd7c5d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 6565b07..d2fba23 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
index c81f3e6..b85ad1b 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
index a0119f1..83edab8 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
index 02fd44e..d356d21 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
index 1f1d7ae..3f0adf2 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
index 77c3c0a..23254e5 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
index 5f84a23..c4bd74f 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 170bb9f..dcf570d 100644 (file)
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
index 5dfd194..5be2957 100644 (file)
@@ -1,3 +1,218 @@
+2019-10-16  Chris Dumez  <cdumez@apple.com>
+
+        Rename PageCache to BackForwardCache
+        https://bugs.webkit.org/show_bug.cgi?id=203048
+
+        Reviewed by Alex Christensen.
+
+        Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache.
+
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::Geolocation::suspend):
+        * Modules/mediarecorder/MediaRecorder.cpp:
+        (WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::suspend):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::suspend):
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
+        * bindings/js/WindowProxy.cpp:
+        (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
+        * bindings/js/WindowProxy.h:
+        * dom/ActiveDOMObject.h:
+        * dom/Document.cpp:
+        (WebCore::Document::~Document):
+        (WebCore::Document::scheduleStyleRecalc):
+        (WebCore::Document::needsStyleRecalc const):
+        (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
+        (WebCore::Document::createRenderTree):
+        (WebCore::Document::didBecomeCurrentDocumentInFrame):
+        (WebCore::Document::attachToCachedFrame):
+        (WebCore::Document::detachFromCachedFrame):
+        (WebCore::Document::prepareForDestruction):
+        (WebCore::Document::adjustFocusedNodeOnNodeRemoval):
+        (WebCore::Document::setFocusedElement):
+        (WebCore::Document::takeDOMWindowFrom):
+        (WebCore::Document::setBackForwardCacheState):
+        (WebCore::Document::suspend):
+        (WebCore::Document::resume):
+        (WebCore::Document::topDocument const):
+        * dom/Document.h:
+        (WebCore::Document::backForwardCacheState const):
+        * dom/FullscreenManager.cpp:
+        (WebCore::FullscreenManager::willEnterFullscreen):
+        (WebCore::FullscreenManager::didEnterFullscreen):
+        (WebCore::FullscreenManager::willExitFullscreen):
+        (WebCore::FullscreenManager::didExitFullscreen):
+        * dom/FullscreenManager.h:
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
+        (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
+        * history/BackForwardCache.cpp: Renamed from Source/WebCore/history/PageCache.cpp.
+        (WebCore::logBackForwardCacheFailureDiagnosticMessage):
+        (WebCore::canCacheFrame):
+        (WebCore::canCachePage):
+        (WebCore::BackForwardCache::singleton):
+        (WebCore::BackForwardCache::BackForwardCache):
+        (WebCore::BackForwardCache::dump const):
+        (WebCore::BackForwardCache::canCache const):
+        (WebCore::BackForwardCache::pruneToSizeNow):
+        (WebCore::BackForwardCache::setMaxSize):
+        (WebCore::BackForwardCache::frameCount const):
+        (WebCore::BackForwardCache::markPagesForDeviceOrPageScaleChanged):
+        (WebCore::BackForwardCache::markPagesForContentsSizeChanged):
+        (WebCore::BackForwardCache::markPagesForCaptionPreferencesChanged):
+        (WebCore::setBackForwardCacheState):
+        (WebCore::BackForwardCache::addIfCacheable):
+        (WebCore::BackForwardCache::take):
+        (WebCore::BackForwardCache::removeAllItemsForPage):
+        (WebCore::BackForwardCache::get):
+        (WebCore::BackForwardCache::remove):
+        (WebCore::BackForwardCache::prune):
+        * history/BackForwardCache.h: Renamed from Source/WebCore/history/PageCache.h.
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrameBase::restore):
+        (WebCore::CachedFrame::CachedFrame):
+        (WebCore::CachedFrame::clear):
+        (WebCore::CachedFrame::destroy):
+        * history/CachedFramePlatformData.h:
+        * history/HistoryItem.cpp:
+        (WebCore::HistoryItem::setCachedPage):
+        (WebCore::HistoryItem::setURL):
+        * history/HistoryItem.h:
+        (WebCore::HistoryItem::isInBackForwardCache const):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::suspend):
+        (WebCore::HTMLMediaElement::resume):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::createElementRenderer):
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::suspend):
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::autoplayPermitted const):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::addSubresourceLoader):
+        * loader/DocumentLoader.h:
+        * loader/EmptyFrameLoaderClient.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::closeURL):
+        (WebCore::FrameLoader::clear):
+        (WebCore::FrameLoader::stopAllLoaders):
+        (WebCore::FrameLoader::stopForBackForwardCache):
+        (WebCore::FrameLoader::commitProvisionalLoad):
+        (WebCore::FrameLoader::open):
+        (WebCore::FrameLoader::frameDetached):
+        (WebCore::FrameLoader::detachFromParent):
+        (WebCore::FrameLoader::receivedMainResourceError):
+        (WebCore::FrameLoader::shouldPerformFragmentNavigation):
+        (WebCore::FrameLoader::dispatchUnloadEvents):
+        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
+        (WebCore::FrameLoader::loadDifferentDocumentItem):
+        * loader/FrameLoader.h:
+        * loader/FrameLoaderClient.h:
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+        (WebCore::HistoryController::restoreScrollPositionAndViewState):
+        (WebCore::HistoryController::invalidateCurrentItemCachedPage):
+        (WebCore::HistoryController::updateForReload):
+        * loader/appcache/ApplicationCacheHost.cpp:
+        (WebCore::ApplicationCacheHost::canCacheInBackForwardCache):
+        * loader/appcache/ApplicationCacheHost.h:
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::load):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::suspendForBackForwardCache):
+        (WebCore::DOMWindow::resumeFromBackForwardCache):
+        (WebCore::DOMWindow::decrementScrollEventListenersCount):
+        * page/DOMWindow.h:
+        * page/DOMWindowExtension.cpp:
+        (WebCore::DOMWindowExtension::suspendForBackForwardCache):
+        (WebCore::DOMWindowExtension::resumeFromBackForwardCache):
+        * page/DOMWindowExtension.h:
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::backForwardCacheKey):
+        (WebCore::DiagnosticLoggingKeys::backForwardCacheFailureKey):
+        * page/DiagnosticLoggingKeys.h:
+        * page/EventSource.cpp:
+        (WebCore::EventSource::scheduleReconnect):
+        (WebCore::EventSource::didReceiveResponse):
+        (WebCore::EventSource::didReceiveData):
+        (WebCore::EventSource::didFinishLoading):
+        (WebCore::EventSource::didFail):
+        (WebCore::EventSource::abortConnectionAttempt):
+        (WebCore::EventSource::suspend):
+        (WebCore::EventSource::resume):
+        (WebCore::EventSource::dispatchMessageEvent):
+        * page/EventSource.h:
+        * page/Frame.cpp:
+        (WebCore::Frame::setView):
+        (WebCore::Frame::setDocument):
+        (WebCore::Frame::willDetachPage):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::didRestoreFromBackForwardCache):
+        (WebCore::FrameView::setContentsSize):
+        * page/FrameView.h:
+        * page/FrameViewLayoutContext.cpp:
+        (WebCore::FrameViewLayoutContext::layout):
+        (WebCore::FrameViewLayoutContext::scheduleLayout):
+        * page/MemoryRelease.cpp:
+        (WebCore::releaseCriticalMemory):
+        (WebCore::releaseMemory):
+        * page/MemoryRelease.h:
+        * page/Page.cpp:
+        (WebCore::Page::~Page):
+        (WebCore::Page::setViewScaleFactor):
+        (WebCore::Page::setDeviceScaleFactor):
+        * page/Page.h:
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::captionPreferencesChanged):
+        * page/PerformanceLogging.cpp:
+        (WebCore::PerformanceLogging::memoryUsageStatistics):
+        * page/Settings.yaml:
+        * page/SettingsBase.cpp:
+        (WebCore::SettingsBase::usesBackForwardCacheChanged):
+        * page/SettingsBase.h:
+        * page/animation/AnimationBase.cpp:
+        (WebCore::AnimationBase::setNeedsStyleRecalc):
+        * page/animation/CSSAnimationController.cpp:
+        (WebCore::CSSAnimationControllerPrivate::updateAnimations):
+        (WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
+        (WebCore::CSSAnimationController::cancelAnimations):
+        (WebCore::CSSAnimationController::updateAnimations):
+        * page/animation/ImplicitAnimation.cpp:
+        (WebCore::ImplicitAnimation::sendTransitionEvent):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::sendAnimationEvent):
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
+        (WebCore::ScrollAnimatorMac::updateScrollerStyle):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintIntoLayer):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateCompositingLayers):
+        (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
+        (WebCore::RenderLayerCompositor::didAddScrollingLayer):
+        * rendering/RenderLayerCompositor.h:
+        * rendering/RenderObject.h:
+        * rendering/SimpleLineLayoutCoverage.cpp:
+        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
+        * testing/Internals.cpp:
+        (WebCore::Internals::clearBackForwardCache):
+        (WebCore::Internals::backForwardCacheSize const):
+        (WebCore::Internals::preventDocumentForEnteringBackForwardCache):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::suspend):
+
 2019-10-16  John Wilander  <wilander@apple.com>
 
         Resource Load Statistics (experimental): Block all third-party cookies on websites without prior user interaction
index 9c2b204..e85d9e3 100644 (file)
@@ -520,13 +520,13 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
     fileapi/FileReaderLoaderClient.h
     fileapi/NetworkSendQueue.h
 
+    history/BackForwardCache.h
     history/BackForwardClient.h
     history/BackForwardController.h
     history/BackForwardItemIdentifier.h
     history/CachedFrame.h
     history/CachedFramePlatformData.h
     history/HistoryItem.h
-    history/PageCache.h
 
     html/Autocapitalize.h
     html/AutocapitalizeTypes.h
index 1ec736f..acdaf79 100644 (file)
@@ -165,7 +165,7 @@ bool Geolocation::canSuspendForDocumentSuspension() const
     
 void Geolocation::suspend(ReasonForSuspension reason)
 {
-    if (reason == ReasonForSuspension::PageCache) {
+    if (reason == ReasonForSuspension::BackForwardCache) {
         stop();
         m_resetOnResume = true;
     }
index d5afd44..6c16fbc 100644 (file)
@@ -106,7 +106,7 @@ const char* MediaRecorder::activeDOMObjectName() const
 
 bool MediaRecorder::canSuspendForDocumentSuspension() const
 {
-    return false; // FIXME: We should do better here as this prevents entering PageCache.
+    return false; // FIXME: We should do better here as this prevents entering BackForwardCache.
 }
 
 ExceptionOr<void> MediaRecorder::startRecording(Optional<int> timeslice)
index 8069d52..fd120fa 100644 (file)
@@ -506,7 +506,7 @@ bool RTCPeerConnection::canSuspendForDocumentSuspension() const
 
 void RTCPeerConnection::suspend(ReasonForSuspension reason)
 {
-    if (reason != ReasonForSuspension::PageCache)
+    if (reason != ReasonForSuspension::BackForwardCache)
         return;
 
     m_shouldDelayTasks = true;
index 3038a97..b32bf98 100644 (file)
@@ -508,7 +508,7 @@ void WebSocket::suspend(ReasonForSuspension reason)
     m_shouldDelayEventFiring = true;
 
     if (m_channel) {
-        if (reason == ReasonForSuspension::PageCache) {
+        if (reason == ReasonForSuspension::BackForwardCache) {
             // This will cause didClose() to be called.
             m_channel->fail("WebSocket is closed due to suspension.");
         } else
index d9bb9af..ffbda96 100644 (file)
@@ -1085,11 +1085,11 @@ fileapi/FileReaderSync.cpp
 fileapi/NetworkSendQueue.cpp
 fileapi/ThreadableBlobRegistry.cpp
 
+history/BackForwardCache.cpp
 history/BackForwardController.cpp
 history/CachedFrame.cpp
 history/CachedPage.cpp
 history/HistoryItem.cpp
-history/PageCache.cpp
 
 html/Autofill.cpp
 html/BaseButtonInputType.cpp
index 3b36679..9155483 100644 (file)
                1432E8470C51493800B1500F /* GCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1432E8460C51493800B1500F /* GCController.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14476AA715DC4BB100305DB2 /* WritingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1449E24A107D4A8400B5793F /* JSCallbackData.h */; };
-               1477E7770BF4134A00152872 /* PageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1477E7750BF4134A00152872 /* PageCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               1477E7770BF4134A00152872 /* BackForwardCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1477E7750BF4134A00152872 /* BackForwardCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1479FAEE109AE37500DED655 /* RenderRuby.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAE6109AE37500DED655 /* RenderRuby.h */; };
                1479FAF0109AE37500DED655 /* RenderRubyBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAE8109AE37500DED655 /* RenderRubyBase.h */; };
                1479FAF2109AE37500DED655 /* RenderRubyRun.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEA109AE37500DED655 /* RenderRubyRun.h */; };
                14476AA715DC4BB100305DB2 /* WritingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritingMode.h; sourceTree = "<group>"; };
                1449E24A107D4A8400B5793F /* JSCallbackData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackData.h; sourceTree = "<group>"; };
                1449E286107D4DB400B5793F /* JSCallbackData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCallbackData.cpp; sourceTree = "<group>"; };
-               1477E7740BF4134A00152872 /* PageCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PageCache.cpp; sourceTree = "<group>"; };
-               1477E7750BF4134A00152872 /* PageCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PageCache.h; sourceTree = "<group>"; };
+               1477E7740BF4134A00152872 /* BackForwardCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardCache.cpp; sourceTree = "<group>"; };
+               1477E7750BF4134A00152872 /* BackForwardCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BackForwardCache.h; sourceTree = "<group>"; };
                1479FAE5109AE37500DED655 /* RenderRuby.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRuby.cpp; sourceTree = "<group>"; };
                1479FAE6109AE37500DED655 /* RenderRuby.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRuby.h; sourceTree = "<group>"; };
                1479FAE7109AE37500DED655 /* RenderRubyBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRubyBase.cpp; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                5160F4920B0AA71500C1D2AF /* mac */,
+                               1477E7740BF4134A00152872 /* BackForwardCache.cpp */,
+                               1477E7750BF4134A00152872 /* BackForwardCache.h */,
                                51741D0B0B07259A00ED442C /* BackForwardClient.h */,
                                BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
                                BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
                                510184670B08602A004A825F /* CachedPage.h */,
                                51741D0E0B07259A00ED442C /* HistoryItem.cpp */,
                                51741D0D0B07259A00ED442C /* HistoryItem.h */,
-                               1477E7740BF4134A00152872 /* PageCache.cpp */,
-                               1477E7750BF4134A00152872 /* PageCache.h */,
                        );
                        path = history;
                        sourceTree = "<group>";
                                F45C231E1995B73B00A6E2E3 /* AxisScrollSnapOffsets.h in Headers */,
                                29A812380FBB9C1D00510293 /* AXObjectCache.h in Headers */,
                                91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */,
+                               1477E7770BF4134A00152872 /* BackForwardCache.h in Headers */,
                                51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
                                BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
                                51A1B87D2087C4C000979A75 /* BackForwardItemIdentifier.h in Headers */,
                                3774ABA50FA21EB400AD7DE9 /* OverlapTestRequestClient.h in Headers */,
                                65A21468097A329100B9050A /* Page.h in Headers */,
                                91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */,
-                               1477E7770BF4134A00152872 /* PageCache.h in Headers */,
                                CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */,
                                A5B81CC21FAA44BC0037D1E6 /* PageConsoleAgent.h in Headers */,
                                DAED203116F244480070EC0F /* PageConsoleClient.h in Headers */,
index 3194b32..5f0c900 100644 (file)
@@ -1161,7 +1161,7 @@ bool WebAnimation::canSuspendForDocumentSuspension() const
 {
     // Use the base class's implementation of hasPendingActivity() since we wouldn't want the custom implementation
     // in this class designed to keep JS wrappers alive to interfere with the ability for a page using animations
-    // to enter the page cache.
+    // to enter the back/forward cache.
     return !ActiveDOMObject::hasPendingActivity();
 }
 
index 02e3c72..de0bf88 100644 (file)
@@ -126,7 +126,7 @@ JSWindowProxy& WindowProxy::createJSWindowProxyWithInitializedScript(DOMWrapperW
     return windowProxy;
 }
 
-void WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow* newDOMWindow, bool goingIntoPageCache)
+void WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow* newDOMWindow, bool goingIntoBackForwardCache)
 {
     if (m_jsWindowProxies.isEmpty())
         return;
@@ -146,7 +146,7 @@ void WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow* ne
 
     // It's likely that resetting our windows created a lot of garbage, unless
     // it went in a back/forward cache.
-    if (!goingIntoPageCache)
+    if (!goingIntoBackForwardCache)
         collectGarbageAfterWindowProxyDestruction();
 }
 
index 4722e49..2c808bd 100644 (file)
@@ -78,7 +78,7 @@ public:
 
     WEBCORE_EXPORT JSDOMGlobalObject* globalObject(DOMWrapperWorld&);
 
-    void clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow*, bool goingIntoPageCache);
+    void clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow*, bool goingIntoBackForwardCache);
 
     WEBCORE_EXPORT void setDOMWindow(AbstractDOMWindow*);
 
index 857998a..6b8b986 100644 (file)
@@ -39,7 +39,7 @@ class Document;
 enum class ReasonForSuspension {
     JavaScriptDebuggerPaused,
     WillDeferLoading,
-    PageCache,
+    BackForwardCache,
     PageWillBeSuspended,
 };
 
@@ -64,7 +64,7 @@ public:
 
     // These three functions must not have a side effect of creating or destroying
     // any ActiveDOMObject. That means they must not result in calls to arbitrary JavaScript.
-    virtual bool canSuspendForDocumentSuspension() const = 0; // Returning false in canSuspendForDocumentSuspension() will prevent the page from entering the PageCache.
+    virtual bool canSuspendForDocumentSuspension() const = 0; // Returning false in canSuspendForDocumentSuspension() will prevent the page from entering the BackForwardCache.
     virtual void suspend(ReasonForSuspension);
     virtual void resume();
 
index 586324b..4d40c40 100644 (file)
@@ -623,7 +623,7 @@ Document::~Document()
     removeFromContextsMap();
 
     ASSERT(!renderView());
-    ASSERT(m_pageCacheState != InPageCache);
+    ASSERT(m_backForwardCacheState != InBackForwardCache);
     ASSERT(m_ranges.isEmpty());
     ASSERT(!m_parentTreeScope);
     ASSERT(!m_disabledFieldsetElementsCount);
@@ -1828,7 +1828,7 @@ void Document::scheduleStyleRecalc()
 {
     ASSERT(!m_renderView || !inHitTesting());
 
-    if (m_styleRecalcTimer.isActive() || pageCacheState() != NotInPageCache)
+    if (m_styleRecalcTimer.isActive() || backForwardCacheState() != NotInBackForwardCache)
         return;
 
     ASSERT(childNeedsStyleRecalc() || m_needsFullStyleRebuild);
@@ -2009,7 +2009,7 @@ void Document::updateTextRenderer(Text& text, unsigned offsetOfReplacedText, uns
 
 bool Document::needsStyleRecalc() const
 {
-    if (pageCacheState() != NotInPageCache)
+    if (backForwardCacheState() != NotInBackForwardCache)
         return false;
 
     if (m_needsFullStyleRebuild)
@@ -2295,7 +2295,7 @@ void Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc()
 {
     if (auto* resolver = styleScope().resolverIfExists())
         resolver->invalidateMatchedPropertiesCache();
-    if (pageCacheState() != NotInPageCache || !renderView())
+    if (backForwardCacheState() != NotInBackForwardCache || !renderView())
         return;
     scheduleFullStyleRebuild();
 }
@@ -2314,7 +2314,7 @@ void Document::setIsResolvingTreeStyle(bool value)
 void Document::createRenderTree()
 {
     ASSERT(!renderView());
-    ASSERT(m_pageCacheState != InPageCache);
+    ASSERT(m_backForwardCacheState != InBackForwardCache);
     ASSERT(!m_axObjectCache || this != &topDocument());
 
     if (m_isNonRenderedPlaceholder)
@@ -2354,7 +2354,7 @@ void Document::didBecomeCurrentDocumentInFrame()
 
     // Ensure that the scheduled task state of the document matches the DOM suspension state of the frame. It can
     // be out of sync if the DOM suspension state changed while the document was not in the frame (possibly in the
-    // page cache, or simply newly created).
+    // back/forward cache, or simply newly created).
     if (m_frame->activeDOMObjectsAndAnimationsSuspended()) {
         if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) {
             if (auto* timeline = existingTimeline())
@@ -2397,7 +2397,7 @@ void Document::attachToCachedFrame(CachedFrameBase& cachedFrame)
 {
     RELEASE_ASSERT(cachedFrame.document() == this);
     ASSERT(cachedFrame.view());
-    ASSERT(m_pageCacheState == Document::InPageCache);
+    ASSERT(m_backForwardCacheState == Document::InBackForwardCache);
     observeFrame(&cachedFrame.view()->frame());
 }
 
@@ -2406,7 +2406,7 @@ void Document::detachFromCachedFrame(CachedFrameBase& cachedFrame)
     ASSERT_UNUSED(cachedFrame, cachedFrame.view());
     RELEASE_ASSERT(cachedFrame.document() == this);
     ASSERT(m_frame == &cachedFrame.view()->frame());
-    ASSERT(m_pageCacheState == Document::InPageCache);
+    ASSERT(m_backForwardCacheState == Document::InBackForwardCache);
     detachFromFrame();
 }
 
@@ -2569,10 +2569,10 @@ void Document::prepareForDestruction()
 
     m_hasPreparedForDestruction = true;
 
-    // Note that m_pageCacheState can be Document::AboutToEnterPageCache if our frame
+    // Note that m_backForwardCacheState can be Document::AboutToEnterBackForwardCache if our frame
     // was removed in an onpagehide event handler fired when the top-level frame is
-    // about to enter the page cache.
-    RELEASE_ASSERT(m_pageCacheState != Document::InPageCache);
+    // about to enter the back/forward cache.
+    RELEASE_ASSERT(m_backForwardCacheState != Document::InBackForwardCache);
 }
 
 void Document::removeAllEventListeners()
@@ -4053,7 +4053,7 @@ static bool isNodeInSubtree(Node& node, Node& container, Document::NodeRemoval n
 
 void Document::adjustFocusedNodeOnNodeRemoval(Node& node, NodeRemoval nodeRemoval)
 {
-    if (!m_focusedElement || pageCacheState() != NotInPageCache) // If the document is in the page cache, then we don't need to clear out the focused node.
+    if (!m_focusedElement || backForwardCacheState() != NotInBackForwardCache) // If the document is in the back/forward cache, then we don't need to clear out the focused node.
         return;
 
     Element* focusedElement = node.treeScope().focusedElementInScope();
@@ -4121,7 +4121,7 @@ bool Document::setFocusedElement(Element* element, FocusDirection direction, Foc
     if (m_focusedElement == newFocusedElement)
         return true;
 
-    if (pageCacheState() != NotInPageCache)
+    if (backForwardCacheState() != NotInBackForwardCache)
         return false;
 
     bool focusChangeBlocked = false;
@@ -4561,7 +4561,7 @@ void Document::takeDOMWindowFrom(Document& document)
     ASSERT(!m_domWindow);
     ASSERT(document.m_domWindow);
     // A valid DOMWindow is needed by CachedFrame for its documents.
-    ASSERT(pageCacheState() == NotInPageCache);
+    ASSERT(backForwardCacheState() == NotInBackForwardCache);
 
     m_domWindow = WTFMove(document.m_domWindow);
     m_domWindow->didSecureTransitionTo(*this);
@@ -5083,21 +5083,21 @@ URL Document::completeURL(const String& url) const
     return completeURL(url, m_baseURL);
 }
 
-void Document::setPageCacheState(PageCacheState state)
+void Document::setBackForwardCacheState(BackForwardCacheState state)
 {
-    if (m_pageCacheState == state)
+    if (m_backForwardCacheState == state)
         return;
 
-    m_pageCacheState = state;
+    m_backForwardCacheState = state;
 
     FrameView* v = view();
     Page* page = this->page();
 
     switch (state) {
-    case InPageCache:
+    case InBackForwardCache:
         if (v) {
             // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the
-            // page cache and similar work that needs to occur when it comes out. This is where we do the work
+            // back/forward cache and similar work that needs to occur when it comes out. This is where we do the work
             // that needs to happen when we enter, and the work that needs to happen when we exit is in
             // HistoryController::restoreScrollPositionAndViewState(). It can't be here because this function is
             // called too early on in the process of a page exiting the cache for that work to be possible in this
@@ -5121,11 +5121,11 @@ void Document::setPageCacheState(PageCacheState state)
 
         clearSharedObjectPool();
         break;
-    case NotInPageCache:
+    case NotInBackForwardCache:
         if (childNeedsStyleRecalc())
             scheduleStyleRecalc();
         break;
-    case AboutToEnterPageCache:
+    case AboutToEnterBackForwardCache:
         break;
     }
 }
@@ -5148,7 +5148,7 @@ void Document::suspend(ReasonForSuspension reason)
 
 #ifndef NDEBUG
     // Clear the update flag to be able to check if the viewport arguments update
-    // is dispatched, after the document is restored from the page cache.
+    // is dispatched, after the document is restored from the back/forward cache.
     m_didDispatchViewportPropertiesChanged = false;
 #endif
 
@@ -5169,7 +5169,7 @@ void Document::suspend(ReasonForSuspension reason)
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled() && reason == ReasonForSuspension::PageCache)
+    if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled() && reason == ReasonForSuspension::BackForwardCache)
         setServiceWorkerConnection(nullptr);
 #endif
 
@@ -5214,7 +5214,7 @@ void Document::resume(ReasonForSuspension reason)
     m_isSuspended = false;
 
 #if ENABLE(SERVICE_WORKER)
-    if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled() && reason == ReasonForSuspension::PageCache)
+    if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled() && reason == ReasonForSuspension::BackForwardCache)
         setServiceWorkerConnection(ServiceWorkerProvider::singleton().existingServiceWorkerConnection());
 #endif
 }
@@ -5534,7 +5534,7 @@ Document& Document::topDocument() const
 {
     // FIXME: This special-casing avoids incorrectly determined top documents during the process
     // of AXObjectCache teardown or notification posting for cached or being-destroyed documents.
-    if (pageCacheState() == NotInPageCache && !m_renderTreeBeingDestroyed) {
+    if (backForwardCacheState() == NotInBackForwardCache && !m_renderTreeBeingDestroyed) {
         if (!m_frame)
             return const_cast<Document&>(*this);
         // This should always be non-null.
index 75315fe..986f9b7 100644 (file)
@@ -1073,10 +1073,10 @@ public:
 
     void finishedParsing();
 
-    enum PageCacheState { NotInPageCache, AboutToEnterPageCache, InPageCache };
+    enum BackForwardCacheState { NotInBackForwardCache, AboutToEnterBackForwardCache, InBackForwardCache };
 
-    PageCacheState pageCacheState() const { return m_pageCacheState; }
-    void setPageCacheState(PageCacheState);
+    BackForwardCacheState backForwardCacheState() const { return m_backForwardCacheState; }
+    void setBackForwardCacheState(BackForwardCacheState);
 
     void registerForDocumentSuspensionCallbacks(Element&);
     void unregisterForDocumentSuspensionCallbacks(Element&);
@@ -1950,7 +1950,7 @@ private:
     InheritedBool m_designMode { inherit };
     MediaProducer::MediaStateFlags m_mediaState { MediaProducer::IsNotPlaying };
     bool m_userHasInteractedWithMediaElement { false };
-    PageCacheState m_pageCacheState { NotInPageCache };
+    BackForwardCacheState m_backForwardCacheState { NotInBackForwardCache };
     Optional<ReferrerPolicy> m_referrerPolicy;
     ReadyState m_readyState { Complete };
 
index 85c78a8..1e42871 100644 (file)
@@ -363,7 +363,7 @@ static void unwrapFullscreenRenderer(RenderFullScreen* fullscreenRenderer, Eleme
 
 void FullscreenManager::willEnterFullscreen(Element& element)
 {
-    if (!document().hasLivingRenderTree() || document().pageCacheState() != Document::NotInPageCache)
+    if (!document().hasLivingRenderTree() || document().backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     // Protect against being called after the document has been removed from the page.
@@ -417,7 +417,7 @@ void FullscreenManager::didEnterFullscreen()
     if (!m_fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     m_fullscreenElement->didBecomeFullscreenElement();
@@ -429,7 +429,7 @@ void FullscreenManager::willExitFullscreen()
     if (!fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     fullscreenElement->willStopBeingFullscreenElement();
@@ -441,7 +441,7 @@ void FullscreenManager::didExitFullscreen()
     if (!fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
     fullscreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
 
index e273418..bfd217f 100644 (file)
@@ -54,7 +54,7 @@ public:
     Frame* frame() const { return m_document.frame(); }
     Element* documentElement() const { return m_document.documentElement(); }
     bool hasLivingRenderTree() const { return m_document.hasLivingRenderTree(); }
-    Document::PageCacheState pageCacheState() const { return m_document.pageCacheState(); }
+    Document::BackForwardCacheState backForwardCacheState() const { return m_document.backForwardCacheState(); }
     void scheduleFullStyleRebuild() { m_document.scheduleFullStyleRebuild(); }
 
     // W3C Fullscreen API
index 0010387..3ea9b38 100644 (file)
@@ -278,7 +278,7 @@ void ScriptExecutionContext::suspendActiveDOMObjects(ReasonForSuspension why)
     checkConsistency();
 
     if (m_activeDOMObjectsAreSuspended) {
-        // A page may subsequently suspend DOM objects, say as part of entering the page cache, after the embedding
+        // A page may subsequently suspend DOM objects, say as part of entering the back/forward cache, after the embedding
         // client requested the page be suspended. We ignore such requests so long as the embedding client requested
         // the suspension first. See <rdar://problem/13754896> for more details.
         ASSERT(m_reasonForSuspendingActiveDOMObjects == ReasonForSuspension::PageWillBeSuspended);
@@ -308,8 +308,8 @@ void ScriptExecutionContext::resumeActiveDOMObjects(ReasonForSuspension why)
         return ShouldContinue::Yes;
     });
 
-    // In case there were pending messages at the time the script execution context entered PageCache,
-    // make sure those get dispatched shortly after restoring from PageCache.
+    // In case there were pending messages at the time the script execution context entered the BackForwardCache,
+    // make sure those get dispatched shortly after restoring from the BackForwardCache.
     processMessageWithMessagePortsSoon();
 }
 
similarity index 70%
rename from Source/WebCore/history/PageCache.cpp
rename to Source/WebCore/history/BackForwardCache.cpp
index cd1f382..937353f 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "PageCache.h"
+#include "BackForwardCache.h"
 
 #include "ApplicationCacheHost.h"
 #include "BackForwardController.h"
@@ -59,17 +59,17 @@ namespace WebCore {
 
 #define PCLOG(...) LOG(BackForwardCache, "%*s%s", indentLevel*4, "", makeString(__VA_ARGS__).utf8().data())
 
-static inline void logPageCacheFailureDiagnosticMessage(DiagnosticLoggingClient& client, const String& reason)
+static inline void logBackForwardCacheFailureDiagnosticMessage(DiagnosticLoggingClient& client, const String& reason)
 {
-    client.logDiagnosticMessage(DiagnosticLoggingKeys::pageCacheFailureKey(), reason, ShouldSample::No);
+    client.logDiagnosticMessage(DiagnosticLoggingKeys::backForwardCacheFailureKey(), reason, ShouldSample::No);
 }
 
-static inline void logPageCacheFailureDiagnosticMessage(Page* page, const String& reason)
+static inline void logBackForwardCacheFailureDiagnosticMessage(Page* page, const String& reason)
 {
     if (!page)
         return;
 
-    logPageCacheFailureDiagnosticMessage(page->diagnosticLoggingClient(), reason);
+    logBackForwardCacheFailureDiagnosticMessage(page->diagnosticLoggingClient(), reason);
 }
 
 static bool canCacheFrame(Frame& frame, DiagnosticLoggingClient& diagnosticLoggingClient, unsigned indentLevel)
@@ -81,7 +81,7 @@ static bool canCacheFrame(Frame& frame, DiagnosticLoggingClient& diagnosticLoggi
     // We only do this check for subframes because the main frame is reused when navigating to a new page.
     if (!frame.isMainFrame() && frameLoader.state() == FrameStateProvisional) {
         PCLOG("   -Frame is in provisional load stage");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::provisionalLoadKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::provisionalLoadKey());
         return false;
     }
 
@@ -104,7 +104,7 @@ static bool canCacheFrame(Frame& frame, DiagnosticLoggingClient& diagnosticLoggi
     DocumentLoader* documentLoader = frameLoader.documentLoader();
     if (!documentLoader) {
         PCLOG("   -There is no DocumentLoader object");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noDocumentLoaderKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noDocumentLoaderKey());
         return false;
     }
 
@@ -114,37 +114,37 @@ static bool canCacheFrame(Frame& frame, DiagnosticLoggingClient& diagnosticLoggi
         PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
     else
         PCLOG(" Determining if subframe with URL (", currentURL.string(), ") can be cached:");
-     
+
     bool isCacheable = true;
     // Do not cache error pages (these can be recognized as pages with substitute data or unreachable URLs).
     if (documentLoader->substituteData().isValid() && !documentLoader->substituteData().failingURL().isEmpty()) {
         PCLOG("   -Frame is an error page");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isErrorPageKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isErrorPageKey());
         isCacheable = false;
     }
-    if (frameLoader.subframeLoader().containsPlugins() && !frame.page()->settings().pageCacheSupportsPlugins()) {
+    if (frameLoader.subframeLoader().containsPlugins() && !frame.page()->settings().backForwardCacheSupportsPlugins()) {
         PCLOG("   -Frame contains plugins");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasPluginsKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasPluginsKey());
         isCacheable = false;
     }
     if (frame.isMainFrame() && !frameLoader.history().currentItem()) {
         PCLOG("   -Main frame has no current history item");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noCurrentHistoryItemKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noCurrentHistoryItemKey());
         isCacheable = false;
     }
     if (frameLoader.quickRedirectComing()) {
         PCLOG("   -Quick redirect is coming");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::quirkRedirectComingKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::quirkRedirectComingKey());
         isCacheable = false;
     }
     if (documentLoader->isLoading()) {
         PCLOG("   -DocumentLoader is still loading");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isLoadingKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isLoadingKey());
         isCacheable = false;
     }
     if (documentLoader->isStopping()) {
         PCLOG("   -DocumentLoader is in the middle of stopping");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::documentLoaderStoppingKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::documentLoaderStoppingKey());
         isCacheable = false;
     }
 
@@ -156,20 +156,20 @@ static bool canCacheFrame(Frame& frame, DiagnosticLoggingClient& diagnosticLoggi
             diagnosticLoggingClient.logDiagnosticMessage(DiagnosticLoggingKeys::unsuspendableDOMObjectKey(), activeDOMObject->activeDOMObjectName(), ShouldSample::No);
             UNUSED_PARAM(activeDOMObject);
         }
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey());
         isCacheable = false;
     }
 
     // FIXME: We should investigating caching frames that have an associated
     // application cache. <rdar://problem/5917899> tracks that work.
-    if (!documentLoader->applicationCacheHost().canCacheInPageCache()) {
+    if (!documentLoader->applicationCacheHost().canCacheInBackForwardCache()) {
         PCLOG("   -The DocumentLoader uses an application cache");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::applicationCacheKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::applicationCacheKey());
         isCacheable = false;
     }
     if (!frameLoader.client().canCachePage()) {
         PCLOG("   -The client says this frame cannot be cached");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deniedByClientKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deniedByClientKey());
         isCacheable = false;
     }
 
@@ -194,20 +194,20 @@ static bool canCachePage(Page& page)
     DiagnosticLoggingClient& diagnosticLoggingClient = page.diagnosticLoggingClient();
     bool isCacheable = canCacheFrame(page.mainFrame(), diagnosticLoggingClient, indentLevel + 1);
 
-    if (!page.settings().usesPageCache() || page.isResourceCachingDisabledByWebInspector()) {
+    if (!page.settings().usesBackForwardCache() || page.isResourceCachingDisabledByWebInspector()) {
         PCLOG("   -Page settings says b/f cache disabled");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isDisabledKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::isDisabledKey());
         isCacheable = false;
     }
 #if ENABLE(DEVICE_ORIENTATION) && !PLATFORM(IOS_FAMILY)
     if (DeviceMotionController::isActiveAt(&page)) {
         PCLOG("   -Page is using DeviceMotion");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deviceMotionKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deviceMotionKey());
         isCacheable = false;
     }
     if (DeviceOrientationController::isActiveAt(&page)) {
         PCLOG("   -Page is using DeviceOrientation");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deviceOrientationKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::deviceOrientationKey());
         isCacheable = false;
     }
 #endif
@@ -217,38 +217,38 @@ static bool canCachePage(Page& page)
     case FrameLoadType::Reload:
         // No point writing to the cache on a reload, since we will just write over it again when we leave that page.
         PCLOG("   -Load type is: Reload");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadKey());
         isCacheable = false;
         break;
     case FrameLoadType::Same: // user loads same URL again (but not reload button)
         // No point writing to the cache on a same load, since we will just write over it again when we leave that page.
         PCLOG("   -Load type is: Same");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::sameLoadKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::sameLoadKey());
         isCacheable = false;
         break;
     case FrameLoadType::RedirectWithLockedBackForwardList:
         // Don't write to the cache if in the middle of a redirect, since we will want to store the final page we end up on.
         PCLOG("   -Load type is: RedirectWithLockedBackForwardList");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::redirectKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::redirectKey());
         isCacheable = false;
         break;
     case FrameLoadType::Replace:
         // No point writing to the cache on a replace, since we will just write over it again when we leave that page.
         PCLOG("   -Load type is: Replace");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::replaceKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::replaceKey());
         isCacheable = false;
         break;
     case FrameLoadType::ReloadFromOrigin: {
         // No point writing to the cache on a reload, since we will just write over it again when we leave that page.
         PCLOG("   -Load type is: ReloadFromOrigin");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadFromOriginKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadFromOriginKey());
         isCacheable = false;
         break;
     }
     case FrameLoadType::ReloadExpiredOnly: {
         // No point writing to the cache on a reload, since we will just write over it again when we leave that page.
         PCLOG("   -Load type is: ReloadRevalidatingExpired");
-        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadRevalidatingExpiredKey());
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::reloadRevalidatingExpiredKey());
         isCacheable = false;
         break;
     }
@@ -265,63 +265,63 @@ static bool canCachePage(Page& page)
     else
         PCLOG(" Page CANNOT be cached\n--------");
 
-    diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::pageCacheKey(), DiagnosticLoggingKeys::canCacheKey(), isCacheable ? DiagnosticLoggingResultPass : DiagnosticLoggingResultFail, ShouldSample::No);
+    diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::backForwardCacheKey(), DiagnosticLoggingKeys::canCacheKey(), isCacheable ? DiagnosticLoggingResultPass : DiagnosticLoggingResultFail, ShouldSample::No);
     return isCacheable;
 }
 
-PageCache& PageCache::singleton()
+BackForwardCache& BackForwardCache::singleton()
 {
-    static NeverDestroyed<PageCache> globalPageCache;
-    return globalPageCache;
+    static NeverDestroyed<BackForwardCache> globalBackForwardCache;
+    return globalBackForwardCache;
 }
 
-PageCache::PageCache()
+BackForwardCache::BackForwardCache()
 {
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
-        PAL::registerNotifyCallback("com.apple.WebKit.showPageCache", [] {
-            PageCache::singleton().dump();
+        PAL::registerNotifyCallback("com.apple.WebKit.showBackForwardCache", [] {
+            BackForwardCache::singleton().dump();
         });
     });
 }
 
-void PageCache::dump() const
+void BackForwardCache::dump() const
 {
-    WTFLogAlways("\nPage Cache:");
+    WTFLogAlways("Back/Forward Cache:");
     for (auto& item : m_items) {
         CachedPage& cachedPage = *item->m_cachedPage;
         WTFLogAlways("  Page %p, document %p %s", &cachedPage.page(), cachedPage.document(), cachedPage.document() ? cachedPage.document()->url().string().utf8().data() : "");
     }
 }
 
-bool PageCache::canCache(Page& page) const
+bool BackForwardCache::canCache(Page& page) const
 {
     if (!m_maxSize) {
-        logPageCacheFailureDiagnosticMessage(&page, DiagnosticLoggingKeys::isDisabledKey());
+        logBackForwardCacheFailureDiagnosticMessage(&page, DiagnosticLoggingKeys::isDisabledKey());
         return false;
     }
 
     if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) {
-        logPageCacheFailureDiagnosticMessage(&page, DiagnosticLoggingKeys::underMemoryPressureKey());
+        logBackForwardCacheFailureDiagnosticMessage(&page, DiagnosticLoggingKeys::underMemoryPressureKey());
         return false;
     }
     
     return canCachePage(page);
 }
 
-void PageCache::pruneToSizeNow(unsigned size, PruningReason pruningReason)
+void BackForwardCache::pruneToSizeNow(unsigned size, PruningReason pruningReason)
 {
     SetForScope<unsigned> change(m_maxSize, size);
     prune(pruningReason);
 }
 
-void PageCache::setMaxSize(unsigned maxSize)
+void BackForwardCache::setMaxSize(unsigned maxSize)
 {
     m_maxSize = maxSize;
     prune(PruningReason::None);
 }
 
-unsigned PageCache::frameCount() const
+unsigned BackForwardCache::frameCount() const
 {
     unsigned frameCount = m_items.size();
     for (auto& item : m_items) {
@@ -332,7 +332,7 @@ unsigned PageCache::frameCount() const
     return frameCount;
 }
 
-void PageCache::markPagesForDeviceOrPageScaleChanged(Page& page)
+void BackForwardCache::markPagesForDeviceOrPageScaleChanged(Page& page)
 {
     for (auto& item : m_items) {
         CachedPage& cachedPage = *item->m_cachedPage;
@@ -341,7 +341,7 @@ void PageCache::markPagesForDeviceOrPageScaleChanged(Page& page)
     }
 }
 
-void PageCache::markPagesForContentsSizeChanged(Page& page)
+void BackForwardCache::markPagesForContentsSizeChanged(Page& page)
 {
     for (auto& item : m_items) {
         CachedPage& cachedPage = *item->m_cachedPage;
@@ -351,7 +351,7 @@ void PageCache::markPagesForContentsSizeChanged(Page& page)
 }
 
 #if ENABLE(VIDEO_TRACK)
-void PageCache::markPagesForCaptionPreferencesChanged()
+void BackForwardCache::markPagesForCaptionPreferencesChanged()
 {
     for (auto& item : m_items) {
         ASSERT(item->m_cachedPage);
@@ -376,16 +376,16 @@ static String pruningReasonToDiagnosticLoggingKey(PruningReason pruningReason)
     return emptyString();
 }
 
-static void setPageCacheState(Page& page, Document::PageCacheState pageCacheState)
+static void setBackForwardCacheState(Page& page, Document::BackForwardCacheState BackForwardCacheState)
 {
     for (Frame* frame = &page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
         if (auto* document = frame->document())
-            document->setPageCacheState(pageCacheState);
+            document->setBackForwardCacheState(BackForwardCacheState);
     }
 }
 
-// When entering page cache, tear down the render tree before setting the in-cache flag.
-// This maintains the invariant that render trees are never present in the page cache.
+// When entering back/forward cache, tear down the render tree before setting the in-cache flag.
+// This maintains the invariant that render trees are never present in the back/forward cache.
 // Note that destruction happens bottom-up so that the main frame's tree dies last.
 static void destroyRenderTree(Frame& mainFrame)
 {
@@ -416,25 +416,25 @@ static void firePageHideEventRecursively(Frame& frame)
         firePageHideEventRecursively(*child);
 }
 
-bool PageCache::addIfCacheable(HistoryItem& item, Page* page)
+bool BackForwardCache::addIfCacheable(HistoryItem& item, Page* page)
 {
-    if (item.isInPageCache())
+    if (item.isInBackForwardCache())
         return false;
 
     if (!page)
         return false;
 
-    page->mainFrame().loader().stopForPageCache();
+    page->mainFrame().loader().stopForBackForwardCache();
 
     if (!canCache(*page))
         return false;
 
-    ASSERT_WITH_MESSAGE(!page->isUtilityPage(), "Utility pages such as SVGImage pages should never go into PageCache");
+    ASSERT_WITH_MESSAGE(!page->isUtilityPage(), "Utility pages such as SVGImage pages should never go into BackForwardCache");
 
-    setPageCacheState(*page, Document::AboutToEnterPageCache);
+    setBackForwardCacheState(*page, Document::AboutToEnterBackForwardCache);
 
     // Focus the main frame, defocusing a focused subframe (if we have one). We do this here,
-    // before the page enters the page cache, while we still can dispatch DOM blur/focus events.
+    // before the page enters the back/forward cache, while we still can dispatch DOM blur/focus events.
     if (page->focusController().focusedFrame())
         page->focusController().setFocusedFrame(&page->mainFrame());
 
@@ -445,16 +445,16 @@ bool PageCache::addIfCacheable(HistoryItem& item, Page* page)
 
     // Stop all loads again before checking if we can still cache the page after firing the pagehide
     // event, since the page may have started ping loads in its pagehide event handler.
-    page->mainFrame().loader().stopForPageCache();
+    page->mainFrame().loader().stopForBackForwardCache();
 
     // Check that the page is still page-cacheable after firing the pagehide event. The JS event handlers
     // could have altered the page in a way that could prevent caching.
     if (!canCache(*page)) {
-        setPageCacheState(*page, Document::NotInPageCache);
+        setBackForwardCacheState(*page, Document::NotInBackForwardCache);
         return false;
     }
 
-    setPageCacheState(*page, Document::InPageCache);
+    setBackForwardCacheState(*page, Document::InBackForwardCache);
 
     {
         // Make sure we don't fire any JS events in this scope.
@@ -466,34 +466,34 @@ bool PageCache::addIfCacheable(HistoryItem& item, Page* page)
     }
     prune(PruningReason::ReachedMaxSize);
 
-    RELEASE_LOG(BackForwardCache, "PageCache::addIfCacheable item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
+    RELEASE_LOG(BackForwardCache, "BackForwardCache::addIfCacheable item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
 
     return true;
 }
 
-std::unique_ptr<CachedPage> PageCache::take(HistoryItem& item, Page* page)
+std::unique_ptr<CachedPage> BackForwardCache::take(HistoryItem& item, Page* page)
 {
     if (!item.m_cachedPage) {
         if (item.m_pruningReason != PruningReason::None)
-            logPageCacheFailureDiagnosticMessage(page, pruningReasonToDiagnosticLoggingKey(item.m_pruningReason));
+            logBackForwardCacheFailureDiagnosticMessage(page, pruningReasonToDiagnosticLoggingKey(item.m_pruningReason));
         return nullptr;
     }
 
     m_items.remove(&item);
     std::unique_ptr<CachedPage> cachedPage = item.takeCachedPage();
 
-    RELEASE_LOG(BackForwardCache, "PageCache::take item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
+    RELEASE_LOG(BackForwardCache, "BackForwardCache::take item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
 
     if (cachedPage->hasExpired() || (page && page->isResourceCachingDisabledByWebInspector())) {
         LOG(BackForwardCache, "Not restoring page for %s from back/forward cache because cache entry has expired", item.url().string().ascii().data());
-        logPageCacheFailureDiagnosticMessage(page, DiagnosticLoggingKeys::expiredKey());
+        logBackForwardCacheFailureDiagnosticMessage(page, DiagnosticLoggingKeys::expiredKey());
         return nullptr;
     }
 
     return cachedPage;
 }
 
-void PageCache::removeAllItemsForPage(Page& page)
+void BackForwardCache::removeAllItemsForPage(Page& page)
 {
 #if !ASSERT_DISABLED
     ASSERT_WITH_MESSAGE(!m_isInRemoveAllItemsForPage, "We should not reenter this method");
@@ -505,32 +505,32 @@ void PageCache::removeAllItemsForPage(Page& page)
         auto current = it;
         ++it;
         if (&(*current)->m_cachedPage->page() == &page) {
-            RELEASE_LOG(BackForwardCache, "PageCache::removeAllItemsForPage removing item: %s, size: %u / %u", (*current)->identifier().string().utf8().data(), pageCount() - 1, maxSize());
+            RELEASE_LOG(BackForwardCache, "BackForwardCache::removeAllItemsForPage removing item: %s, size: %u / %u", (*current)->identifier().string().utf8().data(), pageCount() - 1, maxSize());
             (*current)->setCachedPage(nullptr);
             m_items.remove(current);
         }
     }
 }
 
-CachedPage* PageCache::get(HistoryItem& item, Page* page)
+CachedPage* BackForwardCache::get(HistoryItem& item, Page* page)
 {
     CachedPage* cachedPage = item.m_cachedPage.get();
     if (!cachedPage) {
         if (item.m_pruningReason != PruningReason::None)
-            logPageCacheFailureDiagnosticMessage(page, pruningReasonToDiagnosticLoggingKey(item.m_pruningReason));
+            logBackForwardCacheFailureDiagnosticMessage(page, pruningReasonToDiagnosticLoggingKey(item.m_pruningReason));
         return nullptr;
     }
 
     if (cachedPage->hasExpired() || (page && page->isResourceCachingDisabledByWebInspector())) {
         LOG(BackForwardCache, "Not restoring page for %s from back/forward cache because cache entry has expired", item.url().string().ascii().data());
-        logPageCacheFailureDiagnosticMessage(page, DiagnosticLoggingKeys::expiredKey());
+        logBackForwardCacheFailureDiagnosticMessage(page, DiagnosticLoggingKeys::expiredKey());
         remove(item);
         return nullptr;
     }
     return cachedPage;
 }
 
-void PageCache::remove(HistoryItem& item)
+void BackForwardCache::remove(HistoryItem& item)
 {
     // Safely ignore attempts to remove items not in the cache.
     if (!item.m_cachedPage)
@@ -539,17 +539,17 @@ void PageCache::remove(HistoryItem& item)
     m_items.remove(&item);
     item.setCachedPage(nullptr);
 
-    RELEASE_LOG(BackForwardCache, "PageCache::remove item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
+    RELEASE_LOG(BackForwardCache, "BackForwardCache::remove item: %s, size: %u / %u", item.identifier().string().utf8().data(), pageCount(), maxSize());
 
 }
 
-void PageCache::prune(PruningReason pruningReason)
+void BackForwardCache::prune(PruningReason pruningReason)
 {
     while (pageCount() > maxSize()) {
         auto oldestItem = m_items.takeFirst();
         oldestItem->setCachedPage(nullptr);
         oldestItem->m_pruningReason = pruningReason;
-        RELEASE_LOG(BackForwardCache, "PageCache::prune removing item: %s, size: %u / %u", oldestItem->identifier().string().utf8().data(), pageCount(), maxSize());
+        RELEASE_LOG(BackForwardCache, "BackForwardCache::prune removing item: %s, size: %u / %u", oldestItem->identifier().string().utf8().data(), pageCount(), maxSize());
     }
 }
 
similarity index 87%
rename from Source/WebCore/history/PageCache.h
rename to Source/WebCore/history/BackForwardCache.h
index e211cc4..ae4e60f 100644 (file)
@@ -38,11 +38,12 @@ class Page;
 
 enum class PruningReason { None, ProcessSuspended, MemoryPressure, ReachedMaxSize };
 
-class PageCache {
-    WTF_MAKE_NONCOPYABLE(PageCache); WTF_MAKE_FAST_ALLOCATED;
+class BackForwardCache {
+    WTF_MAKE_NONCOPYABLE(BackForwardCache);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
-    // Function to obtain the global page cache.
-    WEBCORE_EXPORT static PageCache& singleton();
+    // Function to obtain the global back/forward cache.
+    WEBCORE_EXPORT static BackForwardCache& singleton();
 
     bool canCache(Page&) const;
 
@@ -68,8 +69,8 @@ public:
 #endif
 
 private:
-    PageCache();
-    ~PageCache() = delete; // Make sure nobody accidentally calls delete -- WebCore does not delete singletons.
+    BackForwardCache();
+    ~BackForwardCache() = delete; // Make sure nobody accidentally calls delete -- WebCore does not delete singletons.
 
     static bool canCachePageContainingThisFrame(Frame&);
 
@@ -83,7 +84,7 @@ private:
     bool m_isInRemoveAllItemsForPage { false };
 #endif
 
-    friend class WTF::NeverDestroyed<PageCache>;
+    friend class WTF::NeverDestroyed<BackForwardCache>;
 };
 
 } // namespace WebCore
index 8f1e4da..87ab173 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "CachedFrame.h"
 
+#include "BackForwardCache.h"
 #include "CSSAnimationController.h"
 #include "CachedFramePlatformData.h"
 #include "CachedPage.h"
@@ -41,7 +42,6 @@
 #include "Logging.h"
 #include "NavigationDisabler.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "RenderWidget.h"
 #include "SVGDocumentExtensions.h"
 #include "ScriptController.h"
@@ -106,13 +106,13 @@ void CachedFrameBase::restore()
         if (m_document->svgExtensions())
             m_document->accessSVGExtensions().unpauseAnimations();
 
-        m_document->resume(ReasonForSuspension::PageCache);
+        m_document->resume(ReasonForSuspension::BackForwardCache);
 
         // It is necessary to update any platform script objects after restoring the
         // cached page.
         frame->script().updatePlatformScriptObjects();
 
-        frame->loader().client().didRestoreFromPageCache();
+        frame->loader().client().didRestoreFromBackForwardCache();
 
         pruneDetachedChildFrames();
 
@@ -138,7 +138,7 @@ void CachedFrameBase::restore()
     }
 #endif
 
-    frame->view()->didRestoreFromPageCache();
+    frame->view()->didRestoreFromBackForwardCache();
 }
 
 CachedFrame::CachedFrame(Frame& frame)
@@ -150,7 +150,7 @@ CachedFrame::CachedFrame(Frame& frame)
     ASSERT(m_document);
     ASSERT(m_documentLoader);
     ASSERT(m_view);
-    ASSERT(m_document->pageCacheState() == Document::InPageCache);
+    ASSERT(m_document->backForwardCacheState() == Document::InBackForwardCache);
 
     RELEASE_ASSERT(m_document->domWindow());
     RELEASE_ASSERT(m_document->frame());
@@ -169,14 +169,14 @@ CachedFrame::CachedFrame(Frame& frame)
     RELEASE_ASSERT(m_document->domWindow()->frame());
 
     // Active DOM objects must be suspended before we cache the frame script data.
-    m_document->suspend(ReasonForSuspension::PageCache);
+    m_document->suspend(ReasonForSuspension::BackForwardCache);
 
     m_cachedFrameScriptData = makeUnique<ScriptCachedFrameData>(frame);
 
-    m_document->domWindow()->suspendForPageCache();
+    m_document->domWindow()->suspendForBackForwardCache();
 
     // Clear FrameView to reset flags such as 'firstVisuallyNonEmptyLayoutCallbackPending' so that the
-    // 'DidFirstVisuallyNonEmptyLayout' callback gets called against when restoring from PageCache.
+    // 'DidFirstVisuallyNonEmptyLayout' callback gets called against when restoring from the BackForwardCache.
     m_view->resetLayoutMilestones();
 
     // The main frame is reused for the navigation and the opener link to its should thus persist.
@@ -185,13 +185,13 @@ CachedFrame::CachedFrame(Frame& frame)
 
     frame.loader().client().savePlatformDataToCachedFrame(this);
 
-    // documentWillSuspendForPageCache() can set up a layout timer on the FrameView, so clear timers after that.
+    // documentWillSuspendForBackForwardCache() can set up a layout timer on the FrameView, so clear timers after that.
     frame.clearTimers();
 
     // Deconstruct the FrameTree, to restore it later.
     // We do this for two reasons:
     // 1 - We reuse the main frame, so when it navigates to a new page load it needs to start with a blank FrameTree.
-    // 2 - It's much easier to destroy a CachedFrame while it resides in the PageCache if it is disconnected from its parent.
+    // 2 - It's much easier to destroy a CachedFrame while it resides in the BackForwardCache if it is disconnected from its parent.
     for (unsigned i = 0; i < m_childFrames.size(); ++i)
         frame.tree().removeChild(m_childFrames[i]->view()->frame());
 
@@ -235,11 +235,11 @@ void CachedFrame::clear()
     if (!m_document)
         return;
 
-    // clear() should only be called for Frames representing documents that are no longer in the page cache.
+    // clear() should only be called for Frames representing documents that are no longer in the back/forward cache.
     // This means the CachedFrame has been:
     // 1 - Successfully restore()'d by going back/forward.
-    // 2 - destroy()'ed because the PageCache is pruning or the WebView was closed.
-    ASSERT(m_document->pageCacheState() == Document::NotInPageCache);
+    // 2 - destroy()'ed because the BackForwardCache is pruning or the WebView was closed.
+    ASSERT(m_document->backForwardCacheState() == Document::NotInBackForwardCache);
     ASSERT(m_view);
     ASSERT(!m_document->frame() || m_document->frame() == &m_view->frame());
 
@@ -259,8 +259,8 @@ void CachedFrame::destroy()
     if (!m_document)
         return;
     
-    // Only CachedFrames that are still in the PageCache should be destroyed in this manner
-    ASSERT(m_document->pageCacheState() == Document::InPageCache);
+    // Only CachedFrames that are still in the BackForwardCache should be destroyed in this manner
+    ASSERT(m_document->backForwardCacheState() == Document::InBackForwardCache);
     ASSERT(m_view);
     ASSERT(!m_document->frame());
 
@@ -281,11 +281,11 @@ void CachedFrame::destroy()
 
     m_view->frame().animation().detachFromDocument(m_document.get());
 
-    // FIXME: Why do we need to call removeAllEventListeners here? When the document is in page cache, this method won't work
+    // FIXME: Why do we need to call removeAllEventListeners here? When the document is in back/forward cache, this method won't work
     // fully anyway, because the document won't be able to access its DOMWindow object (due to being frameless).
     m_document->removeAllEventListeners();
 
-    m_document->setPageCacheState(Document::NotInPageCache);
+    m_document->setBackForwardCacheState(Document::NotInBackForwardCache);
     m_document->prepareForDestruction();
 
     clear();
index f973ba6..ea8c261 100644 (file)
@@ -31,7 +31,7 @@
 namespace WebCore {
 
 // The purpose of this class is to give each platform a vessel to store platform data when a page
-// goes into the Back/Forward page cache, and perform some action with that data when the page comes out.  
+// goes into the back/forward cache, and perform some action with that data when the page comes out.
 // Each platform should subclass this class as neccessary
 
 class CachedFramePlatformData {
index a79234d..d5377ab 100644 (file)
 #include "config.h"
 #include "HistoryItem.h"
 
+#include "BackForwardCache.h"
 #include "CachedPage.h"
 #include "Document.h"
 #include "KeyedCoding.h"
-#include "PageCache.h"
 #include "ResourceRequest.h"
 #include "SerializedScriptValue.h"
 #include "SharedBuffer.h"
@@ -174,9 +174,9 @@ bool HistoryItem::hasCachedPageExpired() const
 
 void HistoryItem::setCachedPage(std::unique_ptr<CachedPage>&& cachedPage)
 {
-    bool wasInPageCache = isInPageCache();
+    bool wasInBackForwardCache = isInBackForwardCache();
     m_cachedPage = WTFMove(cachedPage);
-    if (wasInPageCache != isInPageCache())
+    if (wasInBackForwardCache != isInBackForwardCache())
         notifyChanged();
 }
 
@@ -222,7 +222,7 @@ void HistoryItem::setURLString(const String& urlString)
 
 void HistoryItem::setURL(const URL& url)
 {
-    PageCache::singleton().remove(*this);
+    BackForwardCache::singleton().remove(*this);
     setURLString(url.string());
     clearDocumentState();
 }
index f85508f..52cab83 100644 (file)
@@ -59,7 +59,7 @@ enum class PruningReason;
 WEBCORE_EXPORT extern void (*notifyHistoryItemChanged)(HistoryItem&);
 
 class HistoryItem : public RefCounted<HistoryItem> {
-    friend class PageCache;
+    friend class BackForwardCache;
 
 public: 
     static Ref<HistoryItem> create()
@@ -95,7 +95,7 @@ public:
     WEBCORE_EXPORT const String& urlString() const;
     WEBCORE_EXPORT const String& title() const;
     
-    bool isInPageCache() const { return m_cachedPage.get(); }
+    bool isInBackForwardCache() const { return m_cachedPage.get(); }
     WEBCORE_EXPORT bool hasCachedPageExpired() const;
 
     WEBCORE_EXPORT void setAlternateTitle(const String&);
@@ -266,7 +266,7 @@ private:
     RefPtr<FormData> m_formData;
     String m_formContentType;
 
-    // PageCache controls these fields.
+    // BackForwardCache controls these fields.
     std::unique_ptr<CachedPage> m_cachedPage;
     PruningReason m_pruningReason;
 
index cfea271..9fa738a 100644 (file)
@@ -5759,7 +5759,7 @@ void HTMLMediaElement::suspend(ReasonForSuspension reason)
     m_resumeTaskQueue.cancelTask();
 
     switch (reason) {
-    case ReasonForSuspension::PageCache:
+    case ReasonForSuspension::BackForwardCache:
         stopWithoutDestroyingMediaPlayer();
         setBufferingPolicy(BufferingPolicy::MakeResourcesPurgeable);
         m_mediaSession->addBehaviorRestriction(MediaElementSession::RequirePageConsentToResumeMedia);
@@ -5787,7 +5787,7 @@ void HTMLMediaElement::resume()
     m_mediaSession->updateBufferingPolicy();
 
     if (m_error && m_error->code() == MediaError::MEDIA_ERR_ABORTED && !m_resumeTaskQueue.hasPendingTask()) {
-        // Restart the load if it was aborted in the middle by moving the document to the page cache.
+        // Restart the load if it was aborted in the middle by moving the document to the back/forward cache.
         // m_error is only left at MEDIA_ERR_ABORTED when the document becomes inactive (it is set to
         //  MEDIA_ERR_ABORTED while the abortEvent is being sent, but cleared immediately afterwards).
         // This behavior is not specified but it seems like a sensible thing to do.
index c56c3c4..8a1ee0d 100644 (file)
@@ -184,13 +184,13 @@ bool HTMLPlugInImageElement::wouldLoadAsPlugIn(const String& relativeURL, const
 
 RenderPtr<RenderElement> HTMLPlugInImageElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition& insertionPosition)
 {
-    ASSERT(document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(document().backForwardCacheState() == Document::NotInBackForwardCache);
 
     if (displayState() >= PreparingPluginReplacement)
         return HTMLPlugInElement::createElementRenderer(WTFMove(style), insertionPosition);
 
     // Once a plug-in element creates its renderer, it needs to be told when the document goes
-    // inactive or reactivates so it can clear the renderer before going into the page cache.
+    // inactive or reactivates so it can clear the renderer before going into the back/forward cache.
     if (!m_needsDocumentActivationCallbacks) {
         m_needsDocumentActivationCallbacks = true;
         document().registerForDocumentSuspensionCallbacks(*this);
index 88ec5a7..dd5d85c 100644 (file)
@@ -135,7 +135,7 @@ bool HTMLSourceElement::canSuspendForDocumentSuspension() const
 void HTMLSourceElement::suspend(ReasonForSuspension reason)
 {
     // FIXME: Shouldn't this also stop the timer for PageWillBeSuspended?
-    if (reason == ReasonForSuspension::PageCache) {
+    if (reason == ReasonForSuspension::BackForwardCache) {
         m_shouldRescheduleErrorEventOnResume = m_errorEventTimer.isActive();
         m_errorEventTimer.stop();
     }
index 28406fc..2a4c8f5 100644 (file)
@@ -312,7 +312,7 @@ SuccessOr<MediaPlaybackDenialReason> MediaElementSession::playbackPermitted() co
 bool MediaElementSession::autoplayPermitted() const
 {
     const Document& document = m_element.document();
-    if (document.pageCacheState() != Document::NotInPageCache)
+    if (document.backForwardCacheState() != Document::NotInBackForwardCache)
         return false;
     if (document.activeDOMObjectsAreSuspended())
         return false;
index fba266a..5fe307d 100644 (file)
@@ -1654,17 +1654,17 @@ void DocumentLoader::addSubresourceLoader(ResourceLoader* loader)
 
 #if !ASSERT_DISABLED
     if (document()) {
-        switch (document()->pageCacheState()) {
-        case Document::NotInPageCache:
+        switch (document()->backForwardCacheState()) {
+        case Document::NotInBackForwardCache:
             break;
-        case Document::AboutToEnterPageCache: {
-            // A page about to enter PageCache should only be able to start ping loads.
+        case Document::AboutToEnterBackForwardCache: {
+            // A page about to enter the BackForwardCache should only be able to start ping loads.
             auto* cachedResource = MemoryCache::singleton().resourceForRequest(loader->request(), loader->frameLoader()->frame().page()->sessionID());
             ASSERT(cachedResource && CachedResource::shouldUsePingLoad(cachedResource->type()));
             break;
         }
-        case Document::InPageCache:
-            // A page in the PageCache should not be able to start loads.
+        case Document::InBackForwardCache:
+            // A page in the BackForwardCache should not be able to start loads.
             ASSERT_NOT_REACHED();
             break;
         }
index dffed40..9f38f9e 100644 (file)
@@ -539,7 +539,7 @@ private:
 
     // We retain all the received responses so we can play back the
     // WebResourceLoadDelegate messages if the item is loaded from the
-    // page cache.
+    // back/forward cache.
     Vector<ResourceResponse> m_responses;
     bool m_stopRecordingResponses { false };
     
@@ -579,7 +579,6 @@ private:
 
     Vector<CustomHeaderFields> m_customHeaderFields;
     
-    bool m_subresourceLoadersArePageCacheAcceptable { false };
     ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow };
 
     std::unique_ptr<ApplicationCacheHost> m_applicationCacheHost;
index e596fa0..09ccd5a 100644 (file)
@@ -46,7 +46,7 @@ class WEBCORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient {
 
     void makeRepresentation(DocumentLoader*) final { }
 #if PLATFORM(IOS_FAMILY)
-    bool forceLayoutOnRestoreFromPageCache() final { return false; }
+    bool forceLayoutOnRestoreFromBackForwardCache() final { return false; }
 #endif
     void forceLayoutForNonHTML() final { }
 
@@ -164,7 +164,7 @@ class WEBCORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient {
 #endif
     void transitionToCommittedForNewPage() final { }
 
-    void didRestoreFromPageCache() final { }
+    void didRestoreFromBackForwardCache() final { }
 
     void dispatchDidBecomeFrameset(bool) final { }
 
index c973e17..b20375a 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "AXObjectCache.h"
 #include "ApplicationCacheHost.h"
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "BeforeUnloadEvent.h"
 #include "CachedPage.h"
@@ -92,7 +93,6 @@
 #include "NavigationScheduler.h"
 #include "Node.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "PageTransitionEvent.h"
 #include "PerformanceLogging.h"
 #include "PlatformStrategies.h"
@@ -548,8 +548,8 @@ bool FrameLoader::closeURL()
         // If this is the SVGDocument of an SVGImage, no need to dispatch events or recalcStyle.
         unloadEventPolicy = UnloadEventPolicyNone;
     } else {
-        // Should only send the pagehide event here if the current document exists and has not been placed in the page cache.
-        unloadEventPolicy = currentDocument && currentDocument->pageCacheState() == Document::NotInPageCache ? UnloadEventPolicyUnloadAndPageHide : UnloadEventPolicyUnloadOnly;
+        // Should only send the pagehide event here if the current document exists and has not been placed in the back/forward cache.
+        unloadEventPolicy = currentDocument && currentDocument->backForwardCacheState() == Document::NotInBackForwardCache ? UnloadEventPolicyUnloadAndPageHide : UnloadEventPolicyUnloadOnly;
     }
 
     stopLoading(unloadEventPolicy);
@@ -634,7 +634,7 @@ void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool
     bool neededClear = m_needsClear;
     m_needsClear = false;
 
-    if (neededClear && m_frame.document()->pageCacheState() != Document::InPageCache) {
+    if (neededClear && m_frame.document()->backForwardCacheState() != Document::InBackForwardCache) {
         m_frame.document()->cancelParsing();
         m_frame.document()->stopActiveDOMObjects();
         bool hadLivingRenderTree = m_frame.document()->hasLivingRenderTree();
@@ -653,7 +653,7 @@ void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool
     if (clearWindowProperties) {
         InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame.document()->domWindow());
         m_frame.document()->domWindow()->resetUnlessSuspendedForDocumentSuspension();
-        m_frame.windowProxy().clearJSWindowProxiesNotMatchingDOMWindow(newDocument->domWindow(), m_frame.document()->pageCacheState() == Document::AboutToEnterPageCache);
+        m_frame.windowProxy().clearJSWindowProxiesNotMatchingDOMWindow(newDocument->domWindow(), m_frame.document()->backForwardCacheState() == Document::AboutToEnterBackForwardCache);
 
         if (shouldClearWindowName(m_frame, *newDocument))
             m_frame.tree().setName(nullAtom());
@@ -1814,7 +1814,7 @@ void FrameLoader::reload(OptionSet<ReloadOption> options)
 
 void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItemPolicy, StopLoadingPolicy stopLoadingPolicy)
 {
-    if (m_frame.document() && m_frame.document()->pageCacheState() == Document::InPageCache)
+    if (m_frame.document() && m_frame.document()->backForwardCacheState() == Document::InBackForwardCache)
         return;
 
     if (stopLoadingPolicy == StopLoadingPolicy::PreventDuringUnloadEvents && !isStopLoadingAllowed())
@@ -1852,7 +1852,7 @@ void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItem
     m_inStopAllLoaders = false;    
 }
 
-void FrameLoader::stopForPageCache()
+void FrameLoader::stopForBackForwardCache()
 {
     // Stop provisional loads in subframes (The one in the main frame is about to be committed).
     if (!m_frame.isMainFrame()) {
@@ -1866,7 +1866,7 @@ void FrameLoader::stopForPageCache()
         m_documentLoader->stopLoading();
 
     for (RefPtr<Frame> child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
-        child->loader().stopForPageCache();
+        child->loader().stopForBackForwardCache();
 
     // We cancel pending navigations & policy checks *after* cancelling loads because cancelling loads might end up
     // running script, which could schedule new navigations.
@@ -2016,7 +2016,7 @@ void FrameLoader::commitProvisionalLoad()
 
     std::unique_ptr<CachedPage> cachedPage;
     if (m_loadingFromCachedPage && history().provisionalItem())
-        cachedPage = PageCache::singleton().take(*history().provisionalItem(), m_frame.page());
+        cachedPage = BackForwardCache::singleton().take(*history().provisionalItem(), m_frame.page());
 
     LOG(BackForwardCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s' with cached page %p", m_frame.tree().uniqueName().string().utf8().data(),
         m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "",
@@ -2027,7 +2027,7 @@ void FrameLoader::commitProvisionalLoad()
     if (!m_frame.tree().parent() && history().currentItem() && history().currentItem() != history().provisionalItem()) {
         // Check to see if we need to cache the page we are navigating away from into the back/forward cache.
         // We are doing this here because we know for sure that a new page is about to be loaded.
-        PageCache::singleton().addIfCacheable(*history().currentItem(), m_frame.page());
+        BackForwardCache::singleton().addIfCacheable(*history().currentItem(), m_frame.page());
         
         WebCore::jettisonExpensiveObjectsOnTopLevelNavigation();
     }
@@ -2104,11 +2104,11 @@ void FrameLoader::commitProvisionalLoad()
         // Note, didReceiveDocType is expected to be called for cached pages. See <rdar://problem/5906758> for more details.
         if (auto* page = m_frame.page())
             page->chrome().didReceiveDocType(m_frame);
-        m_frame.document()->resume(ReasonForSuspension::PageCache);
+        m_frame.document()->resume(ReasonForSuspension::BackForwardCache);
 
         // Force a layout to update view size and thereby update scrollbars.
 #if PLATFORM(IOS_FAMILY)
-        if (!m_client.forceLayoutOnRestoreFromPageCache())
+        if (!m_client.forceLayoutOnRestoreFromBackForwardCache())
             m_frame.view()->forceLayout();
 #else
         m_frame.view()->forceLayout();
@@ -2330,7 +2330,7 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     clear(document.ptr(), true, true, cachedFrame.isMainFrame());
 
     document->attachToCachedFrame(cachedFrame);
-    document->setPageCacheState(Document::NotInPageCache);
+    document->setBackForwardCacheState(Document::NotInBackForwardCache);
 
     m_needsClear = true;
     m_isComplete = false;
@@ -2360,7 +2360,7 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     
     m_frame.setDocument(document.copyRef());
 
-    document->domWindow()->resumeFromPageCache();
+    document->domWindow()->resumeFromBackForwardCache();
 
     updateFirstPartyForCookies();
 
@@ -2828,7 +2828,7 @@ void FrameLoader::frameDetached()
         checkCompletenessNow();
     }
 
-    if (m_frame.document()->pageCacheState() != Document::InPageCache) {
+    if (m_frame.document()->backForwardCacheState() != Document::InBackForwardCache) {
         stopAllLoadersAndCheckCompleteness();
         m_frame.document()->stopActiveDOMObjects();
     }
@@ -2844,8 +2844,8 @@ void FrameLoader::detachFromParent()
     closeURL();
     history().saveScrollPositionAndViewStateToItem(history().currentItem());
     detachChildren();
-    if (m_frame.document()->pageCacheState() != Document::InPageCache) {
-        // stopAllLoaders() needs to be called after detachChildren() if the document is not in the page cache,
+    if (m_frame.document()->backForwardCacheState() != Document::InBackForwardCache) {
+        // stopAllLoaders() needs to be called after detachChildren() if the document is not in the back/forward cache,
         // because detachedChildren() will trigger the unload event handlers of any child frames, and those event
         // handlers might start a new subresource load in this frame.
         stopAllLoaders(ShouldClearProvisionalItem, StopLoadingPolicy::AlwaysStopLoading);
@@ -3180,7 +3180,7 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
         if (m_submittedFormURL == m_provisionalDocumentLoader->originalRequestCopy().url())
             m_submittedFormURL = URL();
             
-        // We might have made a page cache item, but now we're bailing out due to an error before we ever
+        // We might have made a back/forward cache item, but now we're bailing out due to an error before we ever
         // transitioned to the new page (before WebFrameState == commit).  The goal here is to restore any state
         // so that the existing view (that wenever got far enough to replace) can continue being used.
         history().invalidateCurrentItemCachedPage();
@@ -3231,7 +3231,7 @@ bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
     return (!isFormSubmission || equalLettersIgnoringASCIICase(httpMethod, "get"))
         && !isReload(loadType)
         && loadType != FrameLoadType::Same
-        && m_frame.document()->pageCacheState() != Document::InPageCache
+        && m_frame.document()->backForwardCacheState() != Document::InBackForwardCache
         && !shouldReload(m_frame.document()->url(), url)
         // We don't want to just scroll if a link from within a
         // frameset is trying to reload the frameset into _top.
@@ -3315,13 +3315,13 @@ void FrameLoader::dispatchUnloadEvents(UnloadEventPolicy unloadEventPolicy)
         if (m_pageDismissalEventBeingDispatched == PageDismissalType::None) {
             if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
                 m_pageDismissalEventBeingDispatched = PageDismissalType::PageHide;
-                m_frame.document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame.document()->pageCacheState() == Document::AboutToEnterPageCache), m_frame.document());
+                m_frame.document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame.document()->backForwardCacheState() == Document::AboutToEnterBackForwardCache), m_frame.document());
             }
 
             // FIXME: update Page Visibility state here.
             // https://bugs.webkit.org/show_bug.cgi?id=116770
 
-            if (m_frame.document()->pageCacheState() == Document::NotInPageCache) {
+            if (m_frame.document()->backForwardCacheState() == Document::NotInBackForwardCache) {
                 Ref<Event> unloadEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No));
                 // The DocumentLoader (and thus its LoadTiming) might get destroyed
                 // while dispatching the event, so protect it to prevent writing the end
@@ -3345,7 +3345,7 @@ void FrameLoader::dispatchUnloadEvents(UnloadEventPolicy unloadEventPolicy)
     if (!m_frame.document())
         return;
 
-    if (m_frame.document()->pageCacheState() != Document::NotInPageCache)
+    if (m_frame.document()->backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     // Don't remove event listeners from a transitional empty document (see bug 28716 for more information).
@@ -3505,13 +3505,13 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest& reque
 
     if (isBackForwardLoadType(type)) {
         auto& diagnosticLoggingClient = m_frame.page()->diagnosticLoggingClient();
-        if (history().provisionalItem() && history().provisionalItem()->isInPageCache()) {
-            diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::pageCacheKey(), DiagnosticLoggingKeys::retrievalKey(), DiagnosticLoggingResultPass, ShouldSample::Yes);
+        if (history().provisionalItem() && history().provisionalItem()->isInBackForwardCache()) {
+            diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::backForwardCacheKey(), DiagnosticLoggingKeys::retrievalKey(), DiagnosticLoggingResultPass, ShouldSample::Yes);
             loadProvisionalItemFromCachedPage();
             RELEASE_LOG_IF_ALLOWED("continueLoadAfterNavigationPolicy: can't continue loading frame because it will be loaded from cache (frame = %p, main = %d)", &m_frame, m_frame.isMainFrame());
             return;
         }
-        diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::pageCacheKey(), DiagnosticLoggingKeys::retrievalKey(), DiagnosticLoggingResultFail, ShouldSample::Yes);
+        diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::backForwardCacheKey(), DiagnosticLoggingKeys::retrievalKey(), DiagnosticLoggingResultFail, ShouldSample::Yes);
     }
 
     CompletionHandler<void()> completionHandler = [this, protectedFrame = makeRef(m_frame)] () mutable {
@@ -3680,7 +3680,7 @@ bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, con
 void FrameLoader::loadProvisionalItemFromCachedPage()
 {
     DocumentLoader* provisionalLoader = provisionalDocumentLoader();
-    LOG(BackForwardCache, "WebCorePageCache: Loading provisional DocumentLoader %p with URL '%s' from CachedPage", provisionalDocumentLoader(), provisionalDocumentLoader()->url().stringCenterEllipsizedToLength().utf8().data());
+    LOG(BackForwardCache, "FrameLoader::loadProvisionalItemFromCachedPage Loading provisional DocumentLoader %p with URL '%s' from CachedPage", provisionalDocumentLoader(), provisionalDocumentLoader()->url().stringCenterEllipsizedToLength().utf8().data());
 
     prepareForLoadStart();
 
@@ -3768,7 +3768,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem& item, HistoryItem* from
 
     SetForScope<LoadContinuingState> continuingLoadGuard(m_currentLoadContinuingState, shouldTreatAsContinuingLoad == ShouldTreatAsContinuingLoad::Yes ? LoadContinuingState::ContinuingWithHistoryItem : LoadContinuingState::NotContinuing);
 
-    if (CachedPage* cachedPage = PageCache::singleton().get(item, m_frame.page())) {
+    if (CachedPage* cachedPage = BackForwardCache::singleton().get(item, m_frame.page())) {
         auto documentLoader = cachedPage->documentLoader();
         m_client.updateCachedDocumentLoader(*documentLoader);
 
index a3716d9..5b3ac10 100644 (file)
@@ -147,7 +147,7 @@ public:
     void stopAllLoadersAndCheckCompleteness();
     WEBCORE_EXPORT void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem, StopLoadingPolicy = StopLoadingPolicy::PreventDuringUnloadEvents);
     WEBCORE_EXPORT void stopForUserCancel(bool deferCheckLoadComplete = false);
-    void stopForPageCache();
+    void stopForBackForwardCache();
     void stop();
     void stopLoading(UnloadEventPolicy);
     bool closeURL();
index 8c7f175..98df945 100644 (file)
@@ -129,7 +129,7 @@ public:
 
 #if PLATFORM(IOS_FAMILY)
     // Returns true if the client forced the layout.
-    virtual bool forceLayoutOnRestoreFromPageCache() = 0;
+    virtual bool forceLayoutOnRestoreFromBackForwardCache() = 0;
 #endif
     virtual void forceLayoutForNonHTML() = 0;
 
@@ -278,7 +278,7 @@ public:
 #endif
     virtual void transitionToCommittedForNewPage() = 0;
 
-    virtual void didRestoreFromPageCache() = 0;
+    virtual void didRestoreFromBackForwardCache() = 0;
 
     virtual void dispatchDidBecomeFrameset(bool) = 0; // Can change due to navigation or DOM modification.
 
index 06a714f..64f1913 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "HistoryController.h"
 
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "CachedPage.h"
 #include "Document.h"
@@ -44,7 +45,6 @@
 #include "HistoryItem.h"
 #include "Logging.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "ScrollingCoordinator.h"
 #include "SerializedScriptValue.h"
 #include "SharedStringHash.h"
@@ -74,7 +74,7 @@ void HistoryController::saveScrollPositionAndViewStateToItem(HistoryItem* item)
     if (!item || !frameView)
         return;
 
-    if (m_frame.document()->pageCacheState() != Document::NotInPageCache)
+    if (m_frame.document()->backForwardCacheState() != Document::NotInBackForwardCache)
         item->setScrollPosition(frameView->cachedScrollPosition());
     else
         item->setScrollPosition(frameView->scrollPosition());
@@ -137,9 +137,9 @@ void HistoryController::restoreScrollPositionAndViewState()
     auto view = makeRefPtr(m_frame.view());
 
     // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the
-    // page cache and similar work that needs to occur when it comes out. This is where we do the work
+    // back/forward cache and similar work that needs to occur when it comes out. This is where we do the work
     // that needs to happen when we exit, and the work that needs to happen when we enter is in
-    // Document::setIsInPageCache(bool). It would be nice if there was more symmetry in these spots.
+    // Document::setIsInBackForwardCache(bool). It would be nice if there was more symmetry in these spots.
     // https://bugs.webkit.org/show_bug.cgi?id=98698
     if (view) {
         Page* page = m_frame.page();
@@ -261,8 +261,8 @@ void HistoryController::invalidateCurrentItemCachedPage()
     if (!currentItem())
         return;
 
-    // When we are pre-commit, the currentItem is where any page cache data resides.
-    std::unique_ptr<CachedPage> cachedPage = PageCache::singleton().take(*currentItem(), m_frame.page());
+    // When we are pre-commit, the currentItem is where any back/forward cache data resides.
+    std::unique_ptr<CachedPage> cachedPage = BackForwardCache::singleton().take(*currentItem(), m_frame.page());
     if (!cachedPage)
         return;
 
@@ -272,7 +272,7 @@ void HistoryController::invalidateCurrentItemCachedPage()
     
     ASSERT(cachedPage->document() == m_frame.document());
     if (cachedPage->document() == m_frame.document()) {
-        cachedPage->document()->setPageCacheState(Document::NotInPageCache);
+        cachedPage->document()->setBackForwardCacheState(Document::NotInBackForwardCache);
         cachedPage->clear();
     }
 }
@@ -355,7 +355,7 @@ void HistoryController::updateForReload()
     LOG(History, "HistoryController %p updateForReload: Updating History for reload in frame %p (main frame %d) %s", this, &m_frame, m_frame.isMainFrame(), m_frame.loader().documentLoader() ? m_frame.loader().documentLoader()->url().string().utf8().data() : "");
 
     if (m_currentItem) {
-        PageCache::singleton().remove(*m_currentItem);
+        BackForwardCache::singleton().remove(*m_currentItem);
     
         if (m_frame.loader().loadType() == FrameLoadType::Reload || m_frame.loader().loadType() == FrameLoadType::ReloadFromOrigin)
             saveScrollPositionAndViewStateToItem(m_currentItem.get());
index e3131cc..899cba4 100644 (file)
@@ -294,7 +294,7 @@ void ApplicationCacheHost::maybeLoadFallbackSynchronously(const ResourceRequest&
     }
 }
 
-bool ApplicationCacheHost::canCacheInPageCache()
+bool ApplicationCacheHost::canCacheInBackForwardCache()
 {
     return !applicationCache() && !candidateApplicationCacheGroup();
 }
index e094d08..5b2aa1c 100644 (file)
@@ -105,7 +105,7 @@ public:
     bool maybeLoadSynchronously(ResourceRequest&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>&);
     void maybeLoadFallbackSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>&);
 
-    bool canCacheInPageCache();
+    bool canCacheInBackForwardCache();
 
     Status status() const;
     bool update();
index 4b16f59..696ad8b 100644 (file)
@@ -195,23 +195,23 @@ void CachedResource::load(CachedResourceLoader& cachedResourceLoader)
     }
     Frame& frame = *cachedResourceLoader.frame();
 
-    // Prevent new loads if we are in the PageCache or being added to the PageCache.
+    // Prevent new loads if we are in the BackForwardCache or being added to the BackForwardCache.
     // We query the top document because new frames may be created in pagehide event handlers
-    // and their pageCacheState will not reflect the fact that they are about to enter page
+    // and their backForwardCacheState will not reflect the fact that they are about to enter page
     // cache.
     if (auto* topDocument = frame.mainFrame().document()) {
-        switch (topDocument->pageCacheState()) {
-        case Document::NotInPageCache:
+        switch (topDocument->backForwardCacheState()) {
+        case Document::NotInBackForwardCache:
             break;
-        case Document::AboutToEnterPageCache:
+        case Document::AboutToEnterBackForwardCache:
             // Beacons are allowed to&