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

[Gecko Bug 1955626] Fix WPT scroll-start-overflow-toggled.tentative.html to properly await a requestAnimationFrame callback. #51525

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moz-wptsync-bot
Copy link
Collaborator

The pattern that the test was using, "await requestAnimationFrame", does
nothing because requestAnimationFrame doesn't return a Promise that could
be awaited.

To actually use 'await' to allow a requestAnimationFrame tick to pass, you need
to add your own Promise that gets resolved in requestAnimationFrame's callback,
as amended in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D242551

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1955626
gecko-commit: 015e17880a341c5a017a978a16d3b8ff3de2ca9c
gecko-reviewers: emilio

…t a requestAnimationFrame callback.

The pattern that the test was using, "await requestAnimationFrame", does
nothing because requestAnimationFrame doesn't return a Promise that could
be awaited.

To actually use 'await' to allow a requestAnimationFrame tick to pass, you need
to add your own Promise that gets resolved in requestAnimationFrame's callback,
as amended in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D242551

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1955626
gecko-commit: 015e17880a341c5a017a978a16d3b8ff3de2ca9c
gecko-reviewers: emilio
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.

The review process for this patch is being conducted in the Firefox project.

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.

3 participants