Repository navigation
wpt: Wait more than a single frame for a resize event - #48939
Merged
Merged
Conversation
Collaborator
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#63732) with upstreamable changes. |
yezhizhen
requested changes
Oct 16, 2026
yezhizhen
left a comment
Member
There was a problem hiding this comment.
Nit:
We should drop async function oneRaf in the file now.
yezhizhen
reviewed
Oct 16, 2026
Comment on lines
22
to
26
|
|
||
| assert_equals(resize_events.toString(), '', 'PRECONDITION'); | ||
| const oneResizeEvent = new Promise((resolve) => { | ||
| win.visualViewport.addEventListener("resize", resolve, { once: true }); |
Member
There was a problem hiding this comment.
Suggested change
| win.visualViewport.addEventListener("resize", resolve, { once: true }); | |
| win.visualViewport.addEventListener('resize', resolve, { once: true }); |
Another super nit, since we always single quote in this file.
Not all browsers can accomplish a client resize within a single animation frame. In Servo this must first cycle through the embedder which might involve event loop iterations. Furthermore, the specification doesn't say this should happen either. Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
mrobinson
force-pushed
the
wpt-fix-resize-event-order
branch
from
October 16, 2026 07:32
c4588c1 to
cf842b3
Compare
mrobinson
commented
Oct 16, 2026
mrobinson
left a comment
Member
Author
There was a problem hiding this comment.
@yezhizhen Thanks for the review. Please take another look.
Comment on lines
22
to
26
|
|
||
| assert_equals(resize_events.toString(), '', 'PRECONDITION'); | ||
| const oneResizeEvent = new Promise((resolve) => { | ||
| win.visualViewport.addEventListener("resize", resolve, { once: true }); |
yezhizhen
approved these changes
Oct 16, 2026
Collaborator
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63732). |
mrobinson
enabled auto-merge
October 16, 2026 07:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not all browsers can accomplish a client resize within a single
animation frame. In Servo this must first cycle through the embedder
which might involve event loop iterations. Furthermore, the
specification doesn't say this should happen either.
Testing: This change gets a WPT subtest passing.
Fixes: #41981.