Clients should be able to customize the view used for page previews
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Nov 2014 02:02:08 +0000 (02:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Nov 2014 02:02:08 +0000 (02:02 +0000)
commit35b121e477029206330145b2dc31c9e0f7f4c205
tree5565b9060e6fc2e0e3c0b2c1a7ef389b685f0c17
parenta505432675f82f68a649b6851343bad228f03c38
Clients should be able to customize the view used for page previews
https://bugs.webkit.org/show_bug.cgi?id=138447

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-06
Reviewed by Tim Horton.

Add SPI to WKView that clients can use to customize the view used in the page preview popover.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_viewForPreviewingURL:initialFrameSize:.

* UIProcess/API/mac/WKView.mm:
(-[WKView _viewForPreviewingURL:initialFrameSize:]):
Return nil in the default implementation.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Only spin up a WKWebView if the delegate (and, therefore, the presenting WKView) doesn't supply a custom view.
(-[WKActionMenuController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]):
WKPagePreviewViewControllerDelegate method; wrap the WKView SPI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm