Bug 1750174 - Auto-refreshing pages reposition themselves to the top upon refresh. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D137383
This commit is contained in:
Peter Van der Beken
2022-02-02 07:58:58 +00:00
parent ccbbdfa775
commit 6f4c50ef05
6 changed files with 67 additions and 25 deletions

View File

@@ -535,6 +535,11 @@ CanonicalBrowsingContext::CreateLoadingSessionHistoryEntryForLoad(
return nullptr;
}
Unused << SetHistoryEntryCount(entry->BCHistoryLength());
} else if (aLoadState->LoadType() == LOAD_REFRESH &&
!ShouldAddEntryForRefresh(aLoadState->URI(),
aLoadState->PostDataStream()) &&
mActiveEntry) {
entry = mActiveEntry;
} else {
entry = new SessionHistoryEntry(aLoadState, aChannel);
if (IsTop()) {