Title: [253056] trunk
Revision
253056
Author
commit-qu...@webkit.org
Date
2019-12-03 11:28:31 -0800 (Tue, 03 Dec 2019)

Log Message

[Web Animations] Add a runtime flag for Web Animations composite operations
https://bugs.webkit.org/show_bug.cgi?id=204718

Patch by Antoine Quint <grao...@apple.com> on 2019-12-03
Reviewed by Dean Jackson.

Source/WebCore:

While we support parsing and output of composite modes via KeyframeEffect::getKeyframes(), we don't support them for blending properties.
We now have a runtime flag for that feature so that we can continue working on it but not necessarily expose the feature by default.

* animation/KeyframeEffect.cpp:
(WebCore::processKeyframeLikeObject):
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::getKeyframes):
* animation/KeyframeEffect.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAnimationsCompositeOperationsEnabled):
(WebCore::RuntimeEnabledFeatures::webAnimationsCompositeOperationsEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences webAnimationsCompositeOperationsEnabled]):
(-[WebPreferences setWebAnimationsCompositeOperationsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setWebAnimationsCompositeOperationsEnabled):
(WebPreferences::webAnimationsCompositeOperationsEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253055 => 253056)


--- trunk/Source/WebCore/ChangeLog	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebCore/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1,3 +1,23 @@
+2019-12-03  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Add a runtime flag for Web Animations composite operations
+        https://bugs.webkit.org/show_bug.cgi?id=204718
+
+        Reviewed by Dean Jackson.
+
+        While we support parsing and output of composite modes via KeyframeEffect::getKeyframes(), we don't support them for blending properties.
+        We now have a runtime flag for that feature so that we can continue working on it but not necessarily expose the feature by default.
+
+        * animation/KeyframeEffect.cpp:
+        (WebCore::processKeyframeLikeObject):
+        (WebCore::processIterableKeyframes):
+        (WebCore::processPropertyIndexedKeyframes):
+        (WebCore::KeyframeEffect::getKeyframes):
+        * animation/KeyframeEffect.idl:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setWebAnimationsCompositeOperationsEnabled):
+        (WebCore::RuntimeEnabledFeatures::webAnimationsCompositeOperationsEnabled const):
+
 2019-12-03  Joonghun Park  <jh718.p...@samsung.com>
 
         Unreviewed. Remove build warning below since r252987.

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (253055 => 253056)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2019-12-03 19:28:31 UTC (rev 253056)
@@ -49,6 +49,7 @@
 #include "RenderBoxModelObject.h"
 #include "RenderElement.h"
 #include "RenderStyle.h"
+#include "RuntimeEnabledFeatures.h"
 #include "StylePendingResources.h"
 #include "StyleResolver.h"
 #include "TimingFunction.h"
@@ -196,7 +197,8 @@
         else
             baseProperties.offset = nullptr;
         baseProperties.easing = baseKeyframe.easing;
-        baseProperties.composite = baseKeyframe.composite;
+        if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled())
+            baseProperties.composite = baseKeyframe.composite;
     }
     RETURN_IF_EXCEPTION(scope, Exception { TypeError });
 
@@ -302,8 +304,10 @@
 
         // When calling processKeyframeLikeObject() with the "allow lists" flag set to false, the only composite
         // alternatives we should expect is CompositeOperationAuto.
-        ASSERT(WTF::holds_alternative<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite));
-        keyframeOutput.composite = WTF::get<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite);
+        if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled()) {
+            ASSERT(WTF::holds_alternative<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite));
+            keyframeOutput.composite = WTF::get<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite);
+        }
 
         for (auto& propertyAndValue : keyframeLikeObject.propertiesAndValues) {
             auto cssPropertyId = propertyAndValue.property;
@@ -438,27 +442,29 @@
         parsedKeyframes[i].easing = easings[i];
 
     // 12. If the “composite” member of the property-indexed keyframe is not an empty sequence:
-    Vector<CompositeOperationOrAuto> compositeModes;
-    if (WTF::holds_alternative<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite))
-        compositeModes = WTF::get<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite);
-    else if (WTF::holds_alternative<CompositeOperationOrAuto>(propertyIndexedKeyframe.baseProperties.composite))
-        compositeModes.append(WTF::get<CompositeOperationOrAuto>(propertyIndexedKeyframe.baseProperties.composite));
-    if (!compositeModes.isEmpty()) {
-        // 1. Let composite modes be a sequence of CompositeOperationOrAuto values assigned from the “composite” member of property-indexed keyframe. If that member is a single
-        //    CompositeOperationOrAuto value operation, let composite modes be a sequence of length one, with the value of the “composite” as its single item.
-        // 2. As with easings, if composite modes has fewer items than processed keyframes, repeat the elements in composite modes successively starting from the beginning of
-        //    the list until composite modes has as many items as processed keyframes.
-        if (compositeModes.size() < parsedKeyframes.size()) {
-            size_t initialNumberOfCompositeModes = compositeModes.size();
-            for (i = initialNumberOfCompositeModes; i < parsedKeyframes.size(); ++i)
-                compositeModes.append(compositeModes[i % initialNumberOfCompositeModes]);
+    if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled()) {
+        Vector<CompositeOperationOrAuto> compositeModes;
+        if (WTF::holds_alternative<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite))
+            compositeModes = WTF::get<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite);
+        else if (WTF::holds_alternative<CompositeOperationOrAuto>(propertyIndexedKeyframe.baseProperties.composite))
+            compositeModes.append(WTF::get<CompositeOperationOrAuto>(propertyIndexedKeyframe.baseProperties.composite));
+        if (!compositeModes.isEmpty()) {
+            // 1. Let composite modes be a sequence of CompositeOperationOrAuto values assigned from the “composite” member of property-indexed keyframe. If that member is a single
+            //    CompositeOperationOrAuto value operation, let composite modes be a sequence of length one, with the value of the “composite” as its single item.
+            // 2. As with easings, if composite modes has fewer items than processed keyframes, repeat the elements in composite modes successively starting from the beginning of
+            //    the list until composite modes has as many items as processed keyframes.
+            if (compositeModes.size() < parsedKeyframes.size()) {
+                size_t initialNumberOfCompositeModes = compositeModes.size();
+                for (i = initialNumberOfCompositeModes; i < parsedKeyframes.size(); ++i)
+                    compositeModes.append(compositeModes[i % initialNumberOfCompositeModes]);
+            }
+            // 3. Assign each value in composite modes that is not auto to the keyframe-specific composite operation on the keyframe with the corresponding position in processed
+            //    keyframes until the end of processed keyframes is reached.
+            for (size_t i = 0; i < compositeModes.size() && i < parsedKeyframes.size(); ++i) {
+                if (compositeModes[i] != CompositeOperationOrAuto::Auto)
+                    parsedKeyframes[i].composite = compositeModes[i];
+            }
         }
-        // 3. Assign each value in composite modes that is not auto to the keyframe-specific composite operation on the keyframe with the corresponding position in processed
-        //    keyframes until the end of processed keyframes is reached.
-        for (size_t i = 0; i < compositeModes.size() && i < parsedKeyframes.size(); ++i) {
-            if (compositeModes[i] != CompositeOperationOrAuto::Auto)
-                parsedKeyframes[i].composite = compositeModes[i];
-        }
     }
 
     return { };
@@ -636,7 +642,8 @@
             computedKeyframe.offset = parsedKeyframe.offset;
             computedKeyframe.computedOffset = parsedKeyframe.computedOffset;
             computedKeyframe.easing = timingFunctionForKeyframeAtIndex(i)->cssText();
-            computedKeyframe.composite = parsedKeyframe.composite;
+            if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled())
+                computedKeyframe.composite = parsedKeyframe.composite;
 
             auto outputKeyframe = convertDictionaryToJS(lexicalGlobalObject, *jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject), computedKeyframe);
 

Modified: trunk/Source/WebCore/animation/KeyframeEffect.idl (253055 => 253056)


--- trunk/Source/WebCore/animation/KeyframeEffect.idl	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebCore/animation/KeyframeEffect.idl	2019-12-03 19:28:31 UTC (rev 253056)
@@ -33,8 +33,8 @@
     Constructor(KeyframeEffect source)
 ] interface KeyframeEffect : AnimationEffect {
     attribute Element? target;
-    attribute IterationCompositeOperation iterationComposite;
-    attribute CompositeOperation composite;
+    [EnabledAtRuntime=WebAnimationsCompositeOperations] attribute IterationCompositeOperation iterationComposite;
+    [EnabledAtRuntime=WebAnimationsCompositeOperations] attribute CompositeOperation composite;
     [CallWith=GlobalObject] sequence<object> getKeyframes();
     [MayThrowException, CallWith=GlobalObject] void setKeyframes(object? keyframes);
 };

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (253055 => 253056)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2019-12-03 19:28:31 UTC (rev 253056)
@@ -112,6 +112,9 @@
     void setWebAnimationsCSSIntegrationEnabled(bool isEnabled) { m_isWebAnimationsCSSIntegrationEnabled = isEnabled; }
     bool webAnimationsCSSIntegrationEnabled() const { return m_areWebAnimationsEnabled && m_isWebAnimationsCSSIntegrationEnabled; }
 
+    void setWebAnimationsCompositeOperationsEnabled(bool areEnabled) { m_areWebAnimationsCompositeOperationsEnabled = areEnabled; }
+    bool webAnimationsCompositeOperationsEnabled() const { return m_areWebAnimationsCompositeOperationsEnabled; }
+
     void setImageBitmapEnabled(bool isEnabled) { m_isImageBitmapEnabled = isEnabled; }
     bool imageBitmapEnabled() const { return m_isImageBitmapEnabled; }
 
@@ -415,6 +418,7 @@
     bool m_inputEventsEnabled { true };
     bool m_areWebAnimationsEnabled { true };
     bool m_isWebAnimationsCSSIntegrationEnabled { true };
+    bool m_areWebAnimationsCompositeOperationsEnabled { false };
     bool m_isImageBitmapEnabled { true };
 #if ENABLE(OFFSCREEN_CANVAS)
     bool m_isOffscreenCanvasEnabled { false };

Modified: trunk/Source/WebKit/ChangeLog (253055 => 253056)


--- trunk/Source/WebKit/ChangeLog	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKit/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1,3 +1,12 @@
+2019-12-03  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Add a runtime flag for Web Animations composite operations
+        https://bugs.webkit.org/show_bug.cgi?id=204718
+
+        Reviewed by Dean Jackson.
+
+        * Shared/WebPreferences.yaml:
+
 2019-12-03  Youenn Fablet  <you...@apple.com>
 
         UserMediaCaptureManager should have independent capture factories

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (253055 => 253056)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1325,6 +1325,14 @@
   category: experimental
   webcoreBinding: RuntimeEnabledFeatures
 
+WebAnimationsCompositeOperationsEnabled:
+  type: bool
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Web Animations composite operations"
+  humanReadableDescription: "Support for the CompositeOperation enum and properties consuming it"
+  category: experimental
+  webcoreBinding: RuntimeEnabledFeatures
+
 WebGL2Enabled:
   type: bool
   defaultValue: false

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (253055 => 253056)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1,3 +1,18 @@
+2019-12-03  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Add a runtime flag for Web Animations composite operations
+        https://bugs.webkit.org/show_bug.cgi?id=204718
+
+        Reviewed by Dean Jackson.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences webAnimationsCompositeOperationsEnabled]):
+        (-[WebPreferences setWebAnimationsCompositeOperationsEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2019-12-03  Chris Dumez  <cdu...@apple.com>
 
         PageConfiguration::alternativeTextClient should use a smart pointer

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (253055 => 253056)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2019-12-03 19:28:31 UTC (rev 253056)
@@ -53,6 +53,7 @@
 #define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
 #define WebKitJavaScriptMarkupEnabledPreferenceKey @"WebKitJavaScriptMarkupEnabled"
 #define WebKitWebAnimationsEnabledPreferenceKey @"WebKitWebAnimationsEnabled"
+#define WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey @"WebKitWebAnimationsCompositeOperationsEnabled"
 #define WebKitPointerEventsEnabledPreferenceKey @"WebKitPointerEventsEnabled"
 #define WebKitSyntheticEditingCommandsEnabledPreferenceKey @"WebKitSyntheticEditingCommandsEnabled"
 #define WebKitWebSecurityEnabledPreferenceKey @"WebKitWebSecurityEnabled"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (253055 => 253056)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2019-12-03 19:28:31 UTC (rev 253056)
@@ -3176,6 +3176,16 @@
     [self _setBoolValue:flag forKey:WebKitWebAnimationsEnabledPreferenceKey];
 }
 
+- (BOOL)webAnimationsCompositeOperationsEnabled
+{
+    return [self _boolValueForKey:WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey];
+}
+
+- (void)setWebAnimationsCompositeOperationsEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey];
+}
+
 - (BOOL)pointerEventsEnabled
 {
     return [self _boolValueForKey:WebKitPointerEventsEnabledPreferenceKey];

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (253055 => 253056)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h	2019-12-03 19:28:31 UTC (rev 253056)
@@ -573,6 +573,9 @@
 - (void)setWebAnimationsEnabled:(BOOL)flag;
 - (BOOL)webAnimationsEnabled;
 
+- (void)setWebAnimationsCompositeOperationsEnabled:(BOOL)flag;
+- (BOOL)webAnimationsCompositeOperationsEnabled;
+
 - (void)setPointerEventsEnabled:(BOOL)flag;
 - (BOOL)pointerEventsEnabled;
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (253055 => 253056)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-12-03 19:28:31 UTC (rev 253056)
@@ -3166,6 +3166,7 @@
 #endif
 
     RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled([preferences webAnimationsEnabled]);
+    RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsCompositeOperationsEnabled([preferences webAnimationsCompositeOperationsEnabled]);
 
 #if ENABLE(POINTER_EVENTS)
     RuntimeEnabledFeatures::sharedFeatures().setPointerEventsEnabled([preferences pointerEventsEnabled]);

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1,3 +1,20 @@
+2019-12-03  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Add a runtime flag for Web Animations composite operations
+        https://bugs.webkit.org/show_bug.cgi?id=204718
+
+        Reviewed by Dean Jackson.
+
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::setWebAnimationsCompositeOperationsEnabled):
+        (WebPreferences::webAnimationsCompositeOperationsEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2019-12-03  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [PSON] Tooltips from previous page shown on new page

Modified: trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl	2019-12-03 19:28:31 UTC (rev 253056)
@@ -248,4 +248,6 @@
     HRESULT setRequestIdleCallbackEnabled([in] BOOL enabled);
     HRESULT asyncClipboardAPIEnabled([out, retval] BOOL* enabled);
     HRESULT setAsyncClipboardAPIEnabled([in] BOOL enabled);
+    HRESULT webAnimationsCompositeOperationsEnabled([out, retval] BOOL*);
+    HRESULT setWebAnimationsCompositeOperationsEnabled([in] BOOL enabled);
 }

Modified: trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h	2019-12-03 19:28:31 UTC (rev 253056)
@@ -186,6 +186,8 @@
 
 #define WebKitWebAnimationsEnabledPreferenceKey "WebKitWebAnimationsEnabled"
 
+#define WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey "WebKitWebAnimationsCompositeOperationsEnabled"
+
 #define WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey "WebKitWebAnimationsCSSIntegrationEnabled"
 
 #define WebKitUserTimingEnabledPreferenceKey "WebKitUserTimingEnabled"

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2019-12-03 19:28:31 UTC (rev 253056)
@@ -315,6 +315,8 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsEnabledPreferenceKey), kCFBooleanTrue);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey), kCFBooleanFalse);
+
     CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsCSSIntegrationEnabledPreferenceKey), kCFBooleanFalse);
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitUserTimingEnabledPreferenceKey), kCFBooleanFalse);
@@ -2331,6 +2333,20 @@
     return S_OK;
 }
 
+HRESULT WebPreferences::setWebAnimationsCompositeOperationsEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
+HRESULT WebPreferences::webAnimationsCompositeOperationsEnabled(_Out_ BOOL* enabled)
+{
+    if (!enabled)
+        return E_POINTER;
+    *enabled = boolValueForKey(WebKitWebAnimationsCompositeOperationsEnabledPreferenceKey);
+    return S_OK;
+}
+
 HRESULT WebPreferences::setUserTimingEnabled(BOOL enabled)
 {
     setBoolValue(WebKitUserTimingEnabledPreferenceKey, enabled);

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.h (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/WebPreferences.h	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.h	2019-12-03 19:28:31 UTC (rev 253056)
@@ -293,6 +293,8 @@
     virtual HRESULT STDMETHODCALLTYPE setRequestIdleCallbackEnabled(BOOL);
     virtual HRESULT STDMETHODCALLTYPE asyncClipboardAPIEnabled(_Out_ BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setAsyncClipboardAPIEnabled(BOOL);
+    virtual HRESULT STDMETHODCALLTYPE webAnimationsCompositeOperationsEnabled(_Out_ BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setWebAnimationsCompositeOperationsEnabled(BOOL);
 
     // WebPreferences
 

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (253055 => 253056)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2019-12-03 19:28:31 UTC (rev 253056)
@@ -5256,6 +5256,11 @@
         return hr;
     RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(!!enabled);
 
+    hr = prefsPrivate->webAnimationsCompositeOperationsEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsCompositeOperationsEnabled(!!enabled);
+
     hr = prefsPrivate->webAnimationsCSSIntegrationEnabled(&enabled);
     if (FAILED(hr))
         return hr;

Modified: trunk/Tools/ChangeLog (253055 => 253056)


--- trunk/Tools/ChangeLog	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Tools/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
@@ -1,3 +1,15 @@
+2019-12-03  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Add a runtime flag for Web Animations composite operations
+        https://bugs.webkit.org/show_bug.cgi?id=204718
+
+        Reviewed by Dean Jackson.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (enableExperimentalFeatures):
+
 2019-12-03  Aakash Jain  <aakash_j...@apple.com>
 
         Do not retry the EWS build due to flaky failures in layout-test

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (253055 => 253056)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2019-12-03 19:28:31 UTC (rev 253056)
@@ -862,6 +862,7 @@
     // FIXME: InputEvents
     [preferences setFetchAPIKeepAliveEnabled:YES];
     [preferences setWebAnimationsEnabled:YES];
+    [preferences setWebAnimationsCompositeOperationsEnabled:YES];
     [preferences setWebGL2Enabled:YES];
     // FIXME: AsyncFrameScrollingEnabled
     [preferences setCacheAPIEnabled:NO];

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (253055 => 253056)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-12-03 19:08:40 UTC (rev 253055)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-12-03 19:28:31 UTC (rev 253056)
@@ -797,6 +797,7 @@
     prefsPrivate->setCSSOMViewScrollingAPIEnabled(TRUE);
     prefsPrivate->setResizeObserverEnabled(TRUE);
     prefsPrivate->setWebAnimationsEnabled(TRUE);
+    prefsPrivate->setWebAnimationsCompositeOperationsEnabled(TRUE);
     prefsPrivate->setServerTimingEnabled(TRUE);
     // FIXME: WebGL2
     // FIXME: WebRTC
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to