Make Legacy EME API controlled by RuntimeEnabled setting.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 21:04:11 +0000 (21:04 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 21:04:11 +0000 (21:04 +0000)
commit49dbeaac70ed9c3be55204345627bfe8583fd526
tree3389a1ebadbbfd953c1d1122ef2b2806df201a17
parenta93876303662cdf7588a17a0b0a8dd2051741d5a
Make Legacy EME API controlled by RuntimeEnabled setting.
https://bugs.webkit.org/show_bug.cgi?id=173994

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
* runtime/CommonIdentifiers.h:

Source/WebCore:

Add a new RuntimeEnabledFeatures setting to control the availability of the WebKit prefixed EME APIs.

* Configurations/FeatureDefines.xcconfig:
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl:
* Modules/encryptedmedia/legacy/WebKitMediaKeys.idl:
* dom/Element.idl:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::webkitSetMediaKeys):
(WebCore::HTMLMediaElement::keyAdded):
* html/HTMLMediaElement.idl:
* html/WebKitMediaKeyError.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setLegacyEncryptedMediaAPIEnabled):
(WebCore::RuntimeEnabledFeatures::legacyEncryptedMediaAPIEnabled):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Add a new preference used to control WebCore's new RuntimeEnabledFeature setting.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences legacyEncryptedMediaAPIEnabled]):
(-[WebPreferences setLegacyEncryptedMediaAPIEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add a new WKWebViewConfiguration property, as well as a new WKPreferences function, both able to control
WebCore's new RuntimeEnabledFeature setting for the Legacy EME API.

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetLegacyEncryptedMediaAPIEnabled):
(WKPreferencesSetLegacyEncryptedMediaAPIEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setLegacyEncryptedMediaAPIEnabled:]):
(-[WKWebViewConfiguration _legacyEncryptedMediaAPIEnabled]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.idl
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/dom/Element.idl
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/html/WebKitMediaKeyError.idl
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig