Bug
1717968 [wpt PR 29471] - Allow navigating parent and child during history traversal, a=testonly
Automatic update from web-platform-tests
Allow navigating parent and child during history traversal
This is a behavior we've wanted for years, but which could cause
serious breakage in the absence of FrameNavigationEntries being
shared across multiple NavigationEntries. That was implemented in
https://chromium-review.googlesource.com/c/chromium/src/+/
2910529
Normally, when sharing FrameNavigationEntries, we "fork" the entry
when it is updated due to navigating cross-document (unless reloading
the same url). However, this does not work well when navigating away
from an initial empty document, because we want to hide any empty
documents at the start of an iframe's lifetime. In particular, in the
case where an iframe and the main frame racily navigate, we can end
up with an initial empty document's FNE shared across 2 different
NavigationEntries. It is important that when the first real navigation
takes place, we update the existing entry rather than fork,
so that the initial empty document is overwritten in both places.
Therefore, add a special case in
NavigationControllerImpl::RendererDidNavigateAutoSubrame, to ensure
an initial empty document is always updated rather than replaced.
Bug: 542299, 598043
Change-Id: I4113cbbcb8dd5d5065e88ad8f5761acc09847543
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2953549
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896133}
--
wpt-commits:
3b1c1631085e7af5f48d0e38c6a84410c2a9e96c
wpt-pr: 29471