From 72efd49679ff072a5e9b87a1314b82194852257f Mon Sep 17 00:00:00 2001 From: Gregory Pappas Date: Tue, 24 Oct 2023 04:18:50 +0000 Subject: [PATCH] Bug 1860161 - Fade out overlay scrollbars on Android r=emilio,geckoview-reviewers,m_kato Noticed while working on bug 1859864 that ScrollbarFadeDuration on Android is 0. It seemed a bit odd because every other platform with overlay scrollbars has a non-zero fade duration, but I figured that it was intentional and for power saving/performance/etc. Looking closer, it seems this is actually a regression from switching away from the old java scrollbars to gecko scrollbars (bug 1223928). The old java scrollbars did fade out (bug 704784). The fade animation makes scrollbars look nicer imo so it would be cool if we could bring this back. Chromium uses a duration of 300ms so we should probably match that, since people are used to it. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc;l=68-84;drc=6d4dcee2c0a7d7750037ffb70de6b82385d7ad0e Differential Revision: https://phabricator.services.mozilla.com/D191503 --- widget/android/nsLookAndFeel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/android/nsLookAndFeel.cpp b/widget/android/nsLookAndFeel.cpp index b844fe486a98..02919e0dbf1d 100644 --- a/widget/android/nsLookAndFeel.cpp +++ b/widget/android/nsLookAndFeel.cpp @@ -274,7 +274,7 @@ nsresult nsLookAndFeel::NativeGetInt(IntID aID, int32_t& aResult) { break; case IntID::ScrollbarFadeDuration: - aResult = 0; + aResult = 300; break; case IntID::ScrollButtonLeftMouseButtonAction: