-
weinig@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=51546 Reviewed by Darin Adler. WebCore: - Add client functions to notify that a frame has been added or removed from the page cache. * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): (WebCore::CachedFrame::CachedFrame): * history/CachedFrame.h: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::didSaveToPageCache): (WebCore::EmptyFrameLoaderClient::didRestoreFromPageCache): * loader/FrameLoaderClient.h: WebKit/chromium: - Add client functions to notify that a frame has been added or removed from the page cache. * src/FrameLoaderClientImpl.cpp: (WebKit::WebFrameLoaderClientImpl::didSaveToPageCache): (WebKit::WebFrameLoaderClientImpl::didRestoreFromPageCache): * src/FrameLoaderClientImpl.h: WebKit/efl: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/FrameLoaderClientEfl.cpp: (WebCore::FrameLoaderClientEfl::didSaveToPageCache): (WebCore::FrameLoaderClientEfl::didRestoreFromPageCache): * WebCoreSupport/FrameLoaderClientEfl.h: WebKit/gtk: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::didSaveToPageCache): (WebKit::FrameLoaderClient::didRestoreFromPageCache): * WebCoreSupport/FrameLoaderClientGtk.h: WebKit/haiku: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/FrameLoaderClientHaiku.cpp: (WebCore::FrameLoaderClientHaiku::didSaveToPageCache): (WebCore::FrameLoaderClientHaiku::didRestoreFromPageCache): * WebCoreSupport/FrameLoaderClientHaiku.h: WebKit/mac: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::didSaveToPageCache): (WebFrameLoaderClient::didRestoreFromPageCache): WebKit/qt: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::didSaveToPageCache): (WebCore::FrameLoaderClientQt::didRestoreFromPageCache): * WebCoreSupport/FrameLoaderClientQt.h: WebKit/win: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::didSaveToPageCache): (WebFrameLoaderClient::didRestoreFromPageCache): * WebCoreSupport/WebFrameLoaderClient.h: WebKit/wince: - Add client functions to notify that a frame has been added or removed from the page cache. * WebCoreSupport/FrameLoaderClientWinCE.cpp: (WebKit::FrameLoaderClientWinCE::didSaveToPageCache): (WebKit::FrameLoaderClientWinCE::didRestoreFromPageCache): * WebCoreSupport/FrameLoaderClientWinCE.h: WebKit/wx: - Add client functions to notify that a frame has been added or removed from the page cache. * WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::didSaveToPageCache): (WebCore::FrameLoaderClientWx::didRestoreFromPageCache): * WebKitSupport/FrameLoaderClientWx.h: WebKit2: * UIProcess/API/C/WKFrame.cpp: (WKFrameCopyChildFrames): * UIProcess/API/C/WKFrame.h: Add API to get the child frames of a frame. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): (WebKit::WebFrameProxy::disconnect): (WebKit::WebFrameProxy::appendChild): (WebKit::WebFrameProxy::removeChild): (WebKit::WebFrameProxy::isDescendantOf): (WebKit::WebFrameProxy::dumpFrameTree): (WebKit::WebFrameProxy::didRemoveFromHierarchy): (WebKit::WebFrameProxy::childFrames): * UIProcess/WebFrameProxy.h: (WebKit::WebFrameProxy::parentFrame): Add getter. (WebKit::WebFrameProxy::nextSibling): Add getter. (WebKit::WebFrameProxy::previousSibling): Add getter. (WebKit::WebFrameProxy::firstChild): Add getter. (WebKit::WebFrameProxy::lastChild): Add getter. Make frames keep track of their subframes. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCreateSubframe): Use the now passed parentID to insert the frame into the hierarchy (WebKit::WebPageProxy::didSaveFrameToPageCache): When a frame is added to the page cache, remove it from the hierarchy. (WebKit::WebPageProxy::didRestoreFrameFromPageCache): When a frame is restored from the page cache, add it back to the hierarchy. (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Detached frames should also be removed from the hierarchy. * UIProcess/WebPageProxy.h: Add new declarations for didSaveFrameToPageCache and didRestoreFrameFromPageCache. * UIProcess/WebPageProxy.messages.in: Add messages for DidSaveFrameToPageCache and DidRestoreFrameFromPageCache. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Remove notImplemented, there is no work we need to do here. (WebKit::WebFrameLoaderClient::didSaveToPageCache): (WebKit::WebFrameLoaderClient::didRestoreFromPageCache): Send message to UIProcess to indicate this happened. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): Send parent frameID in addition to our own in the message to UIProcess. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e3043f45