Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle null effect when interrupting a transition #18428

Merged
merged 1 commit into from Aug 14, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 14, 2019

If the effect of a CSS Transition is removed (via the getAnimations API)
and then the transition is interrupted by removing the 'to' style, we
previously assumed that the effect would always exist. This CL adds a
null-check for that case.

Bug: 992668
Change-Id: I399be7fd859bac0ca6e7ee1e29dbcbbae2e89403
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753671
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686932}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

If the effect of a CSS Transition is removed (via the getAnimations API)
and then the transition is interrupted by removing the 'to' style, we
previously assumed that the effect would always exist. This CL adds a
null-check for that case.

Bug: 992668
Change-Id: I399be7fd859bac0ca6e7ee1e29dbcbbae2e89403
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753671
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686932}
// reversal logic to apply.
await singleFrame();
assert_not_equals(transition.currentTime, 0);
assert_not_equals(getComputedStyle(div).left, '0px');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephenmcgruer This test is failing on Firefox because it produces '0px' here. I don't think there's anything in the spec requiring that it have moved past 0px by this point (e.g. due to pixel rounding).

Based on the comment above this block I don't believe this assertion is needed (only the first one is). Would you mind dropping it?

If it is needed, would you mind reworking the test to wait until the value of left is actually non-zero?

Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, sorry, you're totally right. That's what I get for being lazy and not testing on Firefox, sorry.

I'll fix this tomorrow when I get to work. It's a bit weird because its really a regression test for Chromium, but we're meant to land all tests as WPT these days so I try to at least make them applicable to all browsers (e.g. test some real behavior). The test should wait until left is non-zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants