[webkit-changes] [WebKit/WebKit] 782144: [css-transitions] setting transition-property to "...

Antoine Quint noreply at github.com
Mon Nov 14 12:26:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7821448df0f4202c66c24715c1edad7b1cdb0c34
      https://github.com/WebKit/WebKit/commit/7821448df0f4202c66c24715c1edad7b1cdb0c34
  Author: Antoine Quint <graouts at apple.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement-expected.txt
    M Source/WebCore/style/Styleable.cpp

  Log Message:
  -----------
  [css-transitions] setting transition-property to "none" does not disassociate CSS Transition from owning element
https://bugs.webkit.org/show_bug.cgi?id=247884

Reviewed by Antti Koivisto.

We would fail a subtest in web-animations/timing-model/timelines/update-and-send-events-replacement.html where a CSS Transition
was canceled by setting the transition-property CSS property to "none". We would correctly cancel the transition in this situation,
but we would fail to disassociate it from its owning element, the element that was the transition's target when it was created.

That association is critical when determining whether an animation, including transitions, can be replaced, per
https://drafts.csswg.org/web-animations/#removing-replaced-animations.

We now correctly call DeclarativeAnimation::cancelFromStyle() instead of WebAnimation::cancel() when an element's style moves
from having a transition defined for a given property to no longer having one in the new style.

* LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement-expected.txt:
* Source/WebCore/style/Styleable.cpp:
(WebCore::updateCSSTransitionsForStyleableAndProperty):

Canonical link: https://commits.webkit.org/256666@main




More information about the webkit-changes mailing list