Bug 1840025 - Use ScrollMode::Smooth in nsSliderFrame::PageScroll. r=rzvncj

This restores the scrolling physics used in PageScroll to what it was
before bug 1331390.

Differential Revision: https://phabricator.services.mozilla.com/D187363
This commit is contained in:
Botond Ballo 2023-09-04 20:43:50 +00:00
Родитель 10018013ed
Коммит 5fa48c881a
2 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -69,13 +69,18 @@ async function test() {
});
}
// Note: on Linux, if the gtk-primary-button-warps-slider setting
// is enabled, this test will not exercise the codepath it intends
// to test (the thumb will jump immediately under the cursor, causing
// the test to pass trivially). However, the test should still not fail.
waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);
if (getPlatform() == "mac") {
ok(true, "Skipping test on Mac (bug 1851423)");
subtestDone();
} else {
// Note: on Linux, if the gtk-primary-button-warps-slider setting
// is enabled, this test will not exercise the codepath it intends
// to test (the thumb will jump immediately under the cursor, causing
// the test to pass trivially). However, the test should still not fail.
waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);
}
</script>
</head>

Просмотреть файл

@ -1564,7 +1564,7 @@ void nsSliderFrame::PageScroll(bool aClickAndHold) {
sf->ScrollTo(pos,
StaticPrefs::general_smoothScroll() &&
StaticPrefs::general_smoothScroll_pages()
? ScrollMode::SmoothMsd
? ScrollMode::Smooth
: ScrollMode::Instant,
nullptr, scrollSnapFlags);