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

[css-view-transitions-1] Fix timing of resolving "update callback done" promise #10302

Merged
merged 1 commit into from
May 9, 2024

Conversation

nt1m
Copy link
Member

@nt1m nt1m commented May 9, 2024

The "update callback done" promise should always be resolved right after the update callback is called, even in failure cases. This is what certain WPTs expect, for instance: css/css-view-transitions/duplicate-tag-rejects-start.html

… done" promise

The "update callback done" promise should always be resolved right after the update callback is called, even in failure cases. This is what certain WPTs expect, for instance: css/css-view-transitions/duplicate-tag-rejects-start.html
@nt1m nt1m requested review from khushalsagar and noamr May 9, 2024 20:15
nt1m added a commit to nt1m/WebKit that referenced this pull request May 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=273969
rdar://127834364

Reviewed by NOBODY (OOPS!).

Implements:
w3c/csswg-drafts@9d5ed6f

w3c/csswg-drafts#10302

Also fix duplicate-tag-rejects-start.html to not check for updateCallbackDone promise timing twice.
The correct timing is: “update callback done -> ready rejects -> finished resolves” (as the "Skip the view transition" algorithm expects)

* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/duplicate-tag-rejects-start.html:
* Source/JavaScriptCore/runtime/JSPromise.cpp:
(JSC::JSPromise::markAsHandled):
(JSC::JSPromise::rejectAsHandled):
* Source/JavaScriptCore/runtime/JSPromise.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::markAsHandled const):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::callUpdateCallback):
(WebCore::ViewTransition::setupViewTransition):
nt1m added a commit to nt1m/WebKit that referenced this pull request May 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=273969
rdar://127834364

Reviewed by NOBODY (OOPS!).

Implements:
w3c/csswg-drafts@9d5ed6f

w3c/csswg-drafts#10302

Also fix duplicate-tag-rejects-start.html to not check for updateCallbackDone promise timing twice.
The correct timing is: “update callback done -> ready rejects -> finished resolves” (as the "Skip the view transition" algorithm expects)

* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/duplicate-tag-rejects-start.html:
* Source/JavaScriptCore/runtime/JSPromise.cpp:
(JSC::JSPromise::markAsHandled):
(JSC::JSPromise::rejectAsHandled):
* Source/JavaScriptCore/runtime/JSPromise.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::markAsHandled const):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::callUpdateCallback):
(WebCore::ViewTransition::setupViewTransition):
nt1m added a commit to nt1m/WebKit that referenced this pull request May 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=273969
rdar://127834364

Reviewed by NOBODY (OOPS!).

Implements:
w3c/csswg-drafts@9d5ed6f

w3c/csswg-drafts#10302

This makes the algorithm only react to the update callback from a single place.

Also fix duplicate-tag-rejects-start.html to not check for updateCallbackDone promise timing twice.
The correct timing is: “update callback done -> ready rejects -> finished resolves” (as the "Skip the view transition" algorithm expects)

* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/duplicate-tag-rejects-start.html:
* Source/JavaScriptCore/runtime/JSPromise.cpp:
(JSC::JSPromise::markAsHandled):
(JSC::JSPromise::rejectAsHandled):
* Source/JavaScriptCore/runtime/JSPromise.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::markAsHandled const):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::callUpdateCallback):
(WebCore::ViewTransition::setupViewTransition):
@khushalsagar khushalsagar merged commit f62c438 into main May 9, 2024
1 check passed
@nt1m nt1m deleted the nt1m-patch-1 branch May 9, 2024 23:16
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.

None yet

2 participants