зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1883279 - Check browser.navigation.requireUserInteraction before skipping entries based on user interaction. r=farre
We don't want to start skipping entries just because callers passed in aRequireUserInteraction, since the feature is not ready and the flag in the entries might not be correct. Differential Revision: https://phabricator.services.mozilla.com/D203376
This commit is contained in:
Родитель
80aa10467a
Коммит
108dd29bbc
|
@ -1220,7 +1220,8 @@ Maybe<int32_t> CanonicalBrowsingContext::HistoryGo(
|
|||
// Check for user interaction if desired, except for the first and last
|
||||
// history entries. We compare with >= to account for the case where
|
||||
// aOffset >= length.
|
||||
if (!aRequireUserInteraction || index.value() >= shistory->Length() - 1 ||
|
||||
if (!StaticPrefs::browser_navigation_requireUserInteraction() ||
|
||||
!aRequireUserInteraction || index.value() >= shistory->Length() - 1 ||
|
||||
index.value() <= 0) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,8 @@ void ChildSHistory::Go(int32_t aOffset, bool aRequireUserInteraction,
|
|||
// Check for user interaction if desired, except for the first and last
|
||||
// history entries. We compare with >= to account for the case where
|
||||
// aOffset >= Count().
|
||||
if (!aRequireUserInteraction || index.value() >= Count() - 1 ||
|
||||
if (!StaticPrefs::browser_navigation_requireUserInteraction() ||
|
||||
!aRequireUserInteraction || index.value() >= Count() - 1 ||
|
||||
index.value() <= 0) {
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче