WKThumbnailView should expose a mode where it can be reparented without resnapshotting
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Sep 2016 02:20:11 +0000 (02:20 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Sep 2016 02:20:11 +0000 (02:20 +0000)
commit3864a3386630080052cf7f8127fb8ffad857976f
treeff122e7d32ae6093c035a42f2c1f7cb8cf6d43f5
parent8a89cfb6b9e3a1798c89fce10ad98ea81fdeb54f
WKThumbnailView should expose a mode where it can be reparented without resnapshotting
https://bugs.webkit.org/show_bug.cgi?id=161828
<rdar://problem/28229756>

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
Add such a mode. Bail from snapshot teardown when unparented if it is on.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKThumbnailView.mm: Added.
(-[SnapshotSizeObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
Add a test ensuring that this behaves correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.h
Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/WKThumbnailView.mm [new file with mode: 0644]