[css-view-transitions-1] Swap the order between setting the phase and calling the update callback#10826
Merged
[css-view-transitions-1] Swap the order between setting the phase and calling the update callback#10826
Conversation
… calling the update callback. This fixes an issue where skipping the transition from within thet update callback would call the update callback twice. Closes w3c#10822
nt1m
reviewed
Sep 3, 2024
|
|
||
| 1. If |transition|'s [=ViewTransition/phase=] is not "`done`", then set |transition|'s [=ViewTransition/phase=] to "`update-callback-called`". | ||
|
|
||
| 1. Otherwise, set |callbackPromise| to the result of [=/invoking=] |transition|'s [=ViewTransition/update callback=]. |
emilio
approved these changes
Sep 4, 2024
|
|
||
| 1. Let |callbackPromise| be null. | ||
|
|
||
| 1. If |transition|'s [=ViewTransition/phase=] is not "`done`", then set |transition|'s [=ViewTransition/phase=] to "`update-callback-called`". |
Collaborator
There was a problem hiding this comment.
May as well move it further up to keep the code using callbackPromise together?
webkit-commit-queue
pushed a commit
to nt1m/WebKit
that referenced
this pull request
Sep 4, 2024
… times https://bugs.webkit.org/show_bug.cgi?id=279087 rdar://135226640 Reviewed by Matt Woodrow. This is currently a spec bug, see: - w3c/csswg-drafts#10826 - w3c/csswg-drafts#10822 * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/update-callback-called-once-expected.xht: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/update-callback-called-once.html: Added. * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::callUpdateCallback): Canonical link: https://commits.webkit.org/283167@main
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.
This fixes an issue where skipping the transition from within thet update callback would call the update callback twice.
Closes #10822