Bug 247884 - [css-transitions] setting transition-property to "none" does not disassociate CSS Transition from owning element
Summary: [css-transitions] setting transition-property to "none" does not disassociate...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar, WebExposed, WPTImpact
Depends on:
Blocks: 237331
  Show dependency treegraph
 
Reported: 2022-11-14 02:31 PST by Antoine Quint
Modified: 2022-11-14 12:27 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2022-11-14 02:31:21 PST
We are failing a subtest in web-animations/timing-model/timelines/update-and-send-events-replacement.html:

promise_test(async t => {
  // Setup transition
  const div = createDiv(t);
  div.style.opacity = '0';
  div.style.transition = 'opacity 1ms';
  getComputedStyle(div).opacity;
  div.style.opacity = '1';
  const cssTransition = div.getAnimations()[0];
  cssTransition.effect.updateTiming({ fill: 'forwards' });

  // Break tie to markup
  div.style.transitionProperty = 'none';
  assert_equals(cssTransition.playState, 'idle');

  // Restart transition
  cssTransition.play();

  const scriptAnimation = div.animate(
    { opacity: 1 },
    {
      duration: 1,
      fill: 'forwards',
    }
  );
  await scriptAnimation.finished;

  assert_equals(cssTransition.replaceState, 'removed');
  assert_equals(scriptAnimation.replaceState, 'active');
}, 'Removes a CSS transition no longer tied to markup');

We fail the second-to-last assertion because we do not correctly disassociate a CSS Transition from its owning element when transition-property is set to "none" and thus do not mark that transition as replaceable.
Comment 1 Antoine Quint 2022-11-14 02:43:47 PST
Pull request: https://github.com/WebKit/WebKit/pull/6465
Comment 2 EWS 2022-11-14 12:26:22 PST
Committed 256666@main (7821448df0f4): <https://commits.webkit.org/256666@main>

Reviewed commits have been landed. Closing PR #6465 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-11-14 12:27:21 PST
<rdar://problem/102333068>