Add runtime and compile time flags for enabling Web Animations API and model.
[WebKit-https.git] / Source / WebKit2 / WebProcess / InjectedBundle / InjectedBundle.cpp
index ded7adb..157535b 100644 (file)
@@ -178,6 +178,11 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
         RuntimeEnabledFeatures::sharedFeatures().setAnimationTriggersEnabled(enabled);
 #endif
 
+#if ENABLE(WEB_ANIMATIONS)
+    if (preference == "WebKitWebAnimationsEnabled")
+        RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(enabled);
+#endif
+
 #if ENABLE(CSS_REGIONS)
     if (preference == "WebKitCSSRegionsEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(enabled);
@@ -566,6 +571,15 @@ void InjectedBundle::setCSSAnimationTriggersEnabled(bool enabled)
 #endif
 }
 
+void InjectedBundle::setWebAnimationsEnabled(bool enabled)
+{
+#if ENABLE(WEB_ANIMATIONS)
+    RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+}
+
 void InjectedBundle::setCSSRegionsEnabled(bool enabled)
 {
 #if ENABLE(CSS_REGIONS)