Backed out 2 changesets (bug 969250) on the other theory that it broke lots of tests, forcing a prolonged CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 25 Mar 2015 14:46:47 -0700
changeset 264609 a88e14943648e15ac2332f023cf18fb172a6598b
parent 264608 13d7138edc6f0da520099ab96616829cc5120e3b
child 264610 8aaa0b07dda62a42176a72a81b5809c501386e8a
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs969250
milestone39.0a1
backs out3c1005c81e52b9b9d68bba8873c957180b94f1a3
3ed9d5170d1386e5922df6ca06765922db08968c
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 969250) on the other theory that it broke lots of tests, forcing a prolonged CLOSED TREE Backed out changeset 3c1005c81e52 (bug 969250) Backed out changeset 3ed9d5170d13 (bug 969250)
dom/events/EventStateManager.cpp
layout/base/tests/mochitest.ini
layout/base/tests/test_scroll_snapping_scrollbars.html
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGfxScrollFrame.h
layout/generic/nsIScrollableFrame.h
layout/xul/nsIScrollbarMediator.h
layout/xul/nsListBoxBodyFrame.cpp
layout/xul/nsListBoxBodyFrame.h
layout/xul/nsScrollbarButtonFrame.cpp
layout/xul/nsSliderFrame.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
layout/xul/tree/nsTreeBodyFrame.h
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -2426,17 +2426,17 @@ EventStateManager::DoScrollText(nsIScrol
   ScrollbarStyles overflowStyle = aScrollableFrame->GetScrollbarStyles();
   if (overflowStyle.mHorizontal == NS_STYLE_OVERFLOW_HIDDEN) {
     actualDevPixelScrollAmount.x = 0;
   }
   if (overflowStyle.mVertical == NS_STYLE_OVERFLOW_HIDDEN) {
     actualDevPixelScrollAmount.y = 0;
   }
 
-  nsIScrollbarMediator::ScrollSnapMode snapMode = nsIScrollbarMediator::DISABLE_SNAP;
+  nsIScrollableFrame::ScrollSnapMode snapMode = nsIScrollableFrame::DISABLE_SNAP;
   nsIAtom* origin = nullptr;
   switch (aEvent->deltaMode) {
     case nsIDOMWheelEvent::DOM_DELTA_LINE:
       origin = nsGkAtoms::mouseWheel;
       snapMode = nsIScrollableFrame::ENABLE_SNAP;
       break;
     case nsIDOMWheelEvent::DOM_DELTA_PAGE:
       origin = nsGkAtoms::pages;
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -175,18 +175,16 @@ skip-if = (buildapp == 'b2g' && toolkit 
 [test_event_target_iframe_oop.html]
 skip-if = e10s # bug 1020135, nested oop iframes not supported
 support-files = bug921928_event_target_iframe_apps_oop.html
 [test_mozPaintCount.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(depends on plugins support) b2g-debug(depends on plugins support) b2g-desktop(depends on plugins support)
 [test_scroll_event_ordering.html]
 [test_scroll_snapping.html]
 skip-if = buildapp == 'android' # bug 1041833
-[test_scroll_snapping_scrollbars.html]
-skip-if = buildapp == 'android' || buildapp == 'b2g' || buildapp == 'b2g-debug' # android(Bug 1041833) b2g(B2G does not have clickable toolbars) b2g-debug(B2G does not have clickable toolbars)
 [test_bug583889.html]
 support-files = bug583889_inner1.html bug583889_inner2.html
 [test_bug582771.html]
 [test_bug968148.html]
 support-files = bug968148_inner.html
 [test_bug603550.html]
 skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-debug(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-desktop(Components.classes[@mozilla.org/widget/dragservice;1] is undefined)
 [test_bug629838.html]
deleted file mode 100644
--- a/layout/base/tests/test_scroll_snapping_scrollbars.html
+++ /dev/null
@@ -1,331 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for scroll snapping</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-
-<p id="display"></p>
-<div id="sc" style="margin: 0px; padding: 0px; overflow: scroll; width:250px; height: 250px;">
-  <div id="sd" style="margin: 0px; padding: 0px; width: 1250px; height: 1250px;"></div>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var runtime = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"]
-                                .getService(SpecialPowers.Ci.nsIXULRuntime);
-var isMac = navigator.platform.indexOf("Mac") != -1;
-var isGtk = runtime.widgetToolkit.indexOf("gtk") != -1;
-var isWin = navigator.platform.indexOf("Win") != -1;
-var isSN = /mac os x 10\.6/.test(navigator.userAgent.toLowerCase());
-
-// Half of the scrollbar control width, in CSS pixels
-var scrollbarOffset = isWin ? 8 : 5;
-
-// OSX 10.6 scroll bar thumbs are off-center due to the bundling of buttons on one end
-// of the scroll bar frame.
-var scrollbarCenter = isSN ? 100 : 125;
-
-var testCases = [
-  {
-    "description"   : "Drag scrollbar left, expect scroll snapping.",
-    "snapCoord"     : "500px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : scrollbarCenter, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : -10, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Drag scrollbar right, expect scroll snapping.",
-    "snapCoord"     : "500px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : scrollbarCenter, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 10, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Drag scrollbar up, expect scroll snapping.",
-    "snapCoord"     : "500px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" :  scrollbarCenter },
-    "mouseOffset"   : { "x" : 0, "y" : -10 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Drag scrollbar down, expect scroll snapping.",
-    "snapCoord"     : "500px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" :  scrollbarCenter },
-    "mouseOffset"   : { "x" : 0, "y" : 10 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Page scrollbar left, expect scroll snapping.",
-    "snapCoord"     : "500px 500px, 1000px 500px",
-    "startScroll"   : { "x" : 1000, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 50, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Page scrollbar right, expect scroll snapping.",
-    "snapCoord"     : "500px 500px, 0px 500px",
-    "startScroll"   : { "x" : 0, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 200, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Page scrollbar up, expect scroll snapping.",
-    "snapCoord"     : "500px 500px, 500px 1000px",
-    "startScroll"   : { "x" : 500, "y" : 1000 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : 50 },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Page scrollbar down, expect scroll snapping.",
-    "snapCoord"     : "500px 500px, 500px 0px",
-    "startScroll"   : { "x" : 500, "y" : 0 },
-    "endScroll"     : { "x" : 500, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : 200 },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : true,
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Click scrollbar left button, expect scroll snapping.",
-    "snapCoord"     : "50px 500px, 250px 500px, 500px 500px, 750px 500px, 950px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 250, "y" : 500 },
-    "mousePosition" : { "x" : scrollbarOffset, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Hold scrollbar left button until repeating, expect scroll snapping.",
-    "snapCoord"     : "50px 500px, 500px 500px, 950px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 50, "y" : 500 },
-    "mousePosition" : { "x" : scrollbarOffset, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "500",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Click scrollbar right button, expect scroll snapping.",
-    "snapCoord"     : "50px 500px, 250px 500px, 500px 500px, 750px 500px, 950px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 750, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset * 3, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Hold scrollbar right button until repeating, expect scroll snapping.",
-    "snapCoord"     : "50px 500px, 500px 500px, 950px 500px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 950, "y" : 500 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset * 3, "y" : 250 - scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "500",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Click scrollbar up button, expect scroll snapping.",
-    "snapCoord"     : "500px 50px, 500px 250px, 500px 500px, 500px 750px, 500px 950px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 250 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Hold scrollbar up button until repeating, expect scroll snapping.",
-    "snapCoord"     : "500px 50px, 500px 500px, 500px 950px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 50 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : scrollbarOffset },
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "500",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Click scrollbar down button, expect scroll snapping.",
-    "snapCoord"     : "500px 50px, 500px 250px, 500px 500px, 500px 750px, 500px 950px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 750 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : 250 - scrollbarOffset * 3},
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "0",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-  {
-    "description"   : "Hold scrollbar down button until repeating, expect scroll snapping.",
-    "snapCoord"     : "500px 50px, 500px 500px, 500px 950px",
-    "startScroll"   : { "x" : 500, "y" : 500 },
-    "endScroll"     : { "x" : 500, "y" : 950 },
-    "mousePosition" : { "x" : 250 - scrollbarOffset, "y" : 250 - scrollbarOffset * 3},
-    "mouseOffset"   : { "x" : 0, "y" : 0 },
-    "duration"      : "500",
-    "runMac"        : false, // OSX does not have have line-scroll buttons
-    "runGtk"        : true,
-    "runWin"        : true
-  },
-
-];
-
-var step = 0;
-var sc; // Scroll Container
-var sd; // Scrolled Div
-
-var lastScrollTop;
-var lastScrollLeft;
-var stopFrameCount;
-
-function doTest() {
-  var testCase = testCases[step];
-
-  stopFrameCount = 0;
-  lastScrollTop = sc.scrollTop;
-  lastScrollLeft = sc.scrollLeft;
-
-  sc.scrollTo(testCase.startScroll.x, testCase.startScroll.y);
-  sc.style.scrollSnapType = "mandatory";
-  sd.style.scrollSnapCoordinate = testCase.snapCoord;
-
-  synthesizeMouse(sc,
-                  testCase.mousePosition.x,
-                  testCase.mousePosition.y,
-                  { type: "mousedown" });
-
-  synthesizeMouse(sc,
-                  testCase.mousePosition.x + testCase.mouseOffset.x,
-                  testCase.mousePosition.y + testCase.mouseOffset.y,
-                  { type: "mousemove" });
-
-  window.requestAnimationFrame(function() {
-    isnot("(" + sc.scrollLeft + "," + sc.scrollTop + ")",
-          "(" + testCase.startScroll.x +"," + testCase.startScroll.y + ")",
-          "Step " + step + ": Synthesized mouse events move scroll position. ("
-            + testCase.description + ")");
-
-    window.setTimeout(function() {
-      synthesizeMouse(sc,
-                      testCase.mousePosition.x + testCase.mouseOffset.x,
-                      testCase.mousePosition.y + testCase.mouseOffset.y,
-                      { type: "mouseup" });
-
-      window.requestAnimationFrame(waitForScrollStop);
-    }, testCase.duration);
-  });
-}
-
-function waitForScrollStop() {
-  if (stopFrameCount > 30) {
-    // We have the same position for 30 consecutive frames -- we are stopped
-    verifyTest();
-  } else {
-    // Still moving
-    if (lastScrollTop == sc.scrollTop && lastScrollLeft == sc.scrollLeft) {
-      stopFrameCount++;
-    } else {
-      stopFrameCount = 0;
-      lastScrollTop = sc.scrollTop;
-      lastScrollLeft = sc.scrollLeft;
-    }
-    window.requestAnimationFrame(waitForScrollStop);
-  }
-}
-
-function verifyTest() {
-  // Test ended, check if scroll position matches expected position
-  var testCase = testCases[step];
-  is("(" + sc.scrollLeft + "," + sc.scrollTop + ")",
-     "(" + testCase.endScroll.x +"," + testCase.endScroll.y + ")",
-      "Step " + step + ": " + testCase.description);
-
-  // Find next test to run
-  while (true) {
-    if (++step == testCases.length) {
-      SimpleTest.finish();
-      break;
-    } else {
-      testCase = testCases[step];
-      if ((testCase.runGtk && isGtk)
-          || (testCase.runMac && isMac)
-          || (testCase.runWin && isWin)) {
-        doTest();
-        break;
-      }
-    }
-  }
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestFlakyTimeout("Delays added to allow synthesized mouse " +
-                               "events to trigger scrollbar repeating scrolls.");
-addLoadEvent(function() {
-  sc = document.getElementById("sc");
-  sd = document.getElementById("sd");
-  SpecialPowers.pushPrefEnv({
-    "set": [["layout.css.scroll-snap.enabled", true],
-            ["layout.css.scroll-snap.proximity-threshold", 100]]},
-    doTest);
-});
-</script>
-</pre>
-</body>
-
-</html>
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1121,34 +1121,31 @@ GetOnePixelRangeAroundPoint(nsPoint aPoi
   } else {
     allowedRange.y = aPoint.y - halfPixel;
     allowedRange.height = halfPixel*2 - 1;
   }
   return allowedRange;
 }
 
 void
-ScrollFrameHelper::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                nsIScrollbarMediator::ScrollSnapMode aSnap)
+ScrollFrameHelper::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
   ScrollByUnit(aScrollbar, nsIScrollableFrame::SMOOTH, aDirection,
-               nsIScrollableFrame::PAGES, aSnap);
+               nsIScrollableFrame::PAGES);
 }
 
 void
-ScrollFrameHelper::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                 nsIScrollbarMediator::ScrollSnapMode aSnap)
+ScrollFrameHelper::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
   ScrollByUnit(aScrollbar, nsIScrollableFrame::INSTANT, aDirection,
-               nsIScrollableFrame::WHOLE, aSnap);
+               nsIScrollableFrame::WHOLE);
 }
 
 void
-ScrollFrameHelper::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                nsIScrollbarMediator::ScrollSnapMode aSnap)
+ScrollFrameHelper::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
   bool isHorizontal = aScrollbar->IsHorizontal();
   nsIntPoint delta;
   if (isHorizontal) {
     const double kScrollMultiplier =
       Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
                           NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
     delta.x = aDirection * kScrollMultiplier;
@@ -1170,18 +1167,17 @@ ScrollFrameHelper::ScrollByLine(nsScroll
       // context.
       ScrollByPage(aScrollbar, aDirection);
       return;
     }
   }
   
   nsIntPoint overflow;
   ScrollBy(delta, nsIScrollableFrame::LINES, nsIScrollableFrame::SMOOTH,
-           &overflow, nsGkAtoms::other, nsIScrollableFrame::NOT_MOMENTUM,
-           aSnap);
+           &overflow, nsGkAtoms::other);
 }
 
 void
 ScrollFrameHelper::RepeatButtonScroll(nsScrollbarFrame* aScrollbar)
 {
   aScrollbar->MoveToNewPosition();
 }
 
@@ -1207,45 +1203,31 @@ ScrollFrameHelper::ThumbMoved(nsScrollba
   if (allowedRange.ClampPoint(current) == current) {
     return;
   }
 
   ScrollTo(dest, nsIScrollableFrame::INSTANT, &allowedRange);
 }
 
 void
-ScrollFrameHelper::ScrollbarReleased(nsScrollbarFrame* aScrollbar)
-{
-  // Scrollbar scrolling does not result in fling gestures, clear any
-  // accumulated velocity
-  mVelocityQueue.Reset();
-
-  // Perform scroll snapping, if needed.  Scrollbar movement uses the same
-  // smooth scrolling animation as keyboard scrolling.
-  ScrollSnap(mDestination, nsIScrollableFrame::SMOOTH);
-}
-
-void
 ScrollFrameHelper::ScrollByUnit(nsScrollbarFrame* aScrollbar,
                                 nsIScrollableFrame::ScrollMode aMode,
                                 int32_t aDirection,
-                                nsIScrollableFrame::ScrollUnit aUnit,
-                                nsIScrollbarMediator::ScrollSnapMode aSnap)
+                                nsIScrollableFrame::ScrollUnit aUnit)
 {
   MOZ_ASSERT(aScrollbar != nullptr);
   bool isHorizontal = aScrollbar->IsHorizontal();
   nsIntPoint delta;
   if (isHorizontal) {
     delta.x = aDirection;
   } else {
     delta.y = aDirection;
   }
   nsIntPoint overflow;
-  ScrollBy(delta, aUnit, aMode, &overflow, nsGkAtoms::other,
-           nsIScrollableFrame::NOT_MOMENTUM, aSnap);
+  ScrollBy(delta, aUnit, aMode, &overflow, nsGkAtoms::other);
 }
 
 nsresult
 nsXULScrollFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
 {
   return mHelper.CreateAnonymousContent(aElements);
 }
 
@@ -2107,17 +2089,17 @@ ScrollFrameHelper::GetScrollPositionCSSP
  * this method wraps calls to ScrollToImpl(), either in one shot or incrementally,
  *  based on the setting of the smoothness scroll pref
  */
 void
 ScrollFrameHelper::ScrollToWithOrigin(nsPoint aScrollPosition,
                                           nsIScrollableFrame::ScrollMode aMode,
                                           nsIAtom *aOrigin,
                                           const nsRect* aRange,
-                                          nsIScrollbarMediator::ScrollSnapMode aSnap)
+                                          nsIScrollableFrame::ScrollSnapMode aSnap)
 {
 
   if (aSnap == nsIScrollableFrame::ENABLE_SNAP) {
     GetSnapPointForDestination(nsIScrollableFrame::DEVICE_PIXELS,
                                mDestination,
                                aScrollPosition);
   }
 
@@ -3381,17 +3363,17 @@ CalcRangeForScrollBy(int32_t aDelta, nsc
 
 void
 ScrollFrameHelper::ScrollBy(nsIntPoint aDelta,
                             nsIScrollableFrame::ScrollUnit aUnit,
                             nsIScrollableFrame::ScrollMode aMode,
                             nsIntPoint* aOverflow,
                             nsIAtom *aOrigin,
                             nsIScrollableFrame::ScrollMomentum aMomentum,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap)
+                            nsIScrollableFrame::ScrollSnapMode aSnap)
 {
   // When a smooth scroll is being processed on a frame, mouse wheel and trackpad
   // momentum scroll event updates must notcancel the SMOOTH or SMOOTH_MSD
   // scroll animations, enabling Javascript that depends on them to be responsive
   // without forcing the user to wait for the fling animations to completely stop.
   switch (aMomentum) {
   case nsIScrollableFrame::NOT_MOMENTUM:
     mIgnoreMomentumScroll = false;
@@ -3513,49 +3495,48 @@ ScrollFrameHelper::ScrollBy(nsIntPoint a
       !gfxPrefs::AsyncPanZoomEnabled()) {
     // When APZ is disabled, we must track the velocity
     // on the main thread; otherwise, the APZC will manage this.
     mVelocityQueue.Sample(GetScrollPosition());
   }
 }
 
 void
-ScrollFrameHelper::ScrollSnap(nsIScrollableFrame::ScrollMode aMode)
+ScrollFrameHelper::ScrollSnap()
 {
   float flingSensitivity = gfxPrefs::ScrollSnapPredictionSensitivity();
   int maxVelocity = gfxPrefs::ScrollSnapPredictionMaxVelocity();
   maxVelocity = nsPresContext::CSSPixelsToAppUnits(maxVelocity);
   int maxOffset = maxVelocity * flingSensitivity;
   nsPoint velocity = mVelocityQueue.GetVelocity();
   // Multiply each component individually to avoid integer multiply
   nsPoint predictedOffset = nsPoint(velocity.x * flingSensitivity,
                                     velocity.y * flingSensitivity);
   predictedOffset.Clamp(maxOffset);
   nsPoint pos = GetScrollPosition();
   nsPoint destinationPos = pos + predictedOffset;
-  ScrollSnap(destinationPos, aMode);
+  ScrollSnap(destinationPos);
 }
 
 void
 ScrollFrameHelper::FlingSnap(const mozilla::CSSPoint& aDestination)
 {
   ScrollSnap(CSSPoint::ToAppUnits(aDestination));
 }
 
 void
-ScrollFrameHelper::ScrollSnap(const nsPoint &aDestination,
-                              nsIScrollableFrame::ScrollMode aMode)
+ScrollFrameHelper::ScrollSnap(const nsPoint &aDestination)
 {
   nsRect scrollRange = GetScrollRangeForClamping();
   nsPoint pos = GetScrollPosition();
   nsPoint snapDestination = scrollRange.ClampPoint(aDestination);
   if (GetSnapPointForDestination(nsIScrollableFrame::DEVICE_PIXELS,
                                                  pos,
                                                  snapDestination)) {
-    ScrollTo(snapDestination, aMode);
+    ScrollTo(snapDestination, nsIScrollableFrame::SMOOTH_MSD);
   }
 }
 
 nsSize
 ScrollFrameHelper::GetLineScrollAmount() const
 {
   nsRefPtr<nsFontMetrics> fm;
   nsLayoutUtils::GetFontMetricsForFrame(mOuter, getter_AddRefs(fm),
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -176,19 +176,18 @@ public:
   nsRect GetScrollRange() const;
   // Get the scroll range assuming the scrollport has size (aWidth, aHeight).
   nsRect GetScrollRange(nscoord aWidth, nscoord aHeight) const;
   nsSize GetScrollPositionClampingScrollPortSize() const;
   float GetResolution() const;
   void SetResolution(float aResolution);
   void SetResolutionAndScaleTo(float aResolution);
   void FlingSnap(const mozilla::CSSPoint& aDestination);
-  void ScrollSnap(nsIScrollableFrame::ScrollMode aMode = nsIScrollableFrame::SMOOTH_MSD);
-  void ScrollSnap(const nsPoint &aDestination,
-                  nsIScrollableFrame::ScrollMode aMode = nsIScrollableFrame::SMOOTH_MSD);
+  void ScrollSnap();
+  void ScrollSnap(const nsPoint &aDestination);
 
 protected:
   nsRect GetScrollRangeForClamping() const;
 
 public:
   static void AsyncScrollCallback(ScrollFrameHelper* aInstance,
                                   mozilla::TimeStamp aTime);
   static void AsyncSmoothMSDScrollCallback(ScrollFrameHelper* aInstance,
@@ -196,18 +195,17 @@ public:
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    * aRange is the range of allowable scroll positions around the desired
    * aScrollPosition. Null means only aScrollPosition is allowed.
    * This is a closed-ended range --- aRange.XMost()/aRange.YMost() are allowed.
    */
   void ScrollTo(nsPoint aScrollPosition, nsIScrollableFrame::ScrollMode aMode,
                 const nsRect* aRange = nullptr,
-                nsIScrollbarMediator::ScrollSnapMode aSnap
-                  = nsIScrollbarMediator::DISABLE_SNAP) {
+                nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP) {
     ScrollToWithOrigin(aScrollPosition, aMode, nsGkAtoms::other, aRange,
                        aSnap);
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   void ScrollToCSSPixels(const CSSIntPoint& aScrollPosition,
                          nsIScrollableFrame::ScrollMode aMode
@@ -226,18 +224,17 @@ public:
   void ScrollVisual(nsPoint aOldScrolledFramePosition);
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   void ScrollBy(nsIntPoint aDelta, nsIScrollableFrame::ScrollUnit aUnit,
                 nsIScrollableFrame::ScrollMode aMode, nsIntPoint* aOverflow,
                 nsIAtom* aOrigin = nullptr,
                 nsIScrollableFrame::ScrollMomentum aMomentum = nsIScrollableFrame::NOT_MOMENTUM,
-                nsIScrollbarMediator::ScrollSnapMode aSnap
-                  = nsIScrollbarMediator::DISABLE_SNAP);
+                nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP);
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   void ScrollToRestoredPosition();
   /**
    * GetSnapPointForDestination determines which point to snap to after
    * scrolling. aStartPos gives the position before scrolling and aDestination
    * gives the position after scrolling, with no snapping. Behaviour is
@@ -378,36 +375,27 @@ public:
   }
   bool WantAsyncScroll() const;
   void ComputeFrameMetrics(Layer* aLayer, nsIFrame* aContainerReferenceFrame,
                            const ContainerLayerParameters& aParameters,
                            nsRect* aClipRect,
                            nsTArray<FrameMetrics>* aOutput) const;
 
   // nsIScrollbarMediator
-  void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                    nsIScrollbarMediator::ScrollSnapMode aSnap
-                      = nsIScrollbarMediator::DISABLE_SNAP);
-  void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                     nsIScrollbarMediator::ScrollSnapMode aSnap
-                       = nsIScrollbarMediator::DISABLE_SNAP);
-  void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                    nsIScrollbarMediator::ScrollSnapMode aSnap
-                      = nsIScrollbarMediator::DISABLE_SNAP);
+  void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection);
+  void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection);
+  void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection);
   void RepeatButtonScroll(nsScrollbarFrame* aScrollbar);
   void ThumbMoved(nsScrollbarFrame* aScrollbar,
                   nscoord aOldPos,
                   nscoord aNewPos);
-  void ScrollbarReleased(nsScrollbarFrame* aScrollbar);
   void ScrollByUnit(nsScrollbarFrame* aScrollbar,
                     nsIScrollableFrame::ScrollMode aMode,
                     int32_t aDirection,
-                    nsIScrollableFrame::ScrollUnit aUnit,
-                    nsIScrollbarMediator::ScrollSnapMode aSnap
-                      = nsIScrollbarMediator::DISABLE_SNAP);
+                    nsIScrollableFrame::ScrollUnit aUnit);
 
   // owning references to the nsIAnonymousContentCreator-built content
   nsCOMPtr<nsIContent> mHScrollbarContent;
   nsCOMPtr<nsIContent> mVScrollbarContent;
   nsCOMPtr<nsIContent> mScrollCornerContent;
   nsCOMPtr<nsIContent> mResizerContent;
 
   nsRevocableEventPtr<ScrollEvent> mScrollEvent;
@@ -527,18 +515,17 @@ public:
 protected:
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   void ScrollToWithOrigin(nsPoint aScrollPosition,
                           nsIScrollableFrame::ScrollMode aMode,
                           nsIAtom *aOrigin, // nullptr indicates "other" origin
                           const nsRect* aRange,
-                          nsIScrollbarMediator::ScrollSnapMode aSnap
-                            = nsIScrollbarMediator::DISABLE_SNAP);
+                          nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP);
 
   void CompleteAsyncScroll(const nsRect &aRange, nsIAtom* aOrigin = nullptr);
 
   static void EnsureImageVisPrefsCached();
   static bool sImageVisPrefsCached;
   // The number of scrollports wide/high to expand when looking for images.
   static uint32_t sHorzExpandScrollPort;
   static uint32_t sVertExpandScrollPort;
@@ -717,18 +704,17 @@ public:
   virtual nsSize GetPageScrollAmount() const override {
     return mHelper.GetPageScrollAmount();
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollTo(nsPoint aScrollPosition, ScrollMode aMode,
                         const nsRect* aRange = nullptr,
-                        nsIScrollbarMediator::ScrollSnapMode aSnap
-                          = nsIScrollbarMediator::DISABLE_SNAP)
+                        nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP)
                         override {
     mHelper.ScrollTo(aScrollPosition, aMode, aRange, aSnap);
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollToCSSPixels(const CSSIntPoint& aScrollPosition,
                                  nsIScrollableFrame::ScrollMode aMode
@@ -746,18 +732,17 @@ public:
     return mHelper.GetScrollPositionCSSPixels();
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollBy(nsIntPoint aDelta, ScrollUnit aUnit, ScrollMode aMode,
                         nsIntPoint* aOverflow, nsIAtom* aOrigin = nullptr,
                         nsIScrollableFrame::ScrollMomentum aMomentum = nsIScrollableFrame::NOT_MOMENTUM,
-                        nsIScrollbarMediator::ScrollSnapMode aSnap
-                          = nsIScrollbarMediator::DISABLE_SNAP)
+                        nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP)
                         override {
     mHelper.ScrollBy(aDelta, aUnit, aMode, aOverflow, aOrigin, aMomentum, aSnap);
   }
   virtual void FlingSnap(const mozilla::CSSPoint& aDestination) override {
     mHelper.FlingSnap(aDestination);
   }
   virtual void ScrollSnap() override {
     mHelper.ScrollSnap();
@@ -855,42 +840,33 @@ public:
   /**
    * Get the "type" of the frame
    *
    * @see nsGkAtoms::scrollFrame
    */
   virtual nsIAtom* GetType() const override;
 
   // nsIScrollbarMediator
-  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByPage(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByPage(aScrollbar, aDirection);
   }
-  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                             nsIScrollbarMediator::ScrollSnapMode aSnap
-                               = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByWhole(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByWhole(aScrollbar, aDirection);
   }
-  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByLine(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByLine(aScrollbar, aDirection);
   }
   virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) override {
     mHelper.RepeatButtonScroll(aScrollbar);
   }
   virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
                           nscoord aOldPos,
                           nscoord aNewPos) override {
     mHelper.ThumbMoved(aScrollbar, aOldPos, aNewPos);
   }
-  virtual void ScrollbarReleased(nsScrollbarFrame* aScrollbar) override {
-    mHelper.ScrollbarReleased(aScrollbar);
-  }
   virtual void VisibilityChanged(bool aVisible) override {}
   virtual nsIFrame* GetScrollbarBox(bool aVertical) override {
     return mHelper.GetScrollbarBox(aVertical);
   }
   virtual void ScrollbarActivityStarted() const override;
   virtual void ScrollbarActivityStopped() const override;
 
   virtual void SetTransformingByAPZ(bool aTransforming) override {
@@ -1109,18 +1085,17 @@ public:
   virtual nsSize GetPageScrollAmount() const override {
     return mHelper.GetPageScrollAmount();
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollTo(nsPoint aScrollPosition, ScrollMode aMode,
                         const nsRect* aRange = nullptr,
-                        ScrollSnapMode aSnap = nsIScrollbarMediator::DISABLE_SNAP)
-                        override {
+                        ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP) override {
     mHelper.ScrollTo(aScrollPosition, aMode, aRange, aSnap);
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollToCSSPixels(const CSSIntPoint& aScrollPosition,
                                  nsIScrollableFrame::ScrollMode aMode
                                    = nsIScrollableFrame::INSTANT) override {
@@ -1134,18 +1109,17 @@ public:
     return mHelper.GetScrollPositionCSSPixels();
   }
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
   virtual void ScrollBy(nsIntPoint aDelta, ScrollUnit aUnit, ScrollMode aMode,
                         nsIntPoint* aOverflow, nsIAtom* aOrigin = nullptr,
                         nsIScrollableFrame::ScrollMomentum aMomentum = nsIScrollableFrame::NOT_MOMENTUM,
-                        nsIScrollbarMediator::ScrollSnapMode aSnap
-                          = nsIScrollbarMediator::DISABLE_SNAP)
+                        nsIScrollableFrame::ScrollSnapMode aSnap = nsIScrollableFrame::DISABLE_SNAP)
                         override {
     mHelper.ScrollBy(aDelta, aUnit, aMode, aOverflow, aOrigin, aMomentum, aSnap);
   }
   virtual void FlingSnap(const mozilla::CSSPoint& aDestination) override {
     mHelper.FlingSnap(aDestination);
   }
   virtual void ScrollSnap() override {
     mHelper.ScrollSnap();
@@ -1250,42 +1224,33 @@ public:
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
     // Override bogus IsFrameOfType in nsBoxFrame.
     if (aFlags & (nsIFrame::eReplacedContainsBlock | nsIFrame::eReplaced))
       return false;
     return nsBoxFrame::IsFrameOfType(aFlags);
   }
 
-  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByPage(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByPage(aScrollbar, aDirection);
   }
-  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                             nsIScrollbarMediator::ScrollSnapMode aSnap
-                               = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByWhole(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByWhole(aScrollbar, aDirection);
   }
-  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override {
-    mHelper.ScrollByLine(aScrollbar, aDirection, aSnap);
+  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection) override {
+    mHelper.ScrollByLine(aScrollbar, aDirection);
   }
   virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) override {
     mHelper.RepeatButtonScroll(aScrollbar);
   }
   virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
                           nscoord aOldPos,
                           nscoord aNewPos) override {
     mHelper.ThumbMoved(aScrollbar, aOldPos, aNewPos);
   }
-  virtual void ScrollbarReleased(nsScrollbarFrame* aScrollbar) override {
-    mHelper.ScrollbarReleased(aScrollbar);
-  }
   virtual void VisibilityChanged(bool aVisible) override {}
   virtual nsIFrame* GetScrollbarBox(bool aVertical) override {
     return mHelper.GetScrollbarBox(aVertical);
   }
 
   virtual void ScrollbarActivityStarted() const override;
   virtual void ScrollbarActivityStopped() const override;
 
--- a/layout/generic/nsIScrollableFrame.h
+++ b/layout/generic/nsIScrollableFrame.h
@@ -203,28 +203,34 @@ public:
    * after the user has stopped scrolling, simulating a momentum scrolling
    * effect resulting from fling gestures.
    * SYNTHESIZED_MOMENTUM_EVENT indicates that the scrolling is being requested
    * by such a synthesized event and may be ignored if another scroll has
    * been started since the last actual user input.
    */
   enum ScrollMomentum { NOT_MOMENTUM, SYNTHESIZED_MOMENTUM_EVENT };
   /**
+   * When set to ENABLE_SNAP, additional scrolling will be performed after the
+   * scroll operation to maintain the constraints set by CSS Scroll snapping.
+   * The additional scrolling may include asynchronous smooth scrolls that
+   * continue to animate after the initial scroll position has been set.
+   */
+  enum ScrollSnapMode { DISABLE_SNAP, ENABLE_SNAP };
+  /**
    * @note This method might destroy the frame, pres shell and other objects.
    * Clamps aScrollPosition to GetScrollRange and sets the scroll position
    * to that value.
    * @param aRange If non-null, specifies area which contains aScrollPosition
    * and can be used for choosing a performance-optimized scroll position.
    * Any point within this area can be chosen.
    * The choosen point will be as close as possible to aScrollPosition.
    */
   virtual void ScrollTo(nsPoint aScrollPosition, ScrollMode aMode,
                         const nsRect* aRange = nullptr,
-                        nsIScrollbarMediator::ScrollSnapMode aSnap
-                          = nsIScrollbarMediator::DISABLE_SNAP) = 0;
+                        ScrollSnapMode aSnap = DISABLE_SNAP) = 0;
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    * Scrolls to a particular position in integer CSS pixels.
    * Keeps the exact current horizontal or vertical position if the current
    * position, rounded to CSS pixels, matches aScrollPosition. If
    * aScrollPosition.x/y is different from the current CSS pixel position,
    * makes sure we only move in the direction given by the difference.
    *
@@ -269,18 +275,17 @@ public:
    * was clamped by in each direction (how far we moved the scroll position
    * to bring it back into the legal range). This is never negative. The
    * values are in device pixels.
    */
   virtual void ScrollBy(nsIntPoint aDelta, ScrollUnit aUnit, ScrollMode aMode,
                         nsIntPoint* aOverflow = nullptr,
                         nsIAtom* aOrigin = nullptr,
                         ScrollMomentum aMomentum = NOT_MOMENTUM,
-                        nsIScrollbarMediator::ScrollSnapMode aSnap
-                          = nsIScrollbarMediator::DISABLE_SNAP) = 0;
+                        ScrollSnapMode aSnap = DISABLE_SNAP) = 0;
 
   /**
    * Perform scroll snapping, possibly resulting in a smooth scroll to
    * maintain the scroll snap position constraints.  A predicted landing
    * position determined by the APZC is used to select the best matching
    * snap point, allowing touchscreen fling gestures to navigate between
    * snap points.
    * @param aDestination The desired landing position of the fling, which
--- a/layout/xul/nsIScrollbarMediator.h
+++ b/layout/xul/nsIScrollbarMediator.h
@@ -20,34 +20,23 @@ public:
 
   /**
    * The aScrollbar argument denotes the scrollbar that's firing the notification.
    * aScrollbar is never null.
    * aDirection is either -1, 0, or 1.
    */
 
   /**
-   * When set to ENABLE_SNAP, additional scrolling will be performed after the
-   * scroll operation to maintain the constraints set by CSS Scroll snapping.
-   * The additional scrolling may include asynchronous smooth scrolls that
-   * continue to animate after the initial scroll position has been set.
-   */
-  enum ScrollSnapMode { DISABLE_SNAP, ENABLE_SNAP };
-
-  /**
    * One of the following three methods is called when the scrollbar's button is
    * clicked.
    * @note These methods might destroy the frame, pres shell, and other objects.
    */
-  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            ScrollSnapMode aSnap = DISABLE_SNAP) = 0;
-  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            ScrollSnapMode aSnap = DISABLE_SNAP) = 0;
-  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            ScrollSnapMode aSnap = DISABLE_SNAP) = 0;
+  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection) = 0;
+  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection) = 0;
+  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection) = 0;
   /**
    * RepeatButtonScroll is called when the scrollbar's button is held down. When the
    * button is first clicked the increment is set; RepeatButtonScroll adds this
    * increment to the current position.
    * @note This method might destroy the frame, pres shell, and other objects.
    */
   virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) = 0;
   /**
@@ -55,21 +44,16 @@ public:
    * The scroll positions start with zero at the left edge; implementors that want
    * zero at the right edge for RTL content will need to adjust accordingly.
    * (See ScrollFrameHelper::ThumbMoved in nsGfxScrollFrame.cpp.)
    * @note This method might destroy the frame, pres shell, and other objects.
    */
   virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
                           nscoord aOldPos,
                           nscoord aNewPos) = 0;
-  /**
-   * Called when the scroll bar thumb, slider, or any other component is
-   * released.
-   */
-  virtual void ScrollbarReleased(nsScrollbarFrame* aScrollbar) = 0;
   virtual void VisibilityChanged(bool aVisible) = 0;
 
   /**
    * Obtain the frame for the horizontal or vertical scrollbar, or null
    * if there is no such box.
    */
   virtual nsIFrame* GetScrollbarBox(bool aVertical) = 0;
   /**
--- a/layout/xul/nsListBoxBodyFrame.cpp
+++ b/layout/xul/nsListBoxBodyFrame.cpp
@@ -321,50 +321,44 @@ nsListBoxBodyFrame::GetPrefSize(nsBoxLay
     pref.width += scrollbars.left + scrollbars.right;
   }
   return pref;
 }
 
 ///////////// nsIScrollbarMediator ///////////////
 
 void
-nsListBoxBodyFrame::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                 nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsListBoxBodyFrame::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr);
   aScrollbar->SetIncrementToPage(aDirection);
   nsWeakFrame weakFrame(this);
   int32_t newPos = aScrollbar->MoveToNewPosition();
   if (!weakFrame.IsAlive()) {
     return;
   }
   UpdateIndex(newPos);
 }
 
 void
-nsListBoxBodyFrame::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                  nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsListBoxBodyFrame::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr);
   aScrollbar->SetIncrementToWhole(aDirection);
   nsWeakFrame weakFrame(this);
   int32_t newPos = aScrollbar->MoveToNewPosition();
   if (!weakFrame.IsAlive()) {
     return;
   }
   UpdateIndex(newPos);
 }
 
 void
-nsListBoxBodyFrame::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                                 nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsListBoxBodyFrame::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr);
   aScrollbar->SetIncrementToLine(aDirection);
   nsWeakFrame weakFrame(this);
   int32_t newPos = aScrollbar->MoveToNewPosition();
   if (!weakFrame.IsAlive()) {
     return;
   }
   UpdateIndex(newPos);
--- a/layout/xul/nsListBoxBodyFrame.h
+++ b/layout/xul/nsListBoxBodyFrame.h
@@ -49,30 +49,23 @@ public:
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent, 
                     nsIFrame*         aPrevInFlow) override;
   virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
 
   virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) override;
 
   // nsIScrollbarMediator
-  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode snapMode
-                              = nsIScrollbarMediator::DISABLE_SNAP) override;
-  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                             nsIScrollbarMediator::ScrollSnapMode snapMode
-                               = nsIScrollbarMediator::DISABLE_SNAP) override;
-  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode snapMode
-                              = nsIScrollbarMediator::DISABLE_SNAP) override;
+  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
+  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
+  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
   virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) override;
   virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
                           int32_t aOldPos,
                           int32_t aNewPos) override;
-  virtual void ScrollbarReleased(nsScrollbarFrame* aScrollbar) override {}
   virtual void VisibilityChanged(bool aVisible) override;
   virtual nsIFrame* GetScrollbarBox(bool aVertical) override;
   virtual void ScrollbarActivityStarted() const override {}
   virtual void ScrollbarActivityStopped() const override {}
 
 
   // nsIReflowCallback
   virtual bool ReflowFinished() override;
--- a/layout/xul/nsScrollbarButtonFrame.cpp
+++ b/layout/xul/nsScrollbarButtonFrame.cpp
@@ -136,29 +136,29 @@ nsScrollbarButtonFrame::HandleButtonPres
 
   nsScrollbarFrame* sb = do_QueryFrame(scrollbar);
   if (sb) {
     nsIScrollbarMediator* m = sb->GetScrollbarMediator();
     switch (pressedButtonAction) {
     case 0:
       sb->SetIncrementToLine(direction);
       if (m) {
-        m->ScrollByLine(sb, direction, nsIScrollbarMediator::ENABLE_SNAP);
+        m->ScrollByLine(sb, direction);
       }
       break;
     case 1:
       sb->SetIncrementToPage(direction);
       if (m) {
-        m->ScrollByPage(sb, direction, nsIScrollbarMediator::ENABLE_SNAP);
+        m->ScrollByPage(sb, direction);
       }
       break;
     case 2:
       sb->SetIncrementToWhole(direction);
       if (m) {
-        m->ScrollByWhole(sb, direction, nsIScrollbarMediator::ENABLE_SNAP);
+        m->ScrollByWhole(sb, direction);
       }
       break;
     case 3:
     default:
       // We were told to ignore this click, or someone assigned a non-standard
       // value to the button's action.
       return false;
     }
@@ -182,25 +182,16 @@ NS_IMETHODIMP
 nsScrollbarButtonFrame::HandleRelease(nsPresContext* aPresContext,
                                       WidgetGUIEvent* aEvent,
                                       nsEventStatus* aEventStatus)
 {
   nsIPresShell::SetCapturingContent(nullptr, 0);
   // we're not active anymore
   mContent->UnsetAttr(kNameSpaceID_None, nsGkAtoms::active, true);
   StopRepeat();
-  nsIFrame* scrollbar;
-  GetParentWithTag(nsGkAtoms::scrollbar, this, scrollbar);
-  nsScrollbarFrame* sb = do_QueryFrame(scrollbar);
-  if (sb) {
-    nsIScrollbarMediator* m = sb->GetScrollbarMediator();
-    if (m) {
-      m->ScrollbarReleased(sb);
-    }
-  }
   return NS_OK;
 }
 
 void nsScrollbarButtonFrame::Notify()
 {
   if (mCursorOnThis ||
       LookAndFeel::GetInt(
         LookAndFeel::eIntID_ScrollbarButtonAutoRepeatBehavior, 0)) {
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -259,18 +259,17 @@ nsSliderFrame::AttributeChanged(int32_t 
         }
 
         // set the new position and notify observers
         nsScrollbarFrame* scrollbarFrame = do_QueryFrame(scrollbarBox);
         if (scrollbarFrame) {
           nsIScrollbarMediator* mediator = scrollbarFrame->GetScrollbarMediator();
           scrollbarFrame->SetIncrementToWhole(direction);
           if (mediator) {
-            mediator->ScrollByWhole(scrollbarFrame, direction,
-                                    nsIScrollbarMediator::ENABLE_SNAP);
+            mediator->ScrollByWhole(scrollbarFrame, direction);
           }
         }
         // 'this' might be destroyed here
 
         nsContentUtils::AddScriptRunner(
           new nsSetAttrRunnable(scrollbar, nsGkAtoms::curpos, current));
       }
   }
@@ -1149,24 +1148,16 @@ nsSliderFrame::HandlePress(nsPresContext
 
 NS_IMETHODIMP
 nsSliderFrame::HandleRelease(nsPresContext* aPresContext,
                              WidgetGUIEvent* aEvent,
                              nsEventStatus* aEventStatus)
 {
   StopRepeat();
 
-  nsIFrame* scrollbar = GetScrollbar();
-  nsScrollbarFrame* sb = do_QueryFrame(scrollbar);
-  if (sb) {
-    nsIScrollbarMediator* m = sb->GetScrollbarMediator();
-    if (m) {
-      m->ScrollbarReleased(sb);
-    }
-  }
   return NS_OK;
 }
 
 void
 nsSliderFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
   // tell our mediator if we have one we are gone.
   if (mMediator) {
@@ -1265,17 +1256,17 @@ nsSliderFrame::PageScroll(nscoord aChang
     aChange = -aChange;
   }
   nsIFrame* scrollbar = GetScrollbar();
   nsScrollbarFrame* sb = do_QueryFrame(scrollbar);
   if (sb) {
     nsIScrollbarMediator* m = sb->GetScrollbarMediator();
     sb->SetIncrementToPage(aChange);
     if (m) {
-      m->ScrollByPage(sb, aChange, nsIScrollbarMediator::ENABLE_SNAP);
+      m->ScrollByPage(sb, aChange);
       return;
     }
   }
   PageUpDown(aChange);
 }
 
 NS_IMPL_ISUPPORTS(nsSliderMediator,
                   nsIDOMEventListener)
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -4195,39 +4195,33 @@ nsTreeBodyFrame::ScrollHorzInternal(cons
     return NS_ERROR_FAILURE;
   }
   // And fire off an event about it all
   PostScrollEvent();
   return NS_OK;
 }
 
 void
-nsTreeBodyFrame::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                              nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsTreeBodyFrame::ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr);
   ScrollByPages(aDirection);
 }
 
 void
-nsTreeBodyFrame::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                               nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsTreeBodyFrame::ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr); 
   int32_t newIndex = aDirection < 0 ? 0 : mTopRowIndex;
   ScrollToRow(newIndex);
 }
 
 void
-nsTreeBodyFrame::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                              nsIScrollbarMediator::ScrollSnapMode aSnap)
+nsTreeBodyFrame::ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection)
 {
-  // CSS Scroll Snapping is not enabled for XUL, aSnap is ignored
   MOZ_ASSERT(aScrollbar != nullptr);
   ScrollByLines(aDirection);
 }
 
 void
 nsTreeBodyFrame::RepeatButtonScroll(nsScrollbarFrame* aScrollbar)
 {
   ScrollParts parts = GetScrollParts();
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -128,30 +128,23 @@ public:
   // nsIReflowCallback
   virtual bool ReflowFinished() override;
   virtual void ReflowCallbackCanceled() override;
 
   // nsICSSPseudoComparator
   virtual bool PseudoMatches(nsCSSSelector* aSelector) override;
 
   // nsIScrollbarMediator
-  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override;
-  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                             nsIScrollbarMediator::ScrollSnapMode aSnap
-                               = nsIScrollbarMediator::DISABLE_SNAP) override;
-  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection,
-                            nsIScrollbarMediator::ScrollSnapMode aSnap
-                              = nsIScrollbarMediator::DISABLE_SNAP) override;
+  virtual void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
+  virtual void ScrollByWhole(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
+  virtual void ScrollByLine(nsScrollbarFrame* aScrollbar, int32_t aDirection) override;
   virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) override;
   virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
                           nscoord aOldPos,
                           nscoord aNewPos) override;
-  virtual void ScrollbarReleased(nsScrollbarFrame* aScrollbar) override {}
   virtual void VisibilityChanged(bool aVisible) override { Invalidate(); }
   virtual nsIFrame* GetScrollbarBox(bool aVertical) override {
     ScrollParts parts = GetScrollParts();
     return aVertical ? parts.mVScrollbar : parts.mHScrollbar;
   }
   virtual void ScrollbarActivityStarted() const override;
   virtual void ScrollbarActivityStopped() const override;