Bug 1588743 - Remove old scroll-snap implementation, and scroll snapping prefs. r=hiro
☠☠ backed out by 43ed533210c6 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 15 Oct 2019 11:39:30 +0000
changeset 497634 1a951477dca5c62745b35a26b7c9226b833c6345
parent 497633 cc291fb152956bdb824560cde53c6535c781f80b
child 497635 448164fceb1b2fc1cb7e7f614c675318143431a6
push id97952
push userealvarez@mozilla.com
push dateTue, 15 Oct 2019 11:41:39 +0000
treeherderautoland@1a951477dca5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1588743
milestone71.0a1
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
Bug 1588743 - Remove old scroll-snap implementation, and scroll snapping prefs. r=hiro Differential Revision: https://phabricator.services.mozilla.com/D49267
dom/base/Element.cpp
gfx/layers/FrameMetrics.h
gfx/layers/apz/test/gtest/TestSnapping.cpp
gfx/layers/apz/test/gtest/TestSnappingOnMomentum.cpp
gfx/layers/apz/test/mochitest/test_group_scroll_snap.html
gfx/layers/ipc/LayersMessageUtils.h
layout/base/ScrollStyles.cpp
layout/base/ScrollStyles.h
layout/generic/ScrollSnap.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/reftests/css-scroll-snap/reftest.list
layout/style/test/property_database.js
layout/style/test/test_transitions_per_property.html
modules/libpref/init/StaticPrefList.yaml
servo/components/style/properties/longhands/box.mako.rs
servo/components/style/properties/longhands/margin.mako.rs
servo/components/style/properties/longhands/padding.mako.rs
servo/components/style/properties/shorthands/margin.mako.rs
servo/components/style/properties/shorthands/padding.mako.rs
testing/web-platform/meta/css/css-scroll-snap/__dir__.ini
testing/web-platform/meta/css/cssom-view/__dir__.ini
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -670,25 +670,23 @@ void Element::ScrollIntoView(const Scrol
       break;
     case ScrollLogicalPosition::Nearest:
       whereToScrollHorizontally = kScrollMinimum;
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("Unexpected ScrollLogicalPosition value");
   }
 
-  ScrollFlags scrollFlags = ScrollFlags::ScrollOverflowHidden;
+  ScrollFlags scrollFlags =
+      ScrollFlags::ScrollOverflowHidden | ScrollFlags::ScrollSnap;
   if (aOptions.mBehavior == ScrollBehavior::Smooth) {
     scrollFlags |= ScrollFlags::ScrollSmooth;
   } else if (aOptions.mBehavior == ScrollBehavior::Auto) {
     scrollFlags |= ScrollFlags::ScrollSmoothAuto;
   }
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    scrollFlags |= ScrollFlags::ScrollSnap;
-  }
 
   presShell->ScrollContentIntoView(
       this, ScrollAxis(whereToScrollVertically, WhenToScroll::Always),
       ScrollAxis(whereToScrollHorizontally, WhenToScroll::Always), scrollFlags);
 }
 
 void Element::Scroll(const CSSIntPoint& aScroll,
                      const ScrollOptions& aOptions) {
--- a/gfx/layers/FrameMetrics.h
+++ b/gfx/layers/FrameMetrics.h
@@ -716,20 +716,16 @@ struct FrameMetrics {
 };
 
 struct ScrollSnapInfo {
   ScrollSnapInfo() = default;
 
   bool operator==(const ScrollSnapInfo& aOther) const {
     return mScrollSnapStrictnessX == aOther.mScrollSnapStrictnessX &&
            mScrollSnapStrictnessY == aOther.mScrollSnapStrictnessY &&
-           mScrollSnapIntervalX == aOther.mScrollSnapIntervalX &&
-           mScrollSnapIntervalY == aOther.mScrollSnapIntervalY &&
-           mScrollSnapDestination == aOther.mScrollSnapDestination &&
-           mScrollSnapCoordinates == aOther.mScrollSnapCoordinates &&
            mSnapPositionX == aOther.mSnapPositionX &&
            mSnapPositionY == aOther.mSnapPositionY &&
            mXRangeWiderThanSnapport == aOther.mXRangeWiderThanSnapport &&
            mYRangeWiderThanSnapport == aOther.mYRangeWiderThanSnapport &&
            mSnapportSize == aOther.mSnapportSize;
   }
 
   bool HasScrollSnapping() const {
@@ -749,28 +745,16 @@ struct ScrollSnapInfo {
                                       const nsStyleDisplay* aDisplay);
 
   // The scroll frame's scroll-snap-type.
   mozilla::StyleScrollSnapStrictness mScrollSnapStrictnessX =
       mozilla::StyleScrollSnapStrictness::None;
   mozilla::StyleScrollSnapStrictness mScrollSnapStrictnessY =
       mozilla::StyleScrollSnapStrictness::None;
 
-  // The intervals derived from the scroll frame's scroll-snap-points.
-  Maybe<nscoord> mScrollSnapIntervalX;
-  Maybe<nscoord> mScrollSnapIntervalY;
-
-  // The scroll frame's scroll-snap-destination, in cooked form (to avoid
-  // shipping the raw style value over IPC).
-  nsPoint mScrollSnapDestination;
-
-  // The scroll-snap-coordinates of any descendant frames of the scroll frame,
-  // relative to the origin of the scrolled frame.
-  nsTArray<nsPoint> mScrollSnapCoordinates;
-
   // The scroll positions corresponding to scroll-snap-align values.
   nsTArray<nscoord> mSnapPositionX;
   nsTArray<nscoord> mSnapPositionY;
 
   struct ScrollSnapRange {
     ScrollSnapRange() = default;
 
     ScrollSnapRange(nscoord aStart, nscoord aEnd)
--- a/gfx/layers/apz/test/gtest/TestSnapping.cpp
+++ b/gfx/layers/apz/test/gtest/TestSnapping.cpp
@@ -24,22 +24,18 @@ TEST_F(APZCSnappingTester, Bug1265510) {
   SetScrollableFrameMetrics(root, ScrollableLayerGuid::START_SCROLL_ID,
                             CSSRect(0, 0, 100, 200));
   SetScrollableFrameMetrics(layers[1], ScrollableLayerGuid::START_SCROLL_ID + 1,
                             CSSRect(0, 0, 100, 200));
   SetScrollHandoff(layers[1], root);
 
   ScrollSnapInfo snap;
   snap.mScrollSnapStrictnessY = StyleScrollSnapStrictness::Mandatory;
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
-    snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
-  } else {
-    snap.mScrollSnapIntervalY = Some(100 * AppUnitsPerCSSPixel());
-  }
+  snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
+  snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
 
   ScrollMetadata metadata = root->GetScrollMetadata(0);
   metadata.SetSnapInfo(ScrollSnapInfo(snap));
   root->SetScrollMetadata(metadata);
 
   UniquePtr<ScopedLayerTreeRegistration> registration =
       MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0}, root, mcc);
   UpdateHitTestingTree();
@@ -100,22 +96,18 @@ TEST_F(APZCSnappingTester, Snap_After_Pi
       CreateLayerTree(layerTreeSyntax, layerVisibleRegion, nullptr, lm, layers);
   SetScrollableFrameMetrics(root, ScrollableLayerGuid::START_SCROLL_ID,
                             CSSRect(0, 0, 100, 200));
 
   // Set up some basic scroll snapping
   ScrollSnapInfo snap;
   snap.mScrollSnapStrictnessY = StyleScrollSnapStrictness::Mandatory;
 
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
-    snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
-  } else {
-    snap.mScrollSnapIntervalY = Some(100 * AppUnitsPerCSSPixel());
-  }
+  snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
+  snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
 
   // Save the scroll snap info on the root APZC.
   // Also mark the root APZC as "root content", since APZC only allows
   // zooming on the root content APZC.
   ScrollMetadata metadata = root->GetScrollMetadata(0);
   metadata.SetSnapInfo(ScrollSnapInfo(snap));
   metadata.GetMetrics().SetIsRootContent(true);
   root->SetScrollMetadata(metadata);
--- a/gfx/layers/apz/test/gtest/TestSnappingOnMomentum.cpp
+++ b/gfx/layers/apz/test/gtest/TestSnappingOnMomentum.cpp
@@ -23,22 +23,18 @@ TEST_F(APZCSnappingOnMomentumTester, Sna
       CreateLayerTree(layerTreeSyntax, layerVisibleRegion, nullptr, lm, layers);
   SetScrollableFrameMetrics(root, ScrollableLayerGuid::START_SCROLL_ID,
                             CSSRect(0, 0, 100, 500));
 
   // Set up some basic scroll snapping
   ScrollSnapInfo snap;
   snap.mScrollSnapStrictnessY = StyleScrollSnapStrictness::Mandatory;
 
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
-    snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
-  } else {
-    snap.mScrollSnapIntervalY = Some(100 * AppUnitsPerCSSPixel());
-  }
+  snap.mSnapPositionY.AppendElement(0 * AppUnitsPerCSSPixel());
+  snap.mSnapPositionY.AppendElement(100 * AppUnitsPerCSSPixel());
 
   ScrollMetadata metadata = root->GetScrollMetadata(0);
   metadata.SetSnapInfo(ScrollSnapInfo(snap));
   root->SetScrollMetadata(metadata);
 
   UniquePtr<ScopedLayerTreeRegistration> registration =
       MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0}, root, mcc);
   UpdateHitTestingTree();
--- a/gfx/layers/apz/test/mochitest/test_group_scroll_snap.html
+++ b/gfx/layers/apz/test/mochitest/test_group_scroll_snap.html
@@ -10,17 +10,16 @@
 
 const prefs = [
   ["general.smoothScroll", false],
   // ensure that any mouse movement will trigger a new wheel transaction,
   // because in this test we move the mouse a bunch and want to recalculate
   // the target APZC after each such movement.
   ["mousewheel.transaction.ignoremovedelay", 0],
   ["mousewheel.transaction.timeout", 0],
-  ["layout.css.scroll-snap-v1.enabled", true],
 ];
 
 const subtests = [
   {"file": "helper_scroll_snap_no_valid_snap_position.html", "prefs": prefs},
 ];
 
 if (isApzEnabled()) {
   SimpleTest.waitForExplicitFinish();
--- a/gfx/layers/ipc/LayersMessageUtils.h
+++ b/gfx/layers/ipc/LayersMessageUtils.h
@@ -317,35 +317,27 @@ struct ParamTraits<mozilla::layers::Scro
 
 template <>
 struct ParamTraits<mozilla::layers::ScrollSnapInfo> {
   typedef mozilla::layers::ScrollSnapInfo paramType;
 
   static void Write(Message* aMsg, const paramType& aParam) {
     WriteParam(aMsg, aParam.mScrollSnapStrictnessX);
     WriteParam(aMsg, aParam.mScrollSnapStrictnessY);
-    WriteParam(aMsg, aParam.mScrollSnapIntervalX);
-    WriteParam(aMsg, aParam.mScrollSnapIntervalY);
-    WriteParam(aMsg, aParam.mScrollSnapDestination);
-    WriteParam(aMsg, aParam.mScrollSnapCoordinates);
     WriteParam(aMsg, aParam.mSnapPositionX);
     WriteParam(aMsg, aParam.mSnapPositionY);
     WriteParam(aMsg, aParam.mXRangeWiderThanSnapport);
     WriteParam(aMsg, aParam.mYRangeWiderThanSnapport);
     WriteParam(aMsg, aParam.mSnapportSize);
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter,
                    paramType* aResult) {
     return (ReadParam(aMsg, aIter, &aResult->mScrollSnapStrictnessX) &&
             ReadParam(aMsg, aIter, &aResult->mScrollSnapStrictnessY) &&
-            ReadParam(aMsg, aIter, &aResult->mScrollSnapIntervalX) &&
-            ReadParam(aMsg, aIter, &aResult->mScrollSnapIntervalY) &&
-            ReadParam(aMsg, aIter, &aResult->mScrollSnapDestination) &&
-            ReadParam(aMsg, aIter, &aResult->mScrollSnapCoordinates) &&
             ReadParam(aMsg, aIter, &aResult->mSnapPositionX) &&
             ReadParam(aMsg, aIter, &aResult->mSnapPositionY) &&
             ReadParam(aMsg, aIter, &aResult->mXRangeWiderThanSnapport) &&
             ReadParam(aMsg, aIter, &aResult->mYRangeWiderThanSnapport) &&
             ReadParam(aMsg, aIter, &aResult->mSnapportSize));
   }
 };
 
--- a/layout/base/ScrollStyles.cpp
+++ b/layout/base/ScrollStyles.cpp
@@ -5,64 +5,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ScrollStyles.h"
 #include "mozilla/WritingModes.h"
 #include "nsStyleStruct.h"  // for nsStyleDisplay & nsStyleBackground::Position
 
 namespace mozilla {
 
-void ScrollStyles::InitializeScrollSnapStrictness(
-    WritingMode aWritingMode, const nsStyleDisplay* aDisplay) {
-  mScrollSnapStrictnessX = StyleScrollSnapStrictness::None;
-  mScrollSnapStrictnessY = StyleScrollSnapStrictness::None;
-
-  if (aDisplay->mScrollSnapType.strictness == StyleScrollSnapStrictness::None) {
-    return;
-  }
-
-  switch (aDisplay->mScrollSnapType.axis) {
-    case StyleScrollSnapAxis::X:
-      mScrollSnapStrictnessX = aDisplay->mScrollSnapType.strictness;
-      break;
-    case StyleScrollSnapAxis::Y:
-      mScrollSnapStrictnessY = aDisplay->mScrollSnapType.strictness;
-      break;
-    case StyleScrollSnapAxis::Block:
-      if (aWritingMode.IsVertical()) {
-        mScrollSnapStrictnessX = aDisplay->mScrollSnapType.strictness;
-      } else {
-        mScrollSnapStrictnessY = aDisplay->mScrollSnapType.strictness;
-      }
-      break;
-    case StyleScrollSnapAxis::Inline:
-      if (aWritingMode.IsVertical()) {
-        mScrollSnapStrictnessY = aDisplay->mScrollSnapType.strictness;
-      } else {
-        mScrollSnapStrictnessX = aDisplay->mScrollSnapType.strictness;
-      }
-      break;
-    case StyleScrollSnapAxis::Both:
-      mScrollSnapStrictnessX = aDisplay->mScrollSnapType.strictness;
-      mScrollSnapStrictnessY = aDisplay->mScrollSnapType.strictness;
-      break;
-  }
-}
-
 ScrollStyles::ScrollStyles(WritingMode aWritingMode, StyleOverflow aH,
                            StyleOverflow aV, const nsStyleDisplay* aDisplay)
     : mHorizontal(aH),
       mVertical(aV),
       mOverscrollBehaviorX(aDisplay->mOverscrollBehaviorX),
-      mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY) {
-  InitializeScrollSnapStrictness(aWritingMode, aDisplay);
-}
+      mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY) {}
 
 ScrollStyles::ScrollStyles(WritingMode aWritingMode,
                            const nsStyleDisplay* aDisplay)
     : mHorizontal(aDisplay->mOverflowX),
       mVertical(aDisplay->mOverflowY),
       mOverscrollBehaviorX(aDisplay->mOverscrollBehaviorX),
-      mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY) {
-  InitializeScrollSnapStrictness(aWritingMode, aDisplay);
-}
+      mOverscrollBehaviorY(aDisplay->mOverscrollBehaviorY) {}
 
 }  // namespace mozilla
--- a/layout/base/ScrollStyles.h
+++ b/layout/base/ScrollStyles.h
@@ -11,47 +11,41 @@
 #include "nsStyleConsts.h"
 #include "mozilla/dom/WindowBinding.h"
 
 // Forward declarations
 struct nsStyleDisplay;
 
 namespace mozilla {
 
+// NOTE: Only styles that are propagated from the <body> should end up in this
+// class.
 struct ScrollStyles {
   // Always one of Scroll, Hidden, or Auto
   StyleOverflow mHorizontal;
   StyleOverflow mVertical;
-  // Always one of NS_STYLE_SCROLL_BEHAVIOR_AUTO or
-  // NS_STYLE_SCROLL_BEHAVIOR_SMOOTH
+
+  // FIXME(emilio): we shouldn't propagate this.
   StyleOverscrollBehavior mOverscrollBehaviorX;
   StyleOverscrollBehavior mOverscrollBehaviorY;
-  StyleScrollSnapStrictness mScrollSnapStrictnessX;
-  StyleScrollSnapStrictness mScrollSnapStrictnessY;
 
   ScrollStyles(StyleOverflow aH, StyleOverflow aV)
       : mHorizontal(aH),
         mVertical(aV),
         mOverscrollBehaviorX(StyleOverscrollBehavior::Auto),
-        mOverscrollBehaviorY(StyleOverscrollBehavior::Auto),
-        mScrollSnapStrictnessX(StyleScrollSnapStrictness::None),
-        mScrollSnapStrictnessY(StyleScrollSnapStrictness::None) {}
+        mOverscrollBehaviorY(StyleOverscrollBehavior::Auto) {}
 
   ScrollStyles(WritingMode aWritingMode, const nsStyleDisplay* aDisplay);
   ScrollStyles(WritingMode aWritingMode, StyleOverflow aH, StyleOverflow aV,
                const nsStyleDisplay* aDisplay);
-  void InitializeScrollSnapStrictness(WritingMode aWritingMode,
-                                      const nsStyleDisplay* aDisplay);
   bool operator==(const ScrollStyles& aStyles) const {
     return aStyles.mHorizontal == mHorizontal &&
            aStyles.mVertical == mVertical &&
            aStyles.mOverscrollBehaviorX == mOverscrollBehaviorX &&
-           aStyles.mOverscrollBehaviorY == mOverscrollBehaviorY &&
-           aStyles.mScrollSnapStrictnessX == mScrollSnapStrictnessX &&
-           aStyles.mScrollSnapStrictnessY == mScrollSnapStrictnessY;
+           aStyles.mOverscrollBehaviorY == mOverscrollBehaviorY;
   }
   bool operator!=(const ScrollStyles& aStyles) const {
     return !(*this == aStyles);
   }
   bool IsHiddenInBothDirections() const {
     return mHorizontal == StyleOverflow::Hidden &&
            mVertical == StyleOverflow::Hidden;
   }
--- a/layout/generic/ScrollSnap.cpp
+++ b/layout/generic/ScrollSnap.cpp
@@ -21,20 +21,16 @@ using layers::ScrollSnapInfo;
  * adding an edge depends on the scrolling unit.
  */
 class CalcSnapPoints final {
  public:
   CalcSnapPoints(nsIScrollableFrame::ScrollUnit aUnit,
                  const nsPoint& aDestination, const nsPoint& aStartPos);
   void AddHorizontalEdge(nscoord aEdge);
   void AddVerticalEdge(nscoord aEdge);
-  void AddHorizontalEdgeInterval(const nsRect& aScrollRange, nscoord aInterval,
-                                 nscoord aOffset);
-  void AddVerticalEdgeInterval(const nsRect& aScrollRange, nscoord aInterval,
-                               nscoord aOffset);
   void AddEdge(nscoord aEdge, nscoord aDestination, nscoord aStartPos,
                nscoord aScrollingDirection, nscoord* aBestEdge,
                nscoord* aSecondBestEdge, bool* aEdgeFound);
   void AddEdgeInterval(nscoord aInterval, nscoord aMinPos, nscoord aMaxPos,
                        nscoord aOffset, nscoord aDestination, nscoord aStartPos,
                        nscoord aScrollingDirection, nscoord* aBestEdge,
                        nscoord* aSecondBestEdge, bool* aEdgeFound);
   nsPoint GetBestEdge() const;
@@ -97,32 +93,16 @@ void CalcSnapPoints::AddHorizontalEdge(n
           &mBestEdge.y, &mSecondBestEdge.y, &mHorizontalEdgeFound);
 }
 
 void CalcSnapPoints::AddVerticalEdge(nscoord aEdge) {
   AddEdge(aEdge, mDestination.x, mStartPos.x, mScrollingDirection.x,
           &mBestEdge.x, &mSecondBestEdge.x, &mVerticalEdgeFound);
 }
 
-void CalcSnapPoints::AddHorizontalEdgeInterval(const nsRect& aScrollRange,
-                                               nscoord aInterval,
-                                               nscoord aOffset) {
-  AddEdgeInterval(aInterval, aScrollRange.y, aScrollRange.YMost(), aOffset,
-                  mDestination.y, mStartPos.y, mScrollingDirection.y,
-                  &mBestEdge.y, &mSecondBestEdge.y, &mHorizontalEdgeFound);
-}
-
-void CalcSnapPoints::AddVerticalEdgeInterval(const nsRect& aScrollRange,
-                                             nscoord aInterval,
-                                             nscoord aOffset) {
-  AddEdgeInterval(aInterval, aScrollRange.x, aScrollRange.XMost(), aOffset,
-                  mDestination.x, mStartPos.x, mScrollingDirection.x,
-                  &mBestEdge.x, &mSecondBestEdge.x, &mVerticalEdgeFound);
-}
-
 void CalcSnapPoints::AddEdge(nscoord aEdge, nscoord aDestination,
                              nscoord aStartPos, nscoord aScrollingDirection,
                              nscoord* aBestEdge, nscoord* aSecondBestEdge,
                              bool* aEdgeFound) {
   // nsIScrollableFrame::DEVICE_PIXELS indicates that we are releasing a drag
   // gesture or any other user input event that sets an absolute scroll
   // position.  In this case, scroll snapping is expected to travel in any
   // direction.  Otherwise, we will restrict the direction of the scroll
@@ -253,87 +233,56 @@ static void ProcessSnapPositions(CalcSna
   for (auto position : aSnapInfo.mSnapPositionX) {
     aCalcSnapPoints.AddVerticalEdge(position);
   }
   for (auto position : aSnapInfo.mSnapPositionY) {
     aCalcSnapPoints.AddHorizontalEdge(position);
   }
 }
 
-static void ProcessScrollSnapCoordinates(
-    CalcSnapPoints& aCalcSnapPoint,
-    const nsTArray<nsPoint>& aScrollSnapCoordinates,
-    const nsPoint& aScrollSnapDestination) {
-  for (nsPoint snapCoords : aScrollSnapCoordinates) {
-    // Make them relative to the scroll snap destination.
-    snapCoords -= aScrollSnapDestination;
-
-    aCalcSnapPoint.AddVerticalEdge(snapCoords.x);
-    aCalcSnapPoint.AddHorizontalEdge(snapCoords.y);
-  }
-}
-
 Maybe<nsPoint> ScrollSnapUtils::GetSnapPointForDestination(
     const ScrollSnapInfo& aSnapInfo, nsIScrollableFrame::ScrollUnit aUnit,
     const nsRect& aScrollRange, const nsPoint& aStartPos,
     const nsPoint& aDestination) {
   if (aSnapInfo.mScrollSnapStrictnessY == StyleScrollSnapStrictness::None &&
       aSnapInfo.mScrollSnapStrictnessX == StyleScrollSnapStrictness::None) {
     return Nothing();
   }
 
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled() &&
-      !aSnapInfo.HasSnapPositions()) {
+  if (!aSnapInfo.HasSnapPositions()) {
     return Nothing();
   }
 
   CalcSnapPoints calcSnapPoints(aUnit, aDestination, aStartPos);
 
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    ProcessSnapPositions(calcSnapPoints, aSnapInfo);
+  ProcessSnapPositions(calcSnapPoints, aSnapInfo);
 
-    // If the distance between the first and the second candidate snap points
-    // is larger than the snapport size and the snapport is covered by larger
-    // elements, any points inside the covering area should be valid snap
-    // points.
-    // https://drafts.csswg.org/css-scroll-snap-1/#snap-overflow
-    // NOTE: |aDestination| sometimes points outside of the scroll range, e.g.
-    // by the APZC fling, so for the overflow checks we need to clamp it.
-    nsPoint clampedDestination = aScrollRange.ClampPoint(aDestination);
-    for (auto range : aSnapInfo.mXRangeWiderThanSnapport) {
-      if (range.IsValid(clampedDestination.x, aSnapInfo.mSnapportSize.width) &&
-          calcSnapPoints.XDistanceBetweenBestAndSecondEdge() >
-              aSnapInfo.mSnapportSize.width) {
-        calcSnapPoints.AddVerticalEdge(clampedDestination.x);
-        break;
-      }
+  // If the distance between the first and the second candidate snap points
+  // is larger than the snapport size and the snapport is covered by larger
+  // elements, any points inside the covering area should be valid snap
+  // points.
+  // https://drafts.csswg.org/css-scroll-snap-1/#snap-overflow
+  // NOTE: |aDestination| sometimes points outside of the scroll range, e.g.
+  // by the APZC fling, so for the overflow checks we need to clamp it.
+  nsPoint clampedDestination = aScrollRange.ClampPoint(aDestination);
+  for (auto range : aSnapInfo.mXRangeWiderThanSnapport) {
+    if (range.IsValid(clampedDestination.x, aSnapInfo.mSnapportSize.width) &&
+        calcSnapPoints.XDistanceBetweenBestAndSecondEdge() >
+            aSnapInfo.mSnapportSize.width) {
+      calcSnapPoints.AddVerticalEdge(clampedDestination.x);
+      break;
     }
-    for (auto range : aSnapInfo.mYRangeWiderThanSnapport) {
-      if (range.IsValid(clampedDestination.y, aSnapInfo.mSnapportSize.height) &&
-          calcSnapPoints.YDistanceBetweenBestAndSecondEdge() >
-              aSnapInfo.mSnapportSize.height) {
-        calcSnapPoints.AddHorizontalEdge(clampedDestination.y);
-        break;
-      }
+  }
+  for (auto range : aSnapInfo.mYRangeWiderThanSnapport) {
+    if (range.IsValid(clampedDestination.y, aSnapInfo.mSnapportSize.height) &&
+        calcSnapPoints.YDistanceBetweenBestAndSecondEdge() >
+            aSnapInfo.mSnapportSize.height) {
+      calcSnapPoints.AddHorizontalEdge(clampedDestination.y);
+      break;
     }
-  } else {
-    nsPoint destPos = aSnapInfo.mScrollSnapDestination;
-
-    if (aSnapInfo.mScrollSnapIntervalX.isSome()) {
-      nscoord interval = aSnapInfo.mScrollSnapIntervalX.value();
-      calcSnapPoints.AddVerticalEdgeInterval(aScrollRange, interval, destPos.x);
-    }
-    if (aSnapInfo.mScrollSnapIntervalY.isSome()) {
-      nscoord interval = aSnapInfo.mScrollSnapIntervalY.value();
-      calcSnapPoints.AddHorizontalEdgeInterval(aScrollRange, interval,
-                                               destPos.y);
-    }
-
-    ProcessScrollSnapCoordinates(calcSnapPoints,
-                                 aSnapInfo.mScrollSnapCoordinates, destPos);
   }
 
   bool snapped = false;
   nsPoint finalPos = calcSnapPoints.GetBestEdge();
   nscoord proximityThreshold =
       StaticPrefs::layout_css_scroll_snap_proximity_threshold();
   proximityThreshold = nsPresContext::CSSPixelsToAppUnits(proximityThreshold);
   if (aSnapInfo.mScrollSnapStrictnessY ==
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2238,30 +2238,24 @@ void ScrollFrameHelper::ScrollTo(nsPoint
                                  nsAtom* aOrigin, const nsRect* aRange,
                                  nsIScrollbarMediator::ScrollSnapMode aSnap) {
   if (aOrigin == nullptr) {
     aOrigin = nsGkAtoms::other;
   }
   ScrollToWithOrigin(aScrollPosition, aMode, aOrigin, aRange, aSnap);
 }
 
-static nsIScrollbarMediator::ScrollSnapMode DefaultSnapMode() {
-  return StaticPrefs::layout_css_scroll_snap_v1_enabled()
-             ? nsIScrollableFrame::ENABLE_SNAP
-             : nsIScrollableFrame::DISABLE_SNAP;
-}
-
 void ScrollFrameHelper::ScrollToCSSPixels(
     const CSSIntPoint& aScrollPosition, ScrollMode aMode,
     nsIScrollbarMediator::ScrollSnapMode aSnap, nsAtom* aOrigin) {
   nsPoint current = GetScrollPosition();
   CSSIntPoint currentCSSPixels = GetScrollPositionCSSPixels();
   nsPoint pt = CSSPoint::ToAppUnits(aScrollPosition);
   if (aSnap == nsIScrollableFrame::DEFAULT) {
-    aSnap = DefaultSnapMode();
+    aSnap = nsIScrollableFrame::ENABLE_SNAP;
   }
 
   if (aOrigin == nullptr) {
     aOrigin = nsGkAtoms::other;
   }
 
   nscoord halfPixel = nsPresContext::CSSPixelsToAppUnits(0.5f);
   nsRect range(pt.x - halfPixel, pt.y - halfPixel, 2 * halfPixel - 1,
@@ -4355,17 +4349,17 @@ void ScrollFrameHelper::ScrollByCSSPixel
   // position.  Hopefully it exactly matches the position where it was given by
   // the previous scrolling operation, but there may be some edge cases where
   // the current position in CSS pixels differs from the given position, the
   // cases should be fixed in bug 1556685.
   CSSIntPoint currentCSSPixels = GetScrollPositionCSSPixels();
   nsPoint pt = CSSPoint::ToAppUnits(currentCSSPixels + aDelta);
 
   if (aSnap == nsIScrollableFrame::DEFAULT) {
-    aSnap = DefaultSnapMode();
+    aSnap = nsIScrollableFrame::ENABLE_SNAP;
   }
 
   if (aOrigin == nullptr) {
     aOrigin = nsGkAtoms::other;
   }
 
   nscoord halfPixel = nsPresContext::CSSPixelsToAppUnits(0.5f);
   nsRect range(pt.x - halfPixel, pt.y - halfPixel, 2 * halfPixel - 1,
@@ -5482,28 +5476,22 @@ nsIFrame* ScrollFrameHelper::GetFrameFor
   } else {
     styleFrame = mOuter;
   }
 
   return styleFrame;
 }
 
 bool ScrollFrameHelper::NeedsScrollSnap() const {
-  if (StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    nsIFrame* scrollSnapFrame = GetFrameForStyle();
-    if (!scrollSnapFrame) {
-      return false;
-    }
-    return scrollSnapFrame->StyleDisplay()->mScrollSnapType.strictness !=
-           StyleScrollSnapStrictness::None;
-  }
-
-  ScrollStyles styles = GetScrollStylesFromFrame();
-  return styles.mScrollSnapStrictnessY != StyleScrollSnapStrictness::None ||
-         styles.mScrollSnapStrictnessX != StyleScrollSnapStrictness::None;
+  nsIFrame* scrollSnapFrame = GetFrameForStyle();
+  if (!scrollSnapFrame) {
+    return false;
+  }
+  return scrollSnapFrame->StyleDisplay()->mScrollSnapType.strictness !=
+         StyleScrollSnapStrictness::None;
 }
 
 bool ScrollFrameHelper::IsScrollbarOnRight() const {
   nsPresContext* presContext = mOuter->PresContext();
 
   // The position of the scrollbar in top-level windows depends on the pref
   // layout.scrollbar.side. For non-top-level elements, it depends only on the
   // directionaliy of the element (equivalent to a value of "1" for the pref).
@@ -6854,18 +6842,16 @@ static void AppendScrollPositionsForSnap
  * subtree rooted at |aFrame|, relative to |aScrolledFrame|, into |aSnapInfo|.
  * If |aSnapport| is given, elements outside of the range of |aSnapport| will be
  * ignored.
  */
 static void CollectScrollPositionsForSnap(
     nsIFrame* aFrame, nsIFrame* aScrolledFrame, const nsRect& aScrolledRect,
     const nsMargin& aScrollPadding, const Maybe<nsRect>& aSnapport,
     WritingMode aWritingModeOnScroller, ScrollSnapInfo& aSnapInfo) {
-  MOZ_ASSERT(StaticPrefs::layout_css_scroll_snap_v1_enabled());
-
   // Snap positions only affect the nearest ancestor scroll container on the
   // element's containing block chain.
   nsIScrollableFrame* sf = do_QueryFrame(aFrame);
   if (sf) {
     return;
   }
 
   nsIFrame::ChildListIterator childLists(aFrame);
@@ -6938,18 +6924,16 @@ nsMargin ScrollFrameHelper::GetScrollPad
   // The spec says percentage values are relative to the scroll port size.
   // https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding
   return ResolveScrollPaddingStyle(styleFrame->StylePadding()->mScrollPadding,
                                    GetScrollPortRect().Size());
 }
 
 layers::ScrollSnapInfo ScrollFrameHelper::ComputeScrollSnapInfo(
     const Maybe<nsPoint>& aDestination) const {
-  MOZ_ASSERT(StaticPrefs::layout_css_scroll_snap_v1_enabled());
-
   ScrollSnapInfo result;
 
   nsIFrame* scrollSnapFrame = GetFrameForStyle();
   if (!scrollSnapFrame) {
     return result;
   }
 
   const nsStyleDisplay* disp = scrollSnapFrame->StyleDisplay();
@@ -6977,19 +6961,16 @@ layers::ScrollSnapInfo ScrollFrameHelper
   CollectScrollPositionsForSnap(mScrolledFrame, mScrolledFrame,
                                 GetScrolledRect(), scrollPadding,
                                 snapportOnDestination, writingMode, result);
   return result;
 }
 
 layers::ScrollSnapInfo ScrollFrameHelper::GetScrollSnapInfo(
     const Maybe<nsPoint>& aDestination) const {
-  if (!StaticPrefs::layout_css_scroll_snap_v1_enabled()) {
-    return {};
-  }
   // TODO(botond): Should we cache it?
   return ComputeScrollSnapInfo(aDestination);
 }
 
 bool ScrollFrameHelper::GetSnapPointForDestination(
     nsIScrollableFrame::ScrollUnit aUnit, nsPoint aStartPos,
     nsPoint& aDestination) {
   Maybe<nsPoint> snapPoint = ScrollSnapUtils::GetSnapPointForDestination(
--- a/layout/reftests/css-scroll-snap/reftest.list
+++ b/layout/reftests/css-scroll-snap/reftest.list
@@ -1,4 +1,2 @@
-default-preferences pref(layout.css.scroll-snap-v1.enabled,true)
-
 == scroll-margin-on-anchor.html#target scroll-margin-on-anchor-ref.html
 == scroll-padding-on-anchor.html#target scroll-padding-on-anchor-ref.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -7184,16 +7184,346 @@ var gCSSProperties = {
   "scroll-behavior": {
     domProp: "scrollBehavior",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: ["auto"],
     other_values: ["smooth"],
     invalid_values: ["none", "1px"],
   },
+  "scroll-snap-type": {
+    domProp: "scrollSnapType",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["none"],
+    other_values: [
+      "both mandatory",
+      "y mandatory",
+      "inline proximity",
+      "both",
+      "x",
+      "y",
+      "block",
+      "inline",
+    ],
+    invalid_values: [
+      "auto",
+      "1px",
+      "x y",
+      "block mandatory inline",
+      "mandatory",
+      "proximity",
+      "mandatory inline",
+      "proximity both",
+      "mandatory x",
+      "proximity y",
+      "mandatory block",
+      "proximity mandatory",
+    ],
+  },
+  "scroll-snap-align": {
+    domProp: "scrollSnapAlign",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["none"],
+    other_values: [
+      "start",
+      "end",
+      "center",
+      "start none",
+      "center end",
+      "start start",
+    ],
+    invalid_values: ["auto", "start invalid", "start end center"],
+  },
+  "scroll-margin": {
+    domProp: "scrollMargin",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: [
+      "scroll-margin-top",
+      "scroll-margin-right",
+      "scroll-margin-bottom",
+      "scroll-margin-left",
+    ],
+    initial_values: ["0"],
+    other_values: [
+      "-10px",
+      "calc(2em + 3ex)",
+      "1px 2px",
+      "1px 2px 3px",
+      "1px 2px 3px 4px",
+    ],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
+  },
+  "scroll-margin-top": {
+    domProp: "scrollMarginTop",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-right": {
+    domProp: "scrollMarginRight",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-bottom": {
+    domProp: "scrollMarginBottom",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-left": {
+    domProp: "scrollMarginLeft",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-inline": {
+    domProp: "scrollMarginInline",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
+  },
+  "scroll-margin-inline-start": {
+    domProp: "scrollMarginInlineStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-inline-end": {
+    domProp: "scrollMarginInlineEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-block": {
+    domProp: "scrollMarginBlock",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: ["scroll-margin-block-start", "scroll-margin-block-end"],
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
+  },
+  "scroll-margin-block-start": {
+    domProp: "scrollMarginBlockStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-margin-block-end": {
+    domProp: "scrollMarginBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["0"],
+    other_values: ["-10px", "calc(2em + 3ex)"],
+    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
+  },
+  "scroll-padding": {
+    domProp: "scrollPadding",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: [
+      "scroll-padding-top",
+      "scroll-padding-right",
+      "scroll-padding-bottom",
+      "scroll-padding-left",
+    ],
+    initial_values: ["auto"],
+    other_values: [
+      "10px",
+      "0",
+      "20%",
+      "calc(2em + 3ex)",
+      "1px 2px",
+      "1px 2px 3%",
+      "1px 2px 3% 4px",
+      "1px auto",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-top": {
+    domProp: "scrollPaddingTop",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-right": {
+    domProp: "scrollPaddingRight",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-bottom": {
+    domProp: "scrollPaddingBottom",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-left": {
+    domProp: "scrollPaddingLeft",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-inline": {
+    domProp: "scrollPaddingInline",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
+    initial_values: ["auto", "auto auto"],
+    other_values: [
+      "10px",
+      "0",
+      "20%",
+      "calc(2em + 3ex)",
+      "1px 2px",
+      "1px auto",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-inline-start": {
+    domProp: "scrollPaddingInlineStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-inline-end": {
+    domProp: "scrollPaddingInlineEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-block": {
+    domProp: "scrollPaddingBlock",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
+    initial_values: ["auto", "auto auto"],
+    other_values: [
+      "10px",
+      "0",
+      "20%",
+      "calc(2em + 3ex)",
+      "1px 2px",
+      "1px auto",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-block-start": {
+    domProp: "scrollPaddingBlockStart",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
+  "scroll-padding-block-end": {
+    domProp: "scrollPaddingBlockEnd",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    logical: true,
+    initial_values: ["auto"],
+    other_values: [
+      "0",
+      "10px",
+      "20%",
+      "calc(2em + 3ex)",
+      "calc(50% + 60px)",
+      "calc(-50px)",
+    ],
+    invalid_values: ["20", "-20px"],
+  },
   "table-layout": {
     domProp: "tableLayout",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: ["auto"],
     other_values: ["fixed"],
     invalid_values: [],
   },
@@ -12088,350 +12418,16 @@ if (IsCSSPropertyPrefEnabled("layout.css
       "none",
       "contain contain",
       "contain auto",
       "none contain",
     ],
     invalid_values: ["left", "1px", "contain auto none", "contain nonsense"],
   };
 }
-
-if (IsCSSPropertyPrefEnabled("layout.css.scroll-snap-v1.enabled")) {
-  gCSSProperties["scroll-snap-type"] = {
-    domProp: "scrollSnapType",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["none"],
-    other_values: [
-      "both mandatory",
-      "y mandatory",
-      "inline proximity",
-      "both",
-      "x",
-      "y",
-      "block",
-      "inline",
-    ],
-    invalid_values: [
-      "auto",
-      "1px",
-      "x y",
-      "block mandatory inline",
-      "mandatory",
-      "proximity",
-      "mandatory inline",
-      "proximity both",
-      "mandatory x",
-      "proximity y",
-      "mandatory block",
-      "proximity mandatory",
-    ],
-  };
-  gCSSProperties["scroll-snap-align"] = {
-    domProp: "scrollSnapAlign",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["none"],
-    other_values: [
-      "start",
-      "end",
-      "center",
-      "start none",
-      "center end",
-      "start start",
-    ],
-    invalid_values: ["auto", "start invalid", "start end center"],
-  };
-  gCSSProperties["scroll-margin"] = {
-    domProp: "scrollMargin",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [
-      "scroll-margin-top",
-      "scroll-margin-right",
-      "scroll-margin-bottom",
-      "scroll-margin-left",
-    ],
-    initial_values: ["0"],
-    other_values: [
-      "-10px",
-      "calc(2em + 3ex)",
-      "1px 2px",
-      "1px 2px 3px",
-      "1px 2px 3px 4px",
-    ],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
-  };
-  gCSSProperties["scroll-margin-top"] = {
-    domProp: "scrollMarginTop",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-right"] = {
-    domProp: "scrollMarginRight",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-bottom"] = {
-    domProp: "scrollMarginBottom",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-left"] = {
-    domProp: "scrollMarginLeft",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-inline"] = {
-    domProp: "scrollMarginInline",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
-  };
-  gCSSProperties["scroll-margin-inline-start"] = {
-    domProp: "scrollMarginInlineStart",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-inline-end"] = {
-    domProp: "scrollMarginInlineEnd",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-block"] = {
-    domProp: "scrollMarginBlock",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: ["scroll-margin-block-start", "scroll-margin-block-end"],
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
-  };
-  gCSSProperties["scroll-margin-block-start"] = {
-    domProp: "scrollMarginBlockStart",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-margin-block-end"] = {
-    domProp: "scrollMarginBlockEnd",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["0"],
-    other_values: ["-10px", "calc(2em + 3ex)"],
-    invalid_values: ["auto", "20%", "-30%", "1px 2px"],
-  };
-  gCSSProperties["scroll-padding"] = {
-    domProp: "scrollPadding",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [
-      "scroll-padding-top",
-      "scroll-padding-right",
-      "scroll-padding-bottom",
-      "scroll-padding-left",
-    ],
-    initial_values: ["auto"],
-    other_values: [
-      "10px",
-      "0",
-      "20%",
-      "calc(2em + 3ex)",
-      "1px 2px",
-      "1px 2px 3%",
-      "1px 2px 3% 4px",
-      "1px auto",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-top"] = {
-    domProp: "scrollPaddingTop",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-right"] = {
-    domProp: "scrollPaddingRight",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-bottom"] = {
-    domProp: "scrollPaddingBottom",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-left"] = {
-    domProp: "scrollPaddingLeft",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-inline"] = {
-    domProp: "scrollPaddingInline",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
-    initial_values: ["auto", "auto auto"],
-    other_values: [
-      "10px",
-      "0",
-      "20%",
-      "calc(2em + 3ex)",
-      "1px 2px",
-      "1px auto",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-inline-start"] = {
-    domProp: "scrollPaddingInlineStart",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-inline-end"] = {
-    domProp: "scrollPaddingInlineEnd",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-block"] = {
-    domProp: "scrollPaddingBlock",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
-    initial_values: ["auto", "auto auto"],
-    other_values: [
-      "10px",
-      "0",
-      "20%",
-      "calc(2em + 3ex)",
-      "1px 2px",
-      "1px auto",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-block-start"] = {
-    domProp: "scrollPaddingBlockStart",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-  gCSSProperties["scroll-padding-block-end"] = {
-    domProp: "scrollPaddingBlockEnd",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    logical: true,
-    initial_values: ["auto"],
-    other_values: [
-      "0",
-      "10px",
-      "20%",
-      "calc(2em + 3ex)",
-      "calc(50% + 60px)",
-      "calc(-50px)",
-    ],
-    invalid_values: ["20", "-20px"],
-  };
-}
-
 if (IsCSSPropertyPrefEnabled("layout.css.webkit-appearance.enabled")) {
   gCSSProperties["-webkit-appearance"] = {
     domProp: "webkitAppearance",
     inherited: false,
     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
     alias_for: "-moz-appearance",
     subproperties: ["-moz-appearance"],
   };
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -319,16 +319,44 @@ var supported_properties = {
     "z-index": [ test_integer_transition, test_pos_integer_or_auto_transition ],
     "-webkit-line-clamp": [ test_pos_integer_or_none_transition ],
     "-webkit-text-fill-color": [ test_color_transition,
                                  test_currentcolor_transition ],
     "-webkit-text-stroke-color": [ test_color_transition,
                                    test_currentcolor_transition ],
     "text-underline-offset": [ test_length_transition ],
     "text-decoration-thickness": [ test_length_transition ],
+    "scroll-margin-top": [
+      test_length_transition,
+    ],
+    "scroll-margin-right": [
+      test_length_transition,
+    ],
+    "scroll-margin-bottom": [
+      test_length_transition,
+    ],
+    "scroll-margin-left": [
+      test_length_transition,
+    ],
+    "scroll-padding-top": [
+      test_length_transition, test_percent_transition,
+      test_length_clamped, test_percent_clamped,
+    ],
+    "scroll-padding-right": [
+      test_length_transition, test_percent_transition,
+      test_length_clamped, test_percent_clamped,
+    ],
+    "scroll-padding-bottom": [
+      test_length_transition, test_percent_transition,
+      test_length_clamped, test_percent_clamped,
+    ],
+    "scroll-padding-left": [
+      test_length_transition, test_percent_transition,
+      test_length_clamped, test_percent_clamped,
+    ],
 };
 
 if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) {
   supported_properties["offset-path"] = [ test_path_function ];
   supported_properties["offset-distance"] =
     [ test_length_transition,
       test_percent_transition,
       test_length_unclamped,
@@ -396,47 +424,16 @@ if (IsCSSPropertyPrefEnabled("layout.css
 }
 
 if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-color.enabled")) {
   supported_properties["scrollbar-color"] = [
     test_scrollbar_color_transition,
   ];
 }
 
-if (IsCSSPropertyPrefEnabled("layout.css.scroll-snap-v1.enabled")) {
-  supported_properties["scroll-margin-top"] = [
-    test_length_transition,
-  ];
-  supported_properties["scroll-margin-right"] = [
-    test_length_transition,
-  ];
-  supported_properties["scroll-margin-bottom"] = [
-    test_length_transition,
-  ];
-  supported_properties["scroll-margin-left"] = [
-    test_length_transition,
-  ];
-  supported_properties["scroll-padding-top"] = [
-    test_length_transition, test_percent_transition,
-    test_length_clamped, test_percent_clamped,
-  ];
-  supported_properties["scroll-padding-right"] = [
-    test_length_transition, test_percent_transition,
-    test_length_clamped, test_percent_clamped,
-  ];
-  supported_properties["scroll-padding-bottom"] = [
-    test_length_transition, test_percent_transition,
-    test_length_clamped, test_percent_clamped,
-  ];
-  supported_properties["scroll-padding-left"] = [
-    test_length_transition, test_percent_transition,
-    test_length_clamped, test_percent_clamped,
-  ];
-}
-
 // For properties which are well-tested by web-platform-tests, we don't need to
 // test animations/transitions again on them.
 var skipped_transitionable_properties = [
   "border-image-outset",
   "border-image-slice",
   "border-image-width",
   "grid-template-columns",
   "grid-template-rows",
@@ -444,20 +441,18 @@ var skipped_transitionable_properties = 
 
 // Logical properties.
 for (const logical_side of ["inline-start", "inline-end", "block-start", "block-end"]) {
   supported_properties["border-" + logical_side + "-color"] = supported_properties["border-top-color"];
   supported_properties["border-" + logical_side + "-width"] = supported_properties["border-top-width"];
   supported_properties["margin-" + logical_side] = supported_properties["margin-top"];
   supported_properties["padding-" + logical_side] = supported_properties["padding-top"];
   supported_properties["inset-" + logical_side] = supported_properties["top"];
-  if (IsCSSPropertyPrefEnabled("layout.css.scroll-snap-v1.enabled")) {
-    supported_properties["scroll-margin-" + logical_side] = supported_properties["scroll-margin-top"];
-    supported_properties["scroll-padding-" + logical_side] = supported_properties["scroll-padding-top"];
-  }
+  supported_properties["scroll-margin-" + logical_side] = supported_properties["scroll-margin-top"];
+  supported_properties["scroll-padding-" + logical_side] = supported_properties["scroll-padding-top"];
 }
 
 for (const logical_size of ["inline", "block"]) {
   supported_properties[logical_size + "-size"] = supported_properties["width"];
   supported_properties["min-" + logical_size + "-size"] = supported_properties["min-width"];
   supported_properties["max-" + logical_size + "-size"] = supported_properties["max-width"];
 }
 
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -5235,29 +5235,16 @@
   value: true
   mirror: always
 
 - name: layout.css.scroll-anchoring.highlight
   type: bool
   value: false
   mirror: always
 
-# Is the CSS Scroll Snap Module Level 1 enabled?
-- name: layout.css.scroll-snap-v1.enabled
-  type: RelaxedAtomicBool
-  value: true
-  mirror: always
-
-# Is support for the old unspecced scroll-snap enabled?
-# E.g. scroll-snap-points-{x,y}, scroll-snap-coordinate, etc.
-- name: layout.css.scroll-snap.enabled
-  type: bool
-  value: false
-  mirror: always
-
 # Are shared memory User Agent style sheets enabled?
 - name: layout.css.shared-memory-ua-sheets.enabled
   type: bool
   value: true
   mirror: always
 
 - name: layout.css.shadow-parts.enabled
   type: RelaxedAtomicBool
--- a/servo/components/style/properties/longhands/box.mako.rs
+++ b/servo/components/style/properties/longhands/box.mako.rs
@@ -449,17 +449,16 @@ impl computed_value::T {
     animation_value_type="discrete",
 )}
 
 ${helpers.predefined_type(
     "scroll-snap-align",
     "ScrollSnapAlign",
     "computed::ScrollSnapAlign::none()",
     engines="gecko",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align",
     animation_value_type="discrete",
 )}
 
 ${helpers.predefined_type(
     "scroll-snap-type",
     "ScrollSnapType",
     "computed::ScrollSnapType::none()",
--- a/servo/components/style/properties/longhands/margin.mako.rs
+++ b/servo/components/style/properties/longhands/margin.mako.rs
@@ -30,15 +30,14 @@
 % endfor
 
 % for side in ALL_SIDES:
     ${helpers.predefined_type(
         "scroll-margin-%s" % side[0],
         "Length",
         "computed::Length::zero()",
         engines="gecko",
-        gecko_pref="layout.css.scroll-snap-v1.enabled",
         logical=side[1],
         logical_group="scroll-margin",
         spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-%s" % side[0],
         animation_value_type="ComputedValue",
     )}
 % endfor
--- a/servo/components/style/properties/longhands/padding.mako.rs
+++ b/servo/components/style/properties/longhands/padding.mako.rs
@@ -29,15 +29,14 @@
 % endfor
 
 % for side in ALL_SIDES:
     ${helpers.predefined_type(
         "scroll-padding-%s" % side[0],
         "NonNegativeLengthPercentageOrAuto",
         "computed::NonNegativeLengthPercentageOrAuto::auto()",
         engines="gecko",
-        gecko_pref="layout.css.scroll-snap-v1.enabled",
         logical=side[1],
         logical_group="scroll-padding",
         spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-%s" % side[0],
         animation_value_type="NonNegativeLengthPercentageOrAuto",
     )}
 % endfor
--- a/servo/components/style/properties/shorthands/margin.mako.rs
+++ b/servo/components/style/properties/shorthands/margin.mako.rs
@@ -33,30 +33,27 @@
 )}
 
 ${helpers.four_sides_shorthand(
     "scroll-margin",
     "scroll-margin-%s",
     "specified::Length::parse",
     engines="gecko",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
 )}
 
 ${helpers.two_properties_shorthand(
     "scroll-margin-block",
     "scroll-margin-block-start",
     "scroll-margin-block-end",
     "specified::Length::parse",
     engines="gecko",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
 )}
 
 ${helpers.two_properties_shorthand(
     "scroll-margin-inline",
     "scroll-margin-inline-start",
     "scroll-margin-inline-end",
     "specified::Length::parse",
     engines="gecko",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-inline",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
 )}
--- a/servo/components/style/properties/shorthands/padding.mako.rs
+++ b/servo/components/style/properties/shorthands/padding.mako.rs
@@ -31,32 +31,29 @@
     spec="https://drafts.csswg.org/css-logical/#propdef-padding-inline"
 )}
 
 ${helpers.four_sides_shorthand(
     "scroll-padding",
     "scroll-padding-%s",
     "specified::NonNegativeLengthPercentageOrAuto::parse",
     engines="gecko",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding"
 )}
 
 ${helpers.two_properties_shorthand(
     "scroll-padding-block",
     "scroll-padding-block-start",
     "scroll-padding-block-end",
     "specified::NonNegativeLengthPercentageOrAuto::parse",
     engines="gecko",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-block"
 )}
 
 ${helpers.two_properties_shorthand(
     "scroll-padding-inline",
     "scroll-padding-inline-start",
     "scroll-padding-inline-end",
     "specified::NonNegativeLengthPercentageOrAuto::parse",
     engines="gecko",
-    gecko_pref="layout.css.scroll-snap-v1.enabled",
     spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-inline"
 )}
 
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-scroll-snap/__dir__.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-prefs: [layout.css.scroll-snap-v1.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/css/cssom-view/__dir__.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-prefs: [layout.css.scroll-snap-v1.enabled:true]