[mac] WebKit1 clients can’t tell when a frame has been removed from the hierarchy
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 23:26:41 +0000 (23:26 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2013 23:26:41 +0000 (23:26 +0000)
commitf5f422304c166ee2a5d1d42454b9165febdf2642
tree2b8c3950d0f8be811a0b01be86e5a70921a56cbe
parent28dc80a7bc81cc38cbd9c8322b40acff593dc978
[mac] WebKit1 clients can’t tell when a frame has been removed from the hierarchy
https://bugs.webkit.org/show_bug.cgi?id=106261

Reviewed by Simon Fraser.

Source/WebKit/mac:

Test: TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm.

Added -[WebFrameLoadDelegate webView:didRemoveFrameFromHierarchy:].

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::detachedFromParent2): Added a call to the new frame load delegate
method.
* WebView/WebDelegateImplementationCaching.h:
(WebFrameLoadDelegateImplementationCache): Added the new method to the cache.
* WebView/WebFrameLoadDelegatePrivate.h: Declared the new delegate method.
* WebView/WebView.mm:
(-[WebView _cacheFrameLoadDelegateImplementations]): Added the new method to the cache.

Tools:

Added a test for -[WebFrameLoadDelegate webView:didRemoveFrameFromHierarchy:].

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm: Added.
(-[DidRemoveFrameFromHierarchyFrameLoadDelegate webView:didFinishLoadForFrame:]):
(-[DidRemoveFrameFromHierarchyFrameLoadDelegate webView:didRemoveFrameFromHierarchy:]):
(TestWebKitAPI):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
Source/WebKit/mac/WebView/WebFrameLoadDelegatePrivate.h
Source/WebKit/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm [new file with mode: 0644]