Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Dec 2016 02:46:31 +0000 (02:46 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Dec 2016 02:46:31 +0000 (02:46 +0000)
commit39651bcad167528ff580eb9b603601008b881a14
tree146cc19de6dfd8c4a345258d070590dbcaf8f9c6
parent746fc5ea4283e3441e1b6e327e75d6b10cfbfda3
Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
https://bugs.webkit.org/show_bug.cgi?id=165251

Reviewed by Dean Jackson.

Based on a patch by Dr Alex Gouaillard <agouaillard@gmail.com>
Source/JavaScriptCore:

* runtime/CommonIdentifiers.h: Add WebRTC and MediaStream identifiers.

Source/WebCore:

No new tests, covered by existing tests.

* Modules/mediastream/MediaStreamEvent.idl: Add "EnabledAtRuntime".
* Modules/mediastream/NavigatorMediaDevices.idl: Ditto.
* Modules/mediastream/NavigatorUserMedia.idl: Ditto.
* Modules/mediastream/RTCDTMFToneChangeEvent.idl: Ditto.
* Modules/mediastream/RTCIceCandidate.idl: Ditto.
* Modules/mediastream/RTCPeerConnection.idl: Ditto.
* Modules/mediastream/RTCRtpReceiver.idl: Ditto.
* Modules/mediastream/RTCRtpSender.idl: Ditto.
* Modules/mediastream/RTCRtpTransceiver.idl: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.
* Modules/mediastream/RTCTrackEvent.idl: Ditto.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): Set m_isMediaStreamEnabled in the
  constructor instead of in reset() because the later is called by the Internals constructor,
  making it impossible to override the runtime flag from WTR or DRT.
(WebCore::RuntimeEnabledFeatures::reset): Don't set m_isMediaStreamEnabled.
* page/Settings.in: Add peerConnectionEnabled.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h: Add MediaStream and PeerConnection preferences.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences mediaStreamEnabled]):
(-[WebPreferences setMediaStreamEnabled:]):
(-[WebPreferences peerConnectionEnabled]):
(-[WebPreferences setPeerConnectionEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h: Add peerConnectionEnabled.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPeerConnectionEnabled): Added.
(WKPreferencesGetPeerConnectionEnabled): Added.
* UIProcess/API/C/WKPreferencesRef.h:

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add WebKitMediaStreamEnabled
  and WebKitPeerConnectionEnabled.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Initialize the peerConnection preference.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Enable MediaStream and PeerConnection.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting): Ditto.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMediaStreamEnabled): New.
(WTR::TestRunner::setPeerConnectionEnabled): New.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStreamEvent.idl
Source/WebCore/Modules/mediastream/NavigatorMediaDevices.idl
Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl
Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.idl
Source/WebCore/Modules/mediastream/RTCIceCandidate.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl
Source/WebCore/Modules/mediastream/RTCRtpSender.idl
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl
Source/WebCore/Modules/mediastream/RTCSessionDescription.idl
Source/WebCore/Modules/mediastream/RTCTrackEvent.idl
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
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/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h