Conversation
…ument that was created using cross-origin redirects This restriction only makes sense for the initial navigation, not for traversal. Closes w3c#11063
css-view-transitions-2/Overview.bs
Outdated
|
|
||
| 1. If |newDocument| [=was created via cross-origin redirects=], then return false. | ||
|
|
||
| 1. If |navigationType| is {{NavigationType/traverse}}, then return true. |
There was a problem hiding this comment.
If it's a non-BFCache traverse navigation, then the cross-origin restriction should still apply. It's no different from a push navigation then.
That said, we might have been overly conservative limiting navigations with cross-origin redirects. I don't quite remember the rationale other than "there could be an information leak and it's a rare use-case". So also happy to re-open that conversation if you'd like.
There was a problem hiding this comment.
Does the HTML spec's wording for the page swap event work here? https://un5nj90kzk5vf152hgyfw29h1eja2.julianrbryant.com/multipage/browsing-the-web.html#updating-the-traversable:latest-entry
There was a problem hiding this comment.
Yes, I was thinking the same. Amended the PR
…ld succeed even if the Document was created with a cross-origin redirect. https://un5h2085w35jr3j0h78verhh.julianrbryant.com/show_bug.cgi?id=282012 <rdar://138517027> Reviewed by Charlie Wolfe. As per https://un5nj90kzk5vf152hgyfw29h1eja2.julianrbryant.com/multipage/browsing-the-web.html#updating-the-traversable:latest-entry, the cross-origin redirect check should only apply if not loading from BFCache. I'm also changing the view-transitions logic, which isn't currently in the spec, but is drafted here: w3c/csswg-drafts#11070. Without this change, navigating to a site via a cross-origin redirect marks the initial Document as having being created with a cross-origin redirect. If you then navigate within the site, and then back to the initial, the view transition is blocked due to this despite the redirect being unrelated to the 'back' traversal. * LayoutTests/http/wpt/css/css-view-transitions/navigation/cross-origin-bfcache-expected.txt: Added. * LayoutTests/http/wpt/css/css-view-transitions/navigation/cross-origin-bfcache.html: Added. * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::navigationCanTriggerCrossDocumentViewTransition): * Source/WebCore/loader/DocumentLoader.h: * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): * Source/WebCore/page/Navigation.cpp: (WebCore::Navigation::createForPageswapEvent): * Source/WebCore/page/Navigation.h: Canonical link: https://un5kw2gk635jr3j0h78verhh.julianrbryant.com/285663@main
[css-view-transitions-2] Traversal navigations to a cached entry should succeed even if the Document was created with a cross-origin redirect.
https://un5h2085w35jr3j0h78verhh.julianrbryant.com/show_bug.cgi?id=282012
<rdar://138517027>
Reviewed by Charlie Wolfe.
As per
https://un5nj90kzk5vf152hgyfw29h1eja2.julianrbryant.com/multipage/browsing-the-web.html#updating-the-traversable:latest-entry,
the cross-origin redirect check should only apply if not loading from BFCache.
I'm also changing the view-transitions logic, which isn't currently in the spec,
but is drafted here: w3c/csswg-drafts#11070.
Without this change, navigating to a site via a cross-origin redirect marks the
initial Document as having being created with a cross-origin redirect. If you
then navigate within the site, and then back to the initial, the view
transition is blocked due to this despite the redirect being unrelated to the
'back' traversal.
* LayoutTests/http/wpt/css/css-view-transitions/navigation/cross-origin-bfcache-expected.txt: Added.
* LayoutTests/http/wpt/css/css-view-transitions/navigation/cross-origin-bfcache.html: Added.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::navigationCanTriggerCrossDocumentViewTransition):
* Source/WebCore/loader/DocumentLoader.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::createForPageswapEvent):
* Source/WebCore/page/Navigation.h:
Canonical link: https://un5kw2gk635jr3j0h78verhh.julianrbryant.com/285663@main
Canonical link: https://un5kw2gk635jr3j0h78verhh.julianrbryant.com/283286.371@safari-7620-branch
This restriction only makes sense for the initial navigation, not for traversal.
Closes #11063
[css-spec-shortname-1] Brief description which should also include the #issuenum-or-URL and/or link to relevant CSSWG minutes.
Copy the above line into the Title and replace with the relevant details. Fill in any additional details here. See https://github.com/w3c/csswg-drafts/blob/master/CONTRIBUTING.md for more info.