Skip to content

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

This reverts commit e79f55877ef7b26643b20eaa5a7b5c241135f4bf.

Reason for revert: defer-back.html is flaky on Mac
https://ci.chromium.org/ui/p/chromium/builders/ci/mac15-x64-rel-tests/13194/overview

Original change's description:

Initial: Deferred cross-document commit

Allows the navigation API to defer a cross-document same-origin commit.
See emerging spec at whatwg/html#11819

This CL implements the following:
navigateEvent.deferPageSwap({handler}).

When such handlers are present, they are called, and their returned
promises are used to defer a same-origin cross-document navigation
commit, without intercepting it into a same-document navigation.

This only works for push/replace navigations.

Design:

  • A NavigationRequest can now receive an optional mojo
    Receiver with a "Resume" function.
  • The navigate event creates a remote for that receiver, and calls
    "Resume" when the deferring promises are resolved.
  • This receiver is passed through the BeginNavigation pipeline.
  • The above ensures that a particular navigate event is bound only
    to the navigation request it initiated, to avoid races.
  • A new CommitDeferringCondition is waiting on that "Resume" call.
    The browser process also verifies that this is a same-origin
    navigation.

This is the first and most basic step. Next steps:

  • the handler can register a "restore" callback, which is called if the
    navigation is cancelled or if the page is restored from BFCache.
  • deferPageSwap should accept a "historyChange" option, allowing the
    history to be committed (like a pushState) immediately to avoid
    confusion with the back button.
  • When commit is deferred, it should also trigger a last minute
    prerender, and defer until the prerendered page is ready (no pending
    render-blocking resources).
  • navigateEvent.destination.ready should return true for BFCached pages
    and also for prerendered pages without pending render-blocking
    resources.

(This is all available in a design doc that can be shared upon request).

Chromestatus: https://chromestatus.com/feature/5568746374692864
Bug: 469466893
Change-Id: I6c9064175104a3f3b25f2a1a31af741f72fad9cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7207394
Reviewed-by: Nate Chapin <[email protected]>
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Dominic Farolino <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1576467}

Bug: 469466893
Change-Id: I12518d2af09b67da3a10d8f12dcd9f64032af497

Reviewed-on: https://chromium-review.googlesource.com/7531616
WPT-Export-Revision: 61e2f82ac4e43d16b90a512b67624b9ae2fcdd1d

This reverts commit e79f55877ef7b26643b20eaa5a7b5c241135f4bf.

Reason for revert: defer-back.html is flaky on Mac
https://ci.chromium.org/ui/p/chromium/builders/ci/mac15-x64-rel-tests/13194/overview

Original change's description:
> Initial: Deferred cross-document commit
>
> Allows the navigation API to defer a cross-document same-origin commit.
> See emerging spec at whatwg/html#11819
>
> This CL implements the following:
> `navigateEvent.deferPageSwap({handler})`.
>
> When such handlers are present, they are called, and their returned
> promises are used to defer a same-origin cross-document navigation
> commit, without intercepting it into a same-document navigation.
>
> This only works for push/replace navigations.
>
> Design:
> - A NavigationRequest can now receive an optional mojo
>   Receiver with a "Resume" function.
> - The navigate event creates a remote for that receiver, and calls
>   "Resume" when the deferring promises are resolved.
> - This receiver is passed through the BeginNavigation pipeline.
> - The above ensures that a particular navigate event is bound only
>   to the navigation request it initiated, to avoid races.
> - A new CommitDeferringCondition is waiting on that "Resume" call.
>   The browser process also verifies that this is a same-origin
>   navigation.
>
> This is the first and most basic step. Next steps:
> - the handler can register a "restore" callback, which is called if the
>   navigation is cancelled or if the page is restored from BFCache.
> - `deferPageSwap` should accept a "historyChange" option, allowing the
>   history to be committed (like a pushState) immediately to avoid
>   confusion with the back button.
> - When commit is deferred, it should also trigger a last minute
>   prerender, and defer until the prerendered page is ready (no pending
>   render-blocking resources).
> - navigateEvent.destination.ready should return true for BFCached pages
>   and also for prerendered pages without pending render-blocking
>   resources.
>
> (This is all available in a design doc that can be shared upon request).
>
> Chromestatus: https://chromestatus.com/feature/5568746374692864
> Bug: 469466893
> Change-Id: I6c9064175104a3f3b25f2a1a31af741f72fad9cf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7207394
> Reviewed-by: Nate Chapin <[email protected]>
> Reviewed-by: Nasko Oskov <[email protected]>
> Reviewed-by: Dominic Farolino <[email protected]>
> Commit-Queue: Noam Rosenthal <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1576467}

Bug: 469466893
Change-Id: I12518d2af09b67da3a10d8f12dcd9f64032af497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants