[Cocoa] Add a HAVE(AVKIT) and use it
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Apr 2015 08:33:41 +0000 (08:33 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Apr 2015 08:33:41 +0000 (08:33 +0000)
commitd7c7c9f68d7f7d3cb5f3d3129b58cdb306bcd79d
tree06ffb78ea6063eac8eef1eb4e4d9b9022b7ee574
parentde951205320932cfdb41832360355569db353c7a
[Cocoa] Add a HAVE(AVKIT) and use it
https://bugs.webkit.org/show_bug.cgi?id=143593

Reviewed by David Kilzer.

Source/WebCore:

* page/Settings.h: Only defined setAVKitEnabled() if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenControllerAVKit.mm: Only compiled if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Ditto.

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Only set WebKitAVKitEnabled to YES if HAVE(AVKIT).
(-[WebPreferences setAVKitEnabled:]): Only set value for WebKitAVKitEnabled if HAVE(AVKIT).
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Only called Settings::setAVKitEnabled() if HAVE(AVKIT).

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
(WebKit::WebPageProxy::reattachToWebProcess): Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).

Source/WTF:

* wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.h
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp