Enable GAMEPAD in the Mac build, but disabled at runtime.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jun 2014 23:17:22 +0000 (23:17 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jun 2014 23:17:22 +0000 (23:17 +0000)
commit02e8932466bb3c15e0e8801b05c66f3de1649d5e
tree956aa2c2a6e9286bd569a374d2ccd3339964c1c1
parenta71f1de01bdacc904aa17db98ef668c2fc8bc533
Enable GAMEPAD in the Mac build, but disabled at runtime.
https://bugs.webkit.org/show_bug.cgi?id=134255

Reviewed by Dean Jackson.

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:

* runtime/JSObject.h: Export JSObject::removeDirect() to allow disabling
  functions at runtime.

Source/WebCore:
No new tests (No changes to a tested config).

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Add the ability to have a function be EnabledAtRuntime by
  removing such functions from the prototype if they are disabled.

Change the three new objects and the one new function to be EnabledAtRuntime
* Modules/gamepad/Gamepad.idl:
* Modules/gamepad/GamepadButton.idl:
* Modules/gamepad/GamepadEvent.idl:
* Modules/gamepad/NavigatorGamepad.idl:

Add a RuntimeEnabledFeature for Gamepads:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::gamepadsEnabled):

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences gamepadsEnabled]):
(-[WebPreferences setGamepadsEnabled:]):
* WebView/WebPreferencesPrivate.h:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetGamepadsEnabled):
(WKPreferencesGetGamepadsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/runtime/JSObject.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/Modules/gamepad/Gamepad.idl
Source/WebCore/Modules/gamepad/GamepadButton.idl
Source/WebCore/Modules/gamepad/GamepadEvent.idl
Source/WebCore/Modules/gamepad/NavigatorGamepad.idl
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
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/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp