Title: [230632] trunk
Revision
230632
Author
grao...@webkit.org
Date
2018-04-13 09:02:11 -0700 (Fri, 13 Apr 2018)

Log Message

[Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
https://bugs.webkit.org/show_bug.cgi?id=184569
<rdar://problem/38671301>

Reviewed by Jon Lee.

LayoutTests/imported/w3c:

This test now fails at a later assertion, so updating the expectation for it.

* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:

Source/WebCore:

We now set the CSS Animations and CSS Transitions as Web Animations flag on by default. To ensure that some remaining
tests pass with this flag on, we expose a way to get to a PseudoElement via a new internals.pseudoElement() method. This
allows tests that used internals.pauseAnimationAtTimeOnPseudoElement() and internals.pauseTransitionAtTimeOnPseudoElement()
to now work with the Web Animations API.

* page/RuntimeEnabledFeatures.h:
* testing/Internals.cpp:
(WebCore::Internals::pseudoElement):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:

Source/WebKitLegacy/win:

Make sure Web Animations and CSS Animations and CSS Transitions are enabled by default on Windows.

* WebPreferences.cpp:

Tools:

We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
but override it to be false always in the LayoutTests/legacy-animation-engine directory.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
(runTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestOptions.cpp:
(WTR::isLegacyAnimationEngineTestPath):
(WTR::TestOptions::TestOptions):
* WebKitTestRunner/TestOptions.h:

LayoutTests:

* TestExpectations: A small number of tests regressed with the flag on, so we list them and have raised
bugs to fix them ASAP.
* animations/animation-direction-alternate-reverse-expected.txt:
* animations/animation-direction-alternate-reverse.html: This test was incorrect since it assumes that at the
end active boundary time we are using the end value whereas we are using the start value. Indeed, since the
fill-mode is "none", at the end of the active time, the progress is null per the Web Animations spec.
* animations/animation-hit-test-transform.html: Stop using the internals method.
* animations/animation-internals-api-expected.txt: Removed.
* animations/animation-internals-api-multiple-keyframes-expected.txt: Removed.
* animations/animation-internals-api-multiple-keyframes.html: Removed. This test only tests an internals method
that is no longer relevant for the new animation engine, but preserved for compatibility with legacy tests.
* animations/animation-internals-api.html: Removed. This test only tests an internals method that is no longer
relevant for the new animation engine, but preserved for compatibility with legacy tests.
* animations/big-rotation-expected.txt:
* animations/big-rotation.html: Here again we are correcting a test which made the wrong assumption about the
value generated at the end active boundary time.
* animations/duplicated-keyframes-name.html: We make the animation fill forwards to check that we are using
the correct end value for an animation with multiple 100% keyframe.
* animations/fill-forwards-end-state.html: Same as previous test.
* animations/fill-mode-forwards-zero-duration-expected.txt:
* animations/fill-mode-forwards-zero-duration.html: This test should seek after its delay + duration, so we test
at 3s instead of 1s. This is due to a behavior difference between internals.pauseAnimationAtTimeOnElement() and
its replacement.
* fast/css-generated-content/pseudo-animation.html: Use internals.pseudoElement() and the Web Animations API rather
than internals.pauseAnimationAtTimeOnPseudoElement().
* fast/css-generated-content/pseudo-transition.html: Use internals.pseudoElement() and the Web Animations API rather
than internals.pauseTransitionAtTimeOnPseudoElement().
* platform/ios/TestExpectations:
* platform/win/TestExpectations: Remove references to tests that we are removing.
* transitions/remove-transition-style.html: Use document.getAnimations() to figure out how many animations are running.
* transitions/transition-drt-api-delay-expected.txt: Removed.
* transitions/transition-drt-api-delay.html: Removed. This test only tests an internals method that is no longer
relevant for the new animation engine, but preserved for compatibility with legacy tests.
* transitions/transition-drt-api-expected.txt: Removed.
* transitions/transition-drt-api.html: Removed. This test only tests an internals method that is no longer
relevant for the new animation engine, but preserved for compatibility with legacy tests.
* transitions/transition-hit-test-transform.html: Stop using internals.pauseTransitionAtTimeOnElement().
* transitions/zero-duration-with-non-zero-delay-end.html: Use the Web Animations API instead of internals.numberOfActiveAnimations().

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (230631 => 230632)


--- trunk/LayoutTests/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,50 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        * TestExpectations: A small number of tests regressed with the flag on, so we list them and have raised
+        bugs to fix them ASAP.
+        * animations/animation-direction-alternate-reverse-expected.txt:
+        * animations/animation-direction-alternate-reverse.html: This test was incorrect since it assumes that at the
+        end active boundary time we are using the end value whereas we are using the start value. Indeed, since the
+        fill-mode is "none", at the end of the active time, the progress is null per the Web Animations spec.
+        * animations/animation-hit-test-transform.html: Stop using the internals method.
+        * animations/animation-internals-api-expected.txt: Removed.
+        * animations/animation-internals-api-multiple-keyframes-expected.txt: Removed.
+        * animations/animation-internals-api-multiple-keyframes.html: Removed. This test only tests an internals method
+        that is no longer relevant for the new animation engine, but preserved for compatibility with legacy tests.
+        * animations/animation-internals-api.html: Removed. This test only tests an internals method that is no longer
+        relevant for the new animation engine, but preserved for compatibility with legacy tests.
+        * animations/big-rotation-expected.txt:
+        * animations/big-rotation.html: Here again we are correcting a test which made the wrong assumption about the
+        value generated at the end active boundary time.
+        * animations/duplicated-keyframes-name.html: We make the animation fill forwards to check that we are using
+        the correct end value for an animation with multiple 100% keyframe.
+        * animations/fill-forwards-end-state.html: Same as previous test.
+        * animations/fill-mode-forwards-zero-duration-expected.txt:
+        * animations/fill-mode-forwards-zero-duration.html: This test should seek after its delay + duration, so we test
+        at 3s instead of 1s. This is due to a behavior difference between internals.pauseAnimationAtTimeOnElement() and
+        its replacement.
+        * fast/css-generated-content/pseudo-animation.html: Use internals.pseudoElement() and the Web Animations API rather
+        than internals.pauseAnimationAtTimeOnPseudoElement().
+        * fast/css-generated-content/pseudo-transition.html: Use internals.pseudoElement() and the Web Animations API rather
+        than internals.pauseTransitionAtTimeOnPseudoElement().
+        * platform/ios/TestExpectations:
+        * platform/win/TestExpectations: Remove references to tests that we are removing.
+        * transitions/remove-transition-style.html: Use document.getAnimations() to figure out how many animations are running.
+        * transitions/transition-drt-api-delay-expected.txt: Removed.
+        * transitions/transition-drt-api-delay.html: Removed. This test only tests an internals method that is no longer
+        relevant for the new animation engine, but preserved for compatibility with legacy tests.
+        * transitions/transition-drt-api-expected.txt: Removed.
+        * transitions/transition-drt-api.html: Removed. This test only tests an internals method that is no longer
+        relevant for the new animation engine, but preserved for compatibility with legacy tests.
+        * transitions/transition-hit-test-transform.html: Stop using internals.pauseTransitionAtTimeOnElement().
+        * transitions/zero-duration-with-non-zero-delay-end.html: Use the Web Animations API instead of internals.numberOfActiveAnimations().
+
 2018-04-13  Per Arne Vollan  <pvol...@apple.com>
 
         Mark some legacy-animation-engine tests as failures on Windows.

Modified: trunk/LayoutTests/TestExpectations (230631 => 230632)


--- trunk/LayoutTests/TestExpectations	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/TestExpectations	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1841,3 +1841,16 @@
 webkit.org/b/48451 animations/play-state.html [ Pass Failure ]
 webkit.org/b/48451 animations/suspend-resume-animation.html [ Pass Failure ]
 webkit.org/b/48451 animations/3d/transform-origin-vs-functions.html [ Pass Failure ]
+
+# Regressions in the new animation engine.
+webkit.org/b/184563 animations/trigger-container-scroll-boundaries.html [ Failure ]
+webkit.org/b/184563 animations/trigger-container-scroll-empty.html [ Failure ]
+webkit.org/b/184563 animations/trigger-container-scroll-simple.html [ Failure ]
+webkit.org/b/184564 imported/blink/transitions/zero-duration-should-not-cancel.html [ Failure ]
+webkit.org/b/184565 compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html [ Failure ]
+webkit.org/b/184565 compositing/layer-creation/mismatched-transform-transition-overlap.html [ Failure ]
+webkit.org/b/184565 compositing/layer-creation/scale-rotation-transition-overlap.html [ Failure ]
+webkit.org/b/184565 compositing/layer-creation/translate-scale-transition-overlap.html [ Failure ]
+webkit.org/b/184565 compositing/layer-creation/translate-transition-overlap.html [ Failure ]
+webkit.org/b/184566 compositing/backing/transform-transition-from-outside-view.html [ Failure ]
+webkit.org/b/184579 fast/animation/css-animation-resuming-when-visible-with-style-change2.html [ Pass Failure ]

Modified: trunk/LayoutTests/animations/animation-direction-alternate-reverse-expected.txt (230631 => 230632)


--- trunk/LayoutTests/animations/animation-direction-alternate-reverse-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-direction-alternate-reverse-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,5 +1,5 @@
 PASS - "left" property for "box" element at 1s saw something close to: 200
 PASS - "left" property for "box" element at 2s saw something close to: 0
 PASS - "left" property for "box" element at 3s saw something close to: 200
-PASS - "left" property for "box" element at 4s saw something close to: 400
+PASS - "left" property for "box" element at 4s saw something close to: 0
 

Modified: trunk/LayoutTests/animations/animation-direction-alternate-reverse.html (230631 => 230632)


--- trunk/LayoutTests/animations/animation-direction-alternate-reverse.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-direction-alternate-reverse.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -40,9 +40,8 @@
       // [animation-name, time, element-id, property, expected-value, tolerance]
       ["move", 1.0, "box", "left", 200, 20],
       ["move", 2.0, "box", "left", 0, 20],
-
       ["move", 3.0, "box", "left", 200, 20],
-      ["move", 4.0, "box", "left", 400, 20],
+      ["move", 4.0, "box", "left", 0, 20],
     ];
     
     runAnimationTest(expectedValues);

Modified: trunk/LayoutTests/animations/animation-hit-test-transform.html (230631 => 230632)


--- trunk/LayoutTests/animations/animation-hit-test-transform.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-hit-test-transform.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -58,7 +58,7 @@
         {
             if (window.testRunner) {
                 var target = document.getElementById("target");
-                if (!internals.pauseAnimationAtTimeOnElement("anim", 2.0, target)) {
+                if (!pauseAnimationAtTimeOnElement("anim", 2.0, target)) {
                     document.getElementById('result').innerHTML = "FAIL: Failed to pause animation"
                     testRunner.notifyDone();
                     return;

Deleted: trunk/LayoutTests/animations/animation-internals-api-expected.txt (230631 => 230632)


--- trunk/LayoutTests/animations/animation-internals-api-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-internals-api-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1 +0,0 @@
-PASS: correctly paused animation

Deleted: trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes-expected.txt (230631 => 230632)


--- trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1 +0,0 @@
-PASS: correctly paused animation

Deleted: trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes.html (230631 => 230632)


--- trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-internals-api-multiple-keyframes.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-  <style>
-    #target {
-      position: relative;
-      left: 100px;
-      height: 100px;
-      width: 100px;
-      background-color: blue;
-      -webkit-animation-duration: 1s;
-      -webkit-animation-timing-function: linear;
-    }
-
-    @-webkit-keyframes anim {
-      from { left: 10px; }
-      40% { left: 30px; }
-      60% { left: 15px; }
-      to { left: 20px; }
-    }
-   </style>
-
-   <script src=""
-   <script>
-    if (window.testRunner)
-      testRunner.dumpAsText();
-
-    function animationStarted()
-    {
-      if (window.testRunner) {
-        var target = document.getElementById('target');
-        var paused = internals.pauseAnimationAtTimeOnElement("anim", 1, target);
-        var result;
-        if (paused)
-          result = "PASS: correctly paused animation";
-        else
-          result = "FAIL: failed to pause animation";
-
-        document.getElementById('results').innerText = result;
-        testRunner.notifyDone();
-      } else
-        document.getElementById('results').innerText = "This test requires WebCore Internals";
-    }
-
-    function startTest()
-    {
-      var target = document.getElementById('target');
-      target.style.webkitAnimationName = "anim";
-      waitForAnimationToStart(target, animationStarted);
-    }
-   </script>
-</head>
-<body _onload_="startTest()">
-  <!-- Test for Internals' pauseAnimationAtTimeOnElement() API on animations with multiple keyframes -->
-  <div id="target"></div>
-  <div id="results"></div>
-
-</body>
-</html>

Deleted: trunk/LayoutTests/animations/animation-internals-api.html (230631 => 230632)


--- trunk/LayoutTests/animations/animation-internals-api.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/animation-internals-api.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <style>
-    #target {
-      position: relative;
-      left: 100px;
-      height: 100px;
-      width: 100px;
-      background-color: blue;
-      -webkit-animation-duration: 1s;
-      -webkit-animation-timing-function: linear;
-    }
-
-    @-webkit-keyframes bounce {
-      from {
-        left: 100px;
-      }
-      to {
-        left: 200px;
-      }
-    }
-
-  </style>
-
-  <script src=""
-  <script>
-    if (window.testRunner)
-      testRunner.dumpAsText();
-
-    function animationStarted()
-    {
-      if (window.testRunner) {
-        var target = document.getElementById('target');
-        var paused = internals.pauseAnimationAtTimeOnElement("bounce", 1.0, target);
-        var result = "";
-        if (paused)
-          result = "PASS: correctly paused animation";
-        else
-          result = "FAIL: failed to pause animation";
-
-        document.getElementById('results').innerText = result;
-        testRunner.notifyDone();
-      } else
-        document.getElementById('results').innerText = "This test requires WebCore Internals";
-    }
-
-    function startTest()
-    {
-      var target = document.getElementById('target');
-      target.style.webkitAnimationName = "bounce";
-      waitForAnimationToStart(target, animationStarted);
-    }
-   </script>
-</head>
-<body _onload_="startTest()">
-  <!-- Test for Internals pauseAnimationAtTimeOnElement() API -->
-  <div id="target"></div>
-  <div id="results"></div>
-</body>
-</html>

Modified: trunk/LayoutTests/animations/big-rotation-expected.txt (230631 => 230632)


--- trunk/LayoutTests/animations/big-rotation-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/big-rotation-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -2,5 +2,5 @@
 
 PASS - "webkitTransform" property for "box" element at 1s saw something close to: -1,0,0,-1
 PASS - "webkitTransform" property for "box" element at 2s saw something close to: 1,0,0,1
-PASS - "webkitTransform" property for "box" element at 3s saw something close to: -1,0,0,-1
+PASS - "webkitTransform" property for "box" element at 3s saw something close to: none
 

Modified: trunk/LayoutTests/animations/big-rotation.html (230631 => 230632)


--- trunk/LayoutTests/animations/big-rotation.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/big-rotation.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -25,7 +25,7 @@
       // [animation-name, time, element-id, property, expected-value, tolerance]
       ["rotate", 1, "box", "webkitTransform", [-1,0,0,-1], 0.2],
       ["rotate", 2, "box", "webkitTransform", [1,0,0,1], 0.2],
-      ["rotate", 3, "box", "webkitTransform", [-1,0,0,-1], 0.2],
+      ["rotate", 3, "box", "webkitTransform", "none", 0.2],
     ];
     
     runAnimationTest(expectedValues);

Modified: trunk/LayoutTests/animations/duplicated-keyframes-name.html (230631 => 230632)


--- trunk/LayoutTests/animations/duplicated-keyframes-name.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/duplicated-keyframes-name.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -16,6 +16,7 @@
         -webkit-animation-duration: 1s;
         -webkit-animation-timing-function: linear;
         -webkit-animation-name: anim;
+        -webkit-animation-fill-mode: forwards;
     }
     @-webkit-keyframes anim {
         from { left: 50px; }

Modified: trunk/LayoutTests/animations/fill-forwards-end-state.html (230631 => 230632)


--- trunk/LayoutTests/animations/fill-forwards-end-state.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/fill-forwards-end-state.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -10,8 +10,7 @@
       height: 100px;
       width: 100px;
       background-color: blue;
-      animation-fill-mode: forwards;
-      animation: anim1 2s 0.2s linear;
+      animation: anim1 2s 0.2s linear forwards;
     }
     @keyframes anim1 {
         from { left: 100px; }

Modified: trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt (230631 => 230632)


--- trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,4 +1,4 @@
 Fill-forwards state should be the last keyframe state, even with a zero-duration animation.
 
-PASS - "left" property for "box1" element at 1s saw something close to: 100
+PASS - "left" property for "box1" element at 3s saw something close to: 100
 

Modified: trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html (230631 => 230632)


--- trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -23,7 +23,7 @@
 
     const expectedValues = [
       // [animation-name, time, element-id, property, expected-value, tolerance]
-      ["anim1", 1, "box1", "left", 100, 2],
+      ["anim1", 3, "box1", "left", 100, 2],
     ];
 
     runAnimationTest(expectedValues);

Modified: trunk/LayoutTests/fast/css-generated-content/pseudo-animation.html (230631 => 230632)


--- trunk/LayoutTests/fast/css-generated-content/pseudo-animation.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/fast/css-generated-content/pseudo-animation.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -78,6 +78,25 @@
 // FIXME: This test should be modified so subpixel doesn't cause off by one
 // below and it no longer needs shouldBeCloseTo.
 
+function pauseAnimationAtTimeOnPseudoElement(animationName, time, element, pseudoId)
+{
+    const pseudoElement = internals.pseudoElement(element, pseudoId);
+    if (!pseudoElement) {
+        console.log("Failed to find pseudo element");
+        return;
+    }
+
+    const animations = pseudoElement.getAnimations();
+    for (let animation of animations) {
+        if (animation instanceof CSSAnimation && animation.animationName == animationName && animation.effect.getKeyframes().length) {
+            animation.currentTime = time * 1000;
+            animation.pause();
+            return true;
+        }
+    }
+    return false;
+}
+
 function testAnimation(id)
 {
     var div = document.getElementById(id);
@@ -85,11 +104,11 @@
     window.div = div;
     shouldBe('div.offsetWidth', '52');
     if (window.internals) {
-        internals.pauseAnimationAtTimeOnPseudoElement('example', 1.0, div, id);
+        pauseAnimationAtTimeOnPseudoElement('example', 1.0, div, id);
         shouldBeCloseTo('div.offsetWidth', 20, 1);
         computedTop = getPseudoComputedTop(id);
         shouldBeCloseTo('computedTop', 170, 1);
-        internals.pauseAnimationAtTimeOnPseudoElement('example', 2.0, div, id);
+        pauseAnimationAtTimeOnPseudoElement('example', 2.0, div, id);
         shouldBeCloseTo('div.offsetWidth', 12, 1);
         computedTop = getPseudoComputedTop(id);
         shouldBeCloseTo('computedTop', 200, 1);

Modified: trunk/LayoutTests/fast/css-generated-content/pseudo-transition.html (230631 => 230632)


--- trunk/LayoutTests/fast/css-generated-content/pseudo-transition.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/fast/css-generated-content/pseudo-transition.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -53,6 +53,33 @@
 // FIXME: This test should be modified so subpixel doesn't cause off by one
 // below and it no longer needs shouldBeCloseTo.
 
+const prefix = "-webkit-";
+const propertiesRequiringPrefix = ["-webkit-text-stroke-color", "-webkit-text-fill-color"];
+
+function pauseTransitionAtTimeOnPseudoElement(transitionProperty, time, element, pseudoId)
+{
+    const pseudoElement = internals.pseudoElement(element, pseudoId);
+    if (!pseudoElement) {
+        console.log("Failed to find pseudo element");
+        return;
+    }
+
+    if (transitionProperty.startsWith(prefix) && !propertiesRequiringPrefix.includes(transitionProperty))
+        transitionProperty = transitionProperty.substr(prefix.length);
+
+    // Otherwise, use the Web Animations API.
+    const animations = pseudoElement.getAnimations();
+    for (let animation of animations) {
+        if (animation instanceof CSSTransition && animation.transitionProperty == transitionProperty) {
+            animation.currentTime = time * 1000;
+            animation.pause();
+            return true;
+        }
+    }
+    console.log(`A transition for property ${transitionProperty} could not be found`);
+    return false;
+}
+
 function testTransition(id)
 {
     var div = document.getElementById(id);
@@ -60,14 +87,14 @@
     window.div = div;
     shouldBe('div.offsetWidth', '52');
     if (window.internals) {
-        internals.pauseTransitionAtTimeOnPseudoElement('width', 1.0, div, id);
+        pauseTransitionAtTimeOnPseudoElement('width', 1.0, div, id);
         shouldBeCloseTo('div.offsetWidth', 20, 1);
-        internals.pauseTransitionAtTimeOnPseudoElement('top', 1.0, div, id);
+        pauseTransitionAtTimeOnPseudoElement('top', 1.0, div, id);
         computedTop = getPseudoComputedTop(id);
         shouldBeCloseTo('computedTop', 170, 1);
-        internals.pauseTransitionAtTimeOnPseudoElement('width', 2.0, div, id);
+        pauseTransitionAtTimeOnPseudoElement('width', 2.0, div, id);
         shouldBeCloseTo('div.offsetWidth', 12, 1);
-        internals.pauseTransitionAtTimeOnPseudoElement('top', 2.0, div, id);
+        pauseTransitionAtTimeOnPseudoElement('top', 2.0, div, id);
         computedTop = getPseudoComputedTop(id);
         shouldBeCloseTo('computedTop', 200, 1);
     } else {

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (230631 => 230632)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,15 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        This test now fails at a later assertion, so updating the expectation for it.
+
+        * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
+
 2018-04-12  Daniel Bates  <daba...@apple.com>
 
         Content-Type not enforced for <script> allows for XSS

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt (230631 => 230632)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -118,6 +118,6 @@
 PASS Element.animate() correctly sets the Animation's timeline 
 PASS Element.animate() correctly sets the Animation's timeline when triggered on an element in a different document 
 PASS Element.animate() calls play on the Animation 
-FAIL CSSPseudoElement.animate() creates an Animation object assert_true: expected true got false
-FAIL CSSPseudoElement.animate() creates an Animation object targeting to the correct CSSPseudoElement object assert_true: expected true got false
+FAIL CSSPseudoElement.animate() creates an Animation object assert_equals: expected Element node <div class="pseudo"></div> but got null
+FAIL CSSPseudoElement.animate() creates an Animation object targeting to the correct CSSPseudoElement object assert_equals: expected Element node <div class="pseudo"></div> but got null
 

Modified: trunk/LayoutTests/platform/ios/TestExpectations (230631 => 230632)


--- trunk/LayoutTests/platform/ios/TestExpectations	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2018-04-13 16:02:11 UTC (rev 230632)
@@ -3286,3 +3286,6 @@
 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/interfaces.any.html [ Slow ]
 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/interfaces.any.worker.html [ Slow ]
 [ Debug ] imported/w3c/web-platform-tests/hr-time/idlharness.html [ Slow ]
+
+webkit.org/b/184580 animations/stop-animation-on-suspend.html [ Failure ]
+

Modified: trunk/LayoutTests/platform/win/TestExpectations (230631 => 230632)


--- trunk/LayoutTests/platform/win/TestExpectations	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/platform/win/TestExpectations	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1740,11 +1740,9 @@
 [ Debug ] legacy-animation-engine/animations/animation-hit-test-transform.html [ Skip ] # Debug assertion
 [ Debug ] animations/animation-hit-test.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-hit-test.html [ Skip ] # Debug assertion
-[ Debug ] animations/animation-internals-api.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-internals-api.html [ Skip ] # Debug assertion
 [ Debug ] animations/animation-direction-reverse-fill-mode-hardware.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-direction-reverse-fill-mode-hardware.html [ Skip ] # Debug assertion
-[ Debug ] animations/animation-internals-api-multiple-keyframes.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-internals-api-multiple-keyframes.html [ Skip ] # Debug assertion
 [ Debug ] animations/animation-shorthand-name-order.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-shorthand-name-order.html [ Skip ] # Debug assertion
@@ -1772,7 +1770,6 @@
 [ Debug ] legacy-animation-engine/animations/animation-on-inline-crash.html [ Skip ] # Debug assertion
 [ Debug ] animations/animation-css-rule-types.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-css-rule-types.html [ Skip ] # Debug assertion
-[ Debug ] animations/animation-direction-alternate-reverse.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-direction-alternate-reverse.html [ Skip ] # Debug assertion
 [ Debug ] animations/animation-direction-reverse-timing-functions.html [ Skip ] # Debug assertion
 [ Debug ] legacy-animation-engine/animations/animation-direction-reverse-timing-functions.html [ Skip ] # Debug assertion
@@ -4050,3 +4047,9 @@
 webkit.org/b/184482 legacy-animation-engine/compositing/reflections/nested-reflection-animated.html [ Skip ]
 
 webkit.org/b/184537 fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html [ Skip ]
+
+webkit.org/b/184589 transitions/zero-duration-with-non-zero-delay-end.html [ Skip ]
+webkit.org/b/184589 animations/big-rotation.html [ Skip ]
+webkit.org/b/184589 fast/css-generated-content/pseudo-transition.html [ Skip ]
+webkit.org/b/184589 animations/animation-direction-alternate-reverse.html [ Skip ]
+webkit.org/b/184589 fast/css-generated-content/pseudo-animation.html [ Skip ]

Modified: trunk/LayoutTests/transitions/remove-transition-style.html (230631 => 230632)


--- trunk/LayoutTests/transitions/remove-transition-style.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/remove-transition-style.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -29,7 +29,7 @@
     function testTransitions()
     {
       if (window.testRunner) {
-        var numAnims = internals.numberOfActiveAnimations();
+        var numAnims = document.getAnimations().length;
         if (numAnims == 0)
           log('No running transitions: PASS');
         else

Deleted: trunk/LayoutTests/transitions/transition-drt-api-delay-expected.txt (230631 => 230632)


--- trunk/LayoutTests/transitions/transition-drt-api-delay-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/transition-drt-api-delay-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,5 +0,0 @@
-Test for transition delay on testRunner API
-
-This test works only in DumpRenderTree. It uses an API exposed only there to jump to a particular time in a running transition. Tests bug 22368
-
-PASS

Deleted: trunk/LayoutTests/transitions/transition-drt-api-delay.html (230631 => 230632)


--- trunk/LayoutTests/transitions/transition-drt-api-delay.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/transition-drt-api-delay.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-  <style>
-    #target {
-      position: relative;
-      left: 100px;
-      height: 50px;
-      width: 50px;
-      background-color: green;
-      -webkit-transition-property: left;
-      -webkit-transition-duration: 4s;
-      -webkit-transition-timing-function: linear;
-      -webkit-transition-delay: 1s;
-    }
-    
-    #target.moved {
-      left: 200px;
-    }
-   </style>
-   <script src=""
-   <script>
-    function endTest() {
-      if (window.testRunner) {
-        var target = document.getElementById('target');
-        internals.pauseTransitionAtTimeOnElement("left", 2.0, target);
-        var left = window.getComputedStyle(target).left;
-        var result = "PASS";
-        if (left != "125px") {
-          result = "FAIL - expected 125px got " + left;
-        }
-        document.getElementById('result').innerHTML = "<p>" + result + "</p>";
-        testRunner.notifyDone();
-      }
-    }
-    
-    function startTest() {
-      if (window.testRunner) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
-      }
-      
-      document.getElementById("target").className = "moved";
-      waitForAnimationStart(endTest, 1);
-    }
-   </script>
-</head>
-<body _onload_="startTest()">
-  <h1>Test for transition delay on testRunner API</h1>
-  
-  <p>This test works only in DumpRenderTree. It uses an API exposed
-    only there to jump to a particular time in a running transition.
-    Tests bug <a href=""
-  </p>
-
-  <div id="target"></div>
-
-  <div id="result"></div>
-
-</body>
-</html>

Deleted: trunk/LayoutTests/transitions/transition-drt-api-expected.txt (230631 => 230632)


--- trunk/LayoutTests/transitions/transition-drt-api-expected.txt	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/transition-drt-api-expected.txt	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1 +0,0 @@
-PASS: correctly paused transition

Deleted: trunk/LayoutTests/transitions/transition-drt-api.html (230631 => 230632)


--- trunk/LayoutTests/transitions/transition-drt-api.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/transition-drt-api.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-  <style>
-    #target {
-      position: relative;
-      left: 100px;
-      height: 100px;
-      width: 100px;
-      background-color: blue;
-      -webkit-transition-property: left;
-      -webkit-transition-duration: 4s;
-      -webkit-transition-timing-function: linear;
-    }
-    
-    #target.moved {
-      left: 200px;
-    }
-   </style>
-   <script>
-    if (window.testRunner)
-      testRunner.dumpAsText();
-
-    function endTest() {
-      if (window.testRunner) {
-        var target = document.getElementById('target');
-        var paused = internals.pauseTransitionAtTimeOnElement("left", 1.0, target);
-        var result = "";
-        if (paused)
-          result = "PASS: correctly paused transition";
-        else
-          result = "FAIL: failed to pause transition";
-
-        document.getElementById('results').innerText = result;
-        testRunner.notifyDone();
-      } else
-        document.getElementById('results').innerText = "This test requires DRT";
-    }
-    
-    function startTest() {
-      if (window.testRunner)
-        testRunner.waitUntilDone();
-      
-      document.getElementById("target").className = "moved";
-      window.setTimeout(endTest, 0);
-    }
-   </script>
-</head>
-<body _onload_="startTest()">
-  <!-- Test for Interals pauseTransitionAtTimeOnElement() API -->
-  <div id="target"></div>
-  <div id="results"></div>
-
-</body>
-</html>

Modified: trunk/LayoutTests/transitions/transition-hit-test-transform.html (230631 => 230632)


--- trunk/LayoutTests/transitions/transition-hit-test-transform.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/transition-hit-test-transform.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -49,7 +49,7 @@
         {
             if (window.testRunner) {
                 var target = document.getElementById('target');
-                if (!internals.pauseTransitionAtTimeOnElement("-webkit-transform", 2.0, target))
+                if (!pauseTransitionAtTimeOnElement("-webkit-transform", 2.0, target))
                     throw("Transition is not running");
         
                 checkResults();

Modified: trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html (230631 => 230632)


--- trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html	2018-04-13 16:02:11 UTC (rev 230632)
@@ -20,9 +20,18 @@
     }
    </style>
    <script>
+
+    function numberOfActiveAnimations()
+    {
+        return document.getAnimations().filter(animation => {
+            const playState = animation.playState;
+            return playState == "running" || playState == "paused";
+        }).length;
+    }
+
     function sample0() {
       var expected = 1;
-      var current = internals.numberOfActiveAnimations();
+      var current = numberOfActiveAnimations();
       if (current == expected)
         document.getElementById('result0').innerHTML = "Number of active animations before transition is (" + current + ") as expected";
       else
@@ -31,7 +40,7 @@
     
     function sample1() {
       var expected = 0;
-      var current = internals.numberOfActiveAnimations();
+      var current = numberOfActiveAnimations();
       if (current == expected)
         document.getElementById('result1').innerHTML = "Number of active animations after transition is (" + current + ") as expected";
       else

Modified: trunk/Source/WebCore/ChangeLog (230631 => 230632)


--- trunk/Source/WebCore/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebCore/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,22 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        We now set the CSS Animations and CSS Transitions as Web Animations flag on by default. To ensure that some remaining
+        tests pass with this flag on, we expose a way to get to a PseudoElement via a new internals.pseudoElement() method. This
+        allows tests that used internals.pauseAnimationAtTimeOnPseudoElement() and internals.pauseTransitionAtTimeOnPseudoElement()
+        to now work with the Web Animations API.
+
+        * page/RuntimeEnabledFeatures.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::pseudoElement):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2018-04-13  Sergio Villar Senin  <svil...@igalia.com>
 
         [WebVR][OpenVR] Implement requestPresent()/exitPresent() and getLayers()

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (230631 => 230632)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2018-04-13 16:02:11 UTC (rev 230632)
@@ -337,7 +337,7 @@
 #endif
 
     bool m_areWebAnimationsEnabled { true };
-    bool m_areCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled { false };
+    bool m_areCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled { true };
 
 #if ENABLE(WEBGL2)
     bool m_isWebGL2Enabled { false };

Modified: trunk/Source/WebCore/testing/Internals.cpp (230631 => 230632)


--- trunk/Source/WebCore/testing/Internals.cpp	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebCore/testing/Internals.cpp	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1040,6 +1040,14 @@
     return frame()->animation().pauseTransitionAtTime(*pseudoElement, property, pauseTime);
 }
 
+ExceptionOr<RefPtr<Element>> Internals::pseudoElement(Element& element, const String& pseudoId)
+{
+    if (pseudoId != "before" && pseudoId != "after")
+        return Exception { InvalidAccessError };
+
+    return pseudoId == "before" ? element.beforePseudoElement() : element.afterPseudoElement();
+}
+
 ExceptionOr<String> Internals::elementRenderTreeAsText(Element& element)
 {
     element.document().updateStyleIfNeeded();

Modified: trunk/Source/WebCore/testing/Internals.h (230631 => 230632)


--- trunk/Source/WebCore/testing/Internals.h	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebCore/testing/Internals.h	2018-04-13 16:02:11 UTC (rev 230632)
@@ -193,6 +193,9 @@
     ExceptionOr<bool> pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element&);
     ExceptionOr<bool> pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element&, const String& pseudoId);
 
+    // For animations testing, we need a way to get at pseudo elements.
+    ExceptionOr<RefPtr<Element>> pseudoElement(Element&, const String&);
+
     Node* treeScopeRootNode(Node&);
     Node* parentTreeScope(Node&);
 

Modified: trunk/Source/WebCore/testing/Internals.idl (230631 => 230632)


--- trunk/Source/WebCore/testing/Internals.idl	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebCore/testing/Internals.idl	2018-04-13 16:02:11 UTC (rev 230632)
@@ -148,6 +148,9 @@
     [MayThrowException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
     [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
 
+    // For animations testing, we need a way to get at pseudo elements.
+    [MayThrowException] Element? pseudoElement(Element element, DOMString pseudoId);
+
     DOMString visiblePlaceholder(Element element);
     void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
     [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();

Modified: trunk/Source/WebKit/ChangeLog (230631 => 230632)


--- trunk/Source/WebKit/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKit/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,13 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        * Shared/WebPreferences.yaml:
+
 2018-04-13  Xabier Rodriguez Calvar  <calva...@igalia.com>
 
         [GStreamer] Convert GStreamerUtilities in GStreamerCommon and include the GStreamer smart pointer traits

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (230631 => 230632)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-04-13 16:02:11 UTC (rev 230632)
@@ -101,7 +101,7 @@
 
 CSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:
   type: bool
-  defaultValue: false
+  defaultValue: true
   webcoreBinding: RuntimeEnabledFeatures
 
 ForceFTPDirectoryListings:

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (230631 => 230632)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,13 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        * WebView/WebPreferences.mm:
+
 2018-04-05  Yusuke Suzuki  <utatane....@gmail.com>
 
         [WTF] Remove StaticLock

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (230631 => 230632)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2018-04-13 16:02:11 UTC (rev 230632)
@@ -625,7 +625,7 @@
         [NSNumber numberWithBool:YES], WebKitDataTransferItemsEnabledPreferenceKey,
         [NSNumber numberWithBool:NO], WebKitCustomPasteboardDataEnabledPreferenceKey,
         [NSNumber numberWithBool:YES], WebKitModernMediaControlsEnabledPreferenceKey,
-        [NSNumber numberWithBool:NO], WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey,
+        [NSNumber numberWithBool:YES], WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey,
 
 #if ENABLE(WEBGL2)
         [NSNumber numberWithBool:NO], WebKitWebGL2EnabledPreferenceKey,

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (230631 => 230632)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,15 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        Make sure Web Animations and CSS Animations and CSS Transitions are enabled by default on Windows.
+
+        * WebPreferences.cpp:
+
 2018-04-05  Yusuke Suzuki  <utatane....@gmail.com>
 
         [WTF] Remove StaticLock

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (230631 => 230632)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2018-04-13 16:02:11 UTC (rev 230632)
@@ -310,6 +310,8 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsEnabledPreferenceKey), kCFBooleanFalse);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey), kCFBooleanFalse);
+
     CFDictionaryAddValue(defaults, CFSTR(WebKitUserTimingEnabledPreferenceKey), kCFBooleanFalse);
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitResourceTimingEnabledPreferenceKey), kCFBooleanFalse);

Modified: trunk/Tools/ChangeLog (230631 => 230632)


--- trunk/Tools/ChangeLog	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/ChangeLog	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1,3 +1,25 @@
+2018-04-12  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
+        https://bugs.webkit.org/show_bug.cgi?id=184569
+        <rdar://problem/38671301>
+
+        Reviewed by Jon Lee.
+
+        We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
+        but override it to be false always in the LayoutTests/legacy-animation-engine directory.
+
+        * DumpRenderTree/TestOptions.h:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
+        (runTest):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+        * WebKitTestRunner/TestOptions.cpp:
+        (WTR::isLegacyAnimationEngineTestPath):
+        (WTR::TestOptions::TestOptions):
+        * WebKitTestRunner/TestOptions.h:
+
 2018-04-13  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added

Modified: trunk/Tools/DumpRenderTree/TestOptions.h (230631 => 230632)


--- trunk/Tools/DumpRenderTree/TestOptions.h	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/DumpRenderTree/TestOptions.h	2018-04-13 16:02:11 UTC (rev 230632)
@@ -29,7 +29,7 @@
 
 struct TestOptions {
     bool enableAttachmentElement { false };
-    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { false };
+    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { true };
     bool useAcceleratedDrawing { false };
     bool enableIntersectionObserver { false };
     bool enableMenuItemElement { false };

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (230631 => 230632)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2018-04-13 16:02:11 UTC (rev 230632)
@@ -1751,6 +1751,11 @@
     return strstr(pathOrURL, "dumpAsText/");
 }
 
+static bool shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference(const char* pathOrURL)
+{
+    return strstr(pathOrURL, "legacy-animation-engine/");
+}
+
 static bool shouldEnableDeveloperExtras(const char* pathOrURL)
 {
     return true;
@@ -1920,6 +1925,9 @@
 
     TestOptions options { [url isFileURL] ? [url fileSystemRepresentation] : pathOrURL, command.absolutePath };
 
+    if (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference(pathOrURL.c_str()))
+        options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations = false;
+
     if (!mainFrameTestOptions || !options.webViewIsCompatibleWithOptions(mainFrameTestOptions.value())) {
         if (mainFrame)
             destroyWebViewAndOffscreenWindow([mainFrame webView]);

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (230631 => 230632)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2018-04-13 16:02:11 UTC (rev 230632)
@@ -697,8 +697,10 @@
     WKPreferencesSetWebAuthenticationEnabled(preferences, options.enableWebAuthentication);
     WKPreferencesSetIsSecureContextAttributeEnabled(preferences, options.enableIsSecureContextAttribute);
     WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(preferences, options.allowCrossOriginSubresourcesToAskForCredentials);
-    WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(preferences, options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations);
 
+    // We always want to have CSS Animations and CSS Transitions as Web Animations turned off for legacy-animation-engine directory.
+    WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(preferences, options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations && !options.isLegacyAnimationEngineTest);
+
     static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
     WKPreferencesSetDefaultTextEncodingName(preferences, defaultTextEncoding);
 

Modified: trunk/Tools/WebKitTestRunner/TestOptions.cpp (230631 => 230632)


--- trunk/Tools/WebKitTestRunner/TestOptions.cpp	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/WebKitTestRunner/TestOptions.cpp	2018-04-13 16:02:11 UTC (rev 230632)
@@ -65,10 +65,16 @@
     return 1;
 }
 
+static bool isLegacyAnimationEngineTestPath(const std::string& pathOrURL)
+{
+    return pathContains(pathOrURL, "legacy-animation-engine/");
+}
+
 TestOptions::TestOptions(const std::string& pathOrURL)
     : useFlexibleViewport(shouldMakeViewportFlexible(pathOrURL))
     , useFixedLayout(shouldUseFixedLayout(pathOrURL))
     , isSVGTest(isSVGTestPath(pathOrURL))
+    , isLegacyAnimationEngineTest(isLegacyAnimationEngineTestPath(pathOrURL))
     , deviceScaleFactor(deviceScaleFactorForTest(pathOrURL))
 {
 }

Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (230631 => 230632)


--- trunk/Tools/WebKitTestRunner/TestOptions.h	2018-04-13 15:46:15 UTC (rev 230631)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h	2018-04-13 16:02:11 UTC (rev 230632)
@@ -55,7 +55,8 @@
     bool shouldShowTouches { false };
     bool dumpJSConsoleLogInStdErr { false };
     bool allowCrossOriginSubresourcesToAskForCredentials { false };
-    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { false };
+    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { true };
+    bool isLegacyAnimationEngineTest { false };
 
     float deviceScaleFactor { 1 };
     Vector<String> overrideLanguages;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to