Backed out changeset a8d030efc4ea (bug 1924861) for causing bc failures on browser_stop_pending.

This commit is contained in:
Cosmin Sabou
2024-12-02 01:21:14 +02:00
parent 4cc45ad6b4
commit 82fbc8fbe4
50 changed files with 48 additions and 273 deletions

View File

@@ -3075,8 +3075,7 @@ nsDocShell::GetCanGoBack(bool* aCanGoBack) {
}
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();
if (rootSH) {
*aCanGoBack = rootSH->CanGo(
-1, StaticPrefs::browser_navigation_requireUserInteraction());
*aCanGoBack = rootSH->CanGo(-1);
MOZ_LOG(gSHLog, LogLevel::Verbose,
("nsDocShell %p CanGoBack()->%d", this, *aCanGoBack));
@@ -3085,24 +3084,6 @@ nsDocShell::GetCanGoBack(bool* aCanGoBack) {
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsDocShell::GetCanGoBackIgnoringUserInteraction(bool* aCanGoBack) {
*aCanGoBack = false;
if (!IsNavigationAllowed(false)) {
return NS_OK; // JS may not handle returning of an error code
}
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();
if (rootSH) {
*aCanGoBack = rootSH->CanGo(-1, false);
MOZ_LOG(gSHLog, LogLevel::Verbose,
("nsDocShell %p CanGoBackIgnoringUserInteraction()->%d", this,
*aCanGoBack));
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsDocShell::GetCanGoForward(bool* aCanGoForward) {
*aCanGoForward = false;
@@ -3111,8 +3092,7 @@ nsDocShell::GetCanGoForward(bool* aCanGoForward) {
}
RefPtr<ChildSHistory> rootSH = GetRootSessionHistory();
if (rootSH) {
*aCanGoForward = rootSH->CanGo(
1, StaticPrefs::browser_navigation_requireUserInteraction());
*aCanGoForward = rootSH->CanGo(1);
MOZ_LOG(gSHLog, LogLevel::Verbose,
("nsDocShell %p CanGoForward()->%d", this, *aCanGoForward));
return NS_OK;