Changeset 260360 in webkit


Ignore:
Timestamp:
Apr 20, 2020 4:56:55 AM (4 years ago)
Author:
graouts@webkit.org
Message:

WebAnimations API doesn't properly apply keyframe easings to transforms
https://bugs.webkit.org/show_bug.cgi?id=210526
<rdar://problem/61800424>

Reviewed by Antti Koivisto.

Source/WebCore:

GraphicsLayerCA has code that determines whether an animation can be accelerated looking at the timing function of its keyframes and excluding
animations that use a steps timing function as one of its values. However, we we would fail to set the timing function on the KeyframeValue for
each keyframe in the KeyframeList we create for a JS-originated animation. We now do this correctly.

Test: webanimations/transform-animation-with-steps-timing-function-not-accelerated.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):

LayoutTests:

Add a new test that checks that an animation targeting an accelerted property does not yield an accelerated animation if one of its keyframes contains a steps timing function.

  • webanimations/transform-animation-with-steps-timing-function-not-accelerated-expected.txt: Added.
  • webanimations/transform-animation-with-steps-timing-function-not-accelerated.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r260358 r260360  
     12020-04-20  Antoine Quint  <graouts@apple.com>
     2
     3        WebAnimations API doesn't properly apply keyframe easings to transforms
     4        https://bugs.webkit.org/show_bug.cgi?id=210526
     5        <rdar://problem/61800424>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Add a new test that checks that an animation targeting an accelerted property does not yield an accelerated animation if one of its keyframes contains a steps timing function.
     10
     11        * webanimations/transform-animation-with-steps-timing-function-not-accelerated-expected.txt: Added.
     12        * webanimations/transform-animation-with-steps-timing-function-not-accelerated.html: Added.
     13
    1142020-04-20  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r260358 r260360  
     12020-04-20  Antoine Quint  <graouts@apple.com>
     2
     3        WebAnimations API doesn't properly apply keyframe easings to transforms
     4        https://bugs.webkit.org/show_bug.cgi?id=210526
     5        <rdar://problem/61800424>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        GraphicsLayerCA has code that determines whether an animation can be accelerated looking at the timing function of its keyframes and excluding
     10        animations that use a steps timing function as one of its values. However, we we would fail to set the timing function on the KeyframeValue for
     11        each keyframe in the KeyframeList we create for a JS-originated animation. We now do this correctly.
     12
     13        Test: webanimations/transform-animation-with-steps-timing-function-not-accelerated.html
     14
     15        * animation/KeyframeEffect.cpp:
     16        (WebCore::KeyframeEffect::updateBlendingKeyframes):
     17
    1182020-04-20  Yusuke Suzuki  <ysuzuki@apple.com>
    219
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r260139 r260360  
    771771    for (auto& keyframe : m_parsedKeyframes) {
    772772        KeyframeValue keyframeValue(keyframe.computedOffset, nullptr);
     773        keyframeValue.setTimingFunction(keyframe.timingFunction->clone());
    773774
    774775        auto styleProperties = keyframe.style->immutableCopyIfNeeded();
Note: See TracChangeset for help on using the changeset viewer.