зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1659183 - Don't temporarily increment length of session history if we're just adding a child entry for an initial load. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D94976
This commit is contained in:
Родитель
4a46c92817
Коммит
e33c84b907
|
@ -13245,6 +13245,7 @@ void nsDocShell::MoveLoadingToActiveEntry() {
|
|||
MOZ_LOG(gSHLog, LogLevel::Debug,
|
||||
("nsDocShell %p MoveLoadingToActiveEntry", this));
|
||||
|
||||
bool hadActiveEntry = !!mActiveEntry;
|
||||
mActiveEntry = nullptr;
|
||||
mozilla::UniquePtr<mozilla::dom::LoadingSessionHistoryInfo> loadingEntry;
|
||||
mActiveEntryIsLoadingFromSessionHistory =
|
||||
|
@ -13270,10 +13271,17 @@ void nsDocShell::MoveLoadingToActiveEntry() {
|
|||
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();
|
||||
if (rootSH) {
|
||||
if (!loadingEntry->mLoadIsFromSessionHistory) {
|
||||
// We try to mimic as closely as possible what will happen in
|
||||
// CanonicalBrowsingContext::SessionHistoryCommit. We'll be
|
||||
// incrementing the session history length if we're not replacing,
|
||||
// this is a top-level load or it's not the initial load in an iframe,
|
||||
// and ShouldUpdateSessionHistory(loadType) returns true.
|
||||
// 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)) {
|
||||
mLoadType, nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY) &&
|
||||
(mBrowsingContext->IsTop() || hadActiveEntry) &&
|
||||
mBrowsingContext->ShouldUpdateSessionHistory(loadType)) {
|
||||
changeID = rootSH->AddPendingHistoryChange();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -836,7 +836,6 @@ tags = audiochannel
|
|||
[test_webaudioNotificationStopOnNavigation.html]
|
||||
tags = audiochannel
|
||||
[test_window_close.html]
|
||||
skip-if = fission # bug 1659183
|
||||
[test_window_constructor.html]
|
||||
[test_window_content.html]
|
||||
[test_window_cross_origin_props.html]
|
||||
|
|
Загрузка…
Ссылка в новой задаче