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.

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: http://svn.webkit.org/repository/webkit/trunk@251220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 92e351b..2155eed 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -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
diff --git a/LayoutTests/animations/resume-after-page-cache.html b/LayoutTests/animations/resume-after-page-cache.html
index a6622ee..e98c499 100644
--- a/LayoutTests/animations/resume-after-page-cache.html
+++ b/LayoutTests/animations/resume-after-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 @-webkit-keyframes bounce {
     from {
diff --git a/LayoutTests/compositing/accelerated-layers-after-back.html b/LayoutTests/compositing/accelerated-layers-after-back.html
index 3b61a44..a5fbc15 100644
--- a/LayoutTests/compositing/accelerated-layers-after-back.html
+++ b/LayoutTests/compositing/accelerated-layers-after-back.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useAcceleratedDrawing=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useAcceleratedDrawing=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
diff --git a/LayoutTests/compositing/iframes/page-cache-layer-tree.html b/LayoutTests/compositing/iframes/page-cache-layer-tree.html
index 96c698f..054aa18 100644
--- a/LayoutTests/compositing/iframes/page-cache-layer-tree.html
+++ b/LayoutTests/compositing/iframes/page-cache-layer-tree.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/compositing/page-cache-back-crash.html b/LayoutTests/compositing/page-cache-back-crash.html
index 8f68bcd..c67f214 100644
--- a/LayoutTests/compositing/page-cache-back-crash.html
+++ b/LayoutTests/compositing/page-cache-back-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 .outer { position: fixed; }
 .inner { position: absolute; }
diff --git a/LayoutTests/compositing/show-composited-iframe-on-back-button.html b/LayoutTests/compositing/show-composited-iframe-on-back-button.html
index 5695e74..0e68a3d 100644
--- a/LayoutTests/compositing/show-composited-iframe-on-back-button.html
+++ b/LayoutTests/compositing/show-composited-iframe-on-back-button.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html b/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html
index 38877cb..7b8d792 100644
--- a/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html
+++ b/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html
@@ -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>
diff --git a/LayoutTests/fast/canvas/webgl/canvas-webgl-page-cache.html b/LayoutTests/fast/canvas/webgl/canvas-webgl-page-cache.html
index cba3279..9c7c837 100644
--- a/LayoutTests/fast/canvas/webgl/canvas-webgl-page-cache.html
+++ b/LayoutTests/fast/canvas/webgl/canvas-webgl-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <style>
diff --git a/LayoutTests/fast/css/fontloader-page-cache.html b/LayoutTests/fast/css/fontloader-page-cache.html
index 7a20a0c..98792cc 100644
--- a/LayoutTests/fast/css/fontloader-page-cache.html
+++ b/LayoutTests/fast/css/fontloader-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!doctype html>
 <html>
 <style>
diff --git a/LayoutTests/fast/dom/DeviceMotion/no-page-cache.html b/LayoutTests/fast/dom/DeviceMotion/no-page-cache.html
index 59e7383..e6f9ebe 100644
--- a/LayoutTests/fast/dom/DeviceMotion/no-page-cache.html
+++ b/LayoutTests/fast/dom/DeviceMotion/no-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/event-after-navigation.html b/LayoutTests/fast/dom/DeviceOrientation/event-after-navigation.html
index 238b371..3602518 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/event-after-navigation.html
+++ b/LayoutTests/fast/dom/DeviceOrientation/event-after-navigation.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/no-page-cache.html b/LayoutTests/fast/dom/DeviceOrientation/no-page-cache.html
index 6651f51..5ec6491 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/no-page-cache.html
+++ b/LayoutTests/fast/dom/DeviceOrientation/no-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script src="../../../resources/js-test-pre.js"></script>
diff --git a/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html b/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
index 302a424..2aec848 100644
--- a/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
+++ b/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 var timeoutValue = 100; //ms
diff --git a/LayoutTests/fast/events/onunload-back-to-page-cache.html b/LayoutTests/fast/events/onunload-back-to-page-cache.html
index f0184f3..24c0a1e 100644
--- a/LayoutTests/fast/events/onunload-back-to-page-cache.html
+++ b/LayoutTests/fast/events/onunload-back-to-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
diff --git a/LayoutTests/fast/events/pagehide-timeout.html b/LayoutTests/fast/events/pagehide-timeout.html
index 4801ee8..a173db3 100644
--- a/LayoutTests/fast/events/pagehide-timeout.html
+++ b/LayoutTests/fast/events/pagehide-timeout.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script src="../../resources/js-test-pre.js"></script>
 <body>
diff --git a/LayoutTests/fast/events/pagehide-xhr-open.html b/LayoutTests/fast/events/pagehide-xhr-open.html
index a3b9b5c..517f41b 100644
--- a/LayoutTests/fast/events/pagehide-xhr-open.html
+++ b/LayoutTests/fast/events/pagehide-xhr-open.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script src="../../resources/js-test-pre.js"></script>
 <body>
diff --git a/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html b/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
index 421286d..f2f3201 100644
--- a/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
+++ b/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
@@ -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.
diff --git a/LayoutTests/fast/events/pageshow-pagehide-on-back-cached.html b/LayoutTests/fast/events/pageshow-pagehide-on-back-cached.html
index cf921bf..0cbbaac 100644
--- a/LayoutTests/fast/events/pageshow-pagehide-on-back-cached.html
+++ b/LayoutTests/fast/events/pageshow-pagehide-on-back-cached.html
@@ -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) {
diff --git a/LayoutTests/fast/events/suspend-timers.html b/LayoutTests/fast/events/suspend-timers.html
index 3c85f48..6ea8981 100644
--- a/LayoutTests/fast/events/suspend-timers.html
+++ b/LayoutTests/fast/events/suspend-timers.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/forms/autocomplete-off-with-default-value-does-not-clear.html b/LayoutTests/fast/forms/autocomplete-off-with-default-value-does-not-clear.html
index b3fdd2a..4556071 100644
--- a/LayoutTests/fast/forms/autocomplete-off-with-default-value-does-not-clear.html
+++ b/LayoutTests/fast/forms/autocomplete-off-with-default-value-does-not-clear.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
diff --git a/LayoutTests/fast/frames/frame-crash-with-page-cache.html b/LayoutTests/fast/frames/frame-crash-with-page-cache.html
index a299cf8..6df0e42 100644
--- a/LayoutTests/fast/frames/frame-crash-with-page-cache.html
+++ b/LayoutTests/fast/frames/frame-crash-with-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
diff --git a/LayoutTests/fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html b/LayoutTests/fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html
index 3832d67..de7ffed 100644
--- a/LayoutTests/fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html
+++ b/LayoutTests/fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/frames/page-hide-document-open.html b/LayoutTests/fast/frames/page-hide-document-open.html
index 95c14ab..c50492a 100644
--- a/LayoutTests/fast/frames/page-hide-document-open.html
+++ b/LayoutTests/fast/frames/page-hide-document-open.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 Passes if it does not crash.
 <script>
diff --git a/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html b/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html
index db1d14e..bd03e93 100644
--- a/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html
+++ b/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -10,7 +10,7 @@
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
     testRunner.setCanOpenWindows();
-    internals.settings.setPageCacheSupportsPlugins(true);
+    internals.settings.setBackForwardCacheSupportsPlugins(true);
 }
 
 let newWindow;
diff --git a/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts.html b/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts.html
index c145b50..6725e64 100644
--- a/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts.html
+++ b/LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html b/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html
index 1187c60..2191eed 100644
--- a/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html
+++ b/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
diff --git a/LayoutTests/fast/harness/use-page-cache.html b/LayoutTests/fast/harness/use-page-cache.html
index a023bca..6054522 100644
--- a/LayoutTests/fast/harness/use-page-cache.html
+++ b/LayoutTests/fast/harness/use-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 window.finish = function()
diff --git a/LayoutTests/fast/history/back-from-page-with-focused-iframe.html b/LayoutTests/fast/history/back-from-page-with-focused-iframe.html
index 6d3f84b..e80e62f 100644
--- a/LayoutTests/fast/history/back-from-page-with-focused-iframe.html
+++ b/LayoutTests/fast/history/back-from-page-with-focused-iframe.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/go-back-to-iframe-with-plugin.html b/LayoutTests/fast/history/go-back-to-iframe-with-plugin.html
index 3c44ad5..5ddab83 100644
--- a/LayoutTests/fast/history/go-back-to-iframe-with-plugin.html
+++ b/LayoutTests/fast/history/go-back-to-iframe-with-plugin.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
   <head>
diff --git a/LayoutTests/fast/history/go-back-to-object-subframe.html b/LayoutTests/fast/history/go-back-to-object-subframe.html
index f08d056..af0835b 100644
--- a/LayoutTests/fast/history/go-back-to-object-subframe.html
+++ b/LayoutTests/fast/history/go-back-to-object-subframe.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html b/LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html
index 1b581fa..cfbc067 100644
--- a/LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html
+++ b/LayoutTests/fast/history/history-back-while-pdf-in-pagecache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-MessagePort-pending-message.html b/LayoutTests/fast/history/page-cache-MessagePort-pending-message.html
index cecf604..a08658e5 100644
--- a/LayoutTests/fast/history/page-cache-MessagePort-pending-message.html
+++ b/LayoutTests/fast/history/page-cache-MessagePort-pending-message.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-after-window-open.html b/LayoutTests/fast/history/page-cache-after-window-open.html
index fcd5de4..489ff84 100644
--- a/LayoutTests/fast/history/page-cache-after-window-open.html
+++ b/LayoutTests/fast/history/page-cache-after-window-open.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-back-navigation-crash.html b/LayoutTests/fast/history/page-cache-back-navigation-crash.html
index 02f8170..c78d536b 100644
--- a/LayoutTests/fast/history/page-cache-back-navigation-crash.html
+++ b/LayoutTests/fast/history/page-cache-back-navigation-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-clearing-expected.txt b/LayoutTests/fast/history/page-cache-clearing-expected.txt
index 6279da9..8e79271 100644
--- a/LayoutTests/fast/history/page-cache-clearing-expected.txt
+++ b/LayoutTests/fast/history/page-cache-clearing-expected.txt
@@ -6,9 +6,9 @@
 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
diff --git a/LayoutTests/fast/history/page-cache-clearing.html b/LayoutTests/fast/history/page-cache-clearing.html
index 8aa972a..df8b47b 100644
--- a/LayoutTests/fast/history/page-cache-clearing.html
+++ b/LayoutTests/fast/history/page-cache-clearing.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -13,9 +13,9 @@
 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);
diff --git a/LayoutTests/fast/history/page-cache-closed-audiocontext.html b/LayoutTests/fast/history/page-cache-closed-audiocontext.html
index ffe5b29..aaae510 100644
--- a/LayoutTests/fast/history/page-cache-closed-audiocontext.html
+++ b/LayoutTests/fast/history/page-cache-closed-audiocontext.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-createImageBitmap.html b/LayoutTests/fast/history/page-cache-createImageBitmap.html
index 99b6513..696fddc 100644
--- a/LayoutTests/fast/history/page-cache-createImageBitmap.html
+++ b/LayoutTests/fast/history/page-cache-createImageBitmap.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-createObjectURL-using-open-panel.html b/LayoutTests/fast/history/page-cache-createObjectURL-using-open-panel.html
index bfcc2e9..f0fd6eb 100644
--- a/LayoutTests/fast/history/page-cache-createObjectURL-using-open-panel.html
+++ b/LayoutTests/fast/history/page-cache-createObjectURL-using-open-panel.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-createObjectURL.html b/LayoutTests/fast/history/page-cache-createObjectURL.html
index a628c82..556c195 100644
--- a/LayoutTests/fast/history/page-cache-createObjectURL.html
+++ b/LayoutTests/fast/history/page-cache-createObjectURL.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-destroy-document.html b/LayoutTests/fast/history/page-cache-destroy-document.html
index 6d1d7bf..99d5e53 100644
--- a/LayoutTests/fast/history/page-cache-destroy-document.html
+++ b/LayoutTests/fast/history/page-cache-destroy-document.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-element-state-focused.html b/LayoutTests/fast/history/page-cache-element-state-focused.html
index fdef5ef..fcd91e5 100644
--- a/LayoutTests/fast/history/page-cache-element-state-focused.html
+++ b/LayoutTests/fast/history/page-cache-element-state-focused.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-execute-script-during-restore.html b/LayoutTests/fast/history/page-cache-execute-script-during-restore.html
index 2e34f49..c47c74e 100644
--- a/LayoutTests/fast/history/page-cache-execute-script-during-restore.html
+++ b/LayoutTests/fast/history/page-cache-execute-script-during-restore.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-geolocation-active-oneshot.html b/LayoutTests/fast/history/page-cache-geolocation-active-oneshot.html
index 0ce4803..8df9808 100644
--- a/LayoutTests/fast/history/page-cache-geolocation-active-oneshot.html
+++ b/LayoutTests/fast/history/page-cache-geolocation-active-oneshot.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-geolocation-active-watcher.html b/LayoutTests/fast/history/page-cache-geolocation-active-watcher.html
index 94c0772..30905c6 100644
--- a/LayoutTests/fast/history/page-cache-geolocation-active-watcher.html
+++ b/LayoutTests/fast/history/page-cache-geolocation-active-watcher.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-geolocation.html b/LayoutTests/fast/history/page-cache-geolocation.html
index 4846ab6..3d06416 100644
--- a/LayoutTests/fast/history/page-cache-geolocation.html
+++ b/LayoutTests/fast/history/page-cache-geolocation.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-iframe-js-url.html b/LayoutTests/fast/history/page-cache-iframe-js-url.html
index ccc6a53..45ec3a6 100644
--- a/LayoutTests/fast/history/page-cache-iframe-js-url.html
+++ b/LayoutTests/fast/history/page-cache-iframe-js-url.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/history/page-cache-indexed-closed-db.html b/LayoutTests/fast/history/page-cache-indexed-closed-db.html
index cc09761..d074120 100644
--- a/LayoutTests/fast/history/page-cache-indexed-closed-db.html
+++ b/LayoutTests/fast/history/page-cache-indexed-closed-db.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-indexed-opened-db.html b/LayoutTests/fast/history/page-cache-indexed-opened-db.html
index caa77cb..7d6bdb2 100644
--- a/LayoutTests/fast/history/page-cache-indexed-opened-db.html
+++ b/LayoutTests/fast/history/page-cache-indexed-opened-db.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-media-source-closed-2.html b/LayoutTests/fast/history/page-cache-media-source-closed-2.html
index d8e3c4f..d5161cc 100644
--- a/LayoutTests/fast/history/page-cache-media-source-closed-2.html
+++ b/LayoutTests/fast/history/page-cache-media-source-closed-2.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-media-source-closed.html b/LayoutTests/fast/history/page-cache-media-source-closed.html
index 818f026..28a7c1f 100644
--- a/LayoutTests/fast/history/page-cache-media-source-closed.html
+++ b/LayoutTests/fast/history/page-cache-media-source-closed.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-media-source-opened.html b/LayoutTests/fast/history/page-cache-media-source-opened.html
index 955af95..0b5f6aa 100644
--- a/LayoutTests/fast/history/page-cache-media-source-opened.html
+++ b/LayoutTests/fast/history/page-cache-media-source-opened.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-navigate-during-restore.html b/LayoutTests/fast/history/page-cache-navigate-during-restore.html
index 97967ae..f488e45 100644
--- a/LayoutTests/fast/history/page-cache-navigate-during-restore.html
+++ b/LayoutTests/fast/history/page-cache-navigate-during-restore.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -13,7 +13,7 @@
     testRunner.clearBackForwardList();
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
-    internals.clearPageCache();
+    internals.clearBackForwardCache();
 }
 sessionStorage.testStage = 'initial';
 let persisted = false;
diff --git a/LayoutTests/fast/history/page-cache-notification-non-suspendable.html b/LayoutTests/fast/history/page-cache-notification-non-suspendable.html
index a62e97b..53dbacb 100644
--- a/LayoutTests/fast/history/page-cache-notification-non-suspendable.html
+++ b/LayoutTests/fast/history/page-cache-notification-non-suspendable.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-notification-suspendable.html b/LayoutTests/fast/history/page-cache-notification-suspendable.html
index 51cba5d..04b7bd6 100644
--- a/LayoutTests/fast/history/page-cache-notification-suspendable.html
+++ b/LayoutTests/fast/history/page-cache-notification-suspendable.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-removed-source-buffer.html b/LayoutTests/fast/history/page-cache-removed-source-buffer.html
index 0e28acf..ba1dc74 100644
--- a/LayoutTests/fast/history/page-cache-removed-source-buffer.html
+++ b/LayoutTests/fast/history/page-cache-removed-source-buffer.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-running-audiocontext.html b/LayoutTests/fast/history/page-cache-running-audiocontext.html
index 79b5255..49eacfd 100644
--- a/LayoutTests/fast/history/page-cache-running-audiocontext.html
+++ b/LayoutTests/fast/history/page-cache-running-audiocontext.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-subframes-with-provisional-load.html b/LayoutTests/fast/history/page-cache-subframes-with-provisional-load.html
index cb9451f..36d50fd 100644
--- a/LayoutTests/fast/history/page-cache-subframes-with-provisional-load.html
+++ b/LayoutTests/fast/history/page-cache-subframes-with-provisional-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-suspended-audiocontext.html b/LayoutTests/fast/history/page-cache-suspended-audiocontext.html
index 3154401..17ecc0a 100644
--- a/LayoutTests/fast/history/page-cache-suspended-audiocontext.html
+++ b/LayoutTests/fast/history/page-cache-suspended-audiocontext.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-webdatabase-no-transaction-db.html b/LayoutTests/fast/history/page-cache-webdatabase-no-transaction-db.html
index a4f5655..2d14144 100644
--- a/LayoutTests/fast/history/page-cache-webdatabase-no-transaction-db.html
+++ b/LayoutTests/fast/history/page-cache-webdatabase-no-transaction-db.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-webdatabase-pending-transaction.html b/LayoutTests/fast/history/page-cache-webdatabase-pending-transaction.html
index 0eab23d..55963bc 100644
--- a/LayoutTests/fast/history/page-cache-webdatabase-pending-transaction.html
+++ b/LayoutTests/fast/history/page-cache-webdatabase-pending-transaction.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/page-cache-with-opener.html b/LayoutTests/fast/history/page-cache-with-opener.html
index f8e40e4..a2fb3bc 100644
--- a/LayoutTests/fast/history/page-cache-with-opener.html
+++ b/LayoutTests/fast/history/page-cache-with-opener.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/pagehide-remove-iframe-crash.html b/LayoutTests/fast/history/pagehide-remove-iframe-crash.html
index 5cc5143..80866d1 100644
--- a/LayoutTests/fast/history/pagehide-remove-iframe-crash.html
+++ b/LayoutTests/fast/history/pagehide-remove-iframe-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/resources/page-cache-window-with-iframe.html b/LayoutTests/fast/history/resources/page-cache-window-with-iframe.html
index fd62bd3..494835b 100644
--- a/LayoutTests/fast/history/resources/page-cache-window-with-iframe.html
+++ b/LayoutTests/fast/history/resources/page-cache-window-with-iframe.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/resources/page-cache-window-with-opener.html b/LayoutTests/fast/history/resources/page-cache-window-with-opener.html
index ba63011..3caf36e 100644
--- a/LayoutTests/fast/history/resources/page-cache-window-with-opener.html
+++ b/LayoutTests/fast/history/resources/page-cache-window-with-opener.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/history/timed-refresh-in-cached-frame.html b/LayoutTests/fast/history/timed-refresh-in-cached-frame.html
index 2428016..03341ac 100644
--- a/LayoutTests/fast/history/timed-refresh-in-cached-frame.html
+++ b/LayoutTests/fast/history/timed-refresh-in-cached-frame.html
@@ -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>
diff --git a/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html b/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html
index 828bcba..64b1510 100644
--- a/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html
+++ b/LayoutTests/fast/images/animated-gif-restored-from-bfcache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
     if (window.testRunner)
         testRunner.dumpAsText();
diff --git a/LayoutTests/fast/loader/frames-with-unload-handlers-in-page-cache.html b/LayoutTests/fast/loader/frames-with-unload-handlers-in-page-cache.html
index b81f877..a37d27e 100644
--- a/LayoutTests/fast/loader/frames-with-unload-handlers-in-page-cache.html
+++ b/LayoutTests/fast/loader/frames-with-unload-handlers-in-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
diff --git a/LayoutTests/fast/loader/image-in-page-cache.html b/LayoutTests/fast/loader/image-in-page-cache.html
index 7d43103..97c9bc0 100644
--- a/LayoutTests/fast/loader/image-in-page-cache.html
+++ b/LayoutTests/fast/loader/image-in-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/loader/input-element-page-cache-crash.html b/LayoutTests/fast/loader/input-element-page-cache-crash.html
index c86b258..7f1bfe3 100644
--- a/LayoutTests/fast/loader/input-element-page-cache-crash.html
+++ b/LayoutTests/fast/loader/input-element-page-cache-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
diff --git a/LayoutTests/fast/loader/navigate-with-new-target-after-back-forward-navigation.html b/LayoutTests/fast/loader/navigate-with-new-target-after-back-forward-navigation.html
index c58c726..1047d07 100644
--- a/LayoutTests/fast/loader/navigate-with-new-target-after-back-forward-navigation.html
+++ b/LayoutTests/fast/loader/navigate-with-new-target-after-back-forward-navigation.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html b/LayoutTests/fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html
index 2fc2395..c2b7053 100644
--- a/LayoutTests/fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html
+++ b/LayoutTests/fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/loader/scroll-position-restored-on-back.html b/LayoutTests/fast/loader/scroll-position-restored-on-back.html
index 780ec60..11314a5 100644
--- a/LayoutTests/fast/loader/scroll-position-restored-on-back.html
+++ b/LayoutTests/fast/loader/scroll-position-restored-on-back.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
diff --git a/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html b/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
index bb0460b..f045383 100644
--- a/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
+++ b/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html b/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html
index 5403c1f..8e4030c 100644
--- a/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html
+++ b/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/loader/unschedule-relayout-after-unload.html b/LayoutTests/fast/loader/unschedule-relayout-after-unload.html
index 692c706..3110eab 100644
--- a/LayoutTests/fast/loader/unschedule-relayout-after-unload.html
+++ b/LayoutTests/fast/loader/unschedule-relayout-after-unload.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <body>
 <pre id="log"></pre>
diff --git a/LayoutTests/fast/loader/window-properties-restored-from-page-cache.html b/LayoutTests/fast/loader/window-properties-restored-from-page-cache.html
index 93435a5..36506e6 100644
--- a/LayoutTests/fast/loader/window-properties-restored-from-page-cache.html
+++ b/LayoutTests/fast/loader/window-properties-restored-from-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 if (window.testRunner) {
 	testRunner.dumpAsText();
diff --git a/LayoutTests/fast/mediastream/RTCPeerConnection-page-cache.html b/LayoutTests/fast/mediastream/RTCPeerConnection-page-cache.html
index d2e93aa..78b281c 100644
--- a/LayoutTests/fast/mediastream/RTCPeerConnection-page-cache.html
+++ b/LayoutTests/fast/mediastream/RTCPeerConnection-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/fast/overflow/horizontal-scroll-after-back.html b/LayoutTests/fast/overflow/horizontal-scroll-after-back.html
index 14a7d9b..703ce64 100644
--- a/LayoutTests/fast/overflow/horizontal-scroll-after-back.html
+++ b/LayoutTests/fast/overflow/horizontal-scroll-after-back.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 
diff --git a/LayoutTests/fast/scrolling/iframe-scrollable-after-back.html b/LayoutTests/fast/scrolling/iframe-scrollable-after-back.html
index f0065fd..2b847d8 100644
--- a/LayoutTests/fast/scrolling/iframe-scrollable-after-back.html
+++ b/LayoutTests/fast/scrolling/iframe-scrollable-after-back.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html b/LayoutTests/fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html
index 5a6bd89..d71332b 100644
--- a/LayoutTests/fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html
+++ b/LayoutTests/fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/scrolling/ios/scroll-events-back-forward.html b/LayoutTests/fast/scrolling/ios/scroll-events-back-forward.html
index e2f9866..c115196 100644
--- a/LayoutTests/fast/scrolling/ios/scroll-events-back-forward.html
+++ b/LayoutTests/fast/scrolling/ios/scroll-events-back-forward.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/scrolling/ios/touch-scroll-back-forward.html b/LayoutTests/fast/scrolling/ios/touch-scroll-back-forward.html
index 1165447..1cda2be 100644
--- a/LayoutTests/fast/scrolling/ios/touch-scroll-back-forward.html
+++ b/LayoutTests/fast/scrolling/ios/touch-scroll-back-forward.html
@@ -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>
diff --git a/LayoutTests/fast/scrolling/overflow-scrollable-after-back.html b/LayoutTests/fast/scrolling/overflow-scrollable-after-back.html
index 07e135a..1ede661 100644
--- a/LayoutTests/fast/scrolling/overflow-scrollable-after-back.html
+++ b/LayoutTests/fast/scrolling/overflow-scrollable-after-back.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/fast/scrolling/page-cache-back-overflow-scroll-restore.html b/LayoutTests/fast/scrolling/page-cache-back-overflow-scroll-restore.html
index 69176a7..6f7df07 100644
--- a/LayoutTests/fast/scrolling/page-cache-back-overflow-scroll-restore.html
+++ b/LayoutTests/fast/scrolling/page-cache-back-overflow-scroll-restore.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <style>
 #puffin {
     font: Ahem 10px;
diff --git a/LayoutTests/fast/text-autosizing/ios/text-autosizing-after-back.html b/LayoutTests/fast/text-autosizing/ios/text-autosizing-after-back.html
index e621c88..efeee5f 100644
--- a/LayoutTests/fast/text-autosizing/ios/text-autosizing-after-back.html
+++ b/LayoutTests/fast/text-autosizing/ios/text-autosizing-after-back.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
diff --git a/LayoutTests/fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html b/LayoutTests/fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html
index 9bb3d9a..d8137ba 100644
--- a/LayoutTests/fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html
+++ b/LayoutTests/fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true enablePageCache=true ] -->
+<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true enableBackForwardCache=true ] -->
 
 <html>
 <head>
diff --git a/LayoutTests/fast/viewport/viewport-128.html b/LayoutTests/fast/viewport/viewport-128.html
index 3feb00d..46e8382 100644
--- a/LayoutTests/fast/viewport/viewport-128.html
+++ b/LayoutTests/fast/viewport/viewport-128.html
@@ -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>
diff --git a/LayoutTests/fast/workers/worker-page-cache.html b/LayoutTests/fast/workers/worker-page-cache.html
index 3542c36..141631e 100644
--- a/LayoutTests/fast/workers/worker-page-cache.html
+++ b/LayoutTests/fast/workers/worker-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <script src="../../resources/js-test.js"></script>
 </head>
diff --git a/LayoutTests/http/tests/cache/display-image-unset-allows-cached-image-load.html b/LayoutTests/http/tests/cache/display-image-unset-allows-cached-image-load.html
index ff5815e..4728222 100644
--- a/LayoutTests/http/tests/cache/display-image-unset-allows-cached-image-load.html
+++ b/LayoutTests/http/tests/cache/display-image-unset-allows-cached-image-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <head>
 <script>
diff --git a/LayoutTests/http/tests/eventsource/eventsource-page-cache-connected.html b/LayoutTests/http/tests/eventsource/eventsource-page-cache-connected.html
index c669f2c..205d9c0 100644
--- a/LayoutTests/http/tests/eventsource/eventsource-page-cache-connected.html
+++ b/LayoutTests/http/tests/eventsource/eventsource-page-cache-connected.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/eventsource/eventsource-page-cache-connecting.html b/LayoutTests/http/tests/eventsource/eventsource-page-cache-connecting.html
index b05e474..ed6fa97 100644
--- a/LayoutTests/http/tests/eventsource/eventsource-page-cache-connecting.html
+++ b/LayoutTests/http/tests/eventsource/eventsource-page-cache-connecting.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/loading/main-resource-delegates-on-back-navigation.html b/LayoutTests/http/tests/loading/main-resource-delegates-on-back-navigation.html
index 0494875..f1e1f8d 100644
--- a/LayoutTests/http/tests/loading/main-resource-delegates-on-back-navigation.html
+++ b/LayoutTests/http/tests/loading/main-resource-delegates-on-back-navigation.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html b/LayoutTests/http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
index ca5788e0..94cff7a 100644
--- a/LayoutTests/http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
+++ b/LayoutTests/http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 window.onpageshow = function(evt) {
diff --git a/LayoutTests/http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html b/LayoutTests/http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html
index f2ac66a..d896580 100644
--- a/LayoutTests/http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html
+++ b/LayoutTests/http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 window.onpageshow = function(evt) {
diff --git a/LayoutTests/http/tests/media/reload-after-dialog.html b/LayoutTests/http/tests/media/reload-after-dialog.html
index 3fe6800..a07a03b 100644
--- a/LayoutTests/http/tests/media/reload-after-dialog.html
+++ b/LayoutTests/http/tests/media/reload-after-dialog.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
     <head>
diff --git a/LayoutTests/http/tests/navigation/go-back-to-error-page.html b/LayoutTests/http/tests/navigation/go-back-to-error-page.html
index 18bd139..1effc68 100644
--- a/LayoutTests/http/tests/navigation/go-back-to-error-page.html
+++ b/LayoutTests/http/tests/navigation/go-back-to-error-page.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 if (window.testRunner) {
     testRunner.dumpAsText();
diff --git a/LayoutTests/http/tests/navigation/https-in-page-cache.html b/LayoutTests/http/tests/navigation/https-in-page-cache.html
index eee9b26..3f09867 100644
--- a/LayoutTests/http/tests/navigation/https-in-page-cache.html
+++ b/LayoutTests/http/tests/navigation/https-in-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
diff --git a/LayoutTests/http/tests/navigation/https-no-store-subframe-in-page-cache.html b/LayoutTests/http/tests/navigation/https-no-store-subframe-in-page-cache.html
index 980f20b..23d583d 100644
--- a/LayoutTests/http/tests/navigation/https-no-store-subframe-in-page-cache.html
+++ b/LayoutTests/http/tests/navigation/https-no-store-subframe-in-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 
 if (window.testRunner) {
diff --git a/LayoutTests/http/tests/navigation/image-load-in-pagehide-handler.html b/LayoutTests/http/tests/navigation/image-load-in-pagehide-handler.html
index f098f14..903f933 100644
--- a/LayoutTests/http/tests/navigation/image-load-in-pagehide-handler.html
+++ b/LayoutTests/http/tests/navigation/image-load-in-pagehide-handler.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html><head>
 <title>Image load in pagehide handler</title>
 <script>
diff --git a/LayoutTests/http/tests/navigation/page-cache-domcache-pending-promise.html b/LayoutTests/http/tests/navigation/page-cache-domcache-pending-promise.html
index dbe765d..75ebfce 100644
--- a/LayoutTests/http/tests/navigation/page-cache-domcache-pending-promise.html
+++ b/LayoutTests/http/tests/navigation/page-cache-domcache-pending-promise.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/navigation/page-cache-domcachestorage-pending-promise.html b/LayoutTests/http/tests/navigation/page-cache-domcachestorage-pending-promise.html
index d05e5e0..c223dd9 100644
--- a/LayoutTests/http/tests/navigation/page-cache-domcachestorage-pending-promise.html
+++ b/LayoutTests/http/tests/navigation/page-cache-domcachestorage-pending-promise.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/navigation/page-cache-failed-xhr.html b/LayoutTests/http/tests/navigation/page-cache-failed-xhr.html
index 72d0bc9..7c91033 100644
--- a/LayoutTests/http/tests/navigation/page-cache-failed-xhr.html
+++ b/LayoutTests/http/tests/navigation/page-cache-failed-xhr.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-fontfaceset.html b/LayoutTests/http/tests/navigation/page-cache-fontfaceset.html
index ef9f5c3..5d62445 100644
--- a/LayoutTests/http/tests/navigation/page-cache-fontfaceset.html
+++ b/LayoutTests/http/tests/navigation/page-cache-fontfaceset.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/navigation/page-cache-fragment-referrer.html b/LayoutTests/http/tests/navigation/page-cache-fragment-referrer.html
index 0267e5d..3dd507d 100644
--- a/LayoutTests/http/tests/navigation/page-cache-fragment-referrer.html
+++ b/LayoutTests/http/tests/navigation/page-cache-fragment-referrer.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/navigation/page-cache-iframe-no-current-historyItem.html b/LayoutTests/http/tests/navigation/page-cache-iframe-no-current-historyItem.html
index bc88764..51f2495 100644
--- a/LayoutTests/http/tests/navigation/page-cache-iframe-no-current-historyItem.html
+++ b/LayoutTests/http/tests/navigation/page-cache-iframe-no-current-historyItem.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html b/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html
index 038f08a..d14c337 100644
--- a/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html
+++ b/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html b/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html
index 01f63bd..185eeda 100644
--- a/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html
+++ b/LayoutTests/http/tests/navigation/page-cache-iframe-provisional-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-pending-image-load-cache-partition.html b/LayoutTests/http/tests/navigation/page-cache-pending-image-load-cache-partition.html
index 480b1cb..fcc47ac 100644
--- a/LayoutTests/http/tests/navigation/page-cache-pending-image-load-cache-partition.html
+++ b/LayoutTests/http/tests/navigation/page-cache-pending-image-load-cache-partition.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-pending-image-load.html b/LayoutTests/http/tests/navigation/page-cache-pending-image-load.html
index 457e217..6df946d 100644
--- a/LayoutTests/http/tests/navigation/page-cache-pending-image-load.html
+++ b/LayoutTests/http/tests/navigation/page-cache-pending-image-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-pending-load.html b/LayoutTests/http/tests/navigation/page-cache-pending-load.html
index 4595375..176f1b8 100644
--- a/LayoutTests/http/tests/navigation/page-cache-pending-load.html
+++ b/LayoutTests/http/tests/navigation/page-cache-pending-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-cross-origin.html b/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
index 13b0f92..52490e4 100644
--- a/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
+++ b/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
@@ -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>
diff --git a/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-same-origin.html b/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-same-origin.html
index 057fc89..eb85752 100644
--- a/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-same-origin.html
+++ b/LayoutTests/http/tests/navigation/page-cache-pending-ping-load-same-origin.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-requestAnimationFrame.html b/LayoutTests/http/tests/navigation/page-cache-requestAnimationFrame.html
index 61caf07..699f0bb 100644
--- a/LayoutTests/http/tests/navigation/page-cache-requestAnimationFrame.html
+++ b/LayoutTests/http/tests/navigation/page-cache-requestAnimationFrame.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html b/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html
index 0b11301..a2f1f4c 100644
--- a/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html
+++ b/LayoutTests/http/tests/navigation/page-cache-xhr-in-pagehide.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/page-cache-xhr.html b/LayoutTests/http/tests/navigation/page-cache-xhr.html
index 522d787..373b55d 100644
--- a/LayoutTests/http/tests/navigation/page-cache-xhr.html
+++ b/LayoutTests/http/tests/navigation/page-cache-xhr.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/navigation/resources/https-in-page-cache-3.html b/LayoutTests/http/tests/navigation/resources/https-in-page-cache-3.html
index 7dfff28..e81a053 100644
--- a/LayoutTests/http/tests/navigation/resources/https-in-page-cache-3.html
+++ b/LayoutTests/http/tests/navigation/resources/https-in-page-cache-3.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 window.onpageshow = function(evt) {
 	if (!evt.persisted)
diff --git a/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load.html b/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load.html
index a344e26..b12b1a2 100644
--- a/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load.html
+++ b/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body onload="runTest()">
diff --git a/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2.html b/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2.html
index c3c3755..666475c 100644
--- a/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2.html
+++ b/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body onload="runTest()">
diff --git a/LayoutTests/http/tests/security/cross-origin-window-open-insert-script.html b/LayoutTests/http/tests/security/cross-origin-window-open-insert-script.html
index 1164b75..aa07b1f 100644
--- a/LayoutTests/http/tests/security/cross-origin-window-open-insert-script.html
+++ b/LayoutTests/http/tests/security/cross-origin-window-open-insert-script.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/security/cross-origin-window-open-javascript-url.html b/LayoutTests/http/tests/security/cross-origin-window-open-javascript-url.html
index 266ba9c..a6bd442 100644
--- a/LayoutTests/http/tests/security/cross-origin-window-open-javascript-url.html
+++ b/LayoutTests/http/tests/security/cross-origin-window-open-javascript-url.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/security/navigate-when-restoring-cached-page.html b/LayoutTests/http/tests/security/navigate-when-restoring-cached-page.html
index b11a4fa..dd6f8c1 100644
--- a/LayoutTests/http/tests/security/navigate-when-restoring-cached-page.html
+++ b/LayoutTests/http/tests/security/navigate-when-restoring-cached-page.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
@@ -63,7 +63,7 @@
 
           // 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 = () => {
diff --git a/LayoutTests/http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html b/LayoutTests/http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html
index 13314e6..fe4634d 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html
+++ b/LayoutTests/http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window.html b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window.html
index 2961976..4d0bba9 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window.html
+++ b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html
index 6a3bd18..9c92856 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html
+++ b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html
@@ -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>
diff --git a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html
index 84bc5be..31ca864 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html
+++ b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html
index 8d6bf2c..3e1fae7 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html
+++ b/LayoutTests/http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html b/LayoutTests/http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
index 4e7143b..e684247 100644
--- a/LayoutTests/http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
+++ b/LayoutTests/http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html b/LayoutTests/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html
index 4ac20c0..2606780 100644
--- a/LayoutTests/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html
+++ b/LayoutTests/http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html b/LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html
index 5bb0bee..5d5853e 100644
--- a/LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html
+++ b/LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html b/LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html
index bec11ea..c22eb4b 100644
--- a/LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html
+++ b/LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/workers/service/page-cache-service-worker-pending-promise.https.html b/LayoutTests/http/tests/workers/service/page-cache-service-worker-pending-promise.https.html
index 09f0568..6db5d300 100644
--- a/LayoutTests/http/tests/workers/service/page-cache-service-worker-pending-promise.https.html
+++ b/LayoutTests/http/tests/workers/service/page-cache-service-worker-pending-promise.https.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/http/tests/workers/service/page-caching.html b/LayoutTests/http/tests/workers/service/page-caching.html
index 4f26af9..511ef85 100644
--- a/LayoutTests/http/tests/workers/service/page-caching.html
+++ b/LayoutTests/http/tests/workers/service/page-caching.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/http/wpt/beacon/support/sendBeacon-onpagehide-window.html b/LayoutTests/http/wpt/beacon/support/sendBeacon-onpagehide-window.html
index cbe1950..a378a54 100644
--- a/LayoutTests/http/wpt/beacon/support/sendBeacon-onpagehide-window.html
+++ b/LayoutTests/http/wpt/beacon/support/sendBeacon-onpagehide-window.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/legacy-animation-engine/animations/resume-after-page-cache.html b/LayoutTests/legacy-animation-engine/animations/resume-after-page-cache.html
index ded3875..b11c0ea 100644
--- a/LayoutTests/legacy-animation-engine/animations/resume-after-page-cache.html
+++ b/LayoutTests/legacy-animation-engine/animations/resume-after-page-cache.html
@@ -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 {
diff --git a/LayoutTests/loader/go-back-cached-main-resource.html b/LayoutTests/loader/go-back-cached-main-resource.html
index 984f640..3555ecc 100644
--- a/LayoutTests/loader/go-back-cached-main-resource.html
+++ b/LayoutTests/loader/go-back-cached-main-resource.html
@@ -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>
diff --git a/LayoutTests/loader/go-back-to-different-window-size.html b/LayoutTests/loader/go-back-to-different-window-size.html
index 5843e7f..0162baa 100644
--- a/LayoutTests/loader/go-back-to-different-window-size.html
+++ b/LayoutTests/loader/go-back-to-different-window-size.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
 <script>
 
diff --git a/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html b/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html
index 819591e..c5d8c74 100644
--- a/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html
+++ b/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <script>
 var childWindow;
 </script>
@@ -13,7 +13,7 @@
 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");
diff --git a/LayoutTests/media/media-source/media-source-page-cache.html b/LayoutTests/media/media-source/media-source-page-cache.html
index 012ce4a..c8dc36f 100644
--- a/LayoutTests/media/media-source/media-source-page-cache.html
+++ b/LayoutTests/media/media-source/media-source-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/media/restore-from-page-cache.html b/LayoutTests/media/restore-from-page-cache.html
index e950518..1ad2571 100644
--- a/LayoutTests/media/restore-from-page-cache.html
+++ b/LayoutTests/media/restore-from-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <html>
     <head>
         <script src=media-file.js></script>
diff --git a/LayoutTests/platform/ios/ios/fixed/fixed-back-forward.html b/LayoutTests/platform/ios/ios/fixed/fixed-back-forward.html
index d064043..3561eee 100644
--- a/LayoutTests/platform/ios/ios/fixed/fixed-back-forward.html
+++ b/LayoutTests/platform/ios/ios/fixed/fixed-back-forward.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/plugins/crash-restoring-plugin-page-from-page-cache.html b/LayoutTests/plugins/crash-restoring-plugin-page-from-page-cache.html
index 6f884f3..10dc994 100644
--- a/LayoutTests/plugins/crash-restoring-plugin-page-from-page-cache.html
+++ b/LayoutTests/plugins/crash-restoring-plugin-page-from-page-cache.html
@@ -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() {
diff --git a/LayoutTests/plugins/frameset-with-plugin-frame.html b/LayoutTests/plugins/frameset-with-plugin-frame.html
index ca85bdc..b29906c 100644
--- a/LayoutTests/plugins/frameset-with-plugin-frame.html
+++ b/LayoutTests/plugins/frameset-with-plugin-frame.html
@@ -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>
 
diff --git a/LayoutTests/plugins/netscape-plugin-page-cache-works.html b/LayoutTests/plugins/netscape-plugin-page-cache-works.html
index 4f82341..77f2be4 100644
--- a/LayoutTests/plugins/netscape-plugin-page-cache-works.html
+++ b/LayoutTests/plugins/netscape-plugin-page-cache-works.html
@@ -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;
diff --git a/LayoutTests/storage/indexeddb/IDBRequest-page-cache.html b/LayoutTests/storage/indexeddb/IDBRequest-page-cache.html
index 6de8063..c7c594b 100644
--- a/LayoutTests/storage/indexeddb/IDBRequest-page-cache.html
+++ b/LayoutTests/storage/indexeddb/IDBRequest-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html b/LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html
index 2c87891..bbd7c5d 100644
--- a/LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html
+++ b/LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/swipe/basic-cached-back-swipe.html b/LayoutTests/swipe/basic-cached-back-swipe.html
index 6565b07..d2fba23 100644
--- a/LayoutTests/swipe/basic-cached-back-swipe.html
+++ b/LayoutTests/swipe/basic-cached-back-swipe.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
diff --git a/LayoutTests/swipe/main-frame-pinning-requirement.html b/LayoutTests/swipe/main-frame-pinning-requirement.html
index c81f3e6..b85ad1b 100644
--- a/LayoutTests/swipe/main-frame-pinning-requirement.html
+++ b/LayoutTests/swipe/main-frame-pinning-requirement.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
diff --git a/LayoutTests/swipe/pushState-cached-back-swipe.html b/LayoutTests/swipe/pushState-cached-back-swipe.html
index a0119f1..83edab8 100644
--- a/LayoutTests/swipe/pushState-cached-back-swipe.html
+++ b/LayoutTests/swipe/pushState-cached-back-swipe.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
diff --git a/LayoutTests/swipe/pushState-programmatic-back-while-swiping-crash.html b/LayoutTests/swipe/pushState-programmatic-back-while-swiping-crash.html
index 02fd44e4..d356d21 100644
--- a/LayoutTests/swipe/pushState-programmatic-back-while-swiping-crash.html
+++ b/LayoutTests/swipe/pushState-programmatic-back-while-swiping-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
diff --git a/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html b/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html
index 1f1d7ae..3f0adf2 100644
--- a/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html
+++ b/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <head>
 <style>
 html {
diff --git a/LayoutTests/tiled-drawing/scrolling/null-parent-back-crash.html b/LayoutTests/tiled-drawing/scrolling/null-parent-back-crash.html
index 77c3c0a..23254e5 100644
--- a/LayoutTests/tiled-drawing/scrolling/null-parent-back-crash.html
+++ b/LayoutTests/tiled-drawing/scrolling/null-parent-back-crash.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html b/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
index bdd0875..ad90c87 100644
--- a/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
+++ b/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <head>
diff --git a/LayoutTests/webrtc/datachannel/datachannel-page-cache-send.html b/LayoutTests/webrtc/datachannel/datachannel-page-cache-send.html
index 5f84a23..c4bd74f 100644
--- a/LayoutTests/webrtc/datachannel/datachannel-page-cache-send.html
+++ b/LayoutTests/webrtc/datachannel/datachannel-page-cache-send.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/LayoutTests/webrtc/datachannel/datachannel-page-cache.html b/LayoutTests/webrtc/datachannel/datachannel-page-cache.html
index 170bb9f..dcf570d 100644
--- a/LayoutTests/webrtc/datachannel/datachannel-page-cache.html
+++ b/LayoutTests/webrtc/datachannel/datachannel-page-cache.html
@@ -1,4 +1,4 @@
-<!-- webkit-test-runner [ enablePageCache=true ] -->
+<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
 <!DOCTYPE html>
 <html>
 <body>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 5dfd194..5be2957 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -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
diff --git a/Source/WebCore/Headers.cmake b/Source/WebCore/Headers.cmake
index 9c2b204..e85d9e3 100644
--- a/Source/WebCore/Headers.cmake
+++ b/Source/WebCore/Headers.cmake
@@ -520,13 +520,13 @@
     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
diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp
index 1ec736f..acdaf79 100644
--- a/Source/WebCore/Modules/geolocation/Geolocation.cpp
+++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp
@@ -165,7 +165,7 @@
     
 void Geolocation::suspend(ReasonForSuspension reason)
 {
-    if (reason == ReasonForSuspension::PageCache) {
+    if (reason == ReasonForSuspension::BackForwardCache) {
         stop();
         m_resetOnResume = true;
     }
diff --git a/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp b/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
index d5afd44..6c16fbc 100644
--- a/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
+++ b/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
@@ -106,7 +106,7 @@
 
 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)
diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
index 8069d52..fd120fa 100644
--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
@@ -506,7 +506,7 @@
 
 void RTCPeerConnection::suspend(ReasonForSuspension reason)
 {
-    if (reason != ReasonForSuspension::PageCache)
+    if (reason != ReasonForSuspension::BackForwardCache)
         return;
 
     m_shouldDelayTasks = true;
diff --git a/Source/WebCore/Modules/websockets/WebSocket.cpp b/Source/WebCore/Modules/websockets/WebSocket.cpp
index 3038a97..b32bf98 100644
--- a/Source/WebCore/Modules/websockets/WebSocket.cpp
+++ b/Source/WebCore/Modules/websockets/WebSocket.cpp
@@ -508,7 +508,7 @@
     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
diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt
index d9bb9af..ffbda96 100644
--- a/Source/WebCore/Sources.txt
+++ b/Source/WebCore/Sources.txt
@@ -1085,11 +1085,11 @@
 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
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 3b36679..9155483 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -410,7 +410,7 @@
 		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 */; };
@@ -5917,8 +5917,8 @@
 		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>"; };
@@ -18874,6 +18874,8 @@
 			isa = PBXGroup;
 			children = (
 				5160F4920B0AA71500C1D2AF /* mac */,
+				1477E7740BF4134A00152872 /* BackForwardCache.cpp */,
+				1477E7750BF4134A00152872 /* BackForwardCache.h */,
 				51741D0B0B07259A00ED442C /* BackForwardClient.h */,
 				BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
 				BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
@@ -18885,8 +18887,6 @@
 				510184670B08602A004A825F /* CachedPage.h */,
 				51741D0E0B07259A00ED442C /* HistoryItem.cpp */,
 				51741D0D0B07259A00ED442C /* HistoryItem.h */,
-				1477E7740BF4134A00152872 /* PageCache.cpp */,
-				1477E7750BF4134A00152872 /* PageCache.h */,
 			);
 			path = history;
 			sourceTree = "<group>";
@@ -28734,6 +28734,7 @@
 				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 */,
@@ -31218,7 +31219,6 @@
 				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 */,
diff --git a/Source/WebCore/animation/WebAnimation.cpp b/Source/WebCore/animation/WebAnimation.cpp
index 3194b32..5f0c900 100644
--- a/Source/WebCore/animation/WebAnimation.cpp
+++ b/Source/WebCore/animation/WebAnimation.cpp
@@ -1161,7 +1161,7 @@
 {
     // 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();
 }
 
diff --git a/Source/WebCore/bindings/js/WindowProxy.cpp b/Source/WebCore/bindings/js/WindowProxy.cpp
index 02e3c72..de0bf88 100644
--- a/Source/WebCore/bindings/js/WindowProxy.cpp
+++ b/Source/WebCore/bindings/js/WindowProxy.cpp
@@ -126,7 +126,7 @@
     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 @@
 
     // 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();
 }
 
diff --git a/Source/WebCore/bindings/js/WindowProxy.h b/Source/WebCore/bindings/js/WindowProxy.h
index 4722e49..2c808bd 100644
--- a/Source/WebCore/bindings/js/WindowProxy.h
+++ b/Source/WebCore/bindings/js/WindowProxy.h
@@ -78,7 +78,7 @@
 
     WEBCORE_EXPORT JSDOMGlobalObject* globalObject(DOMWrapperWorld&);
 
-    void clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow*, bool goingIntoPageCache);
+    void clearJSWindowProxiesNotMatchingDOMWindow(AbstractDOMWindow*, bool goingIntoBackForwardCache);
 
     WEBCORE_EXPORT void setDOMWindow(AbstractDOMWindow*);
 
diff --git a/Source/WebCore/dom/ActiveDOMObject.h b/Source/WebCore/dom/ActiveDOMObject.h
index 857998a..6b8b986 100644
--- a/Source/WebCore/dom/ActiveDOMObject.h
+++ b/Source/WebCore/dom/ActiveDOMObject.h
@@ -39,7 +39,7 @@
 enum class ReasonForSuspension {
     JavaScriptDebuggerPaused,
     WillDeferLoading,
-    PageCache,
+    BackForwardCache,
     PageWillBeSuspended,
 };
 
@@ -64,7 +64,7 @@
 
     // 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();
 
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index 586324b..4d40c40 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -623,7 +623,7 @@
     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 @@
 {
     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 @@
 
 bool Document::needsStyleRecalc() const
 {
-    if (pageCacheState() != NotInPageCache)
+    if (backForwardCacheState() != NotInBackForwardCache)
         return false;
 
     if (m_needsFullStyleRebuild)
@@ -2295,7 +2295,7 @@
 {
     if (auto* resolver = styleScope().resolverIfExists())
         resolver->invalidateMatchedPropertiesCache();
-    if (pageCacheState() != NotInPageCache || !renderView())
+    if (backForwardCacheState() != NotInBackForwardCache || !renderView())
         return;
     scheduleFullStyleRebuild();
 }
@@ -2314,7 +2314,7 @@
 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 @@
 
     // 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 @@
 {
     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 @@
     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 @@
 
     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 @@
 
 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 @@
     if (m_focusedElement == newFocusedElement)
         return true;
 
-    if (pageCacheState() != NotInPageCache)
+    if (backForwardCacheState() != NotInBackForwardCache)
         return false;
 
     bool focusChangeBlocked = false;
@@ -4561,7 +4561,7 @@
     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 @@
     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 @@
 
         clearSharedObjectPool();
         break;
-    case NotInPageCache:
+    case NotInBackForwardCache:
         if (childNeedsStyleRecalc())
             scheduleStyleRecalc();
         break;
-    case AboutToEnterPageCache:
+    case AboutToEnterBackForwardCache:
         break;
     }
 }
@@ -5148,7 +5148,7 @@
 
 #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 @@
 #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 @@
     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 @@
 {
     // 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.
diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h
index 75315fe..986f9b7 100644
--- a/Source/WebCore/dom/Document.h
+++ b/Source/WebCore/dom/Document.h
@@ -1073,10 +1073,10 @@
 
     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 @@
     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 };
 
diff --git a/Source/WebCore/dom/FullscreenManager.cpp b/Source/WebCore/dom/FullscreenManager.cpp
index 85c78a8..1e42871 100644
--- a/Source/WebCore/dom/FullscreenManager.cpp
+++ b/Source/WebCore/dom/FullscreenManager.cpp
@@ -363,7 +363,7 @@
 
 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 @@
     if (!m_fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     m_fullscreenElement->didBecomeFullscreenElement();
@@ -429,7 +429,7 @@
     if (!fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
 
     fullscreenElement->willStopBeingFullscreenElement();
@@ -441,7 +441,7 @@
     if (!fullscreenElement)
         return;
 
-    if (!hasLivingRenderTree() || pageCacheState() != Document::NotInPageCache)
+    if (!hasLivingRenderTree() || backForwardCacheState() != Document::NotInBackForwardCache)
         return;
     fullscreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
 
diff --git a/Source/WebCore/dom/FullscreenManager.h b/Source/WebCore/dom/FullscreenManager.h
index e273418..bfd217f 100644
--- a/Source/WebCore/dom/FullscreenManager.h
+++ b/Source/WebCore/dom/FullscreenManager.h
@@ -54,7 +54,7 @@
     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
diff --git a/Source/WebCore/dom/ScriptExecutionContext.cpp b/Source/WebCore/dom/ScriptExecutionContext.cpp
index 0010387..3ea9b38 100644
--- a/Source/WebCore/dom/ScriptExecutionContext.cpp
+++ b/Source/WebCore/dom/ScriptExecutionContext.cpp
@@ -278,7 +278,7 @@
     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 @@
         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();
 }
 
diff --git a/Source/WebCore/history/PageCache.cpp b/Source/WebCore/history/BackForwardCache.cpp
similarity index 70%
rename from Source/WebCore/history/PageCache.cpp
rename to Source/WebCore/history/BackForwardCache.cpp
index cd1f382..937353f 100644
--- a/Source/WebCore/history/PageCache.cpp
+++ b/Source/WebCore/history/BackForwardCache.cpp
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "PageCache.h"
+#include "BackForwardCache.h"
 
 #include "ApplicationCacheHost.h"
 #include "BackForwardController.h"
@@ -59,17 +59,17 @@
 
 #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 @@
     // 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 @@
     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 @@
         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 @@
             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 @@
     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 @@
     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 @@
     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 @@
     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::markPagesForContentsSizeChanged(Page& page)
+void BackForwardCache::markPagesForContentsSizeChanged(Page& page)
 {
     for (auto& item : m_items) {
         CachedPage& cachedPage = *item->m_cachedPage;
@@ -351,7 +351,7 @@
 }
 
 #if ENABLE(VIDEO_TRACK)
-void PageCache::markPagesForCaptionPreferencesChanged()
+void BackForwardCache::markPagesForCaptionPreferencesChanged()
 {
     for (auto& item : m_items) {
         ASSERT(item->m_cachedPage);
@@ -376,16 +376,16 @@
     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 @@
         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 @@
 
     // 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 @@
     }
     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 @@
         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 @@
     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());
     }
 }
 
diff --git a/Source/WebCore/history/PageCache.h b/Source/WebCore/history/BackForwardCache.h
similarity index 86%
rename from Source/WebCore/history/PageCache.h
rename to Source/WebCore/history/BackForwardCache.h
index e211cc4..ae4e60f 100644
--- a/Source/WebCore/history/PageCache.h
+++ b/Source/WebCore/history/BackForwardCache.h
@@ -38,11 +38,12 @@
 
 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 @@
 #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 @@
     bool m_isInRemoveAllItemsForPage { false };
 #endif
 
-    friend class WTF::NeverDestroyed<PageCache>;
+    friend class WTF::NeverDestroyed<BackForwardCache>;
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/history/CachedFrame.cpp b/Source/WebCore/history/CachedFrame.cpp
index 8f1e4da..87ab173 100644
--- a/Source/WebCore/history/CachedFrame.cpp
+++ b/Source/WebCore/history/CachedFrame.cpp
@@ -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 @@
         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 @@
     }
 #endif
 
-    frame->view()->didRestoreFromPageCache();
+    frame->view()->didRestoreFromBackForwardCache();
 }
 
 CachedFrame::CachedFrame(Frame& frame)
@@ -150,7 +150,7 @@
     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 @@
     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 @@
 
     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 @@
     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 @@
     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 @@
 
     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();
diff --git a/Source/WebCore/history/CachedFramePlatformData.h b/Source/WebCore/history/CachedFramePlatformData.h
index f973ba6..ea8c261 100644
--- a/Source/WebCore/history/CachedFramePlatformData.h
+++ b/Source/WebCore/history/CachedFramePlatformData.h
@@ -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 {
diff --git a/Source/WebCore/history/HistoryItem.cpp b/Source/WebCore/history/HistoryItem.cpp
index a79234d..d5377ab 100644
--- a/Source/WebCore/history/HistoryItem.cpp
+++ b/Source/WebCore/history/HistoryItem.cpp
@@ -26,10 +26,10 @@
 #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 @@
 
 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::setURL(const URL& url)
 {
-    PageCache::singleton().remove(*this);
+    BackForwardCache::singleton().remove(*this);
     setURLString(url.string());
     clearDocumentState();
 }
diff --git a/Source/WebCore/history/HistoryItem.h b/Source/WebCore/history/HistoryItem.h
index f85508f..52cab83 100644
--- a/Source/WebCore/history/HistoryItem.h
+++ b/Source/WebCore/history/HistoryItem.h
@@ -59,7 +59,7 @@
 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 @@
     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 @@
     RefPtr<FormData> m_formData;
     String m_formContentType;
 
-    // PageCache controls these fields.
+    // BackForwardCache controls these fields.
     std::unique_ptr<CachedPage> m_cachedPage;
     PruningReason m_pruningReason;
 
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index cfea271..9fa738a 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -5759,7 +5759,7 @@
     m_resumeTaskQueue.cancelTask();
 
     switch (reason) {
-    case ReasonForSuspension::PageCache:
+    case ReasonForSuspension::BackForwardCache:
         stopWithoutDestroyingMediaPlayer();
         setBufferingPolicy(BufferingPolicy::MakeResourcesPurgeable);
         m_mediaSession->addBehaviorRestriction(MediaElementSession::RequirePageConsentToResumeMedia);
@@ -5787,7 +5787,7 @@
     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.
diff --git a/Source/WebCore/html/HTMLPlugInImageElement.cpp b/Source/WebCore/html/HTMLPlugInImageElement.cpp
index c56c3c48..8a1ee0d 100644
--- a/Source/WebCore/html/HTMLPlugInImageElement.cpp
+++ b/Source/WebCore/html/HTMLPlugInImageElement.cpp
@@ -184,13 +184,13 @@
 
 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);
diff --git a/Source/WebCore/html/HTMLSourceElement.cpp b/Source/WebCore/html/HTMLSourceElement.cpp
index 88ec5a7..dd5d85c 100644
--- a/Source/WebCore/html/HTMLSourceElement.cpp
+++ b/Source/WebCore/html/HTMLSourceElement.cpp
@@ -135,7 +135,7 @@
 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();
     }
diff --git a/Source/WebCore/html/MediaElementSession.cpp b/Source/WebCore/html/MediaElementSession.cpp
index 28406fc..2a4c8f5 100644
--- a/Source/WebCore/html/MediaElementSession.cpp
+++ b/Source/WebCore/html/MediaElementSession.cpp
@@ -312,7 +312,7 @@
 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;
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
index fba266a..5fe307d 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
@@ -1654,17 +1654,17 @@
 
 #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;
         }
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
index dffed40..9f38f9e 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
@@ -539,7 +539,7 @@
 
     // 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 @@
 
     Vector<CustomHeaderFields> m_customHeaderFields;
     
-    bool m_subresourceLoadersArePageCacheAcceptable { false };
     ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow };
 
     std::unique_ptr<ApplicationCacheHost> m_applicationCacheHost;
diff --git a/Source/WebCore/loader/EmptyFrameLoaderClient.h b/Source/WebCore/loader/EmptyFrameLoaderClient.h
index e596fa0..09ccd5a 100644
--- a/Source/WebCore/loader/EmptyFrameLoaderClient.h
+++ b/Source/WebCore/loader/EmptyFrameLoaderClient.h
@@ -46,7 +46,7 @@
 
     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 @@
 #endif
     void transitionToCommittedForNewPage() final { }
 
-    void didRestoreFromPageCache() final { }
+    void didRestoreFromBackForwardCache() final { }
 
     void dispatchDidBecomeFrameset(bool) final { }
 
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index c973e17..b20375a 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -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 @@
         // 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 @@
     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 @@
     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::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 @@
     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 @@
         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 @@
 
     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 @@
     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 @@
         // 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 @@
     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 @@
     
     m_frame.setDocument(document.copyRef());
 
-    document->domWindow()->resumeFromPageCache();
+    document->domWindow()->resumeFromBackForwardCache();
 
     updateFirstPartyForCookies();
 
@@ -2828,7 +2828,7 @@
         checkCompletenessNow();
     }
 
-    if (m_frame.document()->pageCacheState() != Document::InPageCache) {
+    if (m_frame.document()->backForwardCacheState() != Document::InBackForwardCache) {
         stopAllLoadersAndCheckCompleteness();
         m_frame.document()->stopActiveDOMObjects();
     }
@@ -2844,8 +2844,8 @@
     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 @@
         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 @@
     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 @@
         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 @@
     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 @@
 
     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 @@
 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 @@
 
     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);
 
diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h
index a3716d9..5b3ac10 100644
--- a/Source/WebCore/loader/FrameLoader.h
+++ b/Source/WebCore/loader/FrameLoader.h
@@ -147,7 +147,7 @@
     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();
diff --git a/Source/WebCore/loader/FrameLoaderClient.h b/Source/WebCore/loader/FrameLoaderClient.h
index 8c7f175..98df945 100644
--- a/Source/WebCore/loader/FrameLoaderClient.h
+++ b/Source/WebCore/loader/FrameLoaderClient.h
@@ -129,7 +129,7 @@
 
 #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 @@
 #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.
 
diff --git a/Source/WebCore/loader/HistoryController.cpp b/Source/WebCore/loader/HistoryController.cpp
index 06a714fa..64f1913 100644
--- a/Source/WebCore/loader/HistoryController.cpp
+++ b/Source/WebCore/loader/HistoryController.cpp
@@ -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 @@
     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 @@
     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 @@
     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 @@
     
     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 @@
     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());
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp b/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
index e3131cc..899cba4 100644
--- a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
+++ b/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
@@ -294,7 +294,7 @@
     }
 }
 
-bool ApplicationCacheHost::canCacheInPageCache()
+bool ApplicationCacheHost::canCacheInBackForwardCache()
 {
     return !applicationCache() && !candidateApplicationCacheGroup();
 }
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheHost.h b/Source/WebCore/loader/appcache/ApplicationCacheHost.h
index e094d08..5b2aa1c 100644
--- a/Source/WebCore/loader/appcache/ApplicationCacheHost.h
+++ b/Source/WebCore/loader/appcache/ApplicationCacheHost.h
@@ -105,7 +105,7 @@
     bool maybeLoadSynchronously(ResourceRequest&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>&);
     void maybeLoadFallbackSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, RefPtr<SharedBuffer>&);
 
-    bool canCacheInPageCache();
+    bool canCacheInBackForwardCache();
 
     Status status() const;
     bool update();
diff --git a/Source/WebCore/loader/cache/CachedResource.cpp b/Source/WebCore/loader/cache/CachedResource.cpp
index 4b16f59..696ad8b 100644
--- a/Source/WebCore/loader/cache/CachedResource.cpp
+++ b/Source/WebCore/loader/cache/CachedResource.cpp
@@ -195,23 +195,23 @@
     }
     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 go through in 'pagehide' event handlers.
             if (shouldUsePingLoad(type()))
                 break;
-            RELEASE_LOG_IF_ALLOWED("load: About to enter page cache (frame = %p)", &frame);
+            RELEASE_LOG_IF_ALLOWED("load: About to enter back/forward cache (frame = %p)", &frame);
             failBeforeStarting();
             return;
-        case Document::InPageCache:
-            RELEASE_LOG_IF_ALLOWED("load: Already in page cache (frame = %p)", &frame);
+        case Document::InBackForwardCache:
+            RELEASE_LOG_IF_ALLOWED("load: Already in back/forward cache (frame = %p)", &frame);
             failBeforeStarting();
             return;
         }
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 4c571eb..0b6b60c 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -558,25 +558,25 @@
     willDestroyDocumentInFrame();
 }
 
-void DOMWindow::suspendForPageCache()
+void DOMWindow::suspendForBackForwardCache()
 {
     SetForScope<bool> isSuspendingObservers(m_isSuspendingObservers, true);
     RELEASE_ASSERT(frame());
 
     for (auto* observer : copyToVector(m_observers)) {
         if (m_observers.contains(observer))
-            observer->suspendForPageCache();
+            observer->suspendForBackForwardCache();
     }
     RELEASE_ASSERT(frame());
 
     m_suspendedForDocumentSuspension = true;
 }
 
-void DOMWindow::resumeFromPageCache()
+void DOMWindow::resumeFromBackForwardCache()
 {
     for (auto* observer : copyToVector(m_observers)) {
         if (m_observers.contains(observer))
-            observer->resumeFromPageCache();
+            observer->resumeFromBackForwardCache();
     }
 
     m_suspendedForDocumentSuspension = false;
@@ -2057,7 +2057,7 @@
     Document* document = this->document();
     if (!--m_scrollEventListenerCount && document == &document->topDocument()) {
         Frame* frame = this->frame();
-        if (frame && frame->page() && document->pageCacheState() == Document::NotInPageCache)
+        if (frame && frame->page() && document->backForwardCacheState() == Document::NotInBackForwardCache)
             frame->page()->chrome().client().setNeedsScrollNotifications(*frame, false);
     }
 }
diff --git a/Source/WebCore/page/DOMWindow.h b/Source/WebCore/page/DOMWindow.h
index 0da4fb0..d36820a 100644
--- a/Source/WebCore/page/DOMWindow.h
+++ b/Source/WebCore/page/DOMWindow.h
@@ -123,8 +123,8 @@
     public:
         virtual ~Observer() { }
 
-        virtual void suspendForPageCache() { }
-        virtual void resumeFromPageCache() { }
+        virtual void suspendForBackForwardCache() { }
+        virtual void resumeFromBackForwardCache() { }
         virtual void willDestroyGlobalObjectInCachedFrame() { }
         virtual void willDestroyGlobalObjectInFrame() { }
         virtual void willDetachGlobalObjectFromFrame() { }
@@ -134,8 +134,8 @@
     void unregisterObserver(Observer&);
 
     void resetUnlessSuspendedForDocumentSuspension();
-    void suspendForPageCache();
-    void resumeFromPageCache();
+    void suspendForBackForwardCache();
+    void resumeFromBackForwardCache();
 
     WEBCORE_EXPORT Frame* frame() const final;
 
diff --git a/Source/WebCore/page/DOMWindowExtension.cpp b/Source/WebCore/page/DOMWindowExtension.cpp
index 2b7b8c3..5c82e60 100644
--- a/Source/WebCore/page/DOMWindowExtension.cpp
+++ b/Source/WebCore/page/DOMWindowExtension.cpp
@@ -57,7 +57,7 @@
     return m_window ? m_window->frame() : nullptr;
 }
 
-void DOMWindowExtension::suspendForPageCache()
+void DOMWindowExtension::suspendForBackForwardCache()
 {
     // Calling out to the client might result in this DOMWindowExtension being destroyed
     // while there is still work to do.
@@ -69,7 +69,7 @@
     m_disconnectedFrame = WTFMove(frame);
 }
 
-void DOMWindowExtension::resumeFromPageCache()
+void DOMWindowExtension::resumeFromBackForwardCache()
 {
     ASSERT(frame());
     ASSERT(m_disconnectedFrame == frame());
diff --git a/Source/WebCore/page/DOMWindowExtension.h b/Source/WebCore/page/DOMWindowExtension.h
index 480d98e..94ed6ca 100644
--- a/Source/WebCore/page/DOMWindowExtension.h
+++ b/Source/WebCore/page/DOMWindowExtension.h
@@ -44,8 +44,8 @@
 
     WEBCORE_EXPORT ~DOMWindowExtension();
 
-    void suspendForPageCache() final;
-    void resumeFromPageCache() final;
+    void suspendForBackForwardCache() final;
+    void resumeFromBackForwardCache() final;
     void willDestroyGlobalObjectInCachedFrame() final;
     void willDestroyGlobalObjectInFrame() final;
     void willDetachGlobalObjectFromFrame() final;
diff --git a/Source/WebCore/page/DiagnosticLoggingKeys.cpp b/Source/WebCore/page/DiagnosticLoggingKeys.cpp
index b9e6186..98bd0c7 100644
--- a/Source/WebCore/page/DiagnosticLoggingKeys.cpp
+++ b/Source/WebCore/page/DiagnosticLoggingKeys.cpp
@@ -208,14 +208,14 @@
     return "notInMemoryCache"_s;
 }
 
-String DiagnosticLoggingKeys::pageCacheKey()
+String DiagnosticLoggingKeys::backForwardCacheKey()
 {
-    return "pageCache"_s;
+    return "backForwardCache"_s;
 }
 
-String DiagnosticLoggingKeys::pageCacheFailureKey()
+String DiagnosticLoggingKeys::backForwardCacheFailureKey()
 {
-    return "pageCacheFailure"_s;
+    return "backForwardCacheFailure"_s;
 }
 
 String DiagnosticLoggingKeys::noDocumentLoaderKey()
diff --git a/Source/WebCore/page/DiagnosticLoggingKeys.h b/Source/WebCore/page/DiagnosticLoggingKeys.h
index d459c4d..972a0df 100644
--- a/Source/WebCore/page/DiagnosticLoggingKeys.h
+++ b/Source/WebCore/page/DiagnosticLoggingKeys.h
@@ -114,8 +114,8 @@
     static String notInMemoryCacheKey();
     WEBCORE_EXPORT static String occurredKey();
     WEBCORE_EXPORT static String otherKey();
-    static String pageCacheKey();
-    static String pageCacheFailureKey();
+    static String backForwardCacheKey();
+    static String backForwardCacheFailureKey();
     static String pageContainsAtLeastOneMediaEngineKey();
     static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();
diff --git a/Source/WebCore/page/EventSource.cpp b/Source/WebCore/page/EventSource.cpp
index 714e9dc..f1f5b32b 100644
--- a/Source/WebCore/page/EventSource.cpp
+++ b/Source/WebCore/page/EventSource.cpp
@@ -143,7 +143,7 @@
 
 void EventSource::scheduleReconnect()
 {
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
     m_state = CONNECTING;
     m_connectTimer.startOneShot(1_ms * m_reconnectDelay);
     dispatchErrorEvent();
@@ -199,7 +199,7 @@
 {
     ASSERT(m_state == CONNECTING);
     ASSERT(m_requestInFlight);
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
 
     if (!responseIsValid(response)) {
         doExplicitLoadCancellation();
@@ -221,7 +221,7 @@
 {
     ASSERT(m_state == OPEN);
     ASSERT(m_requestInFlight);
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
 
     append(m_receiveBuffer, m_decoder->decode(data, length));
     parseEventStream();
@@ -231,7 +231,7 @@
 {
     ASSERT(m_state == OPEN);
     ASSERT(m_requestInFlight);
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
 
     append(m_receiveBuffer, m_decoder->flush());
     parseEventStream();
@@ -259,7 +259,7 @@
     ASSERT(m_requestInFlight);
 
     // This is the case where the load gets cancelled on navigating away. We only fire an error event and attempt to reconnect
-    // if we end up getting resumed from page cache.
+    // if we end up getting resumed from back/forward cache.
     if (error.isCancellation() && !m_isDoingExplicitCancellation) {
         m_shouldReconnectOnResume = true;
         m_requestInFlight = false;
@@ -277,7 +277,7 @@
 void EventSource::abortConnectionAttempt()
 {
     ASSERT(m_state == CONNECTING);
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
 
     if (m_requestInFlight)
         doExplicitLoadCancellation();
@@ -410,19 +410,19 @@
 
 void EventSource::suspend(ReasonForSuspension reason)
 {
-    if (reason != ReasonForSuspension::PageCache)
+    if (reason != ReasonForSuspension::BackForwardCache)
         return;
 
-    m_isSuspendedForPageCache = true;
-    RELEASE_ASSERT_WITH_MESSAGE(!m_requestInFlight, "Loads get cancelled before entering PageCache.");
+    m_isSuspendedForBackForwardCache = true;
+    RELEASE_ASSERT_WITH_MESSAGE(!m_requestInFlight, "Loads get cancelled before entering the BackForwardCache.");
 }
 
 void EventSource::resume()
 {
-    if (!m_isSuspendedForPageCache)
+    if (!m_isSuspendedForBackForwardCache)
         return;
 
-    m_isSuspendedForPageCache = false;
+    m_isSuspendedForBackForwardCache = false;
     if (std::exchange(m_shouldReconnectOnResume, false)) {
         scriptExecutionContext()->postTask([this, pendingActivity = makePendingActivity(*this)](ScriptExecutionContext&) {
             if (!isContextStopped())
@@ -433,7 +433,7 @@
 
 void EventSource::dispatchMessageEvent()
 {
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForPageCache);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache);
 
     if (!m_currentlyParsedEventId.isNull())
         m_lastEventId = WTFMove(m_currentlyParsedEventId);
diff --git a/Source/WebCore/page/EventSource.h b/Source/WebCore/page/EventSource.h
index d781013..3559144 100644
--- a/Source/WebCore/page/EventSource.h
+++ b/Source/WebCore/page/EventSource.h
@@ -118,7 +118,7 @@
     Vector<UChar> m_receiveBuffer;
     bool m_discardTrailingNewline { false };
     bool m_requestInFlight { false };
-    bool m_isSuspendedForPageCache { false };
+    bool m_isSuspendedForBackForwardCache { false };
     bool m_isDoingExplicitCancellation { false };
     bool m_shouldReconnectOnResume { false };
 
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
index 6466a60..6f077c4 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -31,6 +31,7 @@
 #include "Frame.h"
 
 #include "ApplyStyleCommand.h"
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "CSSAnimationController.h"
 #include "CSSComputedStyleDeclaration.h"
@@ -73,7 +74,6 @@
 #include "NodeList.h"
 #include "NodeTraversal.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "ProcessWarming.h"
 #include "RenderLayerCompositor.h"
 #include "RenderTableCell.h"
@@ -230,7 +230,7 @@
     // Prepare for destruction now, so any unload event handlers get run and the DOMWindow is
     // notified. If we wait until the view is destroyed, then things won't be hooked up enough for
     // these calls to work.
-    if (!view && m_doc && m_doc->pageCacheState() != Document::InPageCache)
+    if (!view && m_doc && m_doc->backForwardCacheState() != Document::InBackForwardCache)
         m_doc->prepareForDestruction();
     
     if (m_view)
@@ -275,7 +275,7 @@
     }
 #endif
 
-    if (m_doc && m_doc->pageCacheState() != Document::InPageCache)
+    if (m_doc && m_doc->backForwardCacheState() != Document::InBackForwardCache)
         m_doc->prepareForDestruction();
 
     m_doc = newDocument.copyRef();
@@ -706,7 +706,7 @@
     // - When calling Frame::setView() with a null FrameView*. This is always done before calling
     //   Frame::willDetachPage (this function.) Hence the assertion below.
     //
-    // - When adding a document to the page cache, the tree is torn down before instantiating
+    // - When adding a document to the back/forward cache, the tree is torn down before instantiating
     //   the CachedPage+CachedFrame object tree.
     ASSERT(!document() || !document()->renderView());
 }
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index b0a3e56..78c3db4 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -28,6 +28,7 @@
 #include "FrameView.h"
 
 #include "AXObjectCache.h"
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "CSSAnimationController.h"
 #include "CachedImage.h"
@@ -69,7 +70,6 @@
 #include "MemoryCache.h"
 #include "OverflowEvent.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "PageOverlayController.h"
 #include "ProgressTracker.h"
 #include "RenderEmbeddedObject.h"
@@ -553,9 +553,9 @@
     return ScrollView::createScrollbar(orientation);
 }
 
-void FrameView::didRestoreFromPageCache()
+void FrameView::didRestoreFromBackForwardCache()
 {
-    // When restoring from page cache, the main frame stays in place while subframes get swapped in.
+    // When restoring from back/forward cache, the main frame stays in place while subframes get swapped in.
     // We update the scrollable area set to ensure that scrolling data structures get invalidated.
     updateScrollableAreaSet();
 }
@@ -601,7 +601,7 @@
 
     if (frame().isMainFrame()) {
         page->pageOverlayController().didChangeDocumentSize();
-        PageCache::singleton().markPagesForContentsSizeChanged(*page);
+        BackForwardCache::singleton().markPagesForContentsSizeChanged(*page);
     }
     layoutContext().enableSetNeedsLayout();
 }
diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h
index 4078eef..ef51943 100644
--- a/Source/WebCore/page/FrameView.h
+++ b/Source/WebCore/page/FrameView.h
@@ -554,7 +554,7 @@
 
     // Page and FrameView both store a Pagination value. Page::pagination() is set only by API,
     // and FrameView::pagination() is set only by CSS. Page::pagination() will affect all
-    // FrameViews in the page cache, but FrameView::pagination() only affects the current
+    // FrameViews in the back/forward cache, but FrameView::pagination() only affects the current
     // FrameView. FrameView::pagination() will return m_pagination if it has been set. Otherwise,
     // it will return Page::pagination() since currently there are no callers that need to
     // distinguish between the two.
@@ -643,7 +643,7 @@
 
     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final;
 
-    void didRestoreFromPageCache();
+    void didRestoreFromBackForwardCache();
 
     void willDestroyRenderTree();
     void didDestroyRenderTree();
diff --git a/Source/WebCore/page/FrameViewLayoutContext.cpp b/Source/WebCore/page/FrameViewLayoutContext.cpp
index 322f679..1c9e315 100644
--- a/Source/WebCore/page/FrameViewLayoutContext.cpp
+++ b/Source/WebCore/page/FrameViewLayoutContext.cpp
@@ -145,8 +145,8 @@
     ASSERT(!view().isPainting());
     ASSERT(frame().view() == &view());
     ASSERT(frame().document());
-    ASSERT(frame().document()->pageCacheState() == Document::NotInPageCache
-        || frame().document()->pageCacheState() == Document::AboutToEnterPageCache);
+    ASSERT(frame().document()->backForwardCacheState() == Document::NotInBackForwardCache
+        || frame().document()->backForwardCacheState() == Document::AboutToEnterBackForwardCache);
     if (!canPerformLayout()) {
         LOG(Layout, "  is not allowed, bailing");
         return;
@@ -334,7 +334,7 @@
 
 void FrameViewLayoutContext::scheduleLayout()
 {
-    // FIXME: We should assert the page is not in the page cache, but that is causing
+    // FIXME: We should assert the page is not in the back/forward cache, but that is causing
     // too many false assertions. See <rdar://problem/7218118>.
     ASSERT(frame().view() == &view());
 
diff --git a/Source/WebCore/page/MemoryRelease.cpp b/Source/WebCore/page/MemoryRelease.cpp
index 0d73e4b..e6b4e04 100644
--- a/Source/WebCore/page/MemoryRelease.cpp
+++ b/Source/WebCore/page/MemoryRelease.cpp
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "MemoryRelease.h"
 
+#include "BackForwardCache.h"
 #include "CSSFontSelector.h"
 #include "CSSValuePool.h"
 #include "CachedResourceLoader.h"
@@ -42,7 +43,6 @@
 #include "Logging.h"
 #include "MemoryCache.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "RenderTheme.h"
 #include "ScrollingThread.h"
 #include "StyleScope.h"
@@ -77,12 +77,12 @@
     InlineStyleSheetOwner::clearCache();
 }
 
-static void releaseCriticalMemory(Synchronous synchronous, MaintainPageCache maintainPageCache, MaintainMemoryCache maintainMemoryCache)
+static void releaseCriticalMemory(Synchronous synchronous, MaintainBackForwardCache maintainBackForwardCache, MaintainMemoryCache maintainMemoryCache)
 {
     // Right now, the only reason we call release critical memory while not under memory pressure is if the process is about to be suspended.
-    if (maintainPageCache == MaintainPageCache::No) {
+    if (maintainBackForwardCache == MaintainBackForwardCache::No) {
         PruningReason pruningReason = MemoryPressureHandler::singleton().isUnderMemoryPressure() ? PruningReason::MemoryPressure : PruningReason::ProcessSuspended;
-        PageCache::singleton().pruneToSizeNow(0, pruningReason);
+        BackForwardCache::singleton().pruneToSizeNow(0, pruningReason);
     }
 
     if (maintainMemoryCache == MaintainMemoryCache::No) {
@@ -118,14 +118,14 @@
     }
 }
 
-void releaseMemory(Critical critical, Synchronous synchronous, MaintainPageCache maintainPageCache, MaintainMemoryCache maintainMemoryCache)
+void releaseMemory(Critical critical, Synchronous synchronous, MaintainBackForwardCache maintainBackForwardCache, MaintainMemoryCache maintainMemoryCache)
 {
     TraceScope scope(MemoryPressureHandlerStart, MemoryPressureHandlerEnd, static_cast<uint64_t>(critical), static_cast<uint64_t>(synchronous));
 
     if (critical == Critical::Yes) {
         // Return unused pages back to the OS now as this will likely give us a little memory to work with.
         WTF::releaseFastMallocFreeMemory();
-        releaseCriticalMemory(synchronous, maintainPageCache, maintainMemoryCache);
+        releaseCriticalMemory(synchronous, maintainBackForwardCache, maintainMemoryCache);
     }
 
     releaseNoncriticalMemory(maintainMemoryCache);
diff --git a/Source/WebCore/page/MemoryRelease.h b/Source/WebCore/page/MemoryRelease.h
index 3e06b30..6e5ebd88 100644
--- a/Source/WebCore/page/MemoryRelease.h
+++ b/Source/WebCore/page/MemoryRelease.h
@@ -29,10 +29,10 @@
 
 namespace WebCore {
 
-enum class MaintainPageCache : bool { No, Yes };
+enum class MaintainBackForwardCache : bool { No, Yes };
 enum class MaintainMemoryCache : bool { No, Yes };
 
-WEBCORE_EXPORT void releaseMemory(Critical, Synchronous, MaintainPageCache = MaintainPageCache::No, MaintainMemoryCache = MaintainMemoryCache::No);
+WEBCORE_EXPORT void releaseMemory(Critical, Synchronous, MaintainBackForwardCache = MaintainBackForwardCache::No, MaintainMemoryCache = MaintainMemoryCache::No);
 void platformReleaseMemory(Critical);
 void jettisonExpensiveObjectsOnTopLevelNavigation();
 WEBCORE_EXPORT void registerMemoryReleaseNotifyCallbacks();
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
index 63cb5ff..3f1467b 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -25,6 +25,7 @@
 #include "ApplicationCacheStorage.h"
 #include "ApplicationStateChangeListener.h"
 #include "AuthenticatorCoordinator.h"
+#include "BackForwardCache.h"
 #include "BackForwardClient.h"
 #include "BackForwardController.h"
 #include "CSSAnimationController.h"
@@ -73,7 +74,6 @@
 #include "LowPowerModeNotifier.h"
 #include "MediaCanStartListener.h"
 #include "Navigator.h"
-#include "PageCache.h"
 #include "PageConfiguration.h"
 #include "PageConsoleClient.h"
 #include "PageDebuggable.h"
@@ -359,7 +359,7 @@
 
     backForward().close();
     if (!isUtilityPage())
-        PageCache::singleton().removeAllItemsForPage(*this);
+        BackForwardCache::singleton().removeAllItemsForPage(*this);
 
 #ifndef NDEBUG
     pageCounter.decrement();
@@ -1071,7 +1071,7 @@
         return;
 
     m_viewScaleFactor = scale;
-    PageCache::singleton().markPagesForDeviceOrPageScaleChanged(*this);
+    BackForwardCache::singleton().markPagesForDeviceOrPageScaleChanged(*this);
 }
 
 void Page::setDeviceScaleFactor(float scaleFactor)
@@ -1087,7 +1087,7 @@
     setNeedsRecalcStyleInAllFrames();
 
     mainFrame().deviceOrPageScaleFactorChanged();
-    PageCache::singleton().markPagesForDeviceOrPageScaleChanged(*this);
+    BackForwardCache::singleton().markPagesForDeviceOrPageScaleChanged(*this);
 
     pageOverlayController().didChangeDeviceScaleFactor();
 }
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
index 99a5eeb..831f0a0 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -413,7 +413,7 @@
 
     // Page and FrameView both store a Pagination value. Page::pagination() is set only by API,
     // and FrameView::pagination() is set only by CSS. Page::pagination() will affect all
-    // FrameViews in the page cache, but FrameView::pagination() only affects the current
+    // FrameViews in the back/forward cache, but FrameView::pagination() only affects the current
     // FrameView.
     const Pagination& pagination() const { return m_pagination; }
     WEBCORE_EXPORT void setPagination(const Pagination&);
diff --git a/Source/WebCore/page/PageGroup.cpp b/Source/WebCore/page/PageGroup.cpp
index 64a3d37..474b029 100644
--- a/Source/WebCore/page/PageGroup.cpp
+++ b/Source/WebCore/page/PageGroup.cpp
@@ -26,11 +26,11 @@
 #include "config.h"
 #include "PageGroup.h"
 
+#include "BackForwardCache.h"
 #include "DOMWrapperWorld.h"
 #include "Document.h"
 #include "Frame.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "StorageNamespace.h"
 #include <JavaScriptCore/HeapInlines.h>
 #include <JavaScriptCore/StructureInlines.h>
@@ -106,7 +106,7 @@
 {
     for (auto& page : m_pages)
         page->captionPreferencesChanged();
-    PageCache::singleton().markPagesForCaptionPreferencesChanged();
+    BackForwardCache::singleton().markPagesForCaptionPreferencesChanged();
 }
 
 CaptionUserPreferences& PageGroup::captionPreferences()
diff --git a/Source/WebCore/page/PerformanceLogging.cpp b/Source/WebCore/page/PerformanceLogging.cpp
index b904c23e..36e38d4 100644
--- a/Source/WebCore/page/PerformanceLogging.cpp
+++ b/Source/WebCore/page/PerformanceLogging.cpp
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "PerformanceLogging.h"
 
+#include "BackForwardCache.h"
 #include "CommonVM.h"
 #include "DOMWindow.h"
 #include "Document.h"
@@ -35,7 +36,6 @@
 #include "JSDOMWindow.h"
 #include "Logging.h"
 #include "Page.h"
-#include "PageCache.h"
 
 namespace WebCore {
 
@@ -59,8 +59,8 @@
     stats.add("javascript_gc_heap_capacity", vm.heap.capacity());
     stats.add("javascript_gc_heap_extra_memory_size", vm.heap.extraMemorySize());
 
-    auto& pageCache = PageCache::singleton();
-    stats.add("pagecache_page_count", pageCache.pageCount());
+    auto& backForwardCache = BackForwardCache::singleton();
+    stats.add("backforward_cache_page_count", backForwardCache.pageCount());
 
     stats.add("document_count", Document::allDocuments().size());
 
diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml
index 88c3789..35770af 100644
--- a/Source/WebCore/page/Settings.yaml
+++ b/Source/WebCore/page/Settings.yaml
@@ -177,7 +177,7 @@
   initial: false
 shrinksStandaloneImagesToFit:
   initial: true
-pageCacheSupportsPlugins:
+backForwardCacheSupportsPlugins:
   initial: false
 showsURLsInToolTips:
   initial: false
@@ -716,9 +716,9 @@
   getter: arePluginsEnabled
   onChange: pluginsEnabledChanged
 
-usesPageCache:
+usesBackForwardCache:
   initial: false
-  onChange: usesPageCacheChanged
+  onChange: usesBackForwardCacheChanged
 
 dnsPrefetchingEnabled:
   initial: false
diff --git a/Source/WebCore/page/SettingsBase.cpp b/Source/WebCore/page/SettingsBase.cpp
index 27eea6c..c9899ad 100644
--- a/Source/WebCore/page/SettingsBase.cpp
+++ b/Source/WebCore/page/SettingsBase.cpp
@@ -27,6 +27,7 @@
 #include "SettingsBase.h"
 
 #include "AudioSession.h"
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "CachedResourceLoader.h"
 #include "CookieStorage.h"
@@ -40,7 +41,6 @@
 #include "FrameView.h"
 #include "HistoryItem.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "RenderWidget.h"
 #include "RuntimeApplicationChecks.h"
 #include "Settings.h"
@@ -362,13 +362,13 @@
         m_page->userStyleSheetLocationChanged();
 }
 
-void SettingsBase::usesPageCacheChanged()
+void SettingsBase::usesBackForwardCacheChanged()
 {
     if (!m_page)
         return;
 
-    if (!m_page->settings().usesPageCache())
-        PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
+    if (!m_page->settings().usesBackForwardCache())
+        BackForwardCache::singleton().pruneToSizeNow(0, PruningReason::None);
 }
 
 void SettingsBase::dnsPrefetchingEnabledChanged()
diff --git a/Source/WebCore/page/SettingsBase.h b/Source/WebCore/page/SettingsBase.h
index b8501cb..1d983a2 100644
--- a/Source/WebCore/page/SettingsBase.h
+++ b/Source/WebCore/page/SettingsBase.h
@@ -185,7 +185,7 @@
     void imagesEnabledChanged();
     void pluginsEnabledChanged();
     void userStyleSheetLocationChanged();
-    void usesPageCacheChanged();
+    void usesBackForwardCacheChanged();
     void dnsPrefetchingEnabledChanged();
     void storageBlockingPolicyChanged();
     void backgroundShouldExtendBeyondPageChanged();
diff --git a/Source/WebCore/page/animation/AnimationBase.cpp b/Source/WebCore/page/animation/AnimationBase.cpp
index deca6c1..0a6aff9 100644
--- a/Source/WebCore/page/animation/AnimationBase.cpp
+++ b/Source/WebCore/page/animation/AnimationBase.cpp
@@ -81,7 +81,7 @@
     if (!element || element->document().renderTreeBeingDestroyed())
         return;
 
-    ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(element->document().backForwardCacheState() == Document::NotInBackForwardCache);
     element->invalidateStyle();
 }
 
diff --git a/Source/WebCore/page/animation/CSSAnimationController.cpp b/Source/WebCore/page/animation/CSSAnimationController.cpp
index 13c31f5..ca890e7 100644
--- a/Source/WebCore/page/animation/CSSAnimationController.cpp
+++ b/Source/WebCore/page/animation/CSSAnimationController.cpp
@@ -150,7 +150,7 @@
                     break;
                 
                 Element& element = *compositeAnimation.key;
-                ASSERT(element.document().pageCacheState() == Document::NotInPageCache);
+                ASSERT(element.document().backForwardCacheState() == Document::NotInBackForwardCache);
                 element.invalidateStyle();
                 calledSetChanged = true;
             }
@@ -254,7 +254,7 @@
 void CSSAnimationControllerPrivate::addElementChangeToDispatch(Element& element)
 {
     m_elementChangesToDispatch.append(element);
-    ASSERT(m_elementChangesToDispatch.last()->document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(m_elementChangesToDispatch.last()->document().backForwardCacheState() == Document::NotInBackForwardCache);
     startUpdateStyleIfNeededDispatcher();
 }
 
@@ -609,7 +609,7 @@
 
     if (element.document().renderTreeBeingDestroyed())
         return;
-    ASSERT(element.document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(element.document().backForwardCacheState() == Document::NotInBackForwardCache);
     element.invalidateStyle();
 }
 
@@ -619,7 +619,7 @@
     if (!hasOrHadAnimations)
         return { };
 
-    if (element.document().pageCacheState() != Document::NotInPageCache)
+    if (element.document().backForwardCacheState() != Document::NotInBackForwardCache)
         return { };
 
     // Don't run transitions when printing.
diff --git a/Source/WebCore/page/animation/ImplicitAnimation.cpp b/Source/WebCore/page/animation/ImplicitAnimation.cpp
index 0477a9e7..8325a59 100644
--- a/Source/WebCore/page/animation/ImplicitAnimation.cpp
+++ b/Source/WebCore/page/animation/ImplicitAnimation.cpp
@@ -212,7 +212,7 @@
             // Dispatch the event
             auto element = makeRefPtr(this->element());
 
-            ASSERT(!element || element->document().pageCacheState() == Document::NotInPageCache);
+            ASSERT(!element || element->document().backForwardCacheState() == Document::NotInBackForwardCache);
             if (!element)
                 return false;
 
diff --git a/Source/WebCore/page/animation/KeyframeAnimation.cpp b/Source/WebCore/page/animation/KeyframeAnimation.cpp
index 9af5f08..f91d3a5 100644
--- a/Source/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/Source/WebCore/page/animation/KeyframeAnimation.cpp
@@ -362,7 +362,7 @@
         // Dispatch the event
         auto element = makeRefPtr(this->element());
 
-        ASSERT(!element || element->document().pageCacheState() == Document::NotInPageCache);
+        ASSERT(!element || element->document().backForwardCacheState() == Document::NotInBackForwardCache);
         if (!element)
             return false;
 
diff --git a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
index 5f0a976..54a90e0 100644
--- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
+++ b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
@@ -246,14 +246,14 @@
     if (!coordinatesScrollingForFrameView(*frameView))
         return false;
 
-    bool inPageCache = frameView->frame().document()->pageCacheState() != Document::NotInPageCache;
+    bool inBackForwardCache = frameView->frame().document()->backForwardCacheState() != Document::NotInBackForwardCache;
     bool inProgrammaticScroll = scrollableArea.currentScrollType() == ScrollType::Programmatic;
-    if (inProgrammaticScroll || inPageCache)
+    if (inProgrammaticScroll || inBackForwardCache)
         updateScrollPositionAfterAsyncScroll(scrollingNodeID, scrollPosition, { }, ScrollType::Programmatic, ScrollingLayerPositionAction::Set);
 
-    // If this frame view's document is being put into the page cache, we don't want to update our
+    // If this frame view's document is being put into the back/forward cache, we don't want to update our
     // main frame scroll position. Just let the FrameView think that we did.
-    if (inPageCache)
+    if (inBackForwardCache)
         return true;
 
     auto* stateNode = downcast<ScrollingStateScrollingNode>(m_scrollingStateTree->stateNodeForID(scrollingNodeID));
diff --git a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm b/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
index 7f4e4bf..f591767 100644
--- a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
+++ b/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
@@ -1141,7 +1141,7 @@
 
 void ScrollAnimatorMac::notifyContentAreaScrolled(const FloatSize& delta)
 {
-    // This function is called when a page is going into the page cache, but the page
+    // This function is called when a page is going into the back/forward cache, but the page
     // isn't really scrolling in that case. We should only pass the message on to the
     // ScrollerImpPair when we're really scrolling on an active page.
     if ([m_scrollerImpPair overlayScrollerStateIsLocked])
@@ -1418,7 +1418,7 @@
         horizontalScrollbar->setFrameRect(IntRect(0, 0, thickness, thickness));
     }
 
-    // If m_needsScrollerStyleUpdate is true, then the page is restoring from the page cache, and 
+    // If m_needsScrollerStyleUpdate is true, then the page is restoring from the back/forward cache, and
     // a relayout will happen on its own. Otherwise, we must initiate a re-layout ourselves.
     scrollableArea().scrollbarStyleChanged(newStyle == NSScrollerStyleOverlay ? ScrollbarStyle::Overlay : ScrollbarStyle::AlwaysVisible, !m_needsScrollerStyleUpdate);
 
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index e0785ec..214f609 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -2780,8 +2780,8 @@
     if ((paintsIntoWindow() || paintsIntoCompositedAncestor()) && graphicsLayer->paintingPhase() != OptionSet<GraphicsLayerPaintingPhase>(GraphicsLayerPaintingPhase::ChildClippingMask)) {
 #if !PLATFORM(IOS_FAMILY) && !OS(WINDOWS)
         // FIXME: Looks like the CALayer tree is out of sync with the GraphicsLayer heirarchy
-        // when pages are restored from the PageCache.
-        // <rdar://problem/8712587> ASSERT: When Going Back to Page with Plugins in PageCache
+        // when pages are restored from the BackForwardCache.
+        // <rdar://problem/8712587> ASSERT: When Going Back to Page with Plugins in BackForwardCache
         ASSERT_NOT_REACHED();
 #endif
         return;
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp
index c0dd060..ff9febf 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -716,8 +716,8 @@
 
     m_updateCompositingLayersTimer.stop();
 
-    ASSERT(m_renderView.document().pageCacheState() == Document::NotInPageCache
-        || m_renderView.document().pageCacheState() == Document::AboutToEnterPageCache);
+    ASSERT(m_renderView.document().backForwardCacheState() == Document::NotInBackForwardCache
+        || m_renderView.document().backForwardCacheState() == Document::AboutToEnterBackForwardCache);
     
     // Compositing layers will be updated in Document::setVisualUpdatesAllowed(bool) if suppressed here.
     if (!m_renderView.document().visualUpdatesAllowed())
@@ -4652,7 +4652,7 @@
         return;
 
 #if PLATFORM(IOS_FAMILY)
-    ASSERT(m_renderView.document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(m_renderView.document().backForwardCacheState() == Document::NotInBackForwardCache);
     if (m_legacyScrollingLayerCoordinator)
         m_legacyScrollingLayerCoordinator->removeScrollingLayer(layer, backing);
 #else
@@ -4668,7 +4668,7 @@
         return;
 
 #if PLATFORM(IOS_FAMILY)
-    ASSERT(m_renderView.document().pageCacheState() == Document::NotInPageCache);
+    ASSERT(m_renderView.document().backForwardCacheState() == Document::NotInBackForwardCache);
     if (m_legacyScrollingLayerCoordinator)
         m_legacyScrollingLayerCoordinator->addScrollingLayer(layer);
 #else
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h
index 652d601..078f79b 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.h
+++ b/Source/WebCore/rendering/RenderLayerCompositor.h
@@ -193,7 +193,7 @@
     // This is only used when state changes and we do not exepect a style update or layout to happen soon (e.g. when
     // we discover that an iframe is overlapped during painting).
     void scheduleCompositingLayerUpdate();
-    // This is used to cancel any pending update timers when the document goes into page cache.
+    // This is used to cancel any pending update timers when the document goes into back/forward cache.
     void cancelCompositingLayerUpdate();
 
     // Update the compositing state of the given layer. Returns true if that state changed.
diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h
index caac5cd..76e28d7 100644
--- a/Source/WebCore/rendering/RenderObject.h
+++ b/Source/WebCore/rendering/RenderObject.h
@@ -723,7 +723,7 @@
      */
     virtual LayoutRect localCaretRect(InlineBox*, unsigned caretOffset, LayoutUnit* extraWidthToEndOfLine = nullptr);
 
-    // When performing a global document tear-down, or when going into the page cache, the renderer of the document is cleared.
+    // When performing a global document tear-down, or when going into the back/forward cache, the renderer of the document is cleared.
     bool renderTreeBeingDestroyed() const;
 
     void destroy();
diff --git a/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp b/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp
index ac109db..55f5fd3 100644
--- a/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp
+++ b/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp
@@ -269,7 +269,7 @@
 static void collectNonEmptyLeafRenderBlockFlowsForCurrentPage(HashSet<const RenderBlockFlow*>& leafRenderers)
 {
     for (const auto* document : Document::allDocuments()) {
-        if (!document->renderView() || document->pageCacheState() != Document::NotInPageCache)
+        if (!document->renderView() || document->backForwardCacheState() != Document::NotInBackForwardCache)
             continue;
         if (!document->isHTMLDocument() && !document->isXHTMLDocument())
             continue;
diff --git a/Source/WebCore/style/StyleTreeResolver.cpp b/Source/WebCore/style/StyleTreeResolver.cpp
index a00f4fe..02a0e37 100644
--- a/Source/WebCore/style/StyleTreeResolver.cpp
+++ b/Source/WebCore/style/StyleTreeResolver.cpp
@@ -296,7 +296,7 @@
         // First, we need to make sure that any new CSS animation occuring on this element has a matching WebAnimation
         // on the document timeline. Note that we get timeline() on the Document here because we need a timeline created
         // in case no Web Animations have been created through the JS API.
-        if (element.document().pageCacheState() == Document::NotInPageCache && !element.document().renderView()->printing()) {
+        if (element.document().backForwardCacheState() == Document::NotInBackForwardCache && !element.document().renderView()->printing()) {
             if (oldStyle && (oldStyle->hasTransitions() || newStyle->hasTransitions()))
                 m_document.timeline().updateCSSTransitionsForElement(element, *oldStyle, *newStyle);
 
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
index 8f8c5c7..4bc7120 100644
--- a/Source/WebCore/testing/Internals.cpp
+++ b/Source/WebCore/testing/Internals.cpp
@@ -34,6 +34,7 @@
 #include "ApplicationCacheStorage.h"
 #include "AudioSession.h"
 #include "Autofill.h"
+#include "BackForwardCache.h"
 #include "BackForwardController.h"
 #include "BitmapImage.h"
 #include "CSSAnimationController.h"
@@ -127,7 +128,6 @@
 #include "NavigatorMediaDevices.h"
 #include "NetworkLoadInformation.h"
 #include "Page.h"
-#include "PageCache.h"
 #include "PageOverlay.h"
 #include "PathUtilities.h"
 #include "PlatformKeyboardEvent.h"
@@ -922,14 +922,14 @@
     GridPosition::setMaxPositionForTesting(maxTrackLimit);
 }
 
-void Internals::clearPageCache()
+void Internals::clearBackForwardCache()
 {
-    PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
+    BackForwardCache::singleton().pruneToSizeNow(0, PruningReason::None);
 }
 
-unsigned Internals::pageCacheSize() const
+unsigned Internals::backForwardCacheSize() const
 {
-    return PageCache::singleton().pageCount();
+    return BackForwardCache::singleton().pageCount();
 }
 
 class UnsuspendableActiveDOMObject final : public ActiveDOMObject, public RefCounted<UnsuspendableActiveDOMObject> {
@@ -947,7 +947,7 @@
     const char* activeDOMObjectName() const { return "UnsuspendableActiveDOMObject"; }
 };
 
-void Internals::preventDocumentForEnteringPageCache()
+void Internals::preventDocumentForEnteringBackForwardCache()
 {
     if (auto* context = contextDocument())
         m_unsuspendableActiveDOMObject = UnsuspendableActiveDOMObject::create(*context);
diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h
index ba2bb97..19f789f 100644
--- a/Source/WebCore/testing/Internals.h
+++ b/Source/WebCore/testing/Internals.h
@@ -169,9 +169,9 @@
 
     void setGridMaxTracksLimit(unsigned);
 
-    void clearPageCache();
-    unsigned pageCacheSize() const;
-    void preventDocumentForEnteringPageCache();
+    void clearBackForwardCache();
+    unsigned backForwardCacheSize() const;
+    void preventDocumentForEnteringBackForwardCache();
 
     void disableTileSizeUpdateDelay();
 
diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl
index 1eee3c9..01db242 100644
--- a/Source/WebCore/testing/Internals.idl
+++ b/Source/WebCore/testing/Internals.idl
@@ -207,9 +207,9 @@
     void setOverrideResourceLoadPriority(ResourceLoadPriority priority);
     void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
 
-    void clearPageCache();
-    unsigned long pageCacheSize();
-    void preventDocumentForEnteringPageCache();
+    void clearBackForwardCache();
+    unsigned long backForwardCacheSize();
+    void preventDocumentForEnteringBackForwardCache();
 
     CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
 
diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp
index 7f0e035..53c4807 100644
--- a/Source/WebCore/xml/XMLHttpRequest.cpp
+++ b/Source/WebCore/xml/XMLHttpRequest.cpp
@@ -1163,8 +1163,8 @@
         m_dispatchErrorOnResuming = true;
     }
 
-    if (reason == ReasonForSuspension::PageCache && m_loader) {
-        // Going into PageCache, abort the request and dispatch a network error on resuming.
+    if (reason == ReasonForSuspension::BackForwardCache && m_loader) {
+        // Going into the BackForwardCache, abort the request and dispatch a network error on resuming.
         genericError();
         m_dispatchErrorOnResuming = true;
         bool aborted = internalAbort();
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index dac79261..09451a2 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,94 @@
+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.
+
+        * 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:
+
 2019-10-16  Per Arne Vollan  <pvollan@apple.com>
 
         [iOS] Remove ubiquity client rule from sandbox
diff --git a/Source/WebKit/Shared/CacheModel.cpp b/Source/WebKit/Shared/CacheModel.cpp
index f09ec6d..9cbd6ab 100644
--- a/Source/WebKit/Shared/CacheModel.cpp
+++ b/Source/WebKit/Shared/CacheModel.cpp
@@ -33,14 +33,14 @@
 
 namespace WebKit {
 
-void calculateMemoryCacheSizes(CacheModel cacheModel, unsigned& cacheTotalCapacity, unsigned& cacheMinDeadCapacity, unsigned& cacheMaxDeadCapacity, Seconds& deadDecodedDataDeletionInterval, unsigned& pageCacheCapacity)
+void calculateMemoryCacheSizes(CacheModel cacheModel, unsigned& cacheTotalCapacity, unsigned& cacheMinDeadCapacity, unsigned& cacheMaxDeadCapacity, Seconds& deadDecodedDataDeletionInterval, unsigned& backForwardCacheCapacity)
 {
     uint64_t memorySize = ramSize() / MB;
 
     switch (cacheModel) {
     case CacheModel::DocumentViewer: {
-        // Page cache capacity (in pages)
-        pageCacheCapacity = 0;
+        // back/forward cache capacity (in pages)
+        backForwardCacheCapacity = 0;
 
         // Object cache capacities (in bytes)
         if (memorySize >= 2048)
@@ -60,13 +60,13 @@
         break;
     }
     case CacheModel::DocumentBrowser: {
-        // Page cache capacity (in pages)
+        // back/forward cache capacity (in pages)
         if (memorySize >= 512)
-            pageCacheCapacity = 2;
+            backForwardCacheCapacity = 2;
         else if (memorySize >= 256)
-            pageCacheCapacity = 1;
+            backForwardCacheCapacity = 1;
         else
-            pageCacheCapacity = 0;
+            backForwardCacheCapacity = 0;
 
         // Object cache capacities (in bytes)
         if (memorySize >= 2048)
@@ -86,13 +86,13 @@
         break;
     }
     case CacheModel::PrimaryWebBrowser: {
-        // Page cache capacity (in pages)
+        // back/forward cache capacity (in pages)
         if (memorySize >= 512)
-            pageCacheCapacity = 2;
+            backForwardCacheCapacity = 2;
         else if (memorySize >= 256)
-            pageCacheCapacity = 1;
+            backForwardCacheCapacity = 1;
         else
-            pageCacheCapacity = 0;
+            backForwardCacheCapacity = 0;
 
         // Object cache capacities (in bytes)
         // (Testing indicates that value / MB depends heavily on content and
diff --git a/Source/WebKit/Shared/CacheModel.h b/Source/WebKit/Shared/CacheModel.h
index f239538..cd648b4 100644
--- a/Source/WebKit/Shared/CacheModel.h
+++ b/Source/WebKit/Shared/CacheModel.h
@@ -37,7 +37,7 @@
     PrimaryWebBrowser
 };
 
-void calculateMemoryCacheSizes(CacheModel, unsigned& cacheTotalCapacity, unsigned& cacheMinDeadCapacity, unsigned& cacheMaxDeadCapacity, Seconds& deadDecodedDataDeletionInterval, unsigned& pageCacheCapacity);
+void calculateMemoryCacheSizes(CacheModel, unsigned& cacheTotalCapacity, unsigned& cacheMinDeadCapacity, unsigned& cacheMaxDeadCapacity, Seconds& deadDecodedDataDeletionInterval, unsigned& backForwardCacheCapacity);
 void calculateURLCacheSizes(CacheModel, uint64_t diskFreeSize, unsigned& urlCacheMemoryCapacity, uint64_t& urlCacheDiskCapacity);
 
 } // namespace WebKit
diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
index 6659493..4f0b6c6 100644
--- a/Source/WebKit/Shared/WebPreferences.yaml
+++ b/Source/WebKit/Shared/WebPreferences.yaml
@@ -155,11 +155,11 @@
   type: bool
   defaultValue: false
 
-UsesPageCache:
+UsesBackForwardCache:
   type: bool
   defaultValue: true
 
-PageCacheSupportsPlugins:
+BackForwardCacheSupportsPlugins:
   type: bool
   defaultValue: true
 
diff --git a/Source/WebKit/UIProcess/API/APINavigationClient.h b/Source/WebKit/UIProcess/API/APINavigationClient.h
index cd22a26..38cc750 100644
--- a/Source/WebKit/UIProcess/API/APINavigationClient.h
+++ b/Source/WebKit/UIProcess/API/APINavigationClient.h
@@ -138,7 +138,7 @@
     virtual void resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WTF::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
 #endif
     
-    virtual bool willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, bool inPageCache) { return false; }
+    virtual bool willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, bool inBackForwardCache) { return false; }
 
     virtual void didBeginNavigationGesture(WebKit::WebPageProxy&) { }
     virtual void willEndNavigationGesture(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
index e373934..1e00a5e 100644
--- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
+++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
@@ -69,7 +69,7 @@
     copy->m_processSwapsOnWindowOpenWithOpener = this->m_processSwapsOnWindowOpenWithOpener;
     copy->m_isAutomaticProcessWarmingEnabledByClient = this->m_isAutomaticProcessWarmingEnabledByClient;
     copy->m_usesWebProcessCache = this->m_usesWebProcessCache;
-    copy->m_usesPageCache = this->m_usesPageCache;
+    copy->m_usesBackForwardCache = this->m_usesBackForwardCache;
 #if PLATFORM(COCOA)
     copy->m_suppressesConnectionTerminationOnSystemChange = this->m_suppressesConnectionTerminationOnSystemChange;
 #endif
diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
index 1fa7901..396f3e5 100644
--- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
+++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
@@ -68,8 +68,8 @@
     bool clientWouldBenefitFromAutomaticProcessPrewarming() const { return m_clientWouldBenefitFromAutomaticProcessPrewarming; }
     void setClientWouldBenefitFromAutomaticProcessPrewarming(bool value) { m_clientWouldBenefitFromAutomaticProcessPrewarming = value; }
 
-    void setUsesPageCache(bool value) { m_usesPageCache = value; }
-    bool usesPageCache() const { return m_usesPageCache; }
+    void setUsesBackForwardCache(bool value) { m_usesBackForwardCache = value; }
+    bool usesBackForwardCache() const { return m_usesBackForwardCache; }
 
     const WTF::String& injectedBundlePath() const { return m_injectedBundlePath; }
     void setInjectedBundlePath(const WTF::String& injectedBundlePath) { m_injectedBundlePath = injectedBundlePath; }
@@ -169,7 +169,7 @@
     bool m_processSwapsOnWindowOpenWithOpener { false };
     Optional<bool> m_isAutomaticProcessWarmingEnabledByClient;
     bool m_usesWebProcessCache { false };
-    bool m_usesPageCache { true };
+    bool m_usesBackForwardCache { true };
     bool m_clientWouldBenefitFromAutomaticProcessPrewarming { false };
     WTF::String m_customWebContentServiceBundleIdentifier;
     bool m_shouldConfigureJSCForTesting { false };
diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
index b34f4bc..88802a2 100644
--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
@@ -610,22 +610,22 @@
 
 void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
-    toImpl(preferencesRef)->setUsesPageCache(enabled);
+    toImpl(preferencesRef)->setUsesBackForwardCache(enabled);
 }
 
 bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->usesPageCache();
+    return toImpl(preferencesRef)->usesBackForwardCache();
 }
 
-void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins)
+void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool backForwardCacheSupportsPlugins)
 {
-    toImpl(preferencesRef)->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
+    toImpl(preferencesRef)->setBackForwardCacheSupportsPlugins(backForwardCacheSupportsPlugins);
 }
 
 bool WKPreferencesGetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->pageCacheSupportsPlugins();
+    return toImpl(preferencesRef)->backForwardCacheSupportsPlugins();
 }
 
 void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferencesRef, bool enabled)
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
index 194260e..c1a7308 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
@@ -944,22 +944,22 @@
 
 - (void)_setUsesPageCache:(BOOL)enabled
 {
-    _preferences->setUsesPageCache(enabled);
+    _preferences->setUsesBackForwardCache(enabled);
 }
 
 - (BOOL)_usesPageCache
 {
-    return _preferences->usesPageCache();
+    return _preferences->usesBackForwardCache();
 }
 
 - (void)_setPageCacheSupportsPlugins:(BOOL)enabled
 {
-    _preferences->setPageCacheSupportsPlugins(enabled);
+    _preferences->setBackForwardCacheSupportsPlugins(enabled);
 }
 
 - (BOOL)_pageCacheSupportsPlugins
 {
-    return _preferences->pageCacheSupportsPlugins();
+    return _preferences->backForwardCacheSupportsPlugins();
 }
 
 - (void)_setShouldPrintBackgrounds:(BOOL)enabled
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
index 877d52c..0b677bc 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
@@ -313,12 +313,12 @@
 
 - (BOOL)pageCacheEnabled
 {
-    return _processPoolConfiguration->usesPageCache();
+    return _processPoolConfiguration->usesBackForwardCache();
 }
 
 - (void)setPageCacheEnabled:(BOOL)enabled
 {
-    return _processPoolConfiguration->setUsesPageCache(enabled);
+    return _processPoolConfiguration->setUsesBackForwardCache(enabled);
 }
 
 - (BOOL)usesSingleWebProcess
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
index ae278c7..e57016b 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
@@ -2984,7 +2984,7 @@
 {
     g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), FALSE);
 
-    return settings->priv->preferences->usesPageCache();
+    return settings->priv->preferences->usesBackForwardCache();
 }
 
 /**
@@ -2999,11 +2999,11 @@
     g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
 
     WebKitSettingsPrivate* priv = settings->priv;
-    bool currentValue = priv->preferences->usesPageCache();
+    bool currentValue = priv->preferences->usesBackForwardCache();
     if (currentValue == enabled)
         return;
 
-    priv->preferences->setUsesPageCache(enabled);
+    priv->preferences->setUsesBackForwardCache(enabled);
     g_object_notify(G_OBJECT(settings), "enable-page-cache");
 }
 
diff --git a/Source/WebKit/UIProcess/Cocoa/NavigationState.h b/Source/WebKit/UIProcess/Cocoa/NavigationState.h
index b3a3d6f..0dfde7c 100644
--- a/Source/WebKit/UIProcess/Cocoa/NavigationState.h
+++ b/Source/WebKit/UIProcess/Cocoa/NavigationState.h
@@ -128,7 +128,7 @@
 #if PLATFORM(MAC)
         void webGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
         void resolveWebGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
-        bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inPageCache) final;
+        bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inBackForwardCache) final;
         bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
         bool didBlockInsecurePluginVersion(WebPageProxy&, API::Dictionary&) final;
         void decidePolicyForPluginLoad(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy, API::Dictionary&, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const WTF::String&)>&&) final;
@@ -240,7 +240,7 @@
         bool webViewBackForwardListItemAddedRemoved : 1;
         bool webViewDidFailToInitializePlugInWithInfo : 1;
         bool webViewDidBlockInsecurePluginVersionWithInfo : 1;
-        bool webViewWillGoToBackForwardListItemInPageCache : 1;
+        bool webViewWillGoToBackForwardListItemInBackForwardCache : 1;
         bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler : 1;
 #endif
 
diff --git a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
index 6b15c06..94ae9b1 100644
--- a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
+++ b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
@@ -192,7 +192,7 @@
 #if PLATFORM(MAC)
     m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:webGLLoadPolicyForURL:decisionHandler:)];
     m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
-    m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInPageCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
+    m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
     m_navigationDelegateMethods.webViewDidFailToInitializePlugInWithInfo = [delegate respondsToSelector:@selector(_webView:didFailToInitializePlugInWithInfo:)];
     m_navigationDelegateMethods.webViewDidBlockInsecurePluginVersionWithInfo = [delegate respondsToSelector:@selector(_webView:didBlockInsecurePluginVersionWithInfo:)];
     m_navigationDelegateMethods.webViewBackForwardListItemAddedRemoved = [delegate respondsToSelector:@selector(_webView:backForwardListItemAdded:removed:)];
@@ -462,16 +462,16 @@
     return true;
 }
 
-bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inPageCache)
+bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inBackForwardCache)
 {
-    if (!m_navigationState.m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInPageCache)
+    if (!m_navigationState.m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache)
         return false;
 
     auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
     if (!navigationDelegate)
         return false;
 
-    [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView willGoToBackForwardListItem:wrapper(item) inPageCache:inPageCache];
+    [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView willGoToBackForwardListItem:wrapper(item) inPageCache:inBackForwardCache];
     return true;
 }
 #endif
@@ -754,7 +754,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     if (m_navigationState.m_navigationDelegateMethods.webViewDidStartProvisionalNavigationUserInfo)
         [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView didStartProvisionalNavigation:wrapper(navigation) userInfo:userInfo ? static_cast<id <NSSecureCoding>>(userInfo->wrapper()) : nil];
@@ -771,7 +771,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     [navigationDelegate webView:m_navigationState.m_webView didReceiveServerRedirectForProvisionalNavigation:wrapper(navigation)];
 }
@@ -834,7 +834,7 @@
 // FIXME: Shouldn't need to pass the WebFrameProxy in here. At most, a FrameHandle.
 void NavigationState::NavigationClient::didFailProvisionalNavigationWithError(WebPageProxy& page, WebFrameProxy& webFrameProxy, API::Navigation* navigation, const WebCore::ResourceError& error, API::Object*)
 {
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     // FIXME: Set the error on the navigation object.
 
@@ -872,7 +872,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     [navigationDelegate webView:m_navigationState.m_webView didCommitNavigation:wrapper(navigation)];
 }
@@ -886,7 +886,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView navigationDidFinishDocumentLoad:wrapper(navigation)];
 }
@@ -900,7 +900,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     [navigationDelegate webView:m_navigationState.m_webView didFinishNavigation:wrapper(navigation)];
 }
@@ -916,7 +916,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
+    // FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the back/forward cache.
 
     auto errorWithRecoveryAttempter = createErrorWithRecoveryAttempter(m_navigationState.m_webView, webFrameProxy, error);
     if (m_navigationState.m_navigationDelegateMethods.webViewDidFailNavigationWithErrorUserInfo)
@@ -934,7 +934,7 @@
     if (!navigationDelegate)
         return;
 
-    // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should assert that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
 
     [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView navigation:wrapper(navigation) didSameDocumentNavigation:toWKSameDocumentNavigationType(navigationType)];
 }
diff --git a/Source/WebKit/UIProcess/ViewGestureController.cpp b/Source/WebKit/UIProcess/ViewGestureController.cpp
index b482772..3562355 100644
--- a/Source/WebKit/UIProcess/ViewGestureController.cpp
+++ b/Source/WebKit/UIProcess/ViewGestureController.cpp
@@ -217,7 +217,7 @@
     if (!m_snapshotRemovalTracker.eventOccurred(SnapshotRemovalTracker::MainFrameLoad))
         return;
 
-    // Coming back from the page cache will result in getting a load event, but no first visually non-empty layout.
+    // Coming back from the back/forward cache will result in getting a load event, but no first visually non-empty layout.
     // WebCore considers a loaded document enough to be considered visually non-empty, so that's good
     // enough for us too.
     m_snapshotRemovalTracker.cancelOutstandingEvent(SnapshotRemovalTracker::VisuallyNonEmptyLayout);
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
index b372558..2cc9693 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
@@ -815,7 +815,7 @@
 
 bool WebPageProxy::shouldUseBackForwardCache() const
 {
-    return m_preferences->usesPageCache() && backForwardCache().capacity() > 0;
+    return m_preferences->usesBackForwardCache() && backForwardCache().capacity() > 0;
 }
 
 void WebPageProxy::swapToWebProcess(Ref<WebProcessProxy>&& process, PageIdentifier webPageID, std::unique_ptr<DrawingAreaProxy>&& drawingArea, RefPtr<WebFrameProxy>&& mainFrame)
@@ -1567,12 +1567,12 @@
     m_pageLoadState.setCanGoForward(transaction, m_backForwardList->forwardItem());
 }
 
-void WebPageProxy::willGoToBackForwardListItem(const BackForwardItemIdentifier& itemID, bool inPageCache)
+void WebPageProxy::willGoToBackForwardListItem(const BackForwardItemIdentifier& itemID, bool inBackForwardCache)
 {
     PageClientProtector protector(pageClient());
 
     if (auto* item = m_backForwardList->itemForID(itemID))
-        m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache);
+        m_navigationClient->willGoToBackForwardListItem(*this, *item, inBackForwardCache);
 }
 
 bool WebPageProxy::shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem& item)
@@ -4083,7 +4083,7 @@
         m_provisionalPage = nullptr;
     }
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().navigation(navigationID);
@@ -4150,7 +4150,7 @@
     MESSAGE_CHECK(process, frame);
     MESSAGE_CHECK_URL(process, request.url());
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation = navigationID ? navigationState().navigation(navigationID) : nullptr;
     if (navigation)
         navigation->appendRedirectionURL(request.url());
@@ -4244,7 +4244,7 @@
             automationSession->navigationOccurredForFrame(*frame);
     }
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().takeNavigation(navigationID);
@@ -4319,7 +4319,7 @@
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(m_process, frame);
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID && (navigation = navigationState().navigation(navigationID))) {
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
@@ -4436,7 +4436,7 @@
             automationSession->documentLoadedForFrame(*frame);
     }
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().navigation(navigationID);
@@ -4455,7 +4455,7 @@
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(m_process, frame);
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().navigation(navigationID);
@@ -4500,7 +4500,7 @@
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(m_process, frame);
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().navigation(navigationID);
@@ -4543,7 +4543,7 @@
     MESSAGE_CHECK(m_process, frame);
     MESSAGE_CHECK_URL(m_process, url);
 
-    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
+    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the back/forward cache.
     RefPtr<API::Navigation> navigation;
     if (frame->isMainFrame() && navigationID)
         navigation = navigationState().navigation(navigationID);
diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h
index 785cc73..c6a4fdc 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -558,7 +558,7 @@
     RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem&);
     void tryRestoreScrollPosition();
     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<Ref<WebBackForwardListItem>>&& removed);
-    void willGoToBackForwardListItem(const WebCore::BackForwardItemIdentifier&, bool inPageCache);
+    void willGoToBackForwardListItem(const WebCore::BackForwardItemIdentifier&, bool inBackForwardCache);
 
     bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem&);
 
diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in
index 3043ece..7b9fe20 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -230,7 +230,7 @@
     BackForwardBackListCount() -> (uint32_t count) Synchronous
     BackForwardForwardListCount() -> (uint32_t count) Synchronous
     BackForwardClear()
-    WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache)
+    WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inBackForwardCache)
 
     # Undo/Redo messages
     RegisterEditCommandForUndo(uint64_t commandID, String label)
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
index c06d6c6..278e4c7 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
@@ -1572,7 +1572,7 @@
 
 void WebProcessPool::updateBackForwardCacheCapacity()
 {
-    if (!m_configuration->usesPageCache())
+    if (!m_configuration->usesBackForwardCache())
         return;
 
     unsigned dummy = 0;
diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
index d8e3a9f..7798782 100644
--- a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
+++ b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
@@ -64,7 +64,7 @@
     return false;
 }
 
-bool WKBundleBackForwardListItemIsInPageCache(WKBundleBackForwardListItemRef itemRef)
+bool WKBundleBackForwardListItemIsInBackForwardCache(WKBundleBackForwardListItemRef itemRef)
 {
     return false;
 }
diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
index f00ead4..c9a6035 100644
--- a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
+++ b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
@@ -44,7 +44,7 @@
 WK_EXPORT WKStringRef WKBundleBackForwardListItemCopyTarget(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 WK_EXPORT bool WKBundleBackForwardListItemIsTargetItem(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 
-WK_EXPORT bool WKBundleBackForwardListItemIsInPageCache(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
+WK_EXPORT bool WKBundleBackForwardListItemIsInBackForwardCache(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 WK_EXPORT bool WKBundleBackForwardListItemHasCachedPageExpired(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 
 WK_EXPORT WKArrayRef WKBundleBackForwardListItemCopyChildren(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp b/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
index 0eca4c1..02695d3 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
@@ -115,7 +115,7 @@
     state.pageState.mainFrameState = toFrameState(historyItem);
     state.pageState.shouldOpenExternalURLsPolicy = historyItem.shouldOpenExternalURLsPolicy();
     state.pageState.sessionStateObject = historyItem.stateObject();
-    state.hasCachedPage = historyItem.isInPageCache();
+    state.hasCachedPage = historyItem.isInBackForwardCache();
     return state;
 }
 
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index cced11f..78da47c 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -104,7 +104,7 @@
     , m_hasSentResponseToPluginView(false)
     , m_didCompletePageTransition(false)
     , m_frameHasCustomContentProvider(false)
-    , m_frameCameFromPageCache(false)
+    , m_frameCameFromBackForwardCache(false)
 {
 }
 
@@ -1206,7 +1206,7 @@
     WebPage* webPage = m_frame->page();
     if (!webPage)
         return false;
-    webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(item.identifier(), item.isInPageCache()));
+    webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(item.identifier(), item.isInBackForwardCache()));
     return true;
 }
 
@@ -1465,7 +1465,7 @@
 {
     const ResourceResponse& response = m_frame->coreFrame()->loader().documentLoader()->response();
     m_frameHasCustomContentProvider = m_frame->isMainFrame() && m_frame->page()->shouldUseCustomContentProviderForResponse(response);
-    m_frameCameFromPageCache = true;
+    m_frameCameFromBackForwardCache = true;
 }
 
 void WebFrameLoaderClient::transitionToCommittedForNewPage()
@@ -1487,7 +1487,7 @@
 
     const ResourceResponse& response = m_frame->coreFrame()->loader().documentLoader()->response();
     m_frameHasCustomContentProvider = isMainFrame && webPage->shouldUseCustomContentProviderForResponse(response);
-    m_frameCameFromPageCache = false;
+    m_frameCameFromBackForwardCache = false;
 
     ScrollbarMode defaultScrollbarMode = shouldHideScrollbars ? ScrollbarAlwaysOff : ScrollbarAuto;
 
@@ -1533,9 +1533,9 @@
 #endif
 }
 
-void WebFrameLoaderClient::didRestoreFromPageCache()
+void WebFrameLoaderClient::didRestoreFromBackForwardCache()
 {
-    m_frameCameFromPageCache = true;
+    m_frameCameFromBackForwardCache = true;
 }
 
 void WebFrameLoaderClient::dispatchDidBecomeFrameset(bool value)
@@ -1596,7 +1596,7 @@
     parameters.values = paramValues;
     parameters.mimeType = mimeType;
     parameters.isFullFramePlugin = loadManually;
-    parameters.shouldUseManualLoader = parameters.isFullFramePlugin && !m_frameCameFromPageCache;
+    parameters.shouldUseManualLoader = parameters.isFullFramePlugin && !m_frameCameFromBackForwardCache;
 #if PLATFORM(COCOA)
     parameters.layerHostingMode = m_frame->page()->layerHostingMode();
 #endif
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
index afa17a4..611fcb8 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
@@ -71,7 +71,7 @@
     
     void makeRepresentation(WebCore::DocumentLoader*) final;
 #if PLATFORM(IOS_FAMILY)
-    bool forceLayoutOnRestoreFromPageCache() final;
+    bool forceLayoutOnRestoreFromBackForwardCache() final;
 #endif
     void forceLayoutForNonHTML() final;
     
@@ -206,7 +206,7 @@
 #endif
     void transitionToCommittedForNewPage() final;
 
-    void didRestoreFromPageCache() final;
+    void didRestoreFromBackForwardCache() final;
 
     void dispatchDidBecomeFrameset(bool) final;
 
@@ -281,7 +281,7 @@
     bool m_hasSentResponseToPluginView;
     bool m_didCompletePageTransition;
     bool m_frameHasCustomContentProvider;
-    bool m_frameCameFromPageCache;
+    bool m_frameCameFromBackForwardCache;
     bool m_useIconLoadingClient { false };
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
     Optional<FrameSpecificStorageAccessIdentifier> m_frameSpecificStorageAccessIdentifier;
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
index fca9bdf..8faf31e 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
+++ b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
@@ -53,7 +53,7 @@
     notImplemented();
 }
 
-bool WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache()
+bool WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache()
 {
     return false;
 }
diff --git a/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp b/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp
index 4bb4e34..2add21b 100644
--- a/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp
+++ b/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp
@@ -30,7 +30,7 @@
 #include "VisitedLinkTableControllerMessages.h"
 #include "WebPage.h"
 #include "WebProcess.h"
-#include <WebCore/PageCache.h>
+#include <WebCore/BackForwardCache.h>
 #include <wtf/NeverDestroyed.h>
 
 namespace WebKit {
diff --git a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp
index d80d7f9..9174fe1 100644
--- a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp
@@ -34,10 +34,10 @@
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
 #include "WebProcessProxyMessages.h"
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/Frame.h>
 #include <WebCore/HistoryController.h>
 #include <WebCore/HistoryItem.h>
-#include <WebCore/PageCache.h>
 #include <wtf/HashMap.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/ProcessID.h>
@@ -78,7 +78,7 @@
     if (!item)
         return;
         
-    PageCache::singleton().remove(*item);
+    BackForwardCache::singleton().remove(*item);
     WebCore::Page::clearPreviousItemFromAllPages(item.get());
 }
 
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
index 0817927..df961e4 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
@@ -136,6 +136,7 @@
 #include <JavaScriptCore/SamplingProfiler.h>
 #include <WebCore/ApplicationCacheStorage.h>
 #include <WebCore/ArchiveResource.h>
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/BackForwardController.h>
 #include <WebCore/Chrome.h>
 #include <WebCore/CommonVM.h>
@@ -192,7 +193,6 @@
 #include <WebCore/MouseEvent.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/Page.h>
-#include <WebCore/PageCache.h>
 #include <WebCore/PageConfiguration.h>
 #include <WebCore/PingLoader.h>
 #include <WebCore/PlatformKeyboardEvent.h>
@@ -1490,12 +1490,12 @@
         return;
     }
 
-    if (!PageCache::singleton().addIfCacheable(*currentHistoryItem, corePage())) {
+    if (!BackForwardCache::singleton().addIfCacheable(*currentHistoryItem, corePage())) {
         failedToSuspend();
         return;
     }
 
-    // Page cache does not break the opener link for the main frame (only does so for the subframes) because the
+    // Back/forward cache does not break the opener link for the main frame (only does so for the subframes) because the
     // main frame is normally re-used for the navigation. However, in the case of process-swapping, the main frame
     // is now hosted in another process and the one in this process is in the cache.
     if (m_mainFrame && m_mainFrame->coreFrame())
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
index c66c805d..6c32b42 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -82,6 +82,7 @@
 #include <WebCore/AXObjectCache.h>
 #include <WebCore/ApplicationCacheStorage.h>
 #include <WebCore/AuthenticationChallenge.h>
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/CPUMonitor.h>
 #include <WebCore/CommonVM.h>
 #include <WebCore/CrossOriginPreflightResultCache.h>
@@ -107,7 +108,6 @@
 #include <WebCore/MockRealtimeMediaSourceCenter.h>
 #include <WebCore/NetworkStorageSession.h>
 #include <WebCore/Page.h>
-#include <WebCore/PageCache.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PlatformKeyboardEvent.h>
 #include <WebCore/PlatformMediaSessionManager.h>
@@ -306,9 +306,9 @@
             }
 #endif
 
-            auto maintainPageCache = m_isSuspending ? WebCore::MaintainPageCache::Yes : WebCore::MaintainPageCache::No;
+            auto maintainBackForwardCache = m_isSuspending ? WebCore::MaintainBackForwardCache::Yes : WebCore::MaintainBackForwardCache::No;
             auto maintainMemoryCache = m_isSuspending && m_hasSuspendedPageProxy ? WebCore::MaintainMemoryCache::Yes : WebCore::MaintainMemoryCache::No;
-            WebCore::releaseMemory(critical, synchronous, maintainPageCache, maintainMemoryCache);
+            WebCore::releaseMemory(critical, synchronous, maintainBackForwardCache, maintainMemoryCache);
         });
 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WPE)
         memoryPressureHandler.setShouldUsePeriodicMemoryMonitor(true);
@@ -471,15 +471,6 @@
     ensureNetworkProcessConnection();
 }
 
-bool WebProcess::hasPageRequiringPageCacheWhileSuspended() const
-{
-    for (auto& page : m_pageMap.values()) {
-        if (page->isSuspended())
-            return true;
-    }
-    return false;
-}
-
 bool WebProcess::areAllPagesSuspended() const
 {
     for (auto& page : m_pageMap.values()) {
@@ -631,13 +622,13 @@
     unsigned cacheMinDeadCapacity = 0;
     unsigned cacheMaxDeadCapacity = 0;
     Seconds deadDecodedDataDeletionInterval;
-    unsigned pageCacheSize = 0;
-    calculateMemoryCacheSizes(cacheModel, cacheTotalCapacity, cacheMinDeadCapacity, cacheMaxDeadCapacity, deadDecodedDataDeletionInterval, pageCacheSize);
+    unsigned backForwardCacheSize = 0;
+    calculateMemoryCacheSizes(cacheModel, cacheTotalCapacity, cacheMinDeadCapacity, cacheMaxDeadCapacity, deadDecodedDataDeletionInterval, backForwardCacheSize);
 
     auto& memoryCache = MemoryCache::singleton();
     memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
-    PageCache::singleton().setMaxSize(pageCacheSize);
+    BackForwardCache::singleton().setMaxSize(backForwardCacheSize);
 
     platformSetCacheModel(cacheModel);
 }
@@ -1309,7 +1300,7 @@
     UNUSED_PARAM(modifiedSince);
 
     if (websiteDataTypes.contains(WebsiteDataType::MemoryCache)) {
-        PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
+        BackForwardCache::singleton().pruneToSizeNow(0, PruningReason::None);
         MemoryCache::singleton().evictResources(sessionID());
 
         CrossOriginPreflightResultCache::singleton().clear();
@@ -1776,7 +1767,7 @@
 
 void WebProcess::setBackForwardCacheCapacity(unsigned capacity)
 {
-    PageCache::singleton().setMaxSize(capacity);
+    BackForwardCache::singleton().setMaxSize(capacity);
 }
 
 void WebProcess::clearCachedPage(BackForwardItemIdentifier backForwardItemID, CompletionHandler<void()>&& completionHandler)
@@ -1785,7 +1776,7 @@
     if (!item)
         return completionHandler();
 
-    PageCache::singleton().remove(*item);
+    BackForwardCache::singleton().remove(*item);
     completionHandler();
 }
 
diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h
index dd60e8d..8c246af 100644
--- a/Source/WebKit/WebProcess/WebProcess.h
+++ b/Source/WebKit/WebProcess/WebProcess.h
@@ -390,7 +390,6 @@
     enum class ShouldAcknowledgeWhenReadyToSuspend { No, Yes };
     void actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend);
 
-    bool hasPageRequiringPageCacheWhileSuspended() const;
     bool areAllPagesSuspended() const;
 
     void ensureAutomationSessionProxy(const String& sessionIdentifier);
diff --git a/Source/WebKitLegacy/ios/ChangeLog b/Source/WebKitLegacy/ios/ChangeLog
index 0789903..d3f0293 100644
--- a/Source/WebKitLegacy/ios/ChangeLog
+++ b/Source/WebKitLegacy/ios/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
+        * WebView/WebUIKitDelegate.h:
+
 2019-10-09  Andy Estes  <aestes@apple.com>
 
         [iOS] Remove redundant uses of USE(UIKIT_EDITING)
diff --git a/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h b/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h
index 9897456..2db738f 100644
--- a/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h
+++ b/Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h
@@ -82,7 +82,7 @@
 - (void)webView:(WebView *)webView elementDidFocusNode:(DOMNode *)node;
 - (void)webView:(WebView *)webView elementDidBlurNode:(DOMNode *)node;
 
-// PageCache support
+// BackForwardCache support
 - (void)webViewDidRestoreFromPageCache:(WebView *)webView;
 
 - (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments fromPlugInPackage:(WebPluginPackage *)package;
diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog
index 061ae1b..93f7ee3 100644
--- a/Source/WebKitLegacy/mac/ChangeLog
+++ b/Source/WebKitLegacy/mac/ChangeLog
@@ -1,5 +1,39 @@
 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.
+
+        * 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:]):
+
+2019-10-16  Chris Dumez  <cdumez@apple.com>
+
         [WK2] Move back/forward cache entry expiration from the WebProcess to the UIProcess
         https://bugs.webkit.org/show_bug.cgi?id=203034
         <rdar://problem/56332453>
diff --git a/Source/WebKitLegacy/mac/History/BackForwardList.mm b/Source/WebKitLegacy/mac/History/BackForwardList.mm
index b7095a7..d054a1b 100644
--- a/Source/WebKitLegacy/mac/History/BackForwardList.mm
+++ b/Source/WebKitLegacy/mac/History/BackForwardList.mm
@@ -26,7 +26,7 @@
 
 #include "BackForwardList.h"
 
-#include <WebCore/PageCache.h>
+#include <WebCore/BackForwardCache.h>
 
 using namespace WebCore;
 
@@ -58,7 +58,7 @@
         while (m_entries.size() > targetSize) {
             Ref<HistoryItem> item = m_entries.takeLast();
             m_entryHash.remove(item.ptr());
-            PageCache::singleton().remove(item);
+            BackForwardCache::singleton().remove(item);
         }
     }
 
@@ -68,7 +68,7 @@
         Ref<HistoryItem> item = WTFMove(m_entries[0]);
         m_entries.remove(0);
         m_entryHash.remove(item.ptr());
-        PageCache::singleton().remove(item);
+        BackForwardCache::singleton().remove(item);
         --m_current;
     }
 
@@ -163,7 +163,7 @@
     while (size < static_cast<int>(m_entries.size())) {
         Ref<HistoryItem> item = m_entries.takeLast();
         m_entryHash.remove(item.ptr());
-        PageCache::singleton().remove(item);
+        BackForwardCache::singleton().remove(item);
     }
 
     if (!size)
diff --git a/Source/WebKitLegacy/mac/History/WebBackForwardList.mm b/Source/WebKitLegacy/mac/History/WebBackForwardList.mm
index df62da9..18f013a 100644
--- a/Source/WebKitLegacy/mac/History/WebBackForwardList.mm
+++ b/Source/WebKitLegacy/mac/History/WebBackForwardList.mm
@@ -40,8 +40,8 @@
 #import "WebTypesInternal.h"
 #import "WebViewPrivate.h"
 #import <JavaScriptCore/InitializeThreading.h>
+#import <WebCore/BackForwardCache.h>
 #import <WebCore/HistoryItem.h>
-#import <WebCore/PageCache.h>
 #import <WebCore/Settings.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
@@ -339,7 +339,7 @@
 
 - (NSUInteger)pageCacheSize
 {
-    return [core(self)->webView() usesPageCache] ? WebCore::PageCache::singleton().maxSize() : 0;
+    return [core(self)->webView() usesPageCache] ? WebCore::BackForwardCache::singleton().maxSize() : 0;
 }
 
 - (int)backListCount
diff --git a/Source/WebKitLegacy/mac/History/WebHistoryItem.mm b/Source/WebKitLegacy/mac/History/WebHistoryItem.mm
index c7c027b..a8d3bc2 100644
--- a/Source/WebKitLegacy/mac/History/WebHistoryItem.mm
+++ b/Source/WebKitLegacy/mac/History/WebHistoryItem.mm
@@ -43,9 +43,9 @@
 #import "WebPluginController.h"
 #import "WebTypesInternal.h"
 #import <JavaScriptCore/InitializeThreading.h>
+#import <WebCore/BackForwardCache.h>
 #import <WebCore/HistoryItem.h>
 #import <WebCore/Image.h>
-#import <WebCore/PageCache.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <wtf/Assertions.h>
@@ -598,9 +598,9 @@
 
 #endif // PLATFORM(IOS_FAMILY)
 
-- (BOOL)_isInPageCache
+- (BOOL)_isInBackForwardCache
 {
-    return core(_private)->isInPageCache();
+    return core(_private)->isInBackForwardCache();
 }
 
 - (BOOL)_hasCachedPageExpired
diff --git a/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h b/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h
index 9d0aa8d..ba5d55c 100644
--- a/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h
+++ b/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h
@@ -77,7 +77,7 @@
 - (void)_setScrollPoint:(CGPoint)scrollPoint;
 #endif
 
-- (BOOL)_isInPageCache;
+- (BOOL)_isInBackForwardCache;
 - (BOOL)_hasCachedPageExpired;
 
 @end
diff --git a/Source/WebKitLegacy/mac/Misc/WebCache.mm b/Source/WebKitLegacy/mac/Misc/WebCache.mm
index b50b21c..5137e41 100644
--- a/Source/WebKitLegacy/mac/Misc/WebCache.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebCache.mm
@@ -46,9 +46,9 @@
 #if PLATFORM(IOS_FAMILY)
 #import "MemoryMeasure.h"
 #import "WebFrameInternal.h"
+#import <WebCore/BackForwardCache.h>
 #import <WebCore/CachedImage.h>
 #import <WebCore/Frame.h>
-#import <WebCore/PageCache.h>
 #import <WebCore/WebCoreThreadRun.h>
 #endif
 
diff --git a/Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm b/Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm
index c8684c4..4666653 100644
--- a/Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm
@@ -33,6 +33,7 @@
 #import "WebFrameInternal.h"
 #import <JavaScriptCore/JSLock.h>
 #import <JavaScriptCore/MemoryStatistics.h>
+#import <WebCore/BackForwardCache.h>
 #import <WebCore/CommonVM.h>
 #import <WebCore/FontCache.h>
 #import <WebCore/Frame.h>
@@ -40,7 +41,6 @@
 #import <WebCore/GlyphPage.h>
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/JSDOMWindow.h>
-#import <WebCore/PageCache.h>
 #import <WebCore/PageConsoleClient.h>
 #import <WebCore/PrintContext.h>
 #import <WebCore/RenderTreeAsText.h>
@@ -224,12 +224,12 @@
 
 + (int)cachedPageCount
 {
-    return PageCache::singleton().pageCount();
+    return BackForwardCache::singleton().pageCount();
 }
 
 + (int)cachedFrameCount
 {
-    return PageCache::singleton().frameCount();
+    return BackForwardCache::singleton().frameCount();
 }
 
 // Deprecated
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
index c21bdcf..b4ee9e6 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -69,7 +69,7 @@
     void makeRepresentation(WebCore::DocumentLoader*) final;
     bool hasHTMLView() const final;
 #if PLATFORM(IOS_FAMILY)
-    bool forceLayoutOnRestoreFromPageCache() final;
+    bool forceLayoutOnRestoreFromBackForwardCache() final;
 #endif
     void forceLayoutForNonHTML() final;
 
@@ -184,7 +184,7 @@
 #endif
     void transitionToCommittedForNewPage() final;
 
-    void didRestoreFromPageCache() final;
+    void didRestoreFromBackForwardCache() final;
 
     void dispatchDidBecomeFrameset(bool) final;
 
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 2e35375..a3e9833 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -239,10 +239,10 @@
 }
 
 #if PLATFORM(IOS_FAMILY)
-bool WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache()
+bool WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache()
 {
     NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
-    // This gets called to lay out a page restored from the page cache.
+    // This gets called to lay out a page restored from the back/forward cache.
     // To work around timing problems with UIKit, restore fixed 
     // layout settings here.
     WebView* webView = getWebView(m_webFrame.get());
@@ -1495,7 +1495,7 @@
     }
 }
 
-void WebFrameLoaderClient::didRestoreFromPageCache()
+void WebFrameLoaderClient::didRestoreFromBackForwardCache()
 {
 #if PLATFORM(IOS_FAMILY)
     WebView *webView = getWebView(m_webFrame.get());
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
index 0844b39..d57dcc5 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.mm
@@ -30,7 +30,7 @@
 #import "WebHistoryDelegate.h"
 #import "WebHistoryInternal.h"
 #import "WebViewInternal.h"
-#import <WebCore/PageCache.h>
+#import <WebCore/BackForwardCache.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
 
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
index bc774d7..c2efb77 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -3342,7 +3342,7 @@
     if (!coreFrame)
         return;
     if (coreFrame->document()) {
-        if (coreFrame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
+        if (coreFrame->document()->backForwardCacheState() != WebCore::Document::NotInBackForwardCache)
             return;
         coreFrame->document()->updateStyleIfNeeded();
     }
@@ -3854,7 +3854,7 @@
     if (!flag)
         return; // There's no way to say you don't need a layout.
     if (auto* frame = core([self _frame])) {
-        if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
+        if (frame->document() && frame->document()->backForwardCacheState() != WebCore::Document::NotInBackForwardCache)
             return;
         if (auto* view = frame->view())
             view->setNeedsLayoutAfterViewConfigurationChange();
@@ -3867,7 +3867,7 @@
     if (!flag)
         return; // There's no way to say you don't need a style recalc.
     if (auto* frame = core([self _frame])) {
-        if (frame->document() && frame->document()->pageCacheState() != WebCore::Document::NotInPageCache)
+        if (frame->document() && frame->document()->backForwardCacheState() != WebCore::Document::NotInBackForwardCache)
             return;
         frame->document()->scheduleFullStyleRebuild();
     }
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
index 4886c84..4eea31d 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -130,6 +130,7 @@
 #import <JavaScriptCore/JSValueRef.h>
 #import <WebCore/AlternativeTextUIController.h>
 #import <WebCore/ApplicationCacheStorage.h>
+#import <WebCore/BackForwardCache.h>
 #import <WebCore/BackForwardController.h>
 #import <WebCore/CSSAnimationController.h>
 #import <WebCore/CacheStorageProvider.h>
@@ -185,7 +186,6 @@
 #import <WebCore/Notification.h>
 #import <WebCore/NotificationController.h>
 #import <WebCore/Page.h>
-#import <WebCore/PageCache.h>
 #import <WebCore/PageConfiguration.h>
 #import <WebCore/PageGroup.h>
 #import <WebCore/PathUtilities.h>
@@ -2367,8 +2367,8 @@
 
     _private->group->removeWebView(self);
 
-    // Deleteing the WebCore::Page will clear the page cache so we call destroy on
-    // all the plug-ins in the page cache to break any retain cycles.
+    // Deleteing the WebCore::Page will clear the back/forward cache so we call destroy on
+    // all the plug-ins in the back/forward cache to break any retain cycles.
     // See comment in HistoryItem::releaseAllPendingPageCaches() for more information.
     auto* page = _private->page;
     _private->page = nullptr;
@@ -2911,8 +2911,8 @@
     settings.setEditableLinkBehavior(core([preferences editableLinkBehavior]));
     settings.setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior]));
     settings.setDOMPasteAllowed([preferences isDOMPasteAllowed]);
-    settings.setUsesPageCache([self usesPageCache]);
-    settings.setPageCacheSupportsPlugins([preferences pageCacheSupportsPlugins]);
+    settings.setUsesBackForwardCache([self usesPageCache]);
+    settings.setBackForwardCacheSupportsPlugins([preferences pageCacheSupportsPlugins]);
     settings.setBackForwardCacheExpirationInterval(Seconds { [preferences _backForwardCacheExpirationInterval] });
 
     settings.setDeveloperExtrasEnabled([preferences developerExtrasEnabled]);
@@ -4359,7 +4359,7 @@
 #endif // ENABLE(TOUCH_EVENTS)
 
 // For backwards compatibility with the WebBackForwardList API, we honor both
-// a per-WebView and a per-preferences setting for whether to use the page cache.
+// a per-WebView and a per-preferences setting for whether to use the back/forward cache.
 
 - (BOOL)usesPageCache
 {
@@ -8797,7 +8797,7 @@
 
     switch (cacheModel) {
     case WebCacheModelDocumentViewer: {
-        // Page cache capacity (in pages)
+        // Back/forward cache capacity (in pages)
         pageCacheSize = 0;
 
         // Object cache capacities (in bytes)
@@ -8833,7 +8833,7 @@
         break;
     }
     case WebCacheModelDocumentBrowser: {
-        // Page cache capacity (in pages)
+        // Back/forward cache capacity (in pages)
         if (memSize >= 512)
             pageCacheSize = 2;
         else if (memSize >= 256)
@@ -8884,7 +8884,7 @@
         break;
     }
     case WebCacheModelPrimaryWebBrowser: {
-        // Page cache capacity (in pages)
+        // Back/forward cache capacity (in pages)
         if (memSize >= 512)
             pageCacheSize = 2;
         else if (memSize >= 256)
@@ -8967,7 +8967,7 @@
     memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
 
-    auto& pageCache = WebCore::PageCache::singleton();
+    auto& pageCache = WebCore::BackForwardCache::singleton();
     pageCache.setMaxSize(pageCacheSize);
 #if PLATFORM(IOS_FAMILY)
     nsurlCacheMemoryCapacity = std::max(nsurlCacheMemoryCapacity, [nsurlCache memoryCapacity]);
diff --git a/Source/WebKitLegacy/win/BackForwardList.cpp b/Source/WebKitLegacy/win/BackForwardList.cpp
index daea161..b20148f 100644
--- a/Source/WebKitLegacy/win/BackForwardList.cpp
+++ b/Source/WebKitLegacy/win/BackForwardList.cpp
@@ -27,12 +27,12 @@
 #include "WebKitDLL.h"
 #include "BackForwardList.h"
 
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/Frame.h>
 #include <WebCore/FrameLoader.h>
 #include <WebCore/FrameLoaderClient.h>
 #include <WebCore/HistoryItem.h>
 #include <WebCore/Logging.h>
-#include <WebCore/PageCache.h>
 #include <WebCore/SerializedScriptValue.h>
 
 static const unsigned DefaultCapacity = 100;
@@ -64,7 +64,7 @@
         while (m_entries.size() > targetSize) {
             Ref<HistoryItem> item = m_entries.takeLast();
             m_entryHash.remove(item.ptr());
-            PageCache::singleton().remove(item);
+            BackForwardCache::singleton().remove(item);
         }
     }
 
@@ -74,7 +74,7 @@
         Ref<HistoryItem> item = WTFMove(m_entries[0]);
         m_entries.remove(0);
         m_entryHash.remove(item.ptr());
-        PageCache::singleton().remove(item);
+        BackForwardCache::singleton().remove(item);
         --m_current;
     }
 
@@ -170,7 +170,7 @@
     while (size < static_cast<int>(m_entries.size())) {
         Ref<HistoryItem> item = m_entries.takeLast();
         m_entryHash.remove(item.ptr());
-        PageCache::singleton().remove(item);
+        BackForwardCache::singleton().remove(item);
     }
 
     if (!size)
diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog
index 3497e48..362dd1e 100644
--- a/Source/WebKitLegacy/win/ChangeLog
+++ b/Source/WebKitLegacy/win/ChangeLog
@@ -1,3 +1,28 @@
+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.
+
+        * 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):
+
 2019-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
diff --git a/Source/WebKitLegacy/win/WebCoreStatistics.cpp b/Source/WebKitLegacy/win/WebCoreStatistics.cpp
index 9120acc..9c96a67 100644
--- a/Source/WebKitLegacy/win/WebCoreStatistics.cpp
+++ b/Source/WebKitLegacy/win/WebCoreStatistics.cpp
@@ -29,13 +29,13 @@
 #include "COMPropertyBag.h"
 #include <JavaScriptCore/JSLock.h>
 #include <JavaScriptCore/MemoryStatistics.h>
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/CommonVM.h>
 #include <WebCore/DOMWindow.h>
 #include <WebCore/FontCache.h>
 #include <WebCore/GCController.h>
 #include <WebCore/GlyphPage.h>
 #include <WebCore/JSDOMWindow.h>
-#include <WebCore/PageCache.h>
 #include <WebCore/PageConsoleClient.h>
 #include <WebCore/RenderView.h>
 #include <WebCore/SharedBuffer.h>
@@ -320,7 +320,7 @@
     if (!count)
         return E_POINTER;
 
-    *count = PageCache::singleton().pageCount();
+    *count = BackForwardCache::singleton().pageCount();
     return S_OK;
 }
 
@@ -329,6 +329,6 @@
     if (!count)
         return E_POINTER;
 
-    *count = PageCache::singleton().frameCount();
+    *count = BackForwardCache::singleton().frameCount();
     return S_OK;
 }
diff --git a/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 26211fa..ab0f1d5 100644
--- a/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -992,7 +992,7 @@
     core(m_webFrame)->createView(enclosingIntRect(logicalFrame).size(), backgroundColor, /* fixedLayoutSize */ { }, /* fixedVisibleContentRect */ { });
 }
 
-void WebFrameLoaderClient::didRestoreFromPageCache()
+void WebFrameLoaderClient::didRestoreFromBackForwardCache()
 {
 }
 
diff --git a/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
index 856f525..676a8d6 100644
--- a/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -176,7 +176,7 @@
     void didFinishLoad() override;
     void prepareForDataSourceReplacement() override;
 
-    void didRestoreFromPageCache() override;
+    void didRestoreFromBackForwardCache() override;
 
     void dispatchDidBecomeFrameset(bool) override;
 
diff --git a/Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.cpp b/Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.cpp
index 2a5e105..200a63c 100644
--- a/Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.cpp
+++ b/Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.cpp
@@ -27,7 +27,7 @@
 
 #include "WebHistory.h"
 #include "WebView.h"
-#include <WebCore/PageCache.h>
+#include <WebCore/BackForwardCache.h>
 #include <wtf/NeverDestroyed.h>
 
 using namespace WebCore;
diff --git a/Source/WebKitLegacy/win/WebFrame.cpp b/Source/WebKitLegacy/win/WebFrame.cpp
index 1a6a73b..a87260f 100644
--- a/Source/WebKitLegacy/win/WebFrame.cpp
+++ b/Source/WebKitLegacy/win/WebFrame.cpp
@@ -2119,7 +2119,7 @@
     else if (!m_accessible || m_accessible->document() != currentDocument) {
         // Either we've never had a wrapper for this frame's top-level Document,
         // the Document renderer was destroyed and its wrapper was detached, or
-        // the previous Document is in the page cache, and the current document
+        // the previous Document is in the back/forward cache, and the current document
         // needs to be wrapped.
         m_accessible = new AccessibleDocument(currentDocument, webView()->viewWindow());
     }
diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp
index 790c1a1..46f4f45 100644
--- a/Source/WebKitLegacy/win/WebView.cpp
+++ b/Source/WebKitLegacy/win/WebView.cpp
@@ -79,6 +79,7 @@
 #include <WebCore/AXObjectCache.h>
 #include <WebCore/ApplicationCacheStorage.h>
 #include <WebCore/BString.h>
+#include <WebCore/BackForwardCache.h>
 #include <WebCore/BackForwardController.h>
 #include <WebCore/BitmapInfo.h>
 #include <WebCore/CacheStorageProvider.h>
@@ -131,8 +132,6 @@
 #include <WebCore/MemoryRelease.h>
 #include <WebCore/NetworkStorageSession.h>
 #include <WebCore/NotImplemented.h>
-#include <WebCore/Page.h>
-#include <WebCore/PageCache.h>
 #include <WebCore/PageConfiguration.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/PathUtilities.h>
@@ -540,13 +539,13 @@
     unsigned cacheMaxDeadCapacity = 0;
     Seconds deadDecodedDataDeletionInterval;
 
-    unsigned pageCacheSize = 0;
+    unsigned backForwardCacheSize = 0;
 
 
     switch (cacheModel) {
     case WebCacheModelDocumentViewer: {
-        // Page cache capacity (in pages)
-        pageCacheSize = 0;
+        // Back/forward cache capacity (in pages)
+        backForwardCacheSize = 0;
 
         // Object cache capacities (in bytes)
         if (memSize >= 2048)
@@ -571,15 +570,15 @@
         break;
     }
     case WebCacheModelDocumentBrowser: {
-        // Page cache capacity (in pages)
+        // Back/forward cache capacity (in pages)
         if (memSize >= 1024)
-            pageCacheSize = 3;
+            backForwardCacheSize = 3;
         else if (memSize >= 512)
-            pageCacheSize = 2;
+            backForwardCacheSize = 2;
         else if (memSize >= 256)
-            pageCacheSize = 1;
+            backForwardCacheSize = 1;
         else
-            pageCacheSize = 0;
+            backForwardCacheSize = 0;
 
         // Object cache capacities (in bytes)
         if (memSize >= 2048)
@@ -617,18 +616,18 @@
         break;
     }
     case WebCacheModelPrimaryWebBrowser: {
-        // Page cache capacity (in pages)
+        // Back/forward cache capacity (in pages)
         // (Research indicates that value / page drops substantially after 3 pages.)
         if (memSize >= 2048)
-            pageCacheSize = 5;
+            backForwardCacheSize = 5;
         else if (memSize >= 1024)
-            pageCacheSize = 4;
+            backForwardCacheSize = 4;
         else if (memSize >= 512)
-            pageCacheSize = 3;
+            backForwardCacheSize = 3;
         else if (memSize >= 256)
-            pageCacheSize = 2;
+            backForwardCacheSize = 2;
         else
-            pageCacheSize = 1;
+            backForwardCacheSize = 1;
 
         // Object cache capacities (in bytes)
         // (Testing indicates that value / MB depends heavily on content and
@@ -686,7 +685,7 @@
     auto& memoryCache = MemoryCache::singleton();
     memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
-    PageCache::singleton().setMaxSize(pageCacheSize);
+    BackForwardCache::singleton().setMaxSize(backForwardCacheSize);
 
 #if USE(CFURLCONNECTION)
     // Don't shrink a big disk cache, since that would cause churn.
@@ -5385,7 +5384,7 @@
     hr = preferences->usesPageCache(&enabled);
     if (FAILED(hr))
         return hr;
-    settings.setUsesPageCache(!!enabled);
+    settings.setUsesBackForwardCache(!!enabled);
 
     hr = preferences->isDOMPasteAllowed(&enabled);
     if (FAILED(hr))
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 0426f42..a7cefc8 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,51 @@
+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.
+
+        * 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):
+
 2019-10-16  Jonathan Bedard  <jbedard@apple.com>
 
         Python 3: Add support in webkitpy.common.net.bugzilla
diff --git a/Tools/DumpRenderTree/TestOptions.cpp b/Tools/DumpRenderTree/TestOptions.cpp
index 1ff849e..556eec2 100644
--- a/Tools/DumpRenderTree/TestOptions.cpp
+++ b/Tools/DumpRenderTree/TestOptions.cpp
@@ -81,8 +81,8 @@
             enableIntersectionObserver = parseBooleanTestHeaderValue(value);
         else if (key == "useEphemeralSession")
             useEphemeralSession = parseBooleanTestHeaderValue(value);
-        else if (key == "enablePageCache")
-            enablePageCache = parseBooleanTestHeaderValue(value);
+        else if (key == "enableBackForwardCache")
+            enableBackForwardCache = parseBooleanTestHeaderValue(value);
         else if (key == "enableMenuItemElement")
             enableMenuItemElement = parseBooleanTestHeaderValue(value);
         else if (key == "enableKeygenElement")
diff --git a/Tools/DumpRenderTree/TestOptions.h b/Tools/DumpRenderTree/TestOptions.h
index 0969b18..e5335e8 100644
--- a/Tools/DumpRenderTree/TestOptions.h
+++ b/Tools/DumpRenderTree/TestOptions.h
@@ -33,7 +33,7 @@
     bool useAcceleratedDrawing { false };
     bool enableIntersectionObserver { false };
     bool useEphemeralSession { false };
-    bool enablePageCache { false };
+    bool enableBackForwardCache { false };
     bool enableMenuItemElement { false };
     bool enableKeygenElement { false };
     bool enableModernMediaControls { true };
diff --git a/Tools/DumpRenderTree/TestRunner.cpp b/Tools/DumpRenderTree/TestRunner.cpp
index 147eb31..3810068 100644
--- a/Tools/DumpRenderTree/TestRunner.cpp
+++ b/Tools/DumpRenderTree/TestRunner.cpp
@@ -583,8 +583,8 @@
     auto value = adopt(JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
 
-    // Should use `<!-- webkit-test-runner [ enablePageCache=true ] -->` instead.
-    RELEASE_ASSERT(!JSStringIsEqualToUTF8CString(key.get(), "WebKitUsesPageCachePreferenceKey"));
+    // Should use `<!-- webkit-test-runner [ enableBackForwardCache=true ] -->` instead.
+    RELEASE_ASSERT(!JSStringIsEqualToUTF8CString(key.get(), "WebKitUsesBackForwardCachePreferenceKey"));
 
     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->overridePreference(key.get(), value.get());
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index ecfa487..1880bbe 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -1030,7 +1030,7 @@
     preferences.requestIdleCallbackEnabled = options.enableRequestIdleCallback;
     preferences.asyncClipboardAPIEnabled = options.enableAsyncClipboardAPI;
     preferences.privateBrowsingEnabled = options.useEphemeralSession;
-    preferences.usesPageCache = options.enablePageCache;
+    preferences.usesPageCache = options.enableBackForwardCache;
 }
 
 // Called once on DumpRenderTree startup.
diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
index 688486a..24d8ad0 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -914,7 +914,7 @@
     prefsPrivate->setRequestIdleCallbackEnabled(options.enableRequestIdleCallback);
     prefsPrivate->setAsyncClipboardAPIEnabled(options.enableAsyncClipboardAPI);
     preferences->setPrivateBrowsingEnabled(options.useEphemeralSession);
-    preferences->setUsesPageCache(options.enablePageCache);
+    preferences->setUsesPageCache(options.enableBackForwardCache);
 }
 
 static String applicationId()
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp
index 2d0435c..55aa37e 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp
@@ -95,7 +95,7 @@
     WKContextSetInjectedBundleClient(context.get(), &injectedBundleClient.base);
     
     // The default cache model has a capacity of 0, so it is necessary to switch to a cache
-    // model that actually allows for a page cache.
+    // model that actually allows for a back/forward cache.
     WKContextSetCacheModel(context.get(), kWKCacheModelDocumentBrowser);
 
     PlatformWebView webView(context.get(), pageGroup.get());
@@ -120,7 +120,7 @@
     Util::run(&finished);
     finished = false;
 
-    // Make sure the 2 disconnected extensions in the page cache and the 4 active extensions are all removed.
+    // Make sure the 2 disconnected extensions in the back/forward cache and the 4 active extensions are all removed.
     WKPageClose(webView.page());
 
     Util::run(&finished);
@@ -150,7 +150,7 @@
     WKContextSetInjectedBundleClient(context.get(), &injectedBundleClient.base);
 
     // The default cache model has a capacity of 0, so it is necessary to switch to a cache
-    // model that actually allows for a page cache.
+    // model that actually allows for a back/forward cache.
     WKContextSetCacheModel(context.get(), kWKCacheModelDocumentBrowser);
 
     PlatformWebView webView(context.get(), pageGroup.get());
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp
index bc50b5e..e1696d5 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp
@@ -95,7 +95,7 @@
 
     WKContextSetInjectedBundleClient(context.get(), &injectedBundleClient.base);
 
-    // Disable the page cache.
+    // Disable the back/forward cache.
     WKContextSetCacheModel(context.get(), kWKCacheModelDocumentViewer);
 
     PlatformWebView webView(context.get(), pageGroup.get());
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
index 40b77f1..dc23e67 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp
@@ -235,13 +235,13 @@
 
 void DOMWindowExtensionNoCache::willDisconnectDOMWindowExtensionFromGlobalObject(WKBundleDOMWindowExtensionRef extension)
 {
-    // No items should be going into a 0-capacity page cache.
+    // No items should be going into a 0-capacity back/forward cache.
     ASSERT_NOT_REACHED();
 }
 
 void DOMWindowExtensionNoCache::didReconnectDOMWindowExtensionToGlobalObject(WKBundleDOMWindowExtensionRef)
 {
-    // No items should be coming out of a 0-capacity page cache.
+    // No items should be coming out of a 0-capacity back/forward cache.
     ASSERT_NOT_REACHED();
 }
 
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp b/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp
index 158c640..fe9f543 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp
@@ -70,9 +70,9 @@
     WKPageSetPageInjectedBundleClient(page, &injectedBundleClient.base);
 }
 
-TEST(WebKit, DidRemoveFrameFromHiearchyInPageCache)
+TEST(WebKit, DidRemoveFrameFromHiearchyInBackForwardCache)
 {
-    WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("DidRemoveFrameFromHiearchyInPageCache"));
+    WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("DidRemoveFrameFromHiearchyInBackForwardCache"));
     // Enable the page cache so we can test the WKBundlePageDidRemoveFrameFromHierarchyCallback API
     WKContextSetCacheModel(context.get(), kWKCacheModelPrimaryWebBrowser);
 
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp
index 991de85..26b524e 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp
@@ -35,14 +35,14 @@
 
 namespace TestWebKitAPI {
 
-class DidRemoveFrameFromHiearchyInPageCacheTest : public InjectedBundleTest {
+class DidRemoveFrameFromHiearchyInBackForwardCacheTest : public InjectedBundleTest {
 public:
-    DidRemoveFrameFromHiearchyInPageCacheTest(const std::string& identifier);
+    DidRemoveFrameFromHiearchyInBackForwardCacheTest(const std::string& identifier);
 
     virtual void didCreatePage(WKBundleRef, WKBundlePageRef);
 };
 
-static InjectedBundleTest::Register<DidRemoveFrameFromHiearchyInPageCacheTest> registrar("DidRemoveFrameFromHiearchyInPageCache");
+static InjectedBundleTest::Register<DidRemoveFrameFromHiearchyInBackForwardCacheTest> registrar("DidRemoveFrameFromHiearchyInBackForwardCache");
 
 static unsigned didRemoveFrameFromHierarchyCount;
 
@@ -56,12 +56,12 @@
     WKBundlePagePostMessage(page, message.get(), message.get());
 }
 
-DidRemoveFrameFromHiearchyInPageCacheTest::DidRemoveFrameFromHiearchyInPageCacheTest(const std::string& identifier)
+DidRemoveFrameFromHiearchyInBackForwardCacheTest::DidRemoveFrameFromHiearchyInBackForwardCacheTest(const std::string& identifier)
     : InjectedBundleTest(identifier)
 {
 }
 
-void DidRemoveFrameFromHiearchyInPageCacheTest::didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
+void DidRemoveFrameFromHiearchyInBackForwardCacheTest::didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
 {
     WKBundlePageLoaderClientV8 pageLoaderClient;
     memset(&pageLoaderClient, 0, sizeof(pageLoaderClient));
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp b/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp
index 5646bd8..1a6cbb1 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp
@@ -76,7 +76,7 @@
 {
     WKRetainPtr<WKContextRef> context = adoptWK(WKContextCreateWithConfiguration(nullptr));
 
-    WKContextSetCacheModel(context.get(), kWKCacheModelPrimaryWebBrowser); // Enables the Page Cache.
+    WKContextSetCacheModel(context.get(), kWKCacheModelPrimaryWebBrowser); // Enables the back/forward cache.
 
     PlatformWebView webView(context.get());
 
diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
index ee40378..8d24bbb 100644
--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
@@ -2484,7 +2484,7 @@
 static const char* failsToEnterPageCacheTestBytes = R"PSONRESOURCE(
 <body>
 <script>
-// Pages with dedicated workers do not go into page cache.
+// Pages with dedicated workers do not go into back/forward cache.
 var myWorker = new Worker('worker.js');
 </script>
 </body>
@@ -3699,7 +3699,7 @@
     }
 }
 
-// Disabling the page cache explicitly is (for some reason) not available on iOS.
+// Disabling the back/forward cache explicitly is (for some reason) not available on iOS.
 #if !TARGET_OS_IPHONE
 static const char* loadUnloadBytes = R"PSONRESOURCE(
 <script>
@@ -5782,7 +5782,7 @@
     auto pid3 = [createdWebView _webProcessIdentifier];
     EXPECT_NE(pid1, pid3); // Should have process-swapped.
 
-    // Navigate back to the suspended page (should use the page cache).
+    // Navigate back to the suspended page (should use the back/forward cache).
     [createdWebView goBack];
     TestWebKitAPI::Util::run(&receivedMessage);
     receivedMessage = false;
@@ -5819,7 +5819,7 @@
 </head>
 <body>
 <script>
-// Pages with dedicated workers do not go into page cache.
+// Pages with dedicated workers do not go into back/forward cache.
 var myWorker = new Worker('worker.js');
 </script>
 <a id="testLink" href="pson://www.apple.com/main.html">Test</a>
@@ -5927,7 +5927,7 @@
 <body>
 <script>
 let wasSubframeLoaded = false;
-// Pages with dedicated workers do not go into page cache.
+// Pages with dedicated workers do not go into back/forward cache.
 var myWorker = new Worker('worker.js');
 </script>
 <iframe src="blockme.html"></iframe>
diff --git a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp
index 3a40c29..8e9944a 100644
--- a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp
@@ -276,7 +276,7 @@
     webkit_settings_set_enable_site_specific_quirks(settings, FALSE);
     g_assert_false(webkit_settings_get_enable_site_specific_quirks(settings));
 
-    // By default, page cache is enabled.
+    // By default, the back/forward cache is enabled.
     g_assert_true(webkit_settings_get_enable_page_cache(settings));
     webkit_settings_set_enable_page_cache(settings, FALSE);
     g_assert_false(webkit_settings_get_enable_page_cache(settings));
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
index b4f0b4b..ce32137 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
@@ -860,8 +860,8 @@
 void TestRunner::overridePreference(JSStringRef preference, JSStringRef value)
 {
     auto& injectedBundle = InjectedBundle::singleton();
-    // Should use `<!-- webkit-test-runner [ enablePageCache=true ] -->` instead.
-    RELEASE_ASSERT(!JSStringIsEqualToUTF8CString(preference, "WebKitUsesPageCachePreferenceKey"));
+    // Should use `<!-- webkit-test-runner [ enableBackForwardCache=true ] -->` instead.
+    RELEASE_ASSERT(!JSStringIsEqualToUTF8CString(preference, "WebKitUsesBackForwardCachePreferenceKey"));
 
     // FIXME: handle non-boolean preferences.
     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), toWK(preference).get(), toBool(value));
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index ea9c6a5..7545fbf 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -846,7 +846,7 @@
     WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(preferences, options.allowCrossOriginSubresourcesToAskForCredentials);
     WKPreferencesSetColorFilterEnabled(preferences, options.enableColorFilter);
     WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode(preferences, options.punchOutWhiteBackgroundsInDarkMode);
-    WKPreferencesSetPageCacheEnabled(preferences, options.enablePageCache);
+    WKPreferencesSetPageCacheEnabled(preferences, options.enableBackForwardCache);
     WKPreferencesSetLazyImageLoadingEnabled(preferences, options.enableLazyImageLoading);
 
     static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
@@ -1429,8 +1429,8 @@
             testOptions.contentMode = { value.c_str() };
         else if (key == "enableAppNap")
             testOptions.enableAppNap = parseBooleanTestHeaderValue(value);
-        else if (key == "enablePageCache")
-            testOptions.enablePageCache = parseBooleanTestHeaderValue(value);
+        else if (key == "enableBackForwardCache")
+            testOptions.enableBackForwardCache = parseBooleanTestHeaderValue(value);
         else if (key == "enableLazyImageLoading")
             testOptions.enableLazyImageLoading = parseBooleanTestHeaderValue(value);
         else if (key == "allowsLinkPreview")
diff --git a/Tools/WebKitTestRunner/TestOptions.h b/Tools/WebKitTestRunner/TestOptions.h
index cb6a5d5..515d5bf 100644
--- a/Tools/WebKitTestRunner/TestOptions.h
+++ b/Tools/WebKitTestRunner/TestOptions.h
@@ -94,7 +94,7 @@
     bool shouldHandleRunOpenPanel { true };
     bool shouldPresentPopovers { true };
     bool enableAppNap { false };
-    bool enablePageCache { false };
+    bool enableBackForwardCache { false };
     bool enableLazyImageLoading { false };
     bool allowsLinkPreview { true };
 
@@ -154,7 +154,7 @@
             || contentInsetTop != options.contentInsetTop
             || contentMode != options.contentMode
             || enableAppNap != options.enableAppNap
-            || enablePageCache != options.enablePageCache
+            || enableBackForwardCache != options.enableBackForwardCache
             || enableLazyImageLoading != options.enableLazyImageLoading
             || allowsLinkPreview != options.allowsLinkPreview)
             return false;
diff --git a/Tools/lldb/lldb_webkit.py b/Tools/lldb/lldb_webkit.py
index f5ae2c1..d580899 100644
--- a/Tools/lldb/lldb_webkit.py
+++ b/Tools/lldb/lldb_webkit.py
@@ -239,19 +239,19 @@
     if document:
         origin = document.origin()
         url = document.url()
-        pageCacheState = document.page_cache_state()
+        backForwardCacheState = document.page_cache_state()
     else:
         origin = ''
         url = ''
-        pageCacheState = ''
-    return '{ origin = %s, url = %s, isMainFrame = %d, pageCacheState = %s }' % (origin, url, provider.is_main_frame(), pageCacheState)
+        backForwardCacheState = ''
+    return '{ origin = %s, url = %s, isMainFrame = %d, backForwardCacheState = %s }' % (origin, url, provider.is_main_frame(), backForwardCacheState)
 
 
 def WebCoreDocument_SummaryProvider(valobj, dict):
     provider = WebCoreDocumentProvider(valobj, dict)
     frame = provider.frame()
     in_main_frame = '%d' % frame.is_main_frame() if frame else 'Detached'
-    return '{ origin = %s, url = %s, inMainFrame = %s, pageCacheState = %s }' % (provider.origin(), provider.url(), in_main_frame, provider.page_cache_state())
+    return '{ origin = %s, url = %s, inMainFrame = %s, backForwardCacheState = %s }' % (provider.origin(), provider.url(), in_main_frame, provider.page_cache_state())
 
 
 def btjs(debugger, command, result, internal_dict):
@@ -723,7 +723,7 @@
         return WebCoreSecurityOriginProvider(security_origin_ptr, dict()).to_string()
 
     def page_cache_state(self):
-        return self.valobj.GetChildMemberWithName('m_pageCacheState').GetValue()
+        return self.valobj.GetChildMemberWithName('m_backForwardCacheState').GetValue()
 
     def frame(self):
         frame_ptr = self.valobj.GetChildMemberWithName('m_frame')