From 967d0dd7301e05e5b6632cd90bfa8f0804ae49f3 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Mon, 9 Jun 2025 12:01:24 +0200 Subject: [PATCH] perf: Disable msd physics by default to improve scrolling, b=no-bug, c=no-component --- src/browser/app/profile/smoothscroll.inc | 14 ++++++++++++++ src/browser/app/profile/zen-browser.js | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 src/browser/app/profile/smoothscroll.inc diff --git a/src/browser/app/profile/smoothscroll.inc b/src/browser/app/profile/smoothscroll.inc new file mode 100644 index 000000000..fc1d5b930 --- /dev/null +++ b/src/browser/app/profile/smoothscroll.inc @@ -0,0 +1,14 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +pref("general.smoothScroll.currentVelocityWeighting", "0.15"); +pref("general.smoothScroll.stopDecelerationWeighting", "0.6"); +pref("mousewheel.min_line_scroll_amount", 10); +pref("general.smoothScroll.mouseWheel.durationMinMS", 80); +pref("general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS", 12); +pref("general.smoothScroll.msdPhysics.motionBeginSpringConstant", 600); +pref("general.smoothScroll.msdPhysics.regularSpringConstant", 650); +pref("general.smoothScroll.msdPhysics.slowdownMinDeltaMS", 25); +pref("general.smoothScroll.msdPhysics.slowdownSpringConstant", 250); +pref("mousewheel.default.delta_multiplier_y", 200); diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index e190e11e9..b63dae74d 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -36,5 +36,9 @@ pref('toolkit.legacyUserProfileCustomizations.stylesheets', true); #include features.inc +#ifndef XP_MACOSX +#include smoothscroll.inc +#endif + #include performance.inc #include pip.inc