<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170400] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170400">170400</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2014-06-24 16:17:22 -0700 (Tue, 24 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>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):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreConfigurationsFeatureDefinesxcconfig">trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreConfigurationsFeatureDefinesxcconfig">trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig</a></li>
<li><a href="#trunkSourceWebCoreModulesgamepadGamepadidl">trunk/Source/WebCore/Modules/gamepad/Gamepad.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesgamepadGamepadButtonidl">trunk/Source/WebCore/Modules/gamepad/GamepadButton.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesgamepadGamepadEventidl">trunk/Source/WebCore/Modules/gamepad/GamepadEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesgamepadNavigatorGamepadidl">trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacConfigurationsFeatureDefinesxcconfig">trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2ConfigurationsFeatureDefinesxcconfig">trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-06-24 Brady Eidson <beidson@apple.com>
+
+ Enable GAMEPAD in the Mac build, but disabled at runtime.
+ https://bugs.webkit.org/show_bug.cgi?id=134255
+
+ Reviewed by Dean Jackson.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+ * runtime/JSObject.h: Export JSObject::removeDirect() to allow disabling
+ functions at runtime.
+
</ins><span class="cx"> 2014-06-24 Mark Hahnenberg <mhahnenberg@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r169703): Invalid cast in JSC::asGetterSetter / JSC::JSObject::defineOwnNonIndexProperty
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreConfigurationsFeatureDefinesxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -87,7 +87,8 @@
</span><span class="cx"> ENABLE_FONT_LOAD_EVENTS = ;
</span><span class="cx"> ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
</span><span class="cx"> ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
</span><del>-ENABLE_GAMEPAD = ;
</del><ins>+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
</ins><span class="cx"> ENABLE_GAMEPAD_DEPRECATED = ;
</span><span class="cx"> ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
</span><span class="cx"> ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING = $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_$(PLATFORM_NAME));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -572,7 +572,7 @@
</span><span class="cx">
</span><span class="cx"> void transitionTo(VM&, Structure*);
</span><span class="cx">
</span><del>- bool removeDirect(VM&, PropertyName); // Return true if anything is removed.
</del><ins>+ JS_EXPORT_PRIVATE bool removeDirect(VM&, PropertyName); // Return true if anything is removed.
</ins><span class="cx"> bool hasCustomProperties() { return structure()->didTransition(); }
</span><span class="cx"> bool hasGetterSetterProperties() { return structure()->hasGetterSetterProperties(); }
</span><span class="cx"> bool hasCustomGetterSetterProperties() { return structure()->hasCustomGetterSetterProperties(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/ChangeLog        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-06-24 Brady Eidson <beidson@apple.com>
+
+ Enable GAMEPAD in the Mac build, but disabled at runtime.
+ https://bugs.webkit.org/show_bug.cgi?id=134255
+
+ Reviewed by Dean Jackson.
+
+ 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:
+
</ins><span class="cx"> 2014-06-24 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> CSS JIT: Add positionInRootFragments to SelectorFragment
</span></span></pre></div>
<a id="trunkSourceWebCoreConfigurationsFeatureDefinesxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -87,7 +87,8 @@
</span><span class="cx"> ENABLE_FONT_LOAD_EVENTS = ;
</span><span class="cx"> ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
</span><span class="cx"> ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
</span><del>-ENABLE_GAMEPAD = ;
</del><ins>+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
</ins><span class="cx"> ENABLE_GAMEPAD_DEPRECATED = ;
</span><span class="cx"> ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
</span><span class="cx"> ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING = $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_$(PLATFORM_NAME));
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgamepadGamepadidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/gamepad/Gamepad.idl (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/gamepad/Gamepad.idl        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/Modules/gamepad/Gamepad.idl        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><ins>+ EnabledAtRuntime=Gamepads,
</ins><span class="cx"> Conditional=GAMEPAD,
</span><span class="cx"> ImplementationLacksVTable
</span><span class="cx"> ] interface Gamepad {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgamepadGamepadButtonidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/gamepad/GamepadButton.idl (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/gamepad/GamepadButton.idl        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/Modules/gamepad/GamepadButton.idl        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><ins>+ EnabledAtRuntime=Gamepads,
</ins><span class="cx"> Conditional=GAMEPAD,
</span><span class="cx"> ImplementationLacksVTable
</span><span class="cx"> ] interface GamepadButton {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgamepadGamepadEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/gamepad/GamepadEvent.idl (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/gamepad/GamepadEvent.idl        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/Modules/gamepad/GamepadEvent.idl        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><ins>+ EnabledAtRuntime=Gamepads,
</ins><span class="cx"> Conditional=GAMEPAD,
</span><span class="cx"> ConstructorTemplate=Event
</span><span class="cx"> ] interface GamepadEvent : Event {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgamepadNavigatorGamepadidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -26,6 +26,6 @@
</span><span class="cx"> [
</span><span class="cx"> Conditional=GAMEPAD,
</span><span class="cx"> ] partial interface Navigator {
</span><del>- Gamepad[] getGamepads();
</del><ins>+ [EnabledAtRuntime=Gamepads] Gamepad[] getGamepads();
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -102,6 +102,9 @@
</span><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="cx"> , m_isFontLoadEventsEnabled(false)
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(GAMEPAD)
+ , m_areGamepadsEnabled(false)
+#endif
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -218,6 +218,11 @@
</span><span class="cx"> void setPluginReplacementEnabled(bool isEnabled) { m_isPluginReplacementEnabled = isEnabled; }
</span><span class="cx"> bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; }
</span><span class="cx">
</span><ins>+#if ENABLE(GAMEPAD)
+ void setGamepadsEnabled(bool areEnabled) { m_areGamepadsEnabled = areEnabled; }
+ bool gamepadsEnabled() const { return m_areGamepadsEnabled; }
+#endif
+
</ins><span class="cx"> static RuntimeEnabledFeatures& sharedFeatures();
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -295,6 +300,10 @@
</span><span class="cx"> bool m_isFontLoadEventsEnabled;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(GAMEPAD)
+ bool m_areGamepadsEnabled;
+#endif
+
</ins><span class="cx"> friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1940,6 +1940,8 @@
</span><span class="cx"> $hashSize++;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ my @runtimeEnabledFunctions = ();
+
</ins><span class="cx"> foreach my $function (@{$interface->functions}) {
</span><span class="cx"> next if ($function->isStatic);
</span><span class="cx"> next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
</span><span class="lines">@@ -1965,6 +1967,8 @@
</span><span class="cx"> $conditionals{$name} = $conditional;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ push(@runtimeEnabledFunctions, $function) if $function->signature->extendedAttributes->{"EnabledAtRuntime"};
+
</ins><span class="cx"> $hashSize++;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2011,6 +2015,20 @@
</span><span class="cx"> push(@implContent, "{\n");
</span><span class="cx"> push(@implContent, " Base::finishCreation(vm);\n");
</span><span class="cx"> push(@implContent, " reifyStaticProperties(vm, ${className}PrototypeTableValues, *this);\n");
</span><ins>+
+ foreach my $function (@runtimeEnabledFunctions) {
+ my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature);
+ push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
+ AddToImplIncludes("RuntimeEnabledFeatures.h");
+ my $signature = $function->signature;
+ my $enable_function = GetRuntimeEnableFunctionName($signature);
+ my $name = $signature->name;
+ push(@implContent, " if (!${enable_function}()) {\n");
+ push(@implContent, " Identifier propertyName(&vm, reinterpret_cast<const LChar*>(\"$name\"), strlen(\"$name\"));\n");
+ push(@implContent, " removeDirect(vm, propertyName);\n");
+ push(@implContent, " }\n");
+ push(@implContent, "#endif\n") if $conditionalString;
+ }
</ins><span class="cx"> push(@implContent, "}\n\n");
</span><span class="cx"> } else {
</span><span class="cx"> push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n");
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-06-24 Brady Eidson <beidson@apple.com>
+
+ Enable GAMEPAD in the Mac build, but disabled at runtime.
+ https://bugs.webkit.org/show_bug.cgi?id=134255
+
+ Reviewed by Dean Jackson.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences gamepadsEnabled]):
+ (-[WebPreferences setGamepadsEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2014-06-24 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> Fixed the iOS build after r170358.
</span></span></pre></div>
<a id="trunkSourceWebKitmacConfigurationsFeatureDefinesxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -87,7 +87,8 @@
</span><span class="cx"> ENABLE_FONT_LOAD_EVENTS = ;
</span><span class="cx"> ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
</span><span class="cx"> ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
</span><del>-ENABLE_GAMEPAD = ;
</del><ins>+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
</ins><span class="cx"> ENABLE_GAMEPAD_DEPRECATED = ;
</span><span class="cx"> ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
</span><span class="cx"> ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING = $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_$(PLATFORM_NAME));
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -146,6 +146,7 @@
</span><span class="cx"> #define WebKitMediaSourceEnabledPreferenceKey @"WebKitMediaSourceEnabled"
</span><span class="cx"> #define WebKitShouldConvertPositionStyleOnCopyPreferenceKey @"WebKitShouldConvertPositionStyleOnCopy"
</span><span class="cx"> #define WebKitImageControlsEnabledPreferenceKey @"WebKitImageControlsEnabled"
</span><ins>+#define WebKitGamepadsEnabledPreferenceKey @"WebKitGamepadsEnabled"
</ins><span class="cx">
</span><span class="cx"> #if !TARGET_OS_IPHONE
</span><span class="cx"> // These are private both because callers should be using the cover methods and because the
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -2538,6 +2538,16 @@
</span><span class="cx"> [self _setBoolValue:enabled forKey:WebKitImageControlsEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)gamepadsEnabled
+{
+ return [self _boolValueForKey:WebKitGamepadsEnabledPreferenceKey];
+}
+
+- (void)setGamepadsEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitGamepadsEnabledPreferenceKey];
+}
+
</ins><span class="cx"> - (BOOL)shouldConvertPositionStyleOnCopy
</span><span class="cx"> {
</span><span class="cx"> return [self _boolValueForKey:WebKitShouldConvertPositionStyleOnCopyPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -436,6 +436,9 @@
</span><span class="cx"> - (void)setImageControlsEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)imageControlsEnabled;
</span><span class="cx">
</span><ins>+- (void)setGamepadsEnabled:(BOOL)flag;
+- (BOOL)gamepadsEnabled;
+
</ins><span class="cx"> #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
</span><span class="cx"> - (void)_setAllowCompositingLayerVisualDegradation:(BOOL)flag;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -2404,8 +2404,12 @@
</span><span class="cx"> settings.setHiddenPageDOMTimerThrottlingEnabled([preferences hiddenPageDOMTimerThrottlingEnabled]);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-settings.setHiddenPageCSSAnimationSuspensionEnabled([preferences hiddenPageCSSAnimationSuspensionEnabled]);
</del><ins>+ settings.setHiddenPageCSSAnimationSuspensionEnabled([preferences hiddenPageCSSAnimationSuspensionEnabled]);
</ins><span class="cx">
</span><ins>+#if ENABLE(GAMEPAD)
+ RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled([preferences gamepadsEnabled]);
+#endif
+
</ins><span class="cx"> NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
</span><span class="cx"> if (timeout > 0)
</span><span class="cx"> settings.setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-06-24 Brady Eidson <beidson@apple.com>
+
+ Enable GAMEPAD in the Mac build, but disabled at runtime.
+ https://bugs.webkit.org/show_bug.cgi?id=134255
+
+ Reviewed by Dean Jackson.
+
+ * 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):
+
</ins><span class="cx"> 2014-06-24 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Add support for v0 legacy decoding
</span></span></pre></div>
<a id="trunkSourceWebKit2ConfigurationsFeatureDefinesxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -87,7 +87,8 @@
</span><span class="cx"> ENABLE_FONT_LOAD_EVENTS = ;
</span><span class="cx"> ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME));
</span><span class="cx"> ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API;
</span><del>-ENABLE_GAMEPAD = ;
</del><ins>+ENABLE_GAMEPAD = $(ENABLE_GAMEPAD_$(PLATFORM_NAME));
+ENABLE_GAMEPAD_macosx = ENABLE_GAMEPAD;
</ins><span class="cx"> ENABLE_GAMEPAD_DEPRECATED = ;
</span><span class="cx"> ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
</span><span class="cx"> ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING = $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_$(PLATFORM_NAME));
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -207,6 +207,7 @@
</span><span class="cx"> macro(ImageControlsEnabled, imageControlsEnabled, Bool, bool, false) \
</span><span class="cx"> macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
</span><span class="cx"> macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false) \
</span><ins>+ macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false) \
</ins><span class="cx">
</span><span class="cx"> #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
</span><span class="cx"> macro(PDFScaleFactor, pdfScaleFactor, Double, double, 0) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -1275,3 +1275,13 @@
</span><span class="cx"> {
</span><span class="cx"> return toImpl(preferencesRef)->imageControlsEnabled();
</span><span class="cx"> }
</span><ins>+
+void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setGamepadsEnabled(enabled);
+}
+
+bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->gamepadsEnabled();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -330,6 +330,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef);
</span><span class="cx">
</span><ins>+// Default to false.
+WK_EXPORT void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (170399 => 170400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-24 23:16:37 UTC (rev 170399)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-24 23:17:22 UTC (rev 170400)
</span><span class="lines">@@ -2775,6 +2775,10 @@
</span><span class="cx"> settings.setUseImageDocumentForSubframePDF(true);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(GAMEPAD)
+ RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey()));
+#endif
+
</ins><span class="cx"> if (store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey()))
</span><span class="cx"> m_processSuppressionDisabledByWebPreference.stop();
</span><span class="cx"> else
</span></span></pre>
</div>
</div>
</body>
</html>