зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1666465 - Pass the correct value as the 'persist' parameter in CanonicalBrowsingContext::SessionHistoryCommit, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D90995
This commit is contained in:
Родитель
5ea0bbd246
Коммит
b6a8ca7795
|
@ -356,6 +356,11 @@ CanonicalBrowsingContext::CreateLoadingSessionHistoryEntryForLoad(
|
|||
entry = SessionHistoryEntry::GetByLoadId(existingLoadingInfo->mLoadId);
|
||||
} else {
|
||||
entry = new SessionHistoryEntry(aLoadState, aChannel);
|
||||
if (IsTop()) {
|
||||
// Only top level pages care about Get/SetPersist.
|
||||
entry->SetPersist(
|
||||
nsDocShell::ShouldAddToSessionHistory(aLoadState->URI(), aChannel));
|
||||
}
|
||||
entry->SetDocshellID(GetHistoryID());
|
||||
entry->SetIsDynamicallyAdded(GetCreatedDynamically());
|
||||
entry->SetForInitialLoad(true);
|
||||
|
@ -427,8 +432,7 @@ void CanonicalBrowsingContext::SessionHistoryCommit(uint64_t aLoadId,
|
|||
}
|
||||
|
||||
if (addEntry) {
|
||||
shistory->AddEntry(mActiveEntry,
|
||||
/* FIXME aPersist = */ true);
|
||||
shistory->AddEntry(mActiveEntry, mActiveEntry->GetPersist());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -140,7 +140,7 @@ class SessionHistoryInfo {
|
|||
bool mURIWasModified = false;
|
||||
bool mIsSrcdocEntry = false;
|
||||
bool mScrollRestorationIsManual = false;
|
||||
bool mPersist = false;
|
||||
bool mPersist = true;
|
||||
|
||||
union SharedState {
|
||||
SharedState();
|
||||
|
|
Загрузка…
Ссылка в новой задаче