Changeset 287550 in webkit


Ignore:
Timestamp:
Jan 3, 2022 10:49:23 AM (7 months ago)
Author:
graouts@webkit.org
Message:

[Web Animations] changing the effect of a transition should no longer have it marked as running
https://bugs.webkit.org/show_bug.cgi?id=234823

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progression.

  • web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt:

Source/WebCore:

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::setEffect):

  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.h:
Location:
trunk
Files:
6 edited

Legend:

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

    r287549 r287550  
     12022-01-03  Antoine Quint  <graouts@webkit.org>
     2
     3        [Web Animations] changing the effect of a transition should no longer have it marked as running
     4        https://bugs.webkit.org/show_bug.cgi?id=234823
     5
     6        Reviewed by Dean Jackson.
     7
     8        Mark WPT progression.
     9
     10        * web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt:
     11
    1122022-01-03  Antoine Quint  <graouts@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-effect.tentative-expected.txt

    r287548 r287550  
    33PASS After setting a transition's effect to null, it becomes finished
    44PASS After setting a transition's effect to null, style is updated
    5 FAIL After setting a transition's effect to null, a new transition can be started assert_equals: expected "100px" but got "0px"
     5PASS After setting a transition's effect to null, a new transition can be started
    66PASS After setting a transition's effect to null, it should be possible to interrupt that transition
    77PASS After setting a new keyframe effect with a shorter duration, the transition becomes finished
  • trunk/Source/WebCore/ChangeLog

    r287549 r287550  
     12022-01-03  Antoine Quint  <graouts@webkit.org>
     2
     3        [Web Animations] changing the effect of a transition should no longer have it marked as running
     4        https://bugs.webkit.org/show_bug.cgi?id=234823
     5
     6        Reviewed by Dean Jackson.
     7
     8        * animation/DeclarativeAnimation.cpp:
     9        (WebCore::DeclarativeAnimation::setEffect):
     10        * animation/DeclarativeAnimation.h:
     11        * animation/WebAnimation.h:
     12
    1132022-01-03  Antoine Quint  <graouts@webkit.org>
    214
  • trunk/Source/WebCore/animation/DeclarativeAnimation.cpp

    r286642 r287550  
    234234    cancel();
    235235    disassociateFromOwningElement();
     236}
     237
     238void DeclarativeAnimation::setEffect(RefPtr<AnimationEffect>&& newEffect)
     239{
     240    if (effect() == newEffect)
     241        return;
     242
     243    WebAnimation::setEffect(WTFMove(newEffect));
     244
     245    if (auto styleable = owningElement())
     246        styleable->removeDeclarativeAnimationFromListsForOwningElement(*this);
    236247}
    237248
  • trunk/Source/WebCore/animation/DeclarativeAnimation.h

    r286642 r287550  
    6565
    6666    void setTimeline(RefPtr<AnimationTimeline>&&) final;
     67    void setEffect(RefPtr<AnimationEffect>&&) final;
    6768    void cancel() final;
    6869
  • trunk/Source/WebCore/animation/WebAnimation.h

    r286915 r287550  
    7474    virtual void setBindingsEffect(RefPtr<AnimationEffect>&&);
    7575    AnimationEffect* effect() const { return m_effect.get(); }
    76     void setEffect(RefPtr<AnimationEffect>&&);
     76    virtual void setEffect(RefPtr<AnimationEffect>&&);
    7777    AnimationTimeline* timeline() const { return m_timeline.get(); }
    7878    virtual void setTimeline(RefPtr<AnimationTimeline>&&);
Note: See TracChangeset for help on using the changeset viewer.