Backed out changeset e55eb174b342 (bug 1742865) for causin failures at attr-meta-http-equiv-refresh/parsing.html?131

This commit is contained in:
Butkovits Atila
2021-12-16 12:15:59 +02:00
parent 3a9fd1ddee
commit 60d0aa134a
10 changed files with 109 additions and 268 deletions

View File

@@ -797,6 +797,7 @@ void CanonicalBrowsingContext::SessionHistoryCommit(
RemoveDynEntriesFromActiveSessionHistoryEntry();
}
}
mActiveEntry = newActiveEntry;
if (LOAD_TYPE_HAS_FLAGS(aLoadType,
nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY)) {
@@ -807,16 +808,8 @@ void CanonicalBrowsingContext::SessionHistoryCommit(
// should append instead.
addEntry = index < 0;
if (!addEntry) {
shistory->ReplaceEntry(index, newActiveEntry);
shistory->ReplaceEntry(index, mActiveEntry);
}
mActiveEntry = newActiveEntry;
} else if (LOAD_TYPE_HAS_FLAGS(
aLoadType, nsIWebNavigation::LOAD_FLAGS_IS_REFRESH) &&
!ShouldAddEntryForRefresh(newActiveEntry)) {
addEntry = false;
mActiveEntry->ReplaceWith(*newActiveEntry);
} else {
mActiveEntry = newActiveEntry;
}
if (loadFromSessionHistory) {
@@ -848,10 +841,7 @@ void CanonicalBrowsingContext::SessionHistoryCommit(
} else if (addEntry) {
if (mActiveEntry) {
if (LOAD_TYPE_HAS_FLAGS(
aLoadType, nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY) ||
(LOAD_TYPE_HAS_FLAGS(aLoadType,
nsIWebNavigation::LOAD_FLAGS_IS_REFRESH) &&
!ShouldAddEntryForRefresh(newActiveEntry))) {
aLoadType, nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY)) {
// FIXME We need to make sure that when we create the info we
// make a copy of the shared state.
mActiveEntry->ReplaceWith(*newActiveEntry);