Commit 2221de7f authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Force timing update after animation.cancel

A cancel event must be dispatched as soon as an animation is canceled.
Otherwise, an immediate restart will drop the canceled event. This patch
addresses the remaining source of timeouts due to dropped
transitioncancel events. Support for animationcancel events will be
introduced in the next patch.

Bug: 1059936
Change-Id: I3f6b306a0199febe62cfe151a414990796886402
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107299Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750960}
parent 1f404393
......@@ -1851,7 +1851,7 @@ void Animation::cancel() {
SetOutdated();
// Force dispatch of canceled event.
ForceServiceOnNextFrame();
Update(kTimingUpdateOnDemand);
// Notify of change to canceled state.
NotifyProbe();
......
......@@ -21,7 +21,7 @@ PASS Redundant change, active -> after, then back
PASS Redundant change, after -> before, then back
PASS Redundant change, after -> active, then back
FAIL Call Animation.cancel after canceling animation. assert_true: Timed out waiting for animationcancel expected true got false
FAIL Restart animation after canceling animation immediately. assert_true: Timed out waiting for animationcancel, animationstart expected true got false
FAIL Restart animation after canceling animation immediately. assert_equals: Expected animationcancel event, but got animationstart event instead expected "animationcancel" but got "animationstart"
FAIL Call Animation.cancel after restarting animation immediately. assert_true: Timed out waiting for animationcancel expected true got false
FAIL Set timeline and play transition after clearing the timeline. promise_test: Unhandled rejection with value: object "TypeError: Cannot assign to read only property 'timeline' of object '#<CSSAnimation>'"
FAIL Set null target effect after canceling the animation. assert_true: Timed out waiting for animationcancel expected true got false
......
......@@ -18,9 +18,9 @@ PASS Active -> After
PASS After -> Before
PASS After -> Active
PASS Calculating the interval start and end time with negative start delay.
FAIL Calculating the interval start and end time with negative end delay. assert_equals: Expected transitioncancel event, but got transitionstart event instead expected "transitioncancel" but got "transitionstart"
FAIL Calculating the interval start and end time with negative end delay. assert_equals: expected 50 but got 100
PASS Call Animation.cancel after canceling transition.
FAIL Restart transition after canceling transition immediately assert_true: Timed out waiting for transitioncancel, transitionrun expected true got false
PASS Restart transition after canceling transition immediately
PASS Call Animation.cancel after restarting transition immediately
FAIL Set timeline and play transition after clear the timeline promise_test: Unhandled rejection with value: object "TypeError: Cannot assign to read only property 'timeline' of object '#<CSSTransition>'"
PASS Set null target effect after canceling the transition
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment