diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 049196fcf1d48..25d2ccadcc88e 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -15582,9 +15582,11 @@ false / / Always -list +allow +going +to the -current +first and last navigation @@ -15601,6 +15603,19 @@ end j ! = +start +& +& +/ +/ +Always +display +the +current +entry +j +! += index ) { diff --git a/browser/base/content/test/about/browser_aboutCertError.js b/browser/base/content/test/about/browser_aboutCertError.js index 2c357036210ba..df2e13ecfe934 100644 --- a/browser/base/content/test/about/browser_aboutCertError.js +++ b/browser/base/content/test/about/browser_aboutCertError.js @@ -219,30 +219,6 @@ tab . linkedBrowser ; -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; is ( browser @@ -642,30 +618,6 @@ tab . linkedBrowser ; -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; BrowserTestUtils . startLoadingURIString @@ -711,30 +663,6 @@ gBrowser . selectedBrowser ; -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; info ( " diff --git a/browser/base/content/test/general/browser_backButtonFitts.js b/browser/base/content/test/general/browser_backButtonFitts.js index cbcea07ebdc8a..f4983800fc53b 100644 --- a/browser/base/content/test/general/browser_backButtonFitts.js +++ b/browser/base/content/test/general/browser_backButtonFitts.js @@ -108,26 +108,6 @@ function { / / -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; -/ -/ Push the state diff --git a/browser/base/content/test/general/browser_bug1299667.js b/browser/base/content/test/general/browser_bug1299667.js index 5c8ba2bb042f7..8f4e64c633365 100644 --- a/browser/base/content/test/general/browser_bug1299667.js +++ b/browser/base/content/test/general/browser_bug1299667.js @@ -86,14 +86,6 @@ function { content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState diff --git a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js b/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js index ebc5c06e6b59b..451b7c044b6d3 100644 --- a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js +++ b/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js @@ -101,44 +101,6 @@ robots true ) ; -await -ContentTask -. -spawn -( -gBrowser -. -selectedBrowser -{ -} -async -function -( -) -{ -/ -/ -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; info ( " diff --git a/browser/base/content/test/sanitize/browser_purgehistory_clears_sh.js b/browser/base/content/test/sanitize/browser_purgehistory_clears_sh.js index 349217f3f2220..c0536ed917e5a 100644 --- a/browser/base/content/test/sanitize/browser_purgehistory_clears_sh.js +++ b/browser/base/content/test/sanitize/browser_purgehistory_clears_sh.js @@ -267,14 +267,6 @@ length ; content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState @@ -287,14 +279,6 @@ pushState ; content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState @@ -307,14 +291,6 @@ pushState ; content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . back diff --git a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_addonspicker.js b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_addonspicker.js index 1d3f96b3747b8..2701bf79a76c2 100644 --- a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_addonspicker.js +++ b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_addonspicker.js @@ -1396,41 +1396,6 @@ install ; / / -Mark -the -first -entry -as -having -been -interacted -with -. -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; -/ -/ Navigate to the diff --git a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_default.js b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_default.js index f9eefeb991b78..1c42a790cb7cc 100644 --- a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_default.js +++ b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_multistage_default.js @@ -603,44 +603,6 @@ welcome true ) ; -await -ContentTask -. -spawn -( -gBrowser -. -selectedBrowser -{ -} -async -function -( -) -{ -/ -/ -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; registerCleanupFunction ( ( diff --git a/browser/components/aboutwelcome/tests/browser/head.js b/browser/components/aboutwelcome/tests/browser/head.js index dd573afc5e211..40278fce1f3be 100644 --- a/browser/components/aboutwelcome/tests/browser/head.js +++ b/browser/components/aboutwelcome/tests/browser/head.js @@ -256,44 +256,6 @@ welcome true ) ; -await -ContentTask -. -spawn -( -gBrowser -. -selectedBrowser -{ -} -async -function -( -) -{ -/ -/ -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; return { browser diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_history_shift_click.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_history_shift_click.js index 1f90a21e0af79..9cc2dcdd7a3e4 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_history_shift_click.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_history_shift_click.js @@ -172,14 +172,6 @@ function { content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState @@ -201,14 +193,6 @@ html ; content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState @@ -230,14 +214,6 @@ html ; content . -document -. -notifyUserGestureActivation -( -) -; -content -. history . pushState diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js index ff15e3e320515..bc95c365ba57e 100644 --- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js +++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js @@ -723,30 +723,6 @@ false serpUrl ) ; -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; BrowserTestUtils . startLoadingURIString diff --git a/browser/components/sessionstore/test/browser_scrollPositions.js b/browser/components/sessionstore/test/browser_scrollPositions.js index d85fc50cd5cda..3e51b03c7cee7 100644 --- a/browser/components/sessionstore/test/browser_scrollPositions.js +++ b/browser/components/sessionstore/test/browser_scrollPositions.js @@ -1184,40 +1184,6 @@ browser ; / / -Add -user -interaction -to -the -first -entry -. -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; -/ -/ Scroll down a diff --git a/browser/components/sessionstore/test/browser_sessionHistory.js b/browser/components/sessionstore/test/browser_sessionHistory.js index 6c843a8d2fef5..d6da0b07eaf24 100644 --- a/browser/components/sessionstore/test/browser_sessionHistory.js +++ b/browser/components/sessionstore/test/browser_sessionHistory.js @@ -1017,14 +1017,6 @@ content . document . -notifyUserGestureActivation -( -) -; -content -. -document -. querySelector ( " diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js index 4b7eeac6ebf6c..37a0940312c55 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -3184,19 +3184,6 @@ canGoBack ; } get -canGoBackIgnoringUserInteraction -( -) -{ -return -this -. -selectedBrowser -. -canGoBackIgnoringUserInteraction -; -} -get canGoForward ( ) diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_bfcache_exemption_about_pages.js b/browser/components/tabbrowser/test/browser/tabs/browser_bfcache_exemption_about_pages.js index f05349b99d4e2..6f69933186896 100644 --- a/browser/components/tabbrowser/test/browser/tabs/browser_bfcache_exemption_about_pages.js +++ b/browser/components/tabbrowser/test/browser/tabs/browser_bfcache_exemption_about_pages.js @@ -334,7 +334,6 @@ browser . goBack ( -false ) ; await @@ -496,7 +495,6 @@ browser . goBack ( -false ) ; await diff --git a/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_searchMode.js b/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_searchMode.js index bcfd2e745e29a..695d745226309 100644 --- a/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_searchMode.js +++ b/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_searchMode.js @@ -1262,7 +1262,6 @@ gBrowser . goBack ( -false ) ; await @@ -1452,7 +1451,6 @@ gBrowser . goBack ( -false ) ; await @@ -1525,7 +1523,6 @@ gBrowser . goForward ( -false ) ; await diff --git a/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_telemetry.js b/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_telemetry.js index 217d4ce66daf1..0dab4d89ea337 100644 --- a/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_telemetry.js +++ b/browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_telemetry.js @@ -1155,7 +1155,6 @@ linkedBrowser . goBack ( -false ) ; await diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp index d7661c80941b4..ea8d4a299cbdc 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp @@ -7709,6 +7709,67 @@ aUpdatedCacheKey } if ( +oldActiveEntry +) +{ +/ +/ +aInfo +comes +from +the +entry +stored +in +the +current +document +' +s +docshell +/ +/ +whose +interaction +state +does +not +get +updated +. +So +we +instead +propagate +/ +/ +state +from +the +previous +canonical +entry +. +See +bug +1917369 +. +mActiveEntry +- +> +SetHasUserInteraction +( +oldActiveEntry +- +> +GetHasUserInteraction +( +) +) +; +} +if +( IsTop ( ) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 9a992a8007bea..a602acd060340 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -18486,12 +18486,6 @@ CanGo ( - 1 -StaticPrefs -: -: -browser_navigation_requireUserInteraction -( -) ) ; MOZ_LOG @@ -18532,108 +18526,6 @@ 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 @@ -18694,12 +18586,6 @@ rootSH CanGo ( 1 -StaticPrefs -: -: -browser_navigation_requireUserInteraction -( -) ) ; MOZ_LOG diff --git a/docshell/base/nsIWebNavigation.idl b/docshell/base/nsIWebNavigation.idl index a19674a0a91ff..423f591557c25 100644 --- a/docshell/base/nsIWebNavigation.idl +++ b/docshell/base/nsIWebNavigation.idl @@ -314,54 +314,6 @@ the object can go -back -. -If -true -this -indicates -that -* -there -is -back -session -history -available -for -navigation -ignoring -* -whether -or -not -the -history -has -been -interacted -with -by -the -user -. -* -/ -readonly -attribute -boolean -canGoBackIgnoringUserInteraction -; -/ -* -* -* -Indicates -if -the -object -can -go forward . If diff --git a/docshell/shistory/ChildSHistory.cpp b/docshell/shistory/ChildSHistory.cpp index b39e297fa4d8b..a535ff67da6fa 100644 --- a/docshell/shistory/ChildSHistory.cpp +++ b/docshell/shistory/ChildSHistory.cpp @@ -776,8 +776,6 @@ CanGo ( int32_t aOffset -bool -aRequireUserInteraction ) { CheckedInt @@ -809,18 +807,6 @@ return false ; } -if -( -! -mHistory -| -| -aOffset -> -= -0 -) -{ return index . @@ -843,42 +829,6 @@ value 0 ; } -if -( -! -aRequireUserInteraction -) -{ -return -index -. -value -( -) -> -= -0 -; -} -bool -canGoBack -; -mHistory -- -> -CanGoBackFromEntryAtIndex -( -Index -( -) -& -canGoBack -) -; -return -canGoBack -; -} void ChildSHistory : diff --git a/docshell/shistory/ChildSHistory.h b/docshell/shistory/ChildSHistory.h index fdd4cf4e108aa..0f4bcf5dc4398 100644 --- a/docshell/shistory/ChildSHistory.h +++ b/docshell/shistory/ChildSHistory.h @@ -472,88 +472,12 @@ go backwards . * -aRequireUserInteraction -is -used -in -order -to -enable -the -back -- -button -* -intervention -. -This -causes -an -additional -check -that -there -must -be -a -previous -* -entry -that -has -been -user -- -interacted -. -This -check -is -unnecessary -when -going -* -forwards -as -the -latest -entry -is -always -available -whether -it -has -been -* -interacted -with -or -not -. -This -feature -is -gated -by -the -* -browser -. -navigation -. -requireUserInteraction -pref -. -* / bool CanGo ( int32_t aOffset -bool -aRequireUserInteraction ) ; MOZ_CAN_RUN_SCRIPT diff --git a/docshell/shistory/nsISHistory.idl b/docshell/shistory/nsISHistory.idl index a83d4dab1e864..098059943ee8e 100644 --- a/docshell/shistory/nsISHistory.idl +++ b/docshell/shistory/nsISHistory.idl @@ -1762,41 +1762,5 @@ isEmptyOrHasEntriesForSingleTopLevelPage ( ) ; -/ -* -* -* -Determine -if -we -can -navigate -back -in -history -from -the -entry -at -aIndex -* -to -an -entry -that -has -user -interaction -. -* -/ -boolean -canGoBackFromEntryAtIndex -( -in -long -aIndex -) -; } ; diff --git a/docshell/shistory/nsSHistory.cpp b/docshell/shistory/nsSHistory.cpp index 5637f1a4f2ad3..058c7a065afe3 100644 --- a/docshell/shistory/nsSHistory.cpp +++ b/docshell/shistory/nsSHistory.cpp @@ -13253,86 +13253,6 @@ GetHasUserInteraction ) ; } -NS_IMETHODIMP -nsSHistory -: -: -CanGoBackFromEntryAtIndex -( -int32_t -aIndex -bool -* -aCanGoBack -) -{ -* -aCanGoBack -= -false -; -if -( -! -StaticPrefs -: -: -browser_navigation_requireUserInteraction -( -) -) -{ -* -aCanGoBack -= -aIndex -> -0 -; -return -NS_OK -; -} -for -( -int32_t -i -= -aIndex -- -1 -; -i -> -= -0 -; -i -- -- -) -{ -if -( -HasUserInteractionAtIndex -( -i -) -) -{ -* -aCanGoBack -= -true -; -break -; -} -} -return -NS_OK -; -} nsresult nsSHistory : diff --git a/docshell/test/browser/browser.toml b/docshell/test/browser/browser.toml index c3403922d76ff..7cee4ef8744ad 100644 --- a/docshell/test/browser/browser.toml +++ b/docshell/test/browser/browser.toml @@ -1446,13 +1446,6 @@ https_first_disabled true [ " -browser_initial_entry_without_interaction -. -js -" -] -[ -" browser_isInitialDocument . js diff --git a/docshell/test/browser/browser_backforward_text_fragment_restore_urlbar.js b/docshell/test/browser/browser_backforward_text_fragment_restore_urlbar.js index e147ef7bed244..e449fee129024 100644 --- a/docshell/test/browser/browser_backforward_text_fragment_restore_urlbar.js +++ b/docshell/test/browser/browser_backforward_text_fragment_restore_urlbar.js @@ -132,30 +132,6 @@ browser = > { -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; let loaded = diff --git a/docshell/test/browser/browser_backforward_userinteraction.js b/docshell/test/browser/browser_backforward_userinteraction.js index 9e97856d52435..315a0ade547e3 100644 --- a/docshell/test/browser/browser_backforward_userinteraction.js +++ b/docshell/test/browser/browser_backforward_userinteraction.js @@ -491,33 +491,6 @@ tab . linkedBrowser ; -/ -/ -Add -some -user -interaction -to -entry -0 -await -BrowserTestUtils -. -synthesizeMouse -( -" -body -" -0 -0 -{ -} -browser -. -browsingContext -true -) -; assertBackForwardState ( false @@ -1169,33 +1142,6 @@ tab . linkedBrowser ; -/ -/ -Add -some -user -interaction -to -entry -0 -await -BrowserTestUtils -. -synthesizeMouse -( -" -body -" -0 -0 -{ -} -browser -. -browsingContext -true -) -; assertBackForwardState ( false @@ -1559,33 +1505,6 @@ tab . linkedBrowser ; -/ -/ -Add -some -user -interaction -to -entry -0 -await -BrowserTestUtils -. -synthesizeMouse -( -" -body -" -0 -0 -{ -} -browser -. -browsingContext -true -) -; await loadMethod ( diff --git a/docshell/test/browser/browser_backforward_userinteraction_about.js b/docshell/test/browser/browser_backforward_userinteraction_about.js index 6100720759948..98aa2bfd68917 100644 --- a/docshell/test/browser/browser_backforward_userinteraction_about.js +++ b/docshell/test/browser/browser_backforward_userinteraction_about.js @@ -165,32 +165,6 @@ false false ) ; -/ -/ -Add -some -user -interaction -to -the -initial -entry -await -BrowserTestUtils -. -synthesizeMouse -( -" -body -" -0 -0 -{ -} -browser -true -) -; await followLink ( diff --git a/docshell/test/browser/browser_backforward_userinteraction_systemprincipal.js b/docshell/test/browser/browser_backforward_userinteraction_systemprincipal.js index 71e1617091433..de5a62eecaa39 100644 --- a/docshell/test/browser/browser_backforward_userinteraction_systemprincipal.js +++ b/docshell/test/browser/browser_backforward_userinteraction_systemprincipal.js @@ -191,47 +191,6 @@ entry " ) ; -let -browser -= -tab -. -linkedBrowser -; -/ -/ -Add -some -user -interaction -to -the -initial -entry -await -SpecialPowers -. -spawn -( -browser -[ -] -( -) -= -> -{ -content -. -document -. -notifyUserGestureActivation -( -) -; -} -) -; assertBackForwardState ( false diff --git a/docshell/test/browser/browser_current_entry_always_in_history_menu.js b/docshell/test/browser/browser_current_entry_always_in_history_menu.js index 948d6ac8c153a..2a930b7683437 100644 --- a/docshell/test/browser/browser_current_entry_always_in_history_menu.js +++ b/docshell/test/browser/browser_current_entry_always_in_history_menu.js @@ -79,31 +79,17 @@ a user interaction . -await SpecialPowers . -spawn -( -browser -[ -] -async +wrap ( -) -= -> -{ -content -. document +) . notifyUserGestureActivation ( ) ; -} -) -; await followLink ( @@ -135,10 +121,9 @@ browser [ ] async +function ( ) -= -> { content . @@ -252,10 +237,9 @@ browser [ ] async +function ( ) -= -> { content . diff --git a/docshell/test/browser/browser_initial_entry_without_interaction.js b/docshell/test/browser/browser_initial_entry_without_interaction.js deleted file mode 100644 index 12e49dc9c30bb..0000000000000 --- a/docshell/test/browser/browser_initial_entry_without_interaction.js +++ /dev/null @@ -1,188 +0,0 @@ -" -use -strict -" -; -const -TEST_URI -= -" -https -: -/ -/ -example -. -com -/ -" -; -add_setup -( -async -function -( -) -{ -await -SpecialPowers -. -pushPrefEnv -( -{ -set -: -[ -[ -" -browser -. -navigation -. -requireUserInteraction -" -true -] -] -} -) -; -} -) -; -add_task -( -async -( -) -= -> -{ -await -BrowserTestUtils -. -withNewTab -( -TEST_URI -async -( -) -= -> -{ -/ -/ -Navigate -away -without -causing -a -user -interaction -. -await -followLink -( -TEST_URI -+ -" -2 -. -html -" -) -; -/ -/ -Wait -for -the -session -data -to -be -flushed -before -continuing -the -test -await -new -Promise -( -resolve -= -> -SessionStore -. -getSessionHistory -( -gBrowser -. -selectedTab -resolve -) -) -; -/ -/ -The -entry -with -no -interaction -shouldn -' -t -appear -. -await -assertMenulist -( -[ -TEST_URI -+ -" -2 -. -html -" -] -) -; -const -backButton -= -document -. -getElementById -( -" -back -- -button -" -) -; -ok -( -backButton -. -disabled -" -The -back -button -should -be -disabled -. -" -) -; -} -) -; -} -) -; diff --git a/docshell/test/browser/browser_replace_state_during_navigation.js b/docshell/test/browser/browser_replace_state_during_navigation.js index 35ef582c6cad4..7df6891cc89fc 100644 --- a/docshell/test/browser/browser_replace_state_during_navigation.js +++ b/docshell/test/browser/browser_replace_state_during_navigation.js @@ -204,6 +204,12 @@ TEST_URI_2 1 " TEST_URI_2 ++ +" +# +inject +" +TEST_URI_2 TEST_URI ] ) diff --git a/docshell/test/browser/browser_replace_state_during_navigation_from_first_page.js b/docshell/test/browser/browser_replace_state_during_navigation_from_first_page.js index cf3c66ddae356..1f41955672539 100644 --- a/docshell/test/browser/browser_replace_state_during_navigation_from_first_page.js +++ b/docshell/test/browser/browser_replace_state_during_navigation_from_first_page.js @@ -153,6 +153,12 @@ TEST_URI 1 " TEST_URI ++ +" +# +inject +" +TEST_URI ] ) ; diff --git a/docshell/test/navigation/file_bug1300461.html b/docshell/test/navigation/file_bug1300461.html index 0c998b8e1c927..1a59e81384138 100644 --- a/docshell/test/navigation/file_bug1300461.html +++ b/docshell/test/navigation/file_bug1300461.html @@ -442,17 +442,6 @@ ( ) { -SpecialPowers -. -wrap -( -document -) -. -notifyUserGestureActivation -( -) -; if ( opener diff --git a/docshell/test/navigation/file_bug1300461_back.html b/docshell/test/navigation/file_bug1300461_back.html index 9274f7cc122d9..5c402d82e2883 100644 --- a/docshell/test/navigation/file_bug1300461_back.html +++ b/docshell/test/navigation/file_bug1300461_back.html @@ -243,10 +243,10 @@ ( webNav . -canGoBackIgnoringUserInteraction +canGoBack " check -canGoBackIgnoringUserInteraction +canGoBack " ) ; diff --git a/dom/base/test/browser_set_focus_after_reuse_bcg.js b/dom/base/test/browser_set_focus_after_reuse_bcg.js index 107659e89b7f2..e09a7f6d3dde1 100644 --- a/dom/base/test/browser_set_focus_after_reuse_bcg.js +++ b/dom/base/test/browser_set_focus_after_reuse_bcg.js @@ -243,14 +243,6 @@ function ( ) { -content -. -document -. -notifyUserGestureActivation -( -) -; var button = diff --git a/dom/chrome-webidl/ChildSHistory.webidl b/dom/chrome-webidl/ChildSHistory.webidl index 037b0c6a78cc0..f3703346a522f 100644 --- a/dom/chrome-webidl/ChildSHistory.webidl +++ b/dom/chrome-webidl/ChildSHistory.webidl @@ -147,11 +147,6 @@ canGo ( long aOffset -optional -boolean -aRequireUserInteraction -= -false ) ; [ diff --git a/dom/interfaces/base/nsIBrowser.idl b/dom/interfaces/base/nsIBrowser.idl index 2dd85af90e2d8..618fc7f7a5ef3 100644 --- a/dom/interfaces/base/nsIBrowser.idl +++ b/dom/interfaces/base/nsIBrowser.idl @@ -557,25 +557,6 @@ in history * param -aCanGoBackIgnoringUserInteraction -whether -or -not -the -nsIWebNavigation -* -can -go -backwards -in -history -regardless -* -of -user -interactions -* -param aCanGoForward whether or @@ -598,9 +579,6 @@ boolean aCanGoBack in boolean -aCanGoBackIgnoringUserInteraction -in -boolean aCanGoForward ) ; diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp index ed0c8e291fde7..78f6aef97648c 100644 --- a/dom/ipc/BrowserChild.cpp +++ b/dom/ipc/BrowserChild.cpp @@ -23182,11 +23182,6 @@ canGoBack false ; bool -canGoBackIgnoringUserInteraction -= -false -; -bool canGoForward = false @@ -23223,20 +23218,6 @@ WebNavigation ) - > -GetCanGoBackIgnoringUserInteraction -( -& -canGoBackIgnoringUserInteraction -) -) -; -MOZ_TRY -( -WebNavigation -( -) -- -> GetCanGoForward ( & @@ -23576,7 +23557,6 @@ requestData aLocation aFlags canGoBack -canGoBackIgnoringUserInteraction canGoForward locationChangeData ) diff --git a/dom/ipc/BrowserParent.cpp b/dom/ipc/BrowserParent.cpp index dde4875ef139a..e3b896d1db7b7 100644 --- a/dom/ipc/BrowserParent.cpp +++ b/dom/ipc/BrowserParent.cpp @@ -19085,9 +19085,6 @@ bool aCanGoBack const bool -aCanGoBackIgnoringUserInteraction -const -bool aCanGoForward const Maybe @@ -19214,7 +19211,6 @@ browser UpdateWebNavigationForLocationChange ( aCanGoBack -aCanGoBackIgnoringUserInteraction aCanGoForward ) ; diff --git a/dom/ipc/BrowserParent.h b/dom/ipc/BrowserParent.h index e113575bc90e6..9def24876cb75 100644 --- a/dom/ipc/BrowserParent.h +++ b/dom/ipc/BrowserParent.h @@ -1642,9 +1642,6 @@ bool aCanGoBack const bool -aCanGoBackIgnoringUserInteraction -const -bool aCanGoForward const Maybe diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index a020043dd822a..b405e0cbededc 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -3491,8 +3491,6 @@ aFlags bool aCanGoBack bool -aCanGoBackIgnoringUserInteraction -bool aCanGoForward WebProgressLocationChangeData ? diff --git a/dom/tests/browser/browser_bug1685807.js b/dom/tests/browser/browser_bug1685807.js index b172dc2ab8667..b7ea4ab9975a5 100644 --- a/dom/tests/browser/browser_bug1685807.js +++ b/dom/tests/browser/browser_bug1685807.js @@ -261,26 +261,6 @@ aTestDocDomain = > { -/ -/ -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; content . name diff --git a/remote/marionette/driver.sys.mjs b/remote/marionette/driver.sys.mjs index ba89eec8ec163..9d09a97389ee5 100644 --- a/remote/marionette/driver.sys.mjs +++ b/remote/marionette/driver.sys.mjs @@ -7952,7 +7952,7 @@ browsingContext embedderElement ? . -canGoBackIgnoringUserInteraction +canGoBack ) { return diff --git a/toolkit/components/browser/nsWebBrowser.cpp b/toolkit/components/browser/nsWebBrowser.cpp index 71d57cc9c0712..2e9cc378669b0 100644 --- a/toolkit/components/browser/nsWebBrowser.cpp +++ b/toolkit/components/browser/nsWebBrowser.cpp @@ -2978,32 +2978,6 @@ NS_IMETHODIMP nsWebBrowser : : -GetCanGoBackIgnoringUserInteraction -( -bool -* -aCanGoBack -) -{ -NS_ENSURE_STATE -( -mDocShell -) -; -return -mDocShell -- -> -GetCanGoBackIgnoringUserInteraction -( -aCanGoBack -) -; -} -NS_IMETHODIMP -nsWebBrowser -: -: GetCanGoForward ( bool diff --git a/toolkit/components/remotebrowserutils/RemoteWebNavigation.sys.mjs b/toolkit/components/remotebrowserutils/RemoteWebNavigation.sys.mjs index 327588463b1e0..6766a5b5c2b81 100644 --- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.sys.mjs +++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.sys.mjs @@ -157,12 +157,6 @@ false ; this . -_canGoBackIgnoringUserInteraction -= -false -; -this -. _canGoForward = false @@ -242,53 +236,7 @@ appinfo sessionHistoryInParent ) { -const -sessionHistory -= -this -. -_browser -. -browsingContext -. -sessionHistory -; return -sessionHistory -? -. -canGoBackFromEntryAtIndex -( -sessionHistory -? -. -index -) -; -} -return -this -. -_canGoBack -; -} -get -canGoBackIgnoringUserInteraction -( -) -{ -if -( -Services -. -appinfo -. -sessionHistoryInParent -) -{ -const -sessionHistory -= this . _browser @@ -296,9 +244,6 @@ _browser browsingContext . sessionHistory -; -return -sessionHistory ? . index @@ -309,7 +254,7 @@ index return this . -_canGoBackIgnoringUserInteraction +_canGoBack ; } get diff --git a/toolkit/content/widgets/browser-custom-element.js b/toolkit/content/widgets/browser-custom-element.js index 111472fefd73d..693d69e983fd9 100644 --- a/toolkit/content/widgets/browser-custom-element.js +++ b/toolkit/content/widgets/browser-custom-element.js @@ -2624,19 +2624,6 @@ canGoBack ; } get -canGoBackIgnoringUserInteraction -( -) -{ -return -this -. -webNavigation -. -canGoBackIgnoringUserInteraction -; -} -get canGoForward ( ) @@ -4514,15 +4501,9 @@ webNavigation ; if ( -requireUserInteraction -? webNavigation . canGoBack -: -webNavigation -. -canGoBackIgnoringUserInteraction ) { this @@ -6410,7 +6391,6 @@ aContentType updateWebNavigationForLocationChange ( aCanGoBack -aCanGoBackIgnoringUserInteraction aCanGoForward ) { @@ -6446,14 +6426,6 @@ this . _remoteWebNavigation . -_canGoBackIgnoringUserInteraction -= -aCanGoBackIgnoringUserInteraction -; -this -. -_remoteWebNavigation -. _canGoForward = aCanGoForward @@ -6612,14 +6584,6 @@ this . _remoteWebNavigation . -_canGoBackIgnoringUserInteraction -= -false -; -this -. -_remoteWebNavigation -. _canGoForward = false diff --git a/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js b/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js index f4c686c451324..0a24adaf8bdb5 100644 --- a/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js +++ b/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js @@ -1301,26 +1301,6 @@ tab = > { -/ -/ -Mark -the -first -entry -as -having -been -interacted -with -. -content -. -document -. -notifyUserGestureActivation -( -) -; SpecialPowers . spawn