Skip to content

[css-view-transitions-1] Swap the order between setting the phase and calling the update callback #10826

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

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Sep 3, 2024

This fixes an issue where skipping the transition from within thet update callback would call the update callback twice.

Closes #10822

… 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
@noamr noamr requested review from vmpstr and khushalsagar September 3, 2024 08:18
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=].
Copy link
Member

Choose a reason for hiding this comment

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

Is "otherwise" here correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, fixed

nt1m added a commit to nt1m/WebKit that referenced this pull request Sep 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=279087
rdar://135226640

Reviewed by NOBODY (OOPS!).

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):
nt1m added a commit to nt1m/WebKit that referenced this pull request Sep 3, 2024
… times

https://bugs.webkit.org/show_bug.cgi?id=279087
rdar://135226640

Reviewed by NOBODY (OOPS!).

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):
nt1m added 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 NOBODY (OOPS!).

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):
@nt1m nt1m requested a review from emilio September 4, 2024 13:56
@@ -1600,14 +1600,14 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;

1. Let |callbackPromise| be null.

1. If |transition|'s [=ViewTransition/phase=] is not "`done`", then set |transition|'s [=ViewTransition/phase=] to "`update-callback-called`".
Copy link
Collaborator

Choose a reason for hiding this comment

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

May as well move it further up to keep the code using callbackPromise together?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, done

nt1m added 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 NOBODY (OOPS!).

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):
nt1m added 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 NOBODY (OOPS!).

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):
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
@noamr noamr merged commit 86f20cc into w3c:main Sep 5, 2024
1 check passed
@noamr noamr deleted the vt1-update branch September 5, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[css-view-transitions] State management seems broken in the spec
3 participants