Bug 1668083 - when redirecting load from post to get, load should become replacing load also in session history, r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D93249
This commit is contained in:
Olli Pettay
2020-10-13 16:36:11 +00:00
parent 41d9ca2665
commit ca9eebae15
10 changed files with 199 additions and 18 deletions

View File

@@ -13273,7 +13273,12 @@ void nsDocShell::MoveLoadingToActiveEntry() {
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();
if (rootSH) {
if (!loadingEntry->mLoadIsFromSessionHistory) {
changeID = rootSH->AddPendingHistoryChange();
// It is possible that this leads to wrong length temporarily, but
// so would not having the check for replace.
if (!LOAD_TYPE_HAS_FLAGS(
mLoadType, nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY)) {
changeID = rootSH->AddPendingHistoryChange();
}
} else {
// This is a load from session history, so we can update
// index and length immediately.