Bug 1386742 - Fix a transcription error in the APZ autoscroll calculation. r=kats
MozReview-Commit-ID: DNVBRR6wucU
--- a/gfx/layers/apz/src/AutoscrollAnimation.cpp
+++ b/gfx/layers/apz/src/AutoscrollAnimation.cpp
@@ -52,17 +52,17 @@ AutoscrollAnimation::DoSample(FrameMetri
ScreenPoint mouseLocation = treeManager->GetCurrentMousePosition();
// The implementation of this function closely mirrors that of its main-
// thread equivalent, the autoscrollLoop() function in
// toolkit/content/browser-content.js.
// Avoid long jumps when the browser hangs for more than |maxTimeDelta| ms.
static const TimeDuration maxTimeDelta = TimeDuration::FromMilliseconds(100);
- TimeDuration timeDelta = TimeDuration::Max(aDelta, maxTimeDelta);
+ TimeDuration timeDelta = TimeDuration::Min(aDelta, maxTimeDelta);
float timeCompensation = timeDelta.ToMilliseconds() / 20;
// Notes:
// - The main-thread implementation rounds the scroll delta to an integer,
// and keeps track of the fractional part as an "error". It does this
// because it uses Window.scrollBy() or Element.scrollBy() to perform
// the scrolling, and those functions truncate the fractional part of