Backed out changeset a399e91dd5c2 (bug 1729662) for causing wpt failures on cross-document-traversal-cross-document-traversal.html.

This commit is contained in:
Iulian Moraru
2021-09-28 19:14:02 +03:00
parent caf4295618
commit 82a9a640ee
12 changed files with 49 additions and 143 deletions

View File

@@ -8636,7 +8636,7 @@ bool nsDocShell::IsSameDocumentNavigation(nsDocShellLoadState* aLoadState,
}
if (aState.mHistoryNavBetweenSameDoc &&
!aLoadState->GetLoadingSessionHistoryInfo()->mLoadingCurrentEntry) {
!aLoadState->GetLoadingSessionHistoryInfo()->mLoadingCurrentActiveEntry) {
return true;
}
@@ -11751,12 +11751,13 @@ nsresult nsDocShell::LoadHistoryEntry(const LoadingSessionHistoryInfo& aEntry,
loadState->SetHasValidUserGestureActivation(
loadState->HasValidUserGestureActivation() || aUserActivation);
return LoadHistoryEntry(loadState, aLoadType, aEntry.mLoadingCurrentEntry);
return LoadHistoryEntry(loadState, aLoadType,
aEntry.mLoadingCurrentActiveEntry);
}
nsresult nsDocShell::LoadHistoryEntry(nsDocShellLoadState* aLoadState,
uint32_t aLoadType,
bool aLoadingCurrentEntry) {
bool aReloadingActiveEntry) {
if (!IsNavigationAllowed()) {
return NS_OK;
}
@@ -11777,7 +11778,7 @@ nsresult nsDocShell::LoadHistoryEntry(nsDocShellLoadState* aLoadState,
rv = CreateAboutBlankContentViewer(
aLoadState->PrincipalToInherit(),
aLoadState->PartitionedPrincipalToInherit(), nullptr, nullptr,
/* aIsInitialDocument */ false, Nothing(), !aLoadingCurrentEntry);
/* aIsInitialDocument */ false, Nothing(), !aReloadingActiveEntry);
if (NS_FAILED(rv)) {
// The creation of the intermittent about:blank content