Backed out 3 changesets (bug 1695911, bug 1648825) for bc failures at browser_navigation.js on a CLOSED TREE

Backed out changeset 1d7e78cac600 (bug 1695911)
Backed out changeset d90566e41269 (bug 1648825)
Backed out changeset 5aece2a17f5d (bug 1648825)
This commit is contained in:
Andreea Pavel
2021-05-20 18:59:30 +03:00
parent c2463f823c
commit 6104b39ec6
16 changed files with 10 additions and 379 deletions

View File

@@ -11662,8 +11662,6 @@ nsresult nsDocShell::AddToSessionHistory(
bool expired = false; // by default the page is not expired
bool discardLayoutState = false;
nsCOMPtr<nsICacheInfoChannel> cacheChannel;
bool userActivation = false;
if (aChannel) {
cacheChannel = do_QueryInterface(aChannel);
@@ -11704,8 +11702,6 @@ nsresult nsDocShell::AddToSessionHistory(
loadInfo->GetResultPrincipalURI(getter_AddRefs(resultPrincipalURI));
userActivation = loadInfo->GetHasValidUserGestureActivation();
// For now keep storing just the principal in the SHEntry.
if (!principalToInherit) {
if (loadInfo->GetLoadingSandboxed()) {
@@ -11774,7 +11770,7 @@ nsresult nsDocShell::AddToSessionHistory(
principalToInherit, partitionedPrincipalToInherit, csp,
HistoryID(), GetCreatedDynamically(), originalURI,
resultPrincipalURI, loadReplace, referrerInfo, srcdoc,
srcdocEntry, baseURI, saveLayoutState, expired, userActivation);
srcdocEntry, baseURI, saveLayoutState, expired);
if (mBrowsingContext->IsTop() && GetSessionHistory()) {
bool shouldPersist = ShouldAddToSessionHistory(aURI, aChannel);
@@ -11887,8 +11883,7 @@ nsresult nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType,
// in case.
nsCOMPtr<nsISHEntry> kungFuDeathGrip(aEntry);
loadState->SetHasValidUserGestureActivation(
loadState->HasValidUserGestureActivation() || aUserActivation);
loadState->SetHasValidUserGestureActivation(aUserActivation);
return LoadHistoryEntry(loadState, aLoadType, aEntry == mOSHE);
}
@@ -11897,8 +11892,7 @@ nsresult nsDocShell::LoadHistoryEntry(const LoadingSessionHistoryInfo& aEntry,
uint32_t aLoadType,
bool aUserActivation) {
RefPtr<nsDocShellLoadState> loadState = aEntry.CreateLoadInfo();
loadState->SetHasValidUserGestureActivation(
loadState->HasValidUserGestureActivation() || aUserActivation);
loadState->SetHasValidUserGestureActivation(aUserActivation);
return LoadHistoryEntry(loadState, aLoadType,
aEntry.mLoadingCurrentActiveEntry);