@@ -2234,11 +2234,6 @@ void nsHTMLScrollFrame::AsyncScroll::InitSmoothScroll(
2234
2234
mAnimationPhysics ->Update (aTime, aDestination, aCurrentVelocity);
2235
2235
}
2236
2236
2237
- /* static */
2238
- bool nsHTMLScrollFrame::IsSmoothScrollingEnabled () {
2239
- return StaticPrefs::general_smoothScroll ();
2240
- }
2241
-
2242
2237
/*
2243
2238
* Callback function from AsyncSmoothMSDScroll, used in
2244
2239
* nsHTMLScrollFrame::ScrollTo
@@ -2560,7 +2555,8 @@ void nsHTMLScrollFrame::ScrollToWithOrigin(nsPoint aScrollPosition,
2560
2555
mAsyncScroll ->SetRefreshObserver (this );
2561
2556
}
2562
2557
2563
- const bool isSmoothScroll = aParams.IsSmooth () && IsSmoothScrollingEnabled ();
2558
+ const bool isSmoothScroll =
2559
+ aParams.IsSmooth () && nsLayoutUtils::IsSmoothScrollingEnabled ();
2564
2560
if (isSmoothScroll) {
2565
2561
mAsyncScroll ->InitSmoothScroll (now, GetScrollPosition (), mDestination ,
2566
2562
aParams.mOrigin , range, currentVelocity);
@@ -7903,7 +7899,7 @@ bool nsHTMLScrollFrame::IsSmoothScroll(dom::ScrollBehavior aBehavior) const {
7903
7899
// smooth scrolls. A requested smooth scroll when smooth scrolling is
7904
7900
// disabled should be equivalent to an instant scroll.
7905
7901
if (aBehavior == dom::ScrollBehavior::Instant ||
7906
- !nsHTMLScrollFrame ::IsSmoothScrollingEnabled ()) {
7902
+ !nsLayoutUtils ::IsSmoothScrollingEnabled ()) {
7907
7903
return false ;
7908
7904
}
7909
7905
0 commit comments