Changeset 230632 in webkit


Ignore:
Timestamp:
Apr 13, 2018, 9:02:11 AM (7 years ago)
Author:
graouts@webkit.org
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().
Location:
trunk
Files:
8 deleted
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r230631 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        * TestExpectations: A small number of tests regressed with the flag on, so we list them and have raised
     10        bugs to fix them ASAP.
     11        * animations/animation-direction-alternate-reverse-expected.txt:
     12        * animations/animation-direction-alternate-reverse.html: This test was incorrect since it assumes that at the
     13        end active boundary time we are using the end value whereas we are using the start value. Indeed, since the
     14        fill-mode is "none", at the end of the active time, the progress is null per the Web Animations spec.
     15        * animations/animation-hit-test-transform.html: Stop using the internals method.
     16        * animations/animation-internals-api-expected.txt: Removed.
     17        * animations/animation-internals-api-multiple-keyframes-expected.txt: Removed.
     18        * animations/animation-internals-api-multiple-keyframes.html: Removed. This test only tests an internals method
     19        that is no longer relevant for the new animation engine, but preserved for compatibility with legacy tests.
     20        * animations/animation-internals-api.html: Removed. This test only tests an internals method that is no longer
     21        relevant for the new animation engine, but preserved for compatibility with legacy tests.
     22        * animations/big-rotation-expected.txt:
     23        * animations/big-rotation.html: Here again we are correcting a test which made the wrong assumption about the
     24        value generated at the end active boundary time.
     25        * animations/duplicated-keyframes-name.html: We make the animation fill forwards to check that we are using
     26        the correct end value for an animation with multiple 100% keyframe.
     27        * animations/fill-forwards-end-state.html: Same as previous test.
     28        * animations/fill-mode-forwards-zero-duration-expected.txt:
     29        * animations/fill-mode-forwards-zero-duration.html: This test should seek after its delay + duration, so we test
     30        at 3s instead of 1s. This is due to a behavior difference between internals.pauseAnimationAtTimeOnElement() and
     31        its replacement.
     32        * fast/css-generated-content/pseudo-animation.html: Use internals.pseudoElement() and the Web Animations API rather
     33        than internals.pauseAnimationAtTimeOnPseudoElement().
     34        * fast/css-generated-content/pseudo-transition.html: Use internals.pseudoElement() and the Web Animations API rather
     35        than internals.pauseTransitionAtTimeOnPseudoElement().
     36        * platform/ios/TestExpectations:
     37        * platform/win/TestExpectations: Remove references to tests that we are removing.
     38        * transitions/remove-transition-style.html: Use document.getAnimations() to figure out how many animations are running.
     39        * transitions/transition-drt-api-delay-expected.txt: Removed.
     40        * transitions/transition-drt-api-delay.html: Removed. This test only tests an internals method that is no longer
     41        relevant for the new animation engine, but preserved for compatibility with legacy tests.
     42        * transitions/transition-drt-api-expected.txt: Removed.
     43        * transitions/transition-drt-api.html: Removed. This test only tests an internals method that is no longer
     44        relevant for the new animation engine, but preserved for compatibility with legacy tests.
     45        * transitions/transition-hit-test-transform.html: Stop using internals.pauseTransitionAtTimeOnElement().
     46        * transitions/zero-duration-with-non-zero-delay-end.html: Use the Web Animations API instead of internals.numberOfActiveAnimations().
     47
    1482018-04-13  Per Arne Vollan  <pvollan@apple.com>
    249
  • trunk/LayoutTests/TestExpectations

    r230602 r230632  
    18421842webkit.org/b/48451 animations/suspend-resume-animation.html [ Pass Failure ]
    18431843webkit.org/b/48451 animations/3d/transform-origin-vs-functions.html [ Pass Failure ]
     1844
     1845# Regressions in the new animation engine.
     1846webkit.org/b/184563 animations/trigger-container-scroll-boundaries.html [ Failure ]
     1847webkit.org/b/184563 animations/trigger-container-scroll-empty.html [ Failure ]
     1848webkit.org/b/184563 animations/trigger-container-scroll-simple.html [ Failure ]
     1849webkit.org/b/184564 imported/blink/transitions/zero-duration-should-not-cancel.html [ Failure ]
     1850webkit.org/b/184565 compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html [ Failure ]
     1851webkit.org/b/184565 compositing/layer-creation/mismatched-transform-transition-overlap.html [ Failure ]
     1852webkit.org/b/184565 compositing/layer-creation/scale-rotation-transition-overlap.html [ Failure ]
     1853webkit.org/b/184565 compositing/layer-creation/translate-scale-transition-overlap.html [ Failure ]
     1854webkit.org/b/184565 compositing/layer-creation/translate-transition-overlap.html [ Failure ]
     1855webkit.org/b/184566 compositing/backing/transform-transition-from-outside-view.html [ Failure ]
     1856webkit.org/b/184579 fast/animation/css-animation-resuming-when-visible-with-style-change2.html [ Pass Failure ]
  • trunk/LayoutTests/animations/animation-direction-alternate-reverse-expected.txt

    r107162 r230632  
    22PASS - "left" property for "box" element at 2s saw something close to: 0
    33PASS - "left" property for "box" element at 3s saw something close to: 200
    4 PASS - "left" property for "box" element at 4s saw something close to: 400
     4PASS - "left" property for "box" element at 4s saw something close to: 0
    55
  • trunk/LayoutTests/animations/animation-direction-alternate-reverse.html

    r107162 r230632  
    4141      ["move", 1.0, "box", "left", 200, 20],
    4242      ["move", 2.0, "box", "left", 0, 20],
    43 
    4443      ["move", 3.0, "box", "left", 200, 20],
    45       ["move", 4.0, "box", "left", 400, 20],
     44      ["move", 4.0, "box", "left", 0, 20],
    4645    ];
    4746   
  • trunk/LayoutTests/animations/animation-hit-test-transform.html

    r211573 r230632  
    5959            if (window.testRunner) {
    6060                var target = document.getElementById("target");
    61                 if (!internals.pauseAnimationAtTimeOnElement("anim", 2.0, target)) {
     61                if (!pauseAnimationAtTimeOnElement("anim", 2.0, target)) {
    6262                    document.getElementById('result').innerHTML = "FAIL: Failed to pause animation"
    6363                    testRunner.notifyDone();
  • trunk/LayoutTests/animations/big-rotation-expected.txt

    r39187 r230632  
    33PASS - "webkitTransform" property for "box" element at 1s saw something close to: -1,0,0,-1
    44PASS - "webkitTransform" property for "box" element at 2s saw something close to: 1,0,0,1
    5 PASS - "webkitTransform" property for "box" element at 3s saw something close to: -1,0,0,-1
     5PASS - "webkitTransform" property for "box" element at 3s saw something close to: none
    66
  • trunk/LayoutTests/animations/big-rotation.html

    r84872 r230632  
    2626      ["rotate", 1, "box", "webkitTransform", [-1,0,0,-1], 0.2],
    2727      ["rotate", 2, "box", "webkitTransform", [1,0,0,1], 0.2],
    28       ["rotate", 3, "box", "webkitTransform", [-1,0,0,-1], 0.2],
     28      ["rotate", 3, "box", "webkitTransform", "none", 0.2],
    2929    ];
    3030   
  • trunk/LayoutTests/animations/duplicated-keyframes-name.html

    r101321 r230632  
    1717        -webkit-animation-timing-function: linear;
    1818        -webkit-animation-name: anim;
     19        -webkit-animation-fill-mode: forwards;
    1920    }
    2021    @-webkit-keyframes anim {
  • trunk/LayoutTests/animations/fill-forwards-end-state.html

    r191502 r230632  
    1111      width: 100px;
    1212      background-color: blue;
    13       animation-fill-mode: forwards;
    14       animation: anim1 2s 0.2s linear;
     13      animation: anim1 2s 0.2s linear forwards;
    1514    }
    1615    @keyframes anim1 {
  • trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt

    r191540 r230632  
    11Fill-forwards state should be the last keyframe state, even with a zero-duration animation.
    22
    3 PASS - "left" property for "box1" element at 1s saw something close to: 100
     3PASS - "left" property for "box1" element at 3s saw something close to: 100
    44
  • trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html

    r204052 r230632  
    2424    const expectedValues = [
    2525      // [animation-name, time, element-id, property, expected-value, tolerance]
    26       ["anim1", 1, "box1", "left", 100, 2],
     26      ["anim1", 3, "box1", "left", 100, 2],
    2727    ];
    2828
  • trunk/LayoutTests/fast/css-generated-content/pseudo-animation.html

    r155263 r230632  
    7979// below and it no longer needs shouldBeCloseTo.
    8080
     81function pauseAnimationAtTimeOnPseudoElement(animationName, time, element, pseudoId)
     82{
     83    const pseudoElement = internals.pseudoElement(element, pseudoId);
     84    if (!pseudoElement) {
     85        console.log("Failed to find pseudo element");
     86        return;
     87    }
     88
     89    const animations = pseudoElement.getAnimations();
     90    for (let animation of animations) {
     91        if (animation instanceof CSSAnimation && animation.animationName == animationName && animation.effect.getKeyframes().length) {
     92            animation.currentTime = time * 1000;
     93            animation.pause();
     94            return true;
     95        }
     96    }
     97    return false;
     98}
     99
    81100function testAnimation(id)
    82101{
     
    86105    shouldBe('div.offsetWidth', '52');
    87106    if (window.internals) {
    88         internals.pauseAnimationAtTimeOnPseudoElement('example', 1.0, div, id);
     107        pauseAnimationAtTimeOnPseudoElement('example', 1.0, div, id);
    89108        shouldBeCloseTo('div.offsetWidth', 20, 1);
    90109        computedTop = getPseudoComputedTop(id);
    91110        shouldBeCloseTo('computedTop', 170, 1);
    92         internals.pauseAnimationAtTimeOnPseudoElement('example', 2.0, div, id);
     111        pauseAnimationAtTimeOnPseudoElement('example', 2.0, div, id);
    93112        shouldBeCloseTo('div.offsetWidth', 12, 1);
    94113        computedTop = getPseudoComputedTop(id);
  • trunk/LayoutTests/fast/css-generated-content/pseudo-transition.html

    r155263 r230632  
    5454// below and it no longer needs shouldBeCloseTo.
    5555
     56const prefix = "-webkit-";
     57const propertiesRequiringPrefix = ["-webkit-text-stroke-color", "-webkit-text-fill-color"];
     58
     59function pauseTransitionAtTimeOnPseudoElement(transitionProperty, time, element, pseudoId)
     60{
     61    const pseudoElement = internals.pseudoElement(element, pseudoId);
     62    if (!pseudoElement) {
     63        console.log("Failed to find pseudo element");
     64        return;
     65    }
     66
     67    if (transitionProperty.startsWith(prefix) && !propertiesRequiringPrefix.includes(transitionProperty))
     68        transitionProperty = transitionProperty.substr(prefix.length);
     69
     70    // Otherwise, use the Web Animations API.
     71    const animations = pseudoElement.getAnimations();
     72    for (let animation of animations) {
     73        if (animation instanceof CSSTransition && animation.transitionProperty == transitionProperty) {
     74            animation.currentTime = time * 1000;
     75            animation.pause();
     76            return true;
     77        }
     78    }
     79    console.log(`A transition for property ${transitionProperty} could not be found`);
     80    return false;
     81}
     82
    5683function testTransition(id)
    5784{
     
    6188    shouldBe('div.offsetWidth', '52');
    6289    if (window.internals) {
    63         internals.pauseTransitionAtTimeOnPseudoElement('width', 1.0, div, id);
     90        pauseTransitionAtTimeOnPseudoElement('width', 1.0, div, id);
    6491        shouldBeCloseTo('div.offsetWidth', 20, 1);
    65         internals.pauseTransitionAtTimeOnPseudoElement('top', 1.0, div, id);
     92        pauseTransitionAtTimeOnPseudoElement('top', 1.0, div, id);
    6693        computedTop = getPseudoComputedTop(id);
    6794        shouldBeCloseTo('computedTop', 170, 1);
    68         internals.pauseTransitionAtTimeOnPseudoElement('width', 2.0, div, id);
     95        pauseTransitionAtTimeOnPseudoElement('width', 2.0, div, id);
    6996        shouldBeCloseTo('div.offsetWidth', 12, 1);
    70         internals.pauseTransitionAtTimeOnPseudoElement('top', 2.0, div, id);
     97        pauseTransitionAtTimeOnPseudoElement('top', 2.0, div, id);
    7198        computedTop = getPseudoComputedTop(id);
    7299        shouldBeCloseTo('computedTop', 200, 1);
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r230602 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        This test now fails at a later assertion, so updating the expectation for it.
     10
     11        * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
     12
    1132018-04-12  Daniel Bates  <dabates@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt

    r229530 r230632  
    119119PASS Element.animate() correctly sets the Animation's timeline when triggered on an element in a different document
    120120PASS Element.animate() calls play on the Animation
    121 FAIL CSSPseudoElement.animate() creates an Animation object assert_true: expected true got false
    122 FAIL CSSPseudoElement.animate() creates an Animation object targeting to the correct CSSPseudoElement object assert_true: expected true got false
     121FAIL CSSPseudoElement.animate() creates an Animation object assert_equals: expected Element node <div class="pseudo"></div> but got null
     122FAIL CSSPseudoElement.animate() creates an Animation object targeting to the correct CSSPseudoElement object assert_equals: expected Element node <div class="pseudo"></div> but got null
    123123
  • trunk/LayoutTests/platform/ios/TestExpectations

    r230471 r230632  
    32873287[ Debug ] imported/w3c/web-platform-tests/IndexedDB/interfaces.any.worker.html [ Slow ]
    32883288[ Debug ] imported/w3c/web-platform-tests/hr-time/idlharness.html [ Slow ]
     3289
     3290webkit.org/b/184580 animations/stop-animation-on-suspend.html [ Failure ]
     3291
  • trunk/LayoutTests/platform/win/TestExpectations

    r230631 r230632  
    17411741[ Debug ] animations/animation-hit-test.html [ Skip ] # Debug assertion
    17421742[ Debug ] legacy-animation-engine/animations/animation-hit-test.html [ Skip ] # Debug assertion
    1743 [ Debug ] animations/animation-internals-api.html [ Skip ] # Debug assertion
    17441743[ Debug ] legacy-animation-engine/animations/animation-internals-api.html [ Skip ] # Debug assertion
    17451744[ Debug ] animations/animation-direction-reverse-fill-mode-hardware.html [ Skip ] # Debug assertion
    17461745[ Debug ] legacy-animation-engine/animations/animation-direction-reverse-fill-mode-hardware.html [ Skip ] # Debug assertion
    1747 [ Debug ] animations/animation-internals-api-multiple-keyframes.html [ Skip ] # Debug assertion
    17481746[ Debug ] legacy-animation-engine/animations/animation-internals-api-multiple-keyframes.html [ Skip ] # Debug assertion
    17491747[ Debug ] animations/animation-shorthand-name-order.html [ Skip ] # Debug assertion
     
    17731771[ Debug ] animations/animation-css-rule-types.html [ Skip ] # Debug assertion
    17741772[ Debug ] legacy-animation-engine/animations/animation-css-rule-types.html [ Skip ] # Debug assertion
    1775 [ Debug ] animations/animation-direction-alternate-reverse.html [ Skip ] # Debug assertion
    17761773[ Debug ] legacy-animation-engine/animations/animation-direction-alternate-reverse.html [ Skip ] # Debug assertion
    17771774[ Debug ] animations/animation-direction-reverse-timing-functions.html [ Skip ] # Debug assertion
     
    40514048
    40524049webkit.org/b/184537 fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html [ Skip ]
     4050
     4051webkit.org/b/184589 transitions/zero-duration-with-non-zero-delay-end.html [ Skip ]
     4052webkit.org/b/184589 animations/big-rotation.html [ Skip ]
     4053webkit.org/b/184589 fast/css-generated-content/pseudo-transition.html [ Skip ]
     4054webkit.org/b/184589 animations/animation-direction-alternate-reverse.html [ Skip ]
     4055webkit.org/b/184589 fast/css-generated-content/pseudo-animation.html [ Skip ]
  • trunk/LayoutTests/transitions/remove-transition-style.html

    r141849 r230632  
    3030    {
    3131      if (window.testRunner) {
    32         var numAnims = internals.numberOfActiveAnimations();
     32        var numAnims = document.getAnimations().length;
    3333        if (numAnims == 0)
    3434          log('No running transitions: PASS');
  • trunk/LayoutTests/transitions/transition-hit-test-transform.html

    r142171 r230632  
    5050            if (window.testRunner) {
    5151                var target = document.getElementById('target');
    52                 if (!internals.pauseTransitionAtTimeOnElement("-webkit-transform", 2.0, target))
     52                if (!pauseTransitionAtTimeOnElement("-webkit-transform", 2.0, target))
    5353                    throw("Transition is not running");
    5454       
  • trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html

    r141849 r230632  
    2121   </style>
    2222   <script>
     23
     24    function numberOfActiveAnimations()
     25    {
     26        return document.getAnimations().filter(animation => {
     27            const playState = animation.playState;
     28            return playState == "running" || playState == "paused";
     29        }).length;
     30    }
     31
    2332    function sample0() {
    2433      var expected = 1;
    25       var current = internals.numberOfActiveAnimations();
     34      var current = numberOfActiveAnimations();
    2635      if (current == expected)
    2736        document.getElementById('result0').innerHTML = "Number of active animations before transition is (" + current + ") as expected";
     
    3241    function sample1() {
    3342      var expected = 0;
    34       var current = internals.numberOfActiveAnimations();
     43      var current = numberOfActiveAnimations();
    3544      if (current == expected)
    3645        document.getElementById('result1').innerHTML = "Number of active animations after transition is (" + current + ") as expected";
  • trunk/Source/WebCore/ChangeLog

    r230630 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        We now set the CSS Animations and CSS Transitions as Web Animations flag on by default. To ensure that some remaining
     10        tests pass with this flag on, we expose a way to get to a PseudoElement via a new internals.pseudoElement() method. This
     11        allows tests that used internals.pauseAnimationAtTimeOnPseudoElement() and internals.pauseTransitionAtTimeOnPseudoElement()
     12        to now work with the Web Animations API.
     13
     14        * page/RuntimeEnabledFeatures.h:
     15        * testing/Internals.cpp:
     16        (WebCore::Internals::pseudoElement):
     17        * testing/Internals.h:
     18        * testing/Internals.idl:
     19
    1202018-04-13  Sergio Villar Senin  <svillar@igalia.com>
    221
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r230521 r230632  
    338338
    339339    bool m_areWebAnimationsEnabled { true };
    340     bool m_areCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled { false };
     340    bool m_areCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled { true };
    341341
    342342#if ENABLE(WEBGL2)
  • trunk/Source/WebCore/testing/Internals.cpp

    r230581 r230632  
    10411041}
    10421042
     1043ExceptionOr<RefPtr<Element>> Internals::pseudoElement(Element& element, const String& pseudoId)
     1044{
     1045    if (pseudoId != "before" && pseudoId != "after")
     1046        return Exception { InvalidAccessError };
     1047
     1048    return pseudoId == "before" ? element.beforePseudoElement() : element.afterPseudoElement();
     1049}
     1050
    10431051ExceptionOr<String> Internals::elementRenderTreeAsText(Element& element)
    10441052{
  • trunk/Source/WebCore/testing/Internals.h

    r230548 r230632  
    194194    ExceptionOr<bool> pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element&, const String& pseudoId);
    195195
     196    // For animations testing, we need a way to get at pseudo elements.
     197    ExceptionOr<RefPtr<Element>> pseudoElement(Element&, const String&);
     198
    196199    Node* treeScopeRootNode(Node&);
    197200    Node* parentTreeScope(Node&);
  • trunk/Source/WebCore/testing/Internals.idl

    r230548 r230632  
    149149    [MayThrowException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
    150150
     151    // For animations testing, we need a way to get at pseudo elements.
     152    [MayThrowException] Element? pseudoElement(Element element, DOMString pseudoId);
     153
    151154    DOMString visiblePlaceholder(Element element);
    152155    void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
  • trunk/Source/WebKit/ChangeLog

    r230625 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        * Shared/WebPreferences.yaml:
     10
    1112018-04-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    212
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r230521 r230632  
    102102CSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:
    103103  type: bool
    104   defaultValue: false
     104  defaultValue: true
    105105  webcoreBinding: RuntimeEnabledFeatures
    106106
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r230303 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        * WebView/WebPreferences.mm:
     10
    1112018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
    212
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r230169 r230632  
    626626        [NSNumber numberWithBool:NO], WebKitCustomPasteboardDataEnabledPreferenceKey,
    627627        [NSNumber numberWithBool:YES], WebKitModernMediaControlsEnabledPreferenceKey,
    628         [NSNumber numberWithBool:NO], WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey,
     628        [NSNumber numberWithBool:YES], WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey,
    629629
    630630#if ENABLE(WEBGL2)
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r230303 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        Make sure Web Animations and CSS Animations and CSS Transitions are enabled by default on Windows.
     10
     11        * WebPreferences.cpp:
     12
    1132018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
    214
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r229578 r230632  
    311311    CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsEnabledPreferenceKey), kCFBooleanFalse);
    312312
     313    CFDictionaryAddValue(defaults, CFSTR(WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabledPreferenceKey), kCFBooleanFalse);
     314
    313315    CFDictionaryAddValue(defaults, CFSTR(WebKitUserTimingEnabledPreferenceKey), kCFBooleanFalse);
    314316
  • trunk/Tools/ChangeLog

    r230624 r230632  
     12018-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
     4        https://bugs.webkit.org/show_bug.cgi?id=184569
     5        <rdar://problem/38671301>
     6
     7        Reviewed by Jon Lee.
     8
     9        We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
     10        but override it to be false always in the LayoutTests/legacy-animation-engine directory.
     11
     12        * DumpRenderTree/TestOptions.h:
     13        * DumpRenderTree/mac/DumpRenderTree.mm:
     14        (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
     15        (runTest):
     16        * WebKitTestRunner/TestController.cpp:
     17        (WTR::TestController::resetPreferencesToConsistentValues):
     18        * WebKitTestRunner/TestOptions.cpp:
     19        (WTR::isLegacyAnimationEngineTestPath):
     20        (WTR::TestOptions::TestOptions):
     21        * WebKitTestRunner/TestOptions.h:
     22
    1232018-04-13  Carlos Garcia Campos  <cgarcia@igalia.com>
    224
  • trunk/Tools/DumpRenderTree/TestOptions.h

    r229565 r230632  
    3030struct TestOptions {
    3131    bool enableAttachmentElement { false };
    32     bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { false };
     32    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { true };
    3333    bool useAcceleratedDrawing { false };
    3434    bool enableIntersectionObserver { false };
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r230192 r230632  
    17521752}
    17531753
     1754static bool shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference(const char* pathOrURL)
     1755{
     1756    return strstr(pathOrURL, "legacy-animation-engine/");
     1757}
     1758
    17541759static bool shouldEnableDeveloperExtras(const char* pathOrURL)
    17551760{
     
    19211926    TestOptions options { [url isFileURL] ? [url fileSystemRepresentation] : pathOrURL, command.absolutePath };
    19221927
     1928    if (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference(pathOrURL.c_str()))
     1929        options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations = false;
     1930
    19231931    if (!mainFrameTestOptions || !options.webViewIsCompatibleWithOptions(mainFrameTestOptions.value())) {
    19241932        if (mainFrame)
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r230473 r230632  
    698698    WKPreferencesSetIsSecureContextAttributeEnabled(preferences, options.enableIsSecureContextAttribute);
    699699    WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(preferences, options.allowCrossOriginSubresourcesToAskForCredentials);
    700     WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(preferences, options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations);
     700
     701    // We always want to have CSS Animations and CSS Transitions as Web Animations turned off for legacy-animation-engine directory.
     702    WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(preferences, options.enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations && !options.isLegacyAnimationEngineTest);
    701703
    702704    static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
  • trunk/Tools/WebKitTestRunner/TestOptions.cpp

    r208213 r230632  
    6666}
    6767
     68static bool isLegacyAnimationEngineTestPath(const std::string& pathOrURL)
     69{
     70    return pathContains(pathOrURL, "legacy-animation-engine/");
     71}
     72
    6873TestOptions::TestOptions(const std::string& pathOrURL)
    6974    : useFlexibleViewport(shouldMakeViewportFlexible(pathOrURL))
    7075    , useFixedLayout(shouldUseFixedLayout(pathOrURL))
    7176    , isSVGTest(isSVGTestPath(pathOrURL))
     77    , isLegacyAnimationEngineTest(isLegacyAnimationEngineTestPath(pathOrURL))
    7278    , deviceScaleFactor(deviceScaleFactorForTest(pathOrURL))
    7379{
  • trunk/Tools/WebKitTestRunner/TestOptions.h

    r229530 r230632  
    5656    bool dumpJSConsoleLogInStdErr { false };
    5757    bool allowCrossOriginSubresourcesToAskForCredentials { false };
    58     bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { false };
     58    bool enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations { true };
     59    bool isLegacyAnimationEngineTest { false };
    5960
    6061    float deviceScaleFactor { 1 };
Note: See TracChangeset for help on using the changeset viewer.