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-transition-2] Clarify timeout behavior for inbound view transition #10817

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Sep 2, 2024

The previous wording of this was somewhat handwavy, made it more rigorous.

  • The timeout starts when the transition is created (before pageswap)
  • If the timeout expires before the transition is resolved (pagereveal), the inbound transition params are cleared and the behavior is similar to having the transition skipped at pageswap.
  • If the timeout expires while the navigation is active, it is skipped with a TimeoutError.

Closes #10800

mattwoodrow added a commit to mattwoodrow/WebKit that referenced this pull request Sep 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=279044
<rdar://135166838>

Reviewed by NOBODY (OOPS!).

w3c/csswg-drafts#10817

There should be a timeout, starting from before the page swap event is fired.

This implements half of the resolution, making sure we don't provide a view
transition to pagereveal if it takes too long.

* LayoutTests/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPageswapEvent):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::resolveInboundCrossDocumentViewTransition):
* Source/WebCore/dom/ViewTransition.h:
mattwoodrow added a commit to mattwoodrow/WebKit that referenced this pull request Sep 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=279044
<rdar://135166838>

Reviewed by NOBODY (OOPS!).

w3c/csswg-drafts#10817

There should be a timeout, starting from before the page swap event is fired.

This implements half of the resolution, making sure we don't provide a view
transition to pagereveal if it takes too long.

* LayoutTests/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPageswapEvent):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::resolveInboundCrossDocumentViewTransition):
* Source/WebCore/dom/ViewTransition.h:
webkit-commit-queue pushed a commit to mattwoodrow/WebKit that referenced this pull request Sep 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=279044
<rdar://135166838>

Reviewed by Tim Nguyen.

w3c/csswg-drafts#10817

There should be a timeout, starting from before the page swap event is fired.

This implements half of the resolution, making sure we don't provide a view
transition to pagereveal if it takes too long.

* LayoutTests/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPageswapEvent):
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::resolveInboundCrossDocumentViewTransition):
* Source/WebCore/dom/ViewTransition.h:

Canonical link: https://commits.webkit.org/283113@main
@@ -875,6 +875,9 @@ It has the following [=struct/items=]:

: <dfn>initial snapshot containing block size</dfn>
:: a [=tuple=] of two numbers (width and height).

: <dfn>resolved transition</dfn>
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right. This data structure is meant to be serialized across Documents and I don't think we can or want to serialize the script "ViewTransition" object?

…nsition

The previous wording of this was somewhat handwavy, made it more rigorous.

- The timeout starts when the transition is created (before pageswap)
- If the timeout expires before the transition is resolved (pagereveal), the
  inbound transition params are cleared and the behavior is similar to having
  the transition skipped at pageswap.
- If the timeout expires while the navigation is active, it is skipped with a
  `TimeoutError`.

Closes w3c#10800
@noamr noamr merged commit c6b1b11 into w3c:main Sep 19, 2024
1 check passed
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-2] Clarify inbound transition timeout semantics
2 participants