Diff
Modified: trunk/Source/WebCore/ChangeLog (136784 => 136785)
--- trunk/Source/WebCore/ChangeLog 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebCore/ChangeLog 2012-12-06 02:06:55 UTC (rev 136785)
@@ -1,3 +1,23 @@
+2012-12-05 Greg Billock <[email protected]>
+
+ Add runtime enable for web intents.
+ https://bugs.webkit.org/show_bug.cgi?id=103669
+
+ Reviewed by Adam Barth.
+
+ Make web intents _javascript_ API enabled by a runtime setting.
+
+ * Modules/intents/DOMWindowIntents.idl:
+ * Modules/intents/NavigatorIntents.idl:
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ (WebCore):
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (RuntimeEnabledFeatures):
+ (WebCore::RuntimeEnabledFeatures::webkitStartActivityEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitIntentEnabled):
+ (WebCore::RuntimeEnabledFeatures::webKitIntentEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebIntentsEnabled):
+
2012-12-05 Scott Violet <[email protected]>
[chromium] Remove linux theme related files and switch to default
Modified: trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl (136784 => 136785)
--- trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebCore/Modules/intents/DOMWindowIntents.idl 2012-12-06 02:06:55 UTC (rev 136785)
@@ -28,8 +28,8 @@
Conditional=WEB_INTENTS,
Supplemental=DOMWindow
] interface DOMWindowIntents {
- attribute IntentConstructor WebKitIntent;
+ [V8EnabledAtRuntime] attribute IntentConstructor WebKitIntent;
- [Replaceable] readonly attribute DeliveredIntent webkitIntent;
+ [Replaceable, V8EnabledAtRuntime] readonly attribute DeliveredIntent webkitIntent;
};
Modified: trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl (136784 => 136785)
--- trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebCore/Modules/intents/NavigatorIntents.idl 2012-12-06 02:06:55 UTC (rev 136785)
@@ -21,9 +21,9 @@
Conditional=WEB_INTENTS,
Supplemental=Navigator
] interface NavigatorIntents {
- void webkitStartActivity(in Intent intent,
- in [Callback, Optional] IntentResultCallback successCallback,
- in [Callback, Optional] IntentResultCallback failureCallback)
+ [V8EnabledAtRuntime] void webkitStartActivity(in Intent intent,
+ in [Callback, Optional] IntentResultCallback successCallback,
+ in [Callback, Optional] IntentResultCallback failureCallback)
raises(DOMException);
};
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (136784 => 136785)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2012-12-06 02:06:55 UTC (rev 136785)
@@ -233,4 +233,8 @@
bool RuntimeEnabledFeatures::areExperimentalContentSecurityPolicyFeaturesEnabled = false;
#endif
+#if ENABLE(WEB_INTENTS)
+bool RuntimeEnabledFeatures::isWebIntentsEnabled = true;
+#endif
+
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (136784 => 136785)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2012-12-06 02:06:55 UTC (rev 136785)
@@ -269,6 +269,12 @@
static void setRequestAutocompleteEnabled(bool isEnabled) { isRequestAutocompleteEnabled = isEnabled; }
#endif
+#if ENABLE(WEB_INTENTS)
+ static bool webkitStartActivityEnabled() { return isWebIntentsEnabled; }
+ static bool webkitIntentEnabled() { return isWebIntentsEnabled; }
+ static bool webKitIntentEnabled() { return isWebIntentsEnabled; }
+ static void setWebIntentsEnabled(bool isEnabled) { isWebIntentsEnabled = isEnabled; }
+#endif
private:
// Never instantiate.
@@ -374,6 +380,11 @@
#if ENABLE(CSP_NEXT)
static bool areExperimentalContentSecurityPolicyFeaturesEnabled;
#endif
+
+#if ENABLE(WEB_INTENTS)
+ static bool isWebIntentsEnabled;
+#endif
+
};
} // namespace WebCore
Modified: trunk/Source/WebKit/chromium/ChangeLog (136784 => 136785)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-12-06 02:06:55 UTC (rev 136785)
@@ -1,3 +1,19 @@
+2012-12-05 Greg Billock <[email protected]>
+
+ Add runtime enable for web intents.
+ https://bugs.webkit.org/show_bug.cgi?id=103669
+
+ Reviewed by Adam Barth.
+
+ Propagate runtime setting to enable/disable web intents _javascript_ API.
+
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures):
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableWebIntents):
+ (WebKit):
+ (WebKit::WebRuntimeFeatures::isWebIntentsEnabled):
+
2012-12-05 Scott Violet <[email protected]>
[chromium] Remove linux theme related files and switch to default
Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (136784 => 136785)
--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h 2012-12-06 02:06:55 UTC (rev 136785)
@@ -162,6 +162,10 @@
WEBKIT_EXPORT static void enableExperimentalContentSecurityPolicyFeatures(bool);
WEBKIT_EXPORT static bool isExperimentalContentSecurityPolicyFeaturesEnabled();
+
+ WEBKIT_EXPORT static void enableWebIntents(bool);
+ WEBKIT_EXPORT static bool isWebIntentsEnabled();
+
private:
WebRuntimeFeatures();
};
Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (136784 => 136785)
--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp 2012-12-06 01:38:29 UTC (rev 136784)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp 2012-12-06 02:06:55 UTC (rev 136785)
@@ -667,4 +667,22 @@
#endif
}
+void WebRuntimeFeatures::enableWebIntents(bool enable)
+{
+#if ENABLE(WEB_INTENTS)
+ RuntimeEnabledFeatures::setWebIntentsEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isWebIntentsEnabled()
+{
+#if ENABLE(WEB_INTENTS)
+ return RuntimeEnabledFeatures::webkitStartActivityEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit