Changeset 251657 in webkit


Ignore:
Timestamp:
Oct 28, 2019 9:59:08 AM (4 years ago)
Author:
graouts@webkit.org
Message:

[Web Animations] The easing property for a CSSTransition effect is always "linear"
https://bugs.webkit.org/show_bug.cgi?id=203476

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt:

Source/WebCore:

While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
Transitions.

  • animation/CSSTransition.cpp:

(WebCore::CSSTransition::setTimingProperties):

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r251655 r251657  
     12019-10-27  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] The easing property for a CSSTransition effect is always "linear"
     4        https://bugs.webkit.org/show_bug.cgi?id=203476
     5
     6        Reviewed by Dean Jackson.
     7
     8        Mark WPT progressions.
     9
     10        * web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt:
     11
    1122019-10-28  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt

    r251591 r251657  
    99PASS duration of a new transition
    1010PASS direction of a new transition
    11 FAIL easing of a new transition assert_equals: Initial value of easing expected "ease" but got "linear"
    12 FAIL non-default easing of a new transition assert_equals: Initial value of easing expected "steps(4)" but got "linear"
     11PASS easing of a new transition
     12PASS non-default easing of a new transition
    1313PASS endTime of a new transition
    1414PASS activeDuration of a new transition
  • trunk/Source/WebCore/ChangeLog

    r251655 r251657  
     12019-10-27  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] The easing property for a CSSTransition effect is always "linear"
     4        https://bugs.webkit.org/show_bug.cgi?id=203476
     5
     6        Reviewed by Dean Jackson.
     7
     8        While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
     9        for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
     10        reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
     11        Transitions.
     12
     13        * animation/CSSTransition.cpp:
     14        (WebCore::CSSTransition::setTimingProperties):
     15        * animation/KeyframeEffect.cpp:
     16        (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
     17
    1182019-10-28  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/animation/CSSTransition.cpp

    r243887 r251657  
    7373    animationEffect->setDelay(delay);
    7474    animationEffect->setIterationDuration(duration);
     75    animationEffect->setTimingFunction(backingAnimation().timingFunction());
    7576
    7677    unsuspendEffectInvalidation();
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r251649 r251657  
    10661066
    10671067    bool isCSSAnimation = is<CSSAnimation>(animation());
     1068    bool isCSSTransition = is<CSSTransition>(animation());
    10681069
    10691070    for (auto cssPropertyId : m_blendingKeyframes.properties()) {
     
    11841185        // 17. Let transformed distance be the result of evaluating the timing function associated with the first keyframe in interval endpoints
    11851186        //     passing interval distance as the input progress.
     1187        // We do not need to do this for CSS Transitions since the timing function is applied to the AnimationEffect as a whole and thus
     1188        // iterationProgress is already transformed.
    11861189        auto transformedDistance = intervalDistance;
    1187         if (startKeyframeIndex) {
     1190        if (!isCSSTransition && startKeyframeIndex) {
    11881191            if (auto duration = iterationDuration()) {
    11891192                auto rangeDuration = (endOffset - startOffset) * duration.seconds();
Note: See TracChangeset for help on using the changeset viewer.