Skip to content

[web-animations-1] Setting playbackRate should probably do a compensatory seek after all #2266

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

Closed
birtles opened this issue Feb 2, 2018 · 0 comments

Comments

@birtles
Copy link
Contributor

birtles commented Feb 2, 2018

In writing the last few tests for the asynchronous playback rate changes (#2059) I noticed an oddity:

const animation = div.animate(...);
animation.currentTime = 100 * 1000;
await animation.ready;
animation.playbackRate = 2;
// animation.currentTime =~ 200 * 1000;

However:

const animation = div.animate(...);
animation.currentTime = 100 * 1000;
animation.playbackRate = 2;
// animation.currentTime =~ 100 * 1000;

The reason is that in the first example the current time is calculated from the start time so changing the playback rate makes it jump. In the second example the current time is calculated from the hold time (the start time is unresolved at this point) so updating the playback rate does not effect the current time.

That inconsistency seems really undesirable. I suspect we want to make setting the playback rate do a compensatory seek after all. That means that doing anim.playbackRate = 2 and anim.updatePlaybackRate(2) are quite close in behavior and authors may accidentally doing the former when they really want the latter but I can't think of anything better. We could just make playbackRate read-only but that's likely to break content.

@birtles birtles changed the title [web-animations] Setting playbackRate should probably do a compensatory seek after all [web-animations-1] Setting playbackRate should probably do a compensatory seek after all Feb 6, 2018
@birtles birtles closed this as completed in 673f6fc Feb 8, 2018
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 14, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436659
gecko-commit: 8f61bf3de90affb12962bd6556a6ee5530c15c5f
gecko-integration-branch: autoland
gecko-reviewers: hiro
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 15, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436659
gecko-commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-integration-branch: autoland
gecko-reviewers: hiro
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 15, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436659
gecko-commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-integration-branch: autoland
gecko-reviewers: hiro
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 15, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

--HG--
extra : rebase_source : ac422351085bd3ac3f4fcb4b2bfc009891e20934
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 15, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

--HG--
extra : rebase_source : 2f8d2e0fc72d443d91366985979b9d8b721aefe8
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 15, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436659
gecko-commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-integration-branch: central
gecko-reviewers: hiro
sideshowbarker pushed a commit to web-platform-tests/wpt that referenced this issue Feb 16, 2018
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436659
gecko-commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-integration-branch: autoland
gecko-reviewers: hiro
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 8f61bf3de90affb12962bd6556a6ee5530c15c5f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 8f61bf3de90affb12962bd6556a6ee5530c15c5f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 8f61bf3de90affb12962bd6556a6ee5530c15c5f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 2, 2019
These tests test the behavior introduced in the following changesets to the Web
Animations specification:

  1. w3c/csswg-drafts@5af5e27
  2. w3c/csswg-drafts@673f6fc

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

See the following spec issues:

  1. w3c/csswg-drafts#2059
  2. w3c/csswg-drafts#2266

MozReview-Commit-ID: 3XJHXIlgSwF

UltraBlame original commit: 7465cb110ae5ec2e2ca73182caf5293f0efc8fd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant