Bug 1560837 - Make APZ static prefs follow the naming convention. r=froydnj
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 24 Jun 2019 13:57:06 +1000
changeset 480081 fb0a0b7ac94c921338b3bdcda9f11de01f25408b
parent 480080 1e28a064d7be5feec7ae99f5e5b17012d512c421
child 480082 7f8969072f732c9ae3e83d69c09975282a57a001
push id113521
push usernnethercote@mozilla.com
push dateTue, 25 Jun 2019 23:21:15 +0000
treeherdermozilla-inbound@fb0a0b7ac94c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1560837
milestone69.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 1560837 - Make APZ static prefs follow the naming convention. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D35633
gfx/layers/apz/src/APZCTreeManager.cpp
gfx/layers/apz/src/APZInputBridge.cpp
gfx/layers/apz/src/AndroidAPZ.cpp
gfx/layers/apz/src/AndroidFlingPhysics.cpp
gfx/layers/apz/src/AndroidVelocityTracker.cpp
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/apz/src/AsyncPanZoomController.h
gfx/layers/apz/src/DesktopFlingPhysics.h
gfx/layers/apz/src/FocusTarget.cpp
gfx/layers/apz/src/GenericFlingAnimation.h
gfx/layers/apz/src/GestureEventListener.cpp
gfx/layers/apz/src/InputBlockState.cpp
gfx/layers/apz/src/InputBlockState.h
gfx/layers/apz/src/InputQueue.cpp
gfx/layers/apz/src/SimpleVelocityTracker.cpp
gfx/layers/apz/test/gtest/TestPinching.cpp
gfx/layers/apz/test/gtest/TestScrollHandoff.cpp
gfx/layers/apz/util/CheckerboardReportService.cpp
gfx/layers/client/TiledContentClient.cpp
gfx/layers/composite/AsyncCompositionManager.cpp
gfx/layers/composite/ContainerLayerComposite.cpp
gfx/thebes/gfxPlatform.cpp
layout/base/PresShell.cpp
layout/base/ZoomConstraintsClient.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsRefreshDriver.cpp
layout/generic/ScrollVelocityQueue.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/painting/nsDisplayList.cpp
modules/libpref/init/StaticPrefList.h
widget/cocoa/nsChildView.mm
widget/gtk/nsWindow.cpp
widget/nsBaseWidget.cpp
widget/windows/nsWindowBase.cpp
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -267,17 +267,17 @@ APZCTreeManager::APZCTreeManager(LayersI
       mApzcTreeLog("apzctree"),
       mTestDataLock("APZTestDataLock"),
       mDPI(160.0) {
   RefPtr<APZCTreeManager> self(this);
   NS_DispatchToMainThread(NS_NewRunnableFunction(
       "layers::APZCTreeManager::APZCTreeManager",
       [self] { self->mFlushObserver = new CheckerboardFlushObserver(self); }));
   AsyncPanZoomController::InitializeGlobalState();
-  mApzcTreeLog.ConditionOnPrefFunction(StaticPrefs::APZPrintTree);
+  mApzcTreeLog.ConditionOnPrefFunction(StaticPrefs::apz_printtree);
 #if defined(MOZ_WIDGET_ANDROID)
   if (jni::IsFennec()) {
     mToolbarAnimator = new AndroidDynamicToolbarAnimator(this);
   }
 #endif  // (MOZ_WIDGET_ANDROID)
 }
 
 APZCTreeManager::~APZCTreeManager() = default;
@@ -601,17 +601,17 @@ APZCTreeManager::UpdateHitTestingTreeImp
   SendSubtreeTransformsToChromeMainThread(nullptr);
 }
 
 void APZCTreeManager::UpdateFocusState(LayersId aRootLayerTreeId,
                                        LayersId aOriginatingLayersId,
                                        const FocusTarget& aFocusTarget) {
   AssertOnUpdaterThread();
 
-  if (!StaticPrefs::APZKeyboardEnabled()) {
+  if (!StaticPrefs::apz_keyboard_enabled()) {
     return;
   }
 
   mFocusState.Update(aRootLayerTreeId, aOriginatingLayersId, aFocusTarget);
 }
 
 void APZCTreeManager::UpdateHitTestingTree(Layer* aRoot, bool aIsFirstPaint,
                                            LayersId aOriginatingLayersId,
@@ -1314,17 +1314,17 @@ nsEventStatus APZCTreeManager::ReceiveIn
           MutexAutoLock lock(mTestDataLock);
           auto it = mTestData.find(guid.mLayersId);
           MOZ_ASSERT(it != mTestData.end());
           it->second->RecordHitResult(mouseInput.mOrigin, hitResult,
                                       guid.mScrollId);
         }
 
         TargetConfirmationFlags confFlags{hitResult};
-        bool apzDragEnabled = StaticPrefs::APZDragEnabled();
+        bool apzDragEnabled = StaticPrefs::apz_drag_enabled();
         if (apzDragEnabled && hitScrollbar) {
           // If scrollbar dragging is enabled and we hit a scrollbar, wait
           // for the main-thread confirmation because it contains drag metrics
           // that we need.
           confFlags.mTargetConfirmed = false;
         }
         result = mInputQueue->ReceiveInputEvent(apzc, confFlags, mouseInput,
                                                 aOutInputBlockId);
@@ -1539,18 +1539,18 @@ nsEventStatus APZCTreeManager::ReceiveIn
         apzc->GetGuid(aOutTargetGuid);
         tapInput.mPoint = *untransformedPoint;
       }
       break;
     }
     case KEYBOARD_INPUT: {
       // Disable async keyboard scrolling when accessibility.browsewithcaret is
       // enabled
-      if (!StaticPrefs::APZKeyboardEnabled() ||
-          StaticPrefs::AccessibilityBrowseWithCaret()) {
+      if (!StaticPrefs::apz_keyboard_enabled() ||
+          StaticPrefs::accessibility_browsewithcaret()) {
         APZ_KEY_LOG("Skipping key input from invalid prefs\n");
         return result;
       }
 
       KeyboardInput& keyInput = aEvent.AsKeyboardInput();
 
       // Try and find a matching shortcut for this keyboard input
       Maybe<KeyboardShortcut> shortcut = mKeyboardMap.FindMatch(keyInput);
@@ -1736,18 +1736,19 @@ nsEventStatus APZCTreeManager::ProcessTo
     mApzcForInputBlock = GetTouchInputBlockAPZC(
         aInput, &touchBehaviors, &mHitResultForInputBlock, &aInput.mLayersId,
         &hitScrollbarNode);
 
     // Check if this event starts a scrollbar touch-drag. The conditions
     // checked are similar to the ones we check for MOUSE_INPUT starting
     // a scrollbar mouse-drag.
     mInScrollbarTouchDrag =
-        StaticPrefs::APZDragEnabled() && StaticPrefs::APZTouchDragEnabled() &&
-        hitScrollbarNode && hitScrollbarNode->IsScrollThumbNode() &&
+        StaticPrefs::apz_drag_enabled() &&
+        StaticPrefs::apz_touch_drag_enabled() && hitScrollbarNode &&
+        hitScrollbarNode->IsScrollThumbNode() &&
         hitScrollbarNode->GetScrollbarData().mThumbIsAsyncDraggable;
 
     MOZ_ASSERT(touchBehaviors.Length() == aInput.mTouches.Length());
     for (size_t i = 0; i < touchBehaviors.Length(); i++) {
       APZCTM_LOG("Touch point has allowed behaviours 0x%02x\n",
                  touchBehaviors[i]);
       if (touchBehaviors[i] == AllowedTouchBehavior::UNKNOWN) {
         // If there's any unknown items in the list, throw it out and we'll
@@ -1919,17 +1920,17 @@ void APZCTreeManager::SetupScrollbarDrag
 
   // Record the thumb's position at the start of the drag.
   // We snap back to this position if, during the drag, the mouse
   // gets sufficiently far away from the scrollbar.
   dragBlock->SetInitialThumbPos(thumbData.mThumbStart);
 
   // Under some conditions, we can confirm the drag block right away.
   // Otherwise, we have to wait for a main-thread confirmation.
-  if (StaticPrefs::APZDragInitiationEnabled() &&
+  if (StaticPrefs::apz_drag_initial_enabled() &&
       // check that the scrollbar's target scroll frame is layerized
       aScrollThumbNode->GetScrollTargetId() == aApzc->GetGuid().mScrollId &&
       !aApzc->IsScrollInfoLayer()) {
     uint64_t dragBlockId = dragBlock->GetBlockId();
     // AsyncPanZoomController::HandleInputEvent() will call
     // TransformToLocal() on the event, but we need its mLocalOrigin now
     // to compute a drag start offset for the AsyncDragMetrics.
     aMouseInput.TransformToLocal(aApzc->GetTransformToThis());
@@ -2383,17 +2384,17 @@ void APZCTreeManager::DispatchScroll(
     }
   }
 }
 
 ParentLayerPoint APZCTreeManager::DispatchFling(
     AsyncPanZoomController* aPrev, const FlingHandoffState& aHandoffState) {
   // If immediate handoff is disallowed, do not allow handoff beyond the
   // single APZC that's scrolled by the input block that triggered this fling.
-  if (aHandoffState.mIsHandoff && !StaticPrefs::APZAllowImmediateHandoff() &&
+  if (aHandoffState.mIsHandoff && !StaticPrefs::apz_allow_immediate_handoff() &&
       aHandoffState.mScrolledApzc == aPrev) {
     FLING_LOG("APZCTM dropping handoff due to disallowed immediate handoff\n");
     return aHandoffState.mVelocity;
   }
 
   const OverscrollHandoffChain* chain = aHandoffState.mChain;
   RefPtr<AsyncPanZoomController> current;
   uint32_t overscrollHandoffChainLength = chain->Length();
--- a/gfx/layers/apz/src/APZInputBridge.cpp
+++ b/gfx/layers/apz/src/APZInputBridge.cpp
@@ -60,17 +60,17 @@ nsEventStatus APZInputBridge::ReceiveInp
 
       // If zooming is enabled, mark the mouse event as "ignore root
       // scroll frame". This ensures that the main-thread hit test the
       // mouse event undergoes (in PositionedEventTargeting.cpp) uses
       // the IGNORE_ROOT_SCROLL_FRAME flag, which is needed for correct
       // hit testing in a zoomed-in or zoomed-out state.
       // FIXME: bug 1525793 -- this may need to handle zooming or not on a
       // per-document basis.
-      if (StaticPrefs::APZAllowZooming()) {
+      if (StaticPrefs::apz_allow_zooming()) {
         mouseEvent.mIgnoreRootScrollFrame = true;
       }
 
       if (WillHandleMouseEvent(mouseEvent)) {
         MouseInput input(mouseEvent);
         input.mOrigin =
             ScreenPoint(mouseEvent.mRefPoint.x, mouseEvent.mRefPoint.y);
 
--- a/gfx/layers/apz/src/AndroidAPZ.cpp
+++ b/gfx/layers/apz/src/AndroidAPZ.cpp
@@ -50,39 +50,40 @@ AndroidSpecificState::AndroidSpecificSta
     return;
   }
   mOverScroller = scroller;
 }
 
 AsyncPanZoomAnimation* AndroidSpecificState::CreateFlingAnimation(
     AsyncPanZoomController& aApzc, const FlingHandoffState& aHandoffState,
     float aPLPPI) {
-  if (StaticPrefs::APZUseChromeFlingPhysics()) {
+  if (StaticPrefs::apz_android_chrome_fling_physics_enabled()) {
     return new GenericFlingAnimation<AndroidFlingPhysics>(
         aApzc, aHandoffState.mChain, aHandoffState.mIsHandoff,
         aHandoffState.mScrolledApzc, aPLPPI);
   } else {
     return new StackScrollerFlingAnimation(aApzc, this, aHandoffState.mChain,
                                            aHandoffState.mIsHandoff,
                                            aHandoffState.mScrolledApzc);
   }
 }
 
 UniquePtr<VelocityTracker> AndroidSpecificState::CreateVelocityTracker(
     Axis* aAxis) {
-  if (StaticPrefs::APZUseChromeFlingPhysics()) {
+  if (StaticPrefs::apz_android_chrome_fling_physics_enabled()) {
     return MakeUnique<AndroidVelocityTracker>();
   }
   return MakeUnique<SimpleVelocityTracker>(aAxis);
 }
 
 /* static */
 void AndroidSpecificState::InitializeGlobalState() {
-  // Not conditioned on StaticPrefs::APZUseChromeFlingPhysics() because
-  // the pref is live.
+  // Not conditioned on
+  // StaticPrefs::apz_android_chrome_fling_physics_enabled() because the pref
+  // is live.
   AndroidFlingPhysics::InitializeGlobalState();
 }
 
 const float BOUNDS_EPSILON = 1.0f;
 
 // This function is used to convert the scroll offset from a float to an integer
 // suitable for using with the Android OverScroller Class.
 // The Android OverScroller class (unfortunately) operates in integers instead
@@ -162,18 +163,19 @@ StackScrollerFlingAnimation::StackScroll
   int32_t originY =
       ClampStart(mStartOffset.y, scrollRangeStartY, scrollRangeEndY);
   if (!state->mLastFling.IsNull()) {
     // If it's been too long since the previous fling, or if the new fling's
     // velocity is too low, don't allow flywheel to kick in. If we do allow
     // flywheel to kick in, then we need to update the timestamp on the
     // StackScroller because otherwise it might use a stale velocity.
     TimeDuration flingDuration = TimeStamp::Now() - state->mLastFling;
-    if (flingDuration.ToMilliseconds() < StaticPrefs::APZFlingAccelInterval() &&
-        velocity.Length() >= StaticPrefs::APZFlingAccelMinVelocity()) {
+    if (flingDuration.ToMilliseconds() <
+            StaticPrefs::apz_fling_accel_interval_ms() &&
+        velocity.Length() >= StaticPrefs::apz_fling_accel_interval_ms()) {
       bool unused = false;
       mOverScroller->ComputeScrollOffset(flingDuration.ToMilliseconds(),
                                          &unused);
     } else {
       mOverScroller->ForceFinished(true);
     }
   }
   mOverScroller->Fling(
@@ -237,19 +239,19 @@ bool StackScrollerFlingAnimation::DoSamp
     shouldContinueFling = false;
   } else if (hitBoundX && hitBoundY) {
     // We can't scroll any farther along either axis.
     shouldContinueFling = false;
   }
 
   float speed = velocity.Length();
 
-  // StaticPrefs::APZFlingStoppedThreshold is only used in tests.
+  // StaticPrefs::apz_fling_stopped_threshold is only used in tests.
   if (!shouldContinueFling ||
-      (speed < StaticPrefs::APZFlingStoppedThreshold())) {
+      (speed < StaticPrefs::apz_fling_stopped_threshold())) {
     if (shouldContinueFling) {
       // The OverScroller thinks it should continue but the speed is below
       // the stopping threshold so abort the animation.
       mOverScroller->AbortAnimation();
     }
     // This animation is going to end. If DeferHandleFlingOverscroll
     // has not been called and there is still some velocity left,
     // call it so that fling hand off may occur if applicable.
--- a/gfx/layers/apz/src/AndroidFlingPhysics.cpp
+++ b/gfx/layers/apz/src/AndroidFlingPhysics.cpp
@@ -28,38 +28,39 @@ static double ComputeDeceleration(float 
          * kFriction;
 }
 
 // == std::log(0.78f) / std::log(0.9f)
 const float kDecelerationRate = 2.3582018f;
 
 // Default friction constant in android.view.ViewConfiguration.
 static float GetFlingFriction() {
-  return StaticPrefs::APZChromeFlingPhysicsFriction();
+  return StaticPrefs::apz_android_chrome_fling_physics_friction();
 }
 
 // Tension lines cross at (GetInflexion(), 1).
 static float GetInflexion() {
   // Clamp the inflexion to the range [0,1]. Values outside of this range
   // do not make sense in the physics model, and for negative values the
   // approximation used to compute the spline curve does not converge.
-  const float inflexion = StaticPrefs::APZChromeFlingPhysicsInflexion();
+  const float inflexion =
+      StaticPrefs::apz_android_chrome_fling_physics_inflexion();
   if (inflexion < 0.0f) {
     return 0.0f;
   }
   if (inflexion > 1.0f) {
     return 1.0f;
   }
   return inflexion;
 }
 
 // Fling scroll is stopped when the scroll position is |kThresholdForFlingEnd|
 // pixels or closer from the end.
 static float GetThresholdForFlingEnd() {
-  return StaticPrefs::APZChromeFlingPhysicsStopThreshold();
+  return StaticPrefs::apz_android_chrome_fling_physics_stop_threshold();
 }
 
 static double ComputeSplineDeceleration(ParentLayerCoord aVelocity,
                                         double aTuningCoeff) {
   float velocityPerSec = aVelocity * 1000.0f;
   return std::log(GetInflexion() * velocityPerSec /
                   (GetFlingFriction() * aTuningCoeff));
 }
--- a/gfx/layers/apz/src/AndroidVelocityTracker.cpp
+++ b/gfx/layers/apz/src/AndroidVelocityTracker.cpp
@@ -246,17 +246,17 @@ Maybe<float> AndroidVelocityTracker::Com
   }
 
   // Iterate over movement samples in reverse time order and collect samples.
   float pos[kHistorySize];
   float w[kHistorySize];
   float time[kHistorySize];
   uint32_t m = 0;
   int index = mHistory.Length() - 1;
-  const uint32_t horizon = StaticPrefs::APZVelocityRelevanceTime();
+  const uint32_t horizon = StaticPrefs::apz_velocity_relevance_time_ms();
   const auto& newest_movement = mHistory[index];
 
   do {
     const auto& movement = mHistory[index];
     uint32_t age = newest_movement.first - movement.first;
     if (age > horizon) break;
 
     ParentLayerCoord position = movement.second;
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -610,17 +610,17 @@ AutoApplyAsyncTestAttributes::~AutoApply
 class ZoomAnimation : public AsyncPanZoomAnimation {
  public:
   ZoomAnimation(AsyncPanZoomController& aApzc, const CSSPoint& aStartOffset,
                 const CSSToParentLayerScale2D& aStartZoom,
                 const CSSPoint& aEndOffset,
                 const CSSToParentLayerScale2D& aEndZoom)
       : mApzc(aApzc),
         mTotalDuration(TimeDuration::FromMilliseconds(
-            StaticPrefs::APZZoomAnimationDuration())),
+            StaticPrefs::apz_zoom_animation_duration_ms())),
         mStartOffset(aStartOffset),
         mStartZoom(aStartZoom),
         mEndOffset(aEndOffset),
         mEndZoom(aEndZoom) {}
 
   virtual bool DoSample(FrameMetrics& aFrameMetrics,
                         const TimeDuration& aDelta) override {
     mDuration += aDelta;
@@ -810,19 +810,21 @@ void AsyncPanZoomController::InitializeG
   if (sInitialized) return;
   sInitialized = true;
 
   MOZ_ASSERT(NS_IsMainThread());
 
   gZoomAnimationFunction =
       new ComputedTimingFunction(nsTimingFunction(StyleTimingKeyword::Ease));
   ClearOnShutdown(&gZoomAnimationFunction);
-  gVelocityCurveFunction = new ComputedTimingFunction(nsTimingFunction(
-      StaticPrefs::APZCurveFunctionX1(), StaticPrefs::APZCurveFunctionY1(),
-      StaticPrefs::APZCurveFunctionX2(), StaticPrefs::APZCurveFunctionY2()));
+  gVelocityCurveFunction = new ComputedTimingFunction(
+      nsTimingFunction(StaticPrefs::apz_fling_curve_function_x1(),
+                       StaticPrefs::apz_fling_curve_function_y1(),
+                       StaticPrefs::apz_fling_curve_function_x2(),
+                       StaticPrefs::apz_fling_curve_function_y2()));
   ClearOnShutdown(&gVelocityCurveFunction);
 
   uint64_t sysmem = PR_GetPhysicalMemorySize();
   uint64_t threshold = 1LL << 32;  // 4 GB in bytes
   gIsHighMemSystem = sysmem >= threshold;
 
   PlatformSpecificState::InitializeGlobalState();
 }
@@ -840,17 +842,17 @@ AsyncPanZoomController::AsyncPanZoomCont
       mTreeManager(aTreeManager),
       mRecursiveMutex("AsyncPanZoomController"),
       mLastContentPaintMetrics(mLastContentPaintMetadata.GetMetrics()),
       mX(this),
       mY(this),
       mPanDirRestricted(false),
       mPinchLocked(false),
       mPinchEventBuffer(TimeDuration::FromMilliseconds(
-          StaticPrefs::APZPinchLockBufferMaxAge())),
+          StaticPrefs::apz_pinch_lock_buffer_max_age())),
       mZoomConstraints(false, false,
                        mScrollMetadata.GetMetrics().GetDevPixelsPerCSSPixel() *
                            kViewportMinScale / ParentLayerToScreenScale(1),
                        mScrollMetadata.GetMetrics().GetDevPixelsPerCSSPixel() *
                            kViewportMaxScale / ParentLayerToScreenScale(1)),
       mLastSampleTime(GetFrameTime()),
       mLastCheckerboardReport(GetFrameTime()),
       mOverscrollEffect(MakeUnique<OverscrollEffect>(*this)),
@@ -933,35 +935,35 @@ float AsyncPanZoomController::GetDPI() c
   }
   // If this APZC has been destroyed then this value is not going to be
   // used for anything that the user will end up seeing, so we can just
   // return 0.
   return 0.0;
 }
 
 ScreenCoord AsyncPanZoomController::GetTouchStartTolerance() const {
-  return (StaticPrefs::APZTouchStartTolerance() * GetDPI());
+  return (StaticPrefs::apz_touch_start_tolerance() * GetDPI());
 }
 
 ScreenCoord AsyncPanZoomController::GetTouchMoveTolerance() const {
-  return (StaticPrefs::APZTouchMoveTolerance() * GetDPI());
+  return (StaticPrefs::apz_touch_move_tolerance() * GetDPI());
 }
 
 ScreenCoord AsyncPanZoomController::GetSecondTapTolerance() const {
-  return (StaticPrefs::APZSecondTapTolerance() * GetDPI());
+  return (StaticPrefs::apz_second_tap_tolerance() * GetDPI());
 }
 
 /* static */ AsyncPanZoomController::AxisLockMode
 AsyncPanZoomController::GetAxisLockMode() {
-  return static_cast<AxisLockMode>(StaticPrefs::APZAxisLockMode());
+  return static_cast<AxisLockMode>(StaticPrefs::apz_axis_lock_mode());
 }
 
 /* static */ AsyncPanZoomController::PinchLockMode
 AsyncPanZoomController::GetPinchLockMode() {
-  return static_cast<PinchLockMode>(StaticPrefs::APZPinchLockMode());
+  return static_cast<PinchLockMode>(StaticPrefs::apz_pinch_lock_mode());
 }
 
 bool AsyncPanZoomController::ArePointerEventsConsumable(
     TouchBlockState* aBlock, const MultiTouchInput& aInput) {
   uint32_t touchPoints = aInput.mTouches.Length();
   if (touchPoints == 0) {
     // Cant' do anything with zero touch points
     return false;
@@ -1007,17 +1009,17 @@ bool AsyncPanZoomController::ArePointerE
   zoomable &= (aBlock->TouchActionAllowsPinchZoom());
 
   return pannable || zoomable;
 }
 
 nsEventStatus AsyncPanZoomController::HandleDragEvent(
     const MouseInput& aEvent, const AsyncDragMetrics& aDragMetrics,
     CSSCoord aInitialThumbPos) {
-  if (!StaticPrefs::APZDragEnabled()) {
+  if (!StaticPrefs::apz_drag_enabled()) {
     return nsEventStatus_eIgnore;
   }
 
   if (!GetApzcTreeManager()) {
     return nsEventStatus_eConsumeNoDefault;
   }
 
   if (aEvent.mType == MouseInput::MouseType::MOUSE_UP) {
@@ -1561,17 +1563,17 @@ nsEventStatus AsyncPanZoomController::On
     mX.StartTouch(aEvent.mLocalFocusPoint.x, aEvent.mTime);
     mY.StartTouch(aEvent.mLocalFocusPoint.y, aEvent.mTime);
   }
 
   // For platforms that don't support APZ zooming, dispatch a message to the
   // content controller, it may want to do something else with this gesture.
   // FIXME: bug 1525793 -- this may need to handle zooming or not on a
   // per-document basis.
-  if (!StaticPrefs::APZAllowZooming()) {
+  if (!StaticPrefs::apz_allow_zooming()) {
     if (RefPtr<GeckoContentController> controller =
             GetGeckoContentController()) {
       controller->NotifyPinchGesture(aEvent.mType, GetGuid(), 0,
                                      aEvent.modifiers);
     }
   }
 
   SetState(PINCHING);
@@ -1608,17 +1610,17 @@ nsEventStatus AsyncPanZoomController::On
   // it cannot be called while the mRecursiveMutex lock is held.
   if (!allowZoom) {
     mX.UpdateWithTouchAtDevicePoint(aEvent.mLocalFocusPoint.x, aEvent.mTime);
     mY.UpdateWithTouchAtDevicePoint(aEvent.mLocalFocusPoint.y, aEvent.mTime);
   }
 
   // FIXME: bug 1525793 -- this may need to handle zooming or not on a
   // per-document basis.
-  if (!StaticPrefs::APZAllowZooming()) {
+  if (!StaticPrefs::apz_allow_zooming()) {
     if (RefPtr<GeckoContentController> controller =
             GetGeckoContentController()) {
       controller->NotifyPinchGesture(
           aEvent.mType, GetGuid(),
           ViewAs<LayoutDevicePixel>(
               aEvent.mCurrentSpan - aEvent.mPreviousSpan,
               PixelCastJustification::LayoutDeviceIsParentLayerForRCDRSF),
           aEvent.modifiers);
@@ -1698,17 +1700,17 @@ nsEventStatus AsyncPanZoomController::On
       ScaleWithFocus(spanRatio, cssFocusPoint);
 
       if (neededDisplacement != CSSPoint()) {
         ScrollBy(neededDisplacement);
       }
 
       // We don't want to redraw on every scale, so throttle it.
       if (!mPinchPaintTimerSet) {
-        const int delay = StaticPrefs::APZScaleRepaintDelay();
+        const int delay = StaticPrefs::apz_scale_repaint_delay_ms();
         if (delay >= 0) {
           if (RefPtr<GeckoContentController> controller =
                   GetGeckoContentController()) {
             mPinchPaintTimerSet = true;
             controller->PostDelayedTask(
                 NewRunnableMethod(
                     "layers::AsyncPanZoomController::"
                     "DoDelayedRequestContentRepaint",
@@ -1742,17 +1744,17 @@ nsEventStatus AsyncPanZoomController::On
 
   if (HasReadyTouchBlock() &&
       !GetCurrentTouchBlock()->TouchActionAllowsPinchZoom()) {
     return nsEventStatus_eIgnore;
   }
 
   // FIXME: bug 1525793 -- this may need to handle zooming or not on a
   // per-document basis.
-  if (!StaticPrefs::APZAllowZooming()) {
+  if (!StaticPrefs::apz_allow_zooming()) {
     if (RefPtr<GeckoContentController> controller =
             GetGeckoContentController()) {
       controller->NotifyPinchGesture(aEvent.mType, GetGuid(), 0,
                                      aEvent.modifiers);
     }
   }
 
   {
@@ -1835,19 +1837,20 @@ nsEventStatus AsyncPanZoomController::Ha
   // if DispatchFling() gives the fling to somone else. However,
   // don't send the state change notification until we've determined
   // what our final state is to avoid notification churn.
   StateChangeNotificationBlocker blocker(this);
   SetState(NOTHING);
 
   APZC_LOG("%p starting a fling animation if %f >= %f\n", this,
            flingVelocity.Length().value,
-           StaticPrefs::APZFlingMinVelocityThreshold());
-
-  if (flingVelocity.Length() < StaticPrefs::APZFlingMinVelocityThreshold()) {
+           StaticPrefs::apz_fling_min_velocity_threshold());
+
+  if (flingVelocity.Length() <
+      StaticPrefs::apz_fling_min_velocity_threshold()) {
     // Relieve overscroll now if needed, since we will not transition to a fling
     // animation and then an overscroll animation, and relieve it then.
     GetCurrentInputBlock()
         ->GetOverscrollHandoffChain()
         ->SnapBackOverscrolledApzc(this);
     return nsEventStatus_eConsumeNoDefault;
   }
 
@@ -2249,17 +2252,17 @@ bool AsyncPanZoomController::IsContentOf
     return mScrollMetadata.IsAutoDirRootContentRTL();
   }
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   return Metrics().IsHorizontalContentRightToLeft();
 }
 
 bool AsyncPanZoomController::AllowScrollHandoffInCurrentBlock() const {
   bool result = mInputQueue->AllowScrollHandoff();
-  if (!StaticPrefs::APZAllowImmediateHandoff()) {
+  if (!StaticPrefs::apz_allow_immediate_handoff()) {
     if (InputBlockState* currentBlock = GetCurrentInputBlock()) {
       // Do not allow handoff beyond the first APZC to scroll.
       if (currentBlock->GetScrolledApzc() == this) {
         result = false;
         APZC_LOG("%p dropping handoff; AllowImmediateHandoff=false\n", this);
       }
     }
   }
@@ -2925,47 +2928,48 @@ void AsyncPanZoomController::HandlePanni
   bool canScrollHorizontal =
       !mX.IsAxisLocked() && overscrollHandoffChain->CanScrollInDirection(
                                 this, ScrollDirection::eHorizontal);
   bool canScrollVertical =
       !mY.IsAxisLocked() && overscrollHandoffChain->CanScrollInDirection(
                                 this, ScrollDirection::eVertical);
   if (GetCurrentTouchBlock()->TouchActionAllowsPanningXY()) {
     if (canScrollHorizontal && canScrollVertical) {
-      if (apz::IsCloseToHorizontal(aAngle, StaticPrefs::APZAxisLockAngle())) {
+      if (apz::IsCloseToHorizontal(aAngle,
+                                   StaticPrefs::apz_axis_lock_lock_angle())) {
         mY.SetAxisLocked(true);
         SetState(PANNING_LOCKED_X);
-      } else if (apz::IsCloseToVertical(aAngle,
-                                        StaticPrefs::APZAxisLockAngle())) {
+      } else if (apz::IsCloseToVertical(
+                     aAngle, StaticPrefs::apz_axis_lock_lock_angle())) {
         mX.SetAxisLocked(true);
         SetState(PANNING_LOCKED_Y);
       } else {
         SetState(PANNING);
       }
     } else if (canScrollHorizontal || canScrollVertical) {
       SetState(PANNING);
     } else {
       SetState(NOTHING);
     }
   } else if (GetCurrentTouchBlock()->TouchActionAllowsPanningX()) {
     // Using bigger angle for panning to keep behavior consistent
     // with IE.
-    if (apz::IsCloseToHorizontal(aAngle,
-                                 StaticPrefs::APZAllowedDirectPanAngle())) {
+    if (apz::IsCloseToHorizontal(
+            aAngle, StaticPrefs::apz_axis_lock_direct_pan_angle())) {
       mY.SetAxisLocked(true);
       SetState(PANNING_LOCKED_X);
       mPanDirRestricted = true;
     } else {
       // Don't treat these touches as pan/zoom movements since 'touch-action'
       // value requires it.
       SetState(NOTHING);
     }
   } else if (GetCurrentTouchBlock()->TouchActionAllowsPanningY()) {
     if (apz::IsCloseToVertical(aAngle,
-                               StaticPrefs::APZAllowedDirectPanAngle())) {
+                               StaticPrefs::apz_axis_lock_direct_pan_angle())) {
       mX.SetAxisLocked(true);
       SetState(PANNING_LOCKED_Y);
       mPanDirRestricted = true;
     } else {
       SetState(NOTHING);
     }
   } else {
     SetState(NOTHING);
@@ -2988,23 +2992,24 @@ void AsyncPanZoomController::HandlePanni
       !mX.IsAxisLocked() && overscrollHandoffChain->CanScrollInDirection(
                                 this, ScrollDirection::eHorizontal);
   bool canScrollVertical =
       !mY.IsAxisLocked() && overscrollHandoffChain->CanScrollInDirection(
                                 this, ScrollDirection::eVertical);
 
   if (!canScrollHorizontal || !canScrollVertical) {
     SetState(PANNING);
-  } else if (apz::IsCloseToHorizontal(aAngle,
-                                      StaticPrefs::APZAxisLockAngle())) {
+  } else if (apz::IsCloseToHorizontal(
+                 aAngle, StaticPrefs::apz_axis_lock_lock_angle())) {
     mY.SetAxisLocked(true);
     if (canScrollHorizontal) {
       SetState(PANNING_LOCKED_X);
     }
-  } else if (apz::IsCloseToVertical(aAngle, StaticPrefs::APZAxisLockAngle())) {
+  } else if (apz::IsCloseToVertical(aAngle,
+                                    StaticPrefs::apz_axis_lock_lock_angle())) {
     mX.SetAxisLocked(true);
     if (canScrollVertical) {
       SetState(PANNING_LOCKED_Y);
     }
   } else {
     SetState(PANNING);
   }
 }
@@ -3014,29 +3019,30 @@ void AsyncPanZoomController::HandlePanni
   // If we're axis-locked, check if the user is trying to break the lock
   if (GetAxisLockMode() == STICKY && !mPanDirRestricted) {
     ParentLayerPoint vector =
         ToParentLayerCoordinates(aPanDistance, mStartTouch);
 
     double angle = atan2(vector.y, vector.x);  // range [-pi, pi]
     angle = fabs(angle);                       // range [0, pi]
 
-    float breakThreshold = StaticPrefs::APZAxisBreakoutThreshold() * GetDPI();
+    float breakThreshold =
+        StaticPrefs::apz_axis_lock_breakout_threshold() * GetDPI();
 
     if (fabs(aPanDistance.x) > breakThreshold ||
         fabs(aPanDistance.y) > breakThreshold) {
       if (mState == PANNING_LOCKED_X) {
-        if (!apz::IsCloseToHorizontal(angle,
-                                      StaticPrefs::APZAxisBreakoutAngle())) {
+        if (!apz::IsCloseToHorizontal(
+                angle, StaticPrefs::apz_axis_lock_breakout_angle())) {
           mY.SetAxisLocked(false);
           SetState(PANNING);
         }
       } else if (mState == PANNING_LOCKED_Y) {
-        if (!apz::IsCloseToVertical(angle,
-                                    StaticPrefs::APZAxisBreakoutAngle())) {
+        if (!apz::IsCloseToVertical(
+                angle, StaticPrefs::apz_axis_lock_breakout_angle())) {
           mX.SetAxisLocked(false);
           SetState(PANNING);
         }
       }
     }
   }
 }
 
@@ -3070,25 +3076,25 @@ void AsyncPanZoomController::HandlePinch
       ToScreenCoordinates(ParentLayerPoint(0, bufferedSpanDistance), focusPoint)
           .Length();
   ScreenPoint focusChange =
       ToScreenCoordinates(bufferedFocusChange, focusPoint);
 
   if (mPinchLocked) {
     if (GetPinchLockMode() == PINCH_STICKY) {
       ScreenCoord spanBreakoutThreshold =
-          StaticPrefs::APZPinchLockSpanBreakoutThreshold() * GetDPI();
+          StaticPrefs::apz_pinch_lock_span_breakout_threshold() * GetDPI();
       mPinchLocked = !(spanDistance > spanBreakoutThreshold);
     }
   } else {
     if (GetPinchLockMode() != PINCH_FREE) {
       ScreenCoord spanLockThreshold =
-          StaticPrefs::APZPinchLockSpanLockThreshold() * GetDPI();
+          StaticPrefs::apz_pinch_lock_span_lock_threshold() * GetDPI();
       ScreenCoord scrollLockThreshold =
-          StaticPrefs::APZPinchLockScrollLockThreshold() * GetDPI();
+          StaticPrefs::apz_pinch_lock_scroll_lock_threshold() * GetDPI();
 
       if (spanDistance < spanLockThreshold &&
           focusChange.Length() > scrollLockThreshold) {
         mPinchLocked = true;
       }
     }
   }
 }
@@ -3252,30 +3258,30 @@ bool AsyncPanZoomController::AttemptScro
 
 void AsyncPanZoomController::OverscrollForPanning(
     ParentLayerPoint& aOverscroll, const ScreenPoint& aPanDistance) {
   // Only allow entering overscroll along an axis if the pan distance along
   // that axis is greater than the pan distance along the other axis by a
   // configurable factor. If we are already overscrolled, don't check this.
   if (!IsOverscrolled()) {
     if (aPanDistance.x <
-        StaticPrefs::APZMinPanDistanceRatio() * aPanDistance.y) {
+        StaticPrefs::apz_overscroll_min_pan_distance_ratio() * aPanDistance.y) {
       aOverscroll.x = 0;
     }
     if (aPanDistance.y <
-        StaticPrefs::APZMinPanDistanceRatio() * aPanDistance.x) {
+        StaticPrefs::apz_overscroll_min_pan_distance_ratio() * aPanDistance.x) {
       aOverscroll.y = 0;
     }
   }
 
   OverscrollBy(aOverscroll);
 }
 
 void AsyncPanZoomController::OverscrollBy(ParentLayerPoint& aOverscroll) {
-  if (!StaticPrefs::APZOverscrollEnabled()) {
+  if (!StaticPrefs::apz_overscroll_enabled()) {
     return;
   }
 
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   // Do not go into overscroll in a direction in which we have no room to
   // scroll to begin with.
   bool xCanScroll = mX.CanScroll();
   bool yCanScroll = mY.CanScroll();
@@ -3332,17 +3338,17 @@ ParentLayerPoint AsyncPanZoomController:
   }
 
   // If we're not scrollable in at least one of the directions in which we
   // were handed velocity, don't start a fling animation.
   // The |IsFinite()| condition should only fail when running some tests
   // that generate events faster than the clock resolution.
   ParentLayerPoint velocity = GetVelocityVector();
   if (!velocity.IsFinite() ||
-      velocity.Length() < StaticPrefs::APZFlingMinVelocityThreshold()) {
+      velocity.Length() < StaticPrefs::apz_fling_min_velocity_threshold()) {
     // Relieve overscroll now if needed, since we will not transition to a fling
     // animation and then an overscroll animation, and relieve it then.
     aHandoffState.mChain->SnapBackOverscrolledApzc(this);
     return residualVelocity;
   }
 
   // If there's a scroll snap point near the predicted fling destination,
   // scroll there using a smooth scroll animation. Otherwise, start a
@@ -3403,17 +3409,17 @@ void AsyncPanZoomController::HandleFling
   if (treeManagerLocal) {
     const FlingHandoffState handoffState{aVelocity, aOverscrollHandoffChain,
                                          true /* handoff */, aScrolledApzc};
     ParentLayerPoint residualVelocity =
         treeManagerLocal->DispatchFling(this, handoffState);
     FLING_LOG("APZC %p left with residual velocity %s\n", this,
               Stringify(residualVelocity).c_str());
     if (!IsZero(residualVelocity) && IsPannable() &&
-        StaticPrefs::APZOverscrollEnabled()) {
+        StaticPrefs::apz_overscroll_enabled()) {
       // Obey overscroll-behavior.
       RecursiveMutexAutoLock lock(mRecursiveMutex);
       if (!mX.OverscrollBehaviorAllowsOverscrollEffect()) {
         residualVelocity.x = 0;
       }
       if (!mY.OverscrollBehaviorAllowsOverscrollEffect()) {
         residualVelocity.y = 0;
       }
@@ -3661,50 +3667,50 @@ void AsyncPanZoomController::ScaleWithFo
 }
 
 /**
  * Enlarges the displayport along both axes based on the velocity.
  */
 static CSSSize CalculateDisplayPortSize(const CSSSize& aCompositionSize,
                                         const CSSPoint& aVelocity) {
   bool xIsStationarySpeed =
-      fabsf(aVelocity.x) < StaticPrefs::APZMinSkateSpeed();
+      fabsf(aVelocity.x) < StaticPrefs::apz_min_skate_speed();
   bool yIsStationarySpeed =
-      fabsf(aVelocity.y) < StaticPrefs::APZMinSkateSpeed();
+      fabsf(aVelocity.y) < StaticPrefs::apz_min_skate_speed();
   float xMultiplier = xIsStationarySpeed
-                          ? StaticPrefs::APZXStationarySizeMultiplier()
-                          : StaticPrefs::APZXSkateSizeMultiplier();
+                          ? StaticPrefs::apz_x_stationary_size_multiplier()
+                          : StaticPrefs::apz_x_skate_size_multiplier();
   float yMultiplier = yIsStationarySpeed
-                          ? StaticPrefs::APZYStationarySizeMultiplier()
-                          : StaticPrefs::APZYSkateSizeMultiplier();
+                          ? StaticPrefs::apz_y_stationary_size_multiplier()
+                          : StaticPrefs::apz_y_skate_size_multiplier();
 
   if (IsHighMemSystem() && !xIsStationarySpeed) {
-    xMultiplier += StaticPrefs::APZXSkateHighMemAdjust();
+    xMultiplier += StaticPrefs::apz_x_skate_highmem_adjust();
   }
 
   if (IsHighMemSystem() && !yIsStationarySpeed) {
-    yMultiplier += StaticPrefs::APZYSkateHighMemAdjust();
+    yMultiplier += StaticPrefs::apz_y_skate_highmem_adjust();
   }
 
   return aCompositionSize * CSSSize(xMultiplier, yMultiplier);
 }
 
 /**
  * Ensures that the displayport is at least as large as the visible area
  * inflated by the danger zone. If this is not the case then the
  * "AboutToCheckerboard" function in TiledContentClient.cpp will return true
  * even in the stable state.
  */
 static CSSSize ExpandDisplayPortToDangerZone(
     const CSSSize& aDisplayPortSize, const FrameMetrics& aFrameMetrics) {
   CSSSize dangerZone(0.0f, 0.0f);
   if (aFrameMetrics.LayersPixelsPerCSSPixel().xScale != 0 &&
       aFrameMetrics.LayersPixelsPerCSSPixel().yScale != 0) {
-    dangerZone = LayerSize(StaticPrefs::APZDangerZoneX(),
-                           StaticPrefs::APZDangerZoneY()) /
+    dangerZone = LayerSize(StaticPrefs::apz_danger_zone_x(),
+                           StaticPrefs::apz_danger_zone_y()) /
                  aFrameMetrics.LayersPixelsPerCSSPixel();
   }
   const CSSSize compositionSize =
       aFrameMetrics.CalculateBoundedCompositedSizeInCssPixels();
 
   const float xSize = std::max(aDisplayPortSize.width,
                                compositionSize.width + (2 * dangerZone.width));
 
@@ -3754,17 +3760,17 @@ const ScreenMargin AsyncPanZoomControlle
 
   // Calculate the displayport size based on how fast we're moving along each
   // axis.
   CSSSize displayPortSize = CalculateDisplayPortSize(compositionSize, velocity);
 
   displayPortSize =
       ExpandDisplayPortToDangerZone(displayPortSize, aFrameMetrics);
 
-  if (StaticPrefs::APZEnlargeDisplayPortWhenClipped()) {
+  if (StaticPrefs::apz_enlarge_displayport_when_clipped()) {
     RedistributeDisplayPortExcess(displayPortSize, scrollableRect);
   }
 
   // We calculate a "displayport" here which is relative to the scroll offset.
   // Note that the scroll offset we have here in the APZ code may not be the
   // same as the base rect that gets used on the layout side when the
   // displayport margins are actually applied, so it is important to only
   // consider the displayport as margins relative to a scroll offset rather than
@@ -3773,17 +3779,17 @@ const ScreenMargin AsyncPanZoomControlle
   // Center the displayport based on its expansion over the composition size.
   CSSRect displayPort((compositionSize.width - displayPortSize.width) / 2.0f,
                       (compositionSize.height - displayPortSize.height) / 2.0f,
                       displayPortSize.width, displayPortSize.height);
 
   // Offset the displayport, depending on how fast we're moving and the
   // estimated time it takes to paint, to try to minimise checkerboarding.
   float paintFactor = kDefaultEstimatedPaintDurationMs;
-  displayPort.MoveBy(velocity * paintFactor * StaticPrefs::APZVelocityBias());
+  displayPort.MoveBy(velocity * paintFactor * StaticPrefs::apz_velocity_bias());
 
   APZC_LOG_FM(
       aFrameMetrics,
       "Calculated displayport as %s from velocity %s paint time %f metrics",
       Stringify(displayPort).c_str(), ToString(aVelocity).c_str(), paintFactor);
 
   CSSMargin cssMargins;
   cssMargins.left = -displayPort.X();
@@ -3838,17 +3844,17 @@ bool AsyncPanZoomController::SnapBackIfO
     ScrollSnap();
   }
   return false;
 }
 
 bool AsyncPanZoomController::IsFlingingFast() const {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   if (mState == FLING && GetVelocityVector().Length() >
-                             StaticPrefs::APZFlingStopOnTapThreshold()) {
+                             StaticPrefs::apz_fling_stop_on_tap_threshold()) {
     APZC_LOG("%p is moving fast\n", this);
     return true;
   }
   return false;
 }
 
 bool AsyncPanZoomController::IsPannable() const {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
@@ -4201,17 +4207,17 @@ AsyncPanZoomController::GetCurrentAsyncT
   // double applied.
   AutoApplyAsyncTestAttributes testAttributeApplier(this);
 
   // Use the layout viewport to adjust fixed position elements if and only if
   // it's larger than the visual viewport (assuming we're scrolling the RCD-RSF
   // with apz.allow_zooming enabled).
   // FIXME: bug 1525793 -- this may need to handle zooming or not on a
   // per-document basis.
-  return (StaticPrefs::APZAllowZooming() && Metrics().IsRootContent() &&
+  return (StaticPrefs::apz_allow_zooming() && Metrics().IsRootContent() &&
           Metrics().GetVisualViewport().Size() <=
               Metrics().GetLayoutViewport().Size())
              ? GetCurrentAsyncViewportTransform(aMode)
              : GetCurrentAsyncTransform(aMode);
 }
 
 AsyncTransformComponentMatrix
 AsyncPanZoomController::GetCurrentAsyncTransformWithOverscroll(
@@ -4229,33 +4235,33 @@ LayoutDeviceToParentLayerScale AsyncPanZ
   // Note that in general the zoom might have different x- and y-scales.
   // However, this function in particular is only used on the WebRender codepath
   // for which the scales should always be the same.
   return scale.ToScaleFactor() / Metrics().GetDevPixelsPerCSSPixel();
 }
 
 CSSRect AsyncPanZoomController::GetEffectiveLayoutViewport(
     AsyncTransformConsumer aMode) const {
-  if (StaticPrefs::APZFrameDelayEnabled() && aMode == eForCompositing) {
+  if (StaticPrefs::apz_frame_delay_enabled() && aMode == eForCompositing) {
     return mCompositedLayoutViewport;
   }
   return Metrics().GetLayoutViewport();
 }
 
 CSSPoint AsyncPanZoomController::GetEffectiveScrollOffset(
     AsyncTransformConsumer aMode) const {
-  if (StaticPrefs::APZFrameDelayEnabled() && aMode == eForCompositing) {
+  if (StaticPrefs::apz_frame_delay_enabled() && aMode == eForCompositing) {
     return mCompositedScrollOffset;
   }
   return Metrics().GetScrollOffset();
 }
 
 CSSToParentLayerScale2D AsyncPanZoomController::GetEffectiveZoom(
     AsyncTransformConsumer aMode) const {
-  if (StaticPrefs::APZFrameDelayEnabled() && aMode == eForCompositing) {
+  if (StaticPrefs::apz_frame_delay_enabled() && aMode == eForCompositing) {
     return mCompositedZoom;
   }
   return Metrics().GetZoom();
 }
 
 bool AsyncPanZoomController::SampleCompositedAsyncTransform() {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   if (!mCompositedLayoutViewport.IsEqualEdges(Metrics().GetLayoutViewport()) ||
@@ -4341,17 +4347,17 @@ void AsyncPanZoomController::ReportCheck
   if (mLastCheckerboardReport == aSampleTime) {
     // This function will get called multiple times for each APZC on a single
     // composite (once for each layer it is attached to). Only report the
     // checkerboard once per composite though.
     return;
   }
   mLastCheckerboardReport = aSampleTime;
 
-  bool recordTrace = StaticPrefs::APZRecordCheckerboarding();
+  bool recordTrace = StaticPrefs::apz_record_checkerboarding();
   bool forTelemetry = Telemetry::CanRecordExtended();
   uint32_t magnitude = GetCheckerboardMagnitude();
 
   MutexAutoLock lock(mCheckerboardEventLock);
   if (!mCheckerboardEvent && (recordTrace || forTelemetry)) {
     mCheckerboardEvent = MakeUnique<CheckerboardEvent>(recordTrace);
   }
   mPotentialCheckerboardTracker.InTransform(IsTransformingState(mState));
@@ -4370,17 +4376,17 @@ void AsyncPanZoomController::UpdateCheck
     mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK,
                                    mCheckerboardEvent->GetPeak());
     mozilla::Telemetry::Accumulate(
         mozilla::Telemetry::CHECKERBOARD_DURATION,
         (uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds());
 
     mPotentialCheckerboardTracker.CheckerboardDone();
 
-    if (StaticPrefs::APZRecordCheckerboarding()) {
+    if (StaticPrefs::apz_record_checkerboarding()) {
       // if the pref is enabled, also send it to the storage class. it may be
       // chosen for public display on about:checkerboard, the hall of fame for
       // checkerboard events.
       uint32_t severity = mCheckerboardEvent->GetSeverity();
       std::string log = mCheckerboardEvent->GetLog();
       CheckerboardEventStorage::Report(severity, log);
     }
     mCheckerboardEvent = nullptr;
@@ -4680,17 +4686,18 @@ void AsyncPanZoomController::NotifyLayer
       // Send an acknowledgement with the new scroll generation so that any
       // repaint requests later in this function go through.
       // Because of the scroll generation update, any inflight paint requests
       // are going to be ignored by layout, and so mExpectedGeckoMetrics becomes
       // incorrect for the purposes of calculating the LD transform. To correct
       // this we need to update mExpectedGeckoMetrics to be the last thing we
       // know was painted by Gecko.
       Maybe<CSSPoint> relativeDelta;
-      if (StaticPrefs::APZRelativeUpdate() && aLayerMetrics.IsRelative()) {
+      if (StaticPrefs::apz_relative_update_enabled() &&
+          aLayerMetrics.IsRelative()) {
         APZC_LOG("%p relative updating scroll offset from %s by %s\n", this,
                  ToString(Metrics().GetScrollOffset()).c_str(),
                  ToString(aLayerMetrics.GetScrollOffset() -
                           aLayerMetrics.GetBaseScrollOffset())
                      .c_str());
 
         // It's possible that the main thread has ignored an APZ scroll offset
         // update for the pending relative scroll that we have just received.
@@ -4755,17 +4762,18 @@ void AsyncPanZoomController::NotifyLayer
     // the scroll update acknowledgement.
 
     APZC_LOG("%p smooth scrolling from %s to %s in state %d\n", this,
              Stringify(Metrics().GetScrollOffset()).c_str(),
              Stringify(aLayerMetrics.GetSmoothScrollOffset()).c_str(), mState);
 
     // See comment on the similar code in the |if (scrollOffsetUpdated)| block
     // above.
-    if (StaticPrefs::APZRelativeUpdate() && aLayerMetrics.IsRelative()) {
+    if (StaticPrefs::apz_relative_update_enabled() &&
+        aLayerMetrics.IsRelative()) {
       Metrics().ApplyRelativeSmoothScrollUpdateFrom(aLayerMetrics);
     } else {
       Metrics().ApplySmoothScrollUpdateFrom(aLayerMetrics);
     }
     needContentRepaint = true;
     mExpectedGeckoMetrics = aLayerMetrics;
 
     SmoothScrollTo(Metrics().GetSmoothScrollOffset());
@@ -5292,17 +5300,17 @@ void AsyncPanZoomController::ScrollSnapN
 void AsyncPanZoomController::ScrollSnap() {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   ScrollSnapNear(Metrics().GetScrollOffset());
 }
 
 void AsyncPanZoomController::ScrollSnapToDestination() {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
 
-  float friction = StaticPrefs::APZFlingFriction();
+  float friction = StaticPrefs::apz_fling_friction();
   ParentLayerPoint velocity(mX.GetVelocity(), mY.GetVelocity());
   ParentLayerPoint predictedDelta;
   // "-velocity / log(1.0 - friction)" is the integral of the deceleration
   // curve modeled for flings in the "Axis" class.
   if (velocity.x != 0.0f) {
     predictedDelta.x = -velocity.x / log(1.0 - friction);
   }
   if (velocity.y != 0.0f) {
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -1157,19 +1157,19 @@ class AsyncPanZoomController {
   /**
    * Samples the composited async transform, making the result of
    * |GetCurrentAsyncTransform(eForCompositing)| and similar functions reflect
    * the async scroll offset and zoom stored in |Metrics()|.
    *
    * Returns true if the newly sampled value is different from the previously
    * sampled value.
    *
-   * (This is only relevant when |StaticPrefs::APZFrameDelayEnabled() == true|.
-   * Otherwise, GetCurrentAsyncTransform() always reflects what's stored in
-   * |Metrics()| immediately, without any delay.)
+   * (This is only relevant when StaticPrefs::apz_frame_delay_enabled() is
+   * true. Otherwise, GetCurrentAsyncTransform() always reflects what's stored
+   * in |Metrics()| immediately, without any delay.)
    */
   bool SampleCompositedAsyncTransform();
 
   /**
    * Returns the incremental transformation corresponding to the async
    * panning/zooming of the layout viewport (unlike GetCurrentAsyncTransform,
    * which deals with async movement of the visual viewport). That is, when
    * this transform is multiplied with the layer's existing transform, it will
--- a/gfx/layers/apz/src/DesktopFlingPhysics.h
+++ b/gfx/layers/apz/src/DesktopFlingPhysics.h
@@ -20,18 +20,18 @@ namespace layers {
 class DesktopFlingPhysics {
  public:
   void Init(const ParentLayerPoint& aStartingVelocity,
             float aPLPPI /* unused */) {
     mVelocity = aStartingVelocity;
   }
   void Sample(const TimeDuration& aDelta, ParentLayerPoint* aOutVelocity,
               ParentLayerPoint* aOutOffset) {
-    float friction = StaticPrefs::APZFlingFriction();
-    float threshold = StaticPrefs::APZFlingStoppedThreshold();
+    float friction = StaticPrefs::apz_fling_friction();
+    float threshold = StaticPrefs::apz_fling_stopped_threshold();
 
     mVelocity = ParentLayerPoint(
         ApplyFrictionOrCancel(mVelocity.x, aDelta, friction, threshold),
         ApplyFrictionOrCancel(mVelocity.y, aDelta, friction, threshold));
 
     *aOutVelocity = mVelocity;
     *aOutOffset = mVelocity * aDelta.ToMilliseconds();
   }
--- a/gfx/layers/apz/src/FocusTarget.cpp
+++ b/gfx/layers/apz/src/FocusTarget.cpp
@@ -133,17 +133,17 @@ FocusTarget::FocusTarget(PresShell* aRoo
   // If there is no focused element then event dispatch goes to the body of
   // the page if it exists or the root element.
   if (!keyEventTarget) {
     keyEventTarget = document->GetUnfocusedKeyEventTarget();
   }
 
   // Check if there are key event listeners that could prevent default or change
   // the focus or selection of the page.
-  if (StaticPrefs::APZKeyboardPassiveListeners()) {
+  if (StaticPrefs::apz_keyboard_passive_listeners()) {
     mFocusHasKeyEventListeners =
         HasListenersForNonPassiveKeyEvents(keyEventTarget.get());
   } else {
     mFocusHasKeyEventListeners = HasListenersForKeyEvents(keyEventTarget.get());
   }
 
   // Check if the key event target is content editable or if the document
   // is in design mode.
--- a/gfx/layers/apz/src/GenericFlingAnimation.h
+++ b/gfx/layers/apz/src/GenericFlingAnimation.h
@@ -89,18 +89,18 @@ class GenericFlingAnimation : public Asy
     // y-fling to get accelerated. Note that the acceleration code is only
     // applied on the APZC that initiates the fling; the accelerated velocities
     // are then handed off using the normal DispatchFling codepath. Acceleration
     // is only applied in the APZC that originated the fling, not in APZCs
     // further down the handoff chain during handoff.
     bool applyAcceleration = !aFlingIsHandedOff;
     if (applyAcceleration && !mApzc.mLastFlingTime.IsNull() &&
         (now - mApzc.mLastFlingTime).ToMilliseconds() <
-            StaticPrefs::APZFlingAccelInterval() &&
-        velocity.Length() >= StaticPrefs::APZFlingAccelMinVelocity()) {
+            StaticPrefs::apz_fling_accel_interval_ms() &&
+        velocity.Length() >= StaticPrefs::apz_fling_accel_min_velocity()) {
       if (velocity.x != 0 &&
           SameDirection(velocity.x, mApzc.mLastFlingVelocity.x)) {
         velocity.x = Accelerate(velocity.x, mApzc.mLastFlingVelocity.x);
         FLING_LOG("%p Applying fling x-acceleration from %f to %f (delta %f)\n",
                   &mApzc, mApzc.mX.GetVelocity(), velocity.x,
                   mApzc.mLastFlingVelocity.x);
         mApzc.mX.SetVelocity(velocity.x);
       }
@@ -215,18 +215,18 @@ class GenericFlingAnimation : public Asy
 
  private:
   static bool SameDirection(float aVelocity1, float aVelocity2) {
     return (aVelocity1 == 0.0f) || (aVelocity2 == 0.0f) ||
            (IsNegative(aVelocity1) == IsNegative(aVelocity2));
   }
 
   static float Accelerate(float aBase, float aSupplemental) {
-    return (aBase * StaticPrefs::APZFlingAccelBaseMultiplier()) +
-           (aSupplemental * StaticPrefs::APZFlingAccelSupplementalMultiplier());
+    return (aBase * StaticPrefs::apz_fling_accel_base_mult()) +
+           (aSupplemental * StaticPrefs::apz_fling_accel_supplemental_mult());
   }
 
   AsyncPanZoomController& mApzc;
   RefPtr<const OverscrollHandoffChain> mOverscrollHandoffChain;
   RefPtr<const AsyncPanZoomController> mScrolledApzc;
 };
 
 }  // namespace layers
--- a/gfx/layers/apz/src/GestureEventListener.cpp
+++ b/gfx/layers/apz/src/GestureEventListener.cpp
@@ -286,23 +286,23 @@ nsEventStatus GestureEventListener::Hand
         mSingleTapSent = Nothing();
         SetState(GESTURE_NONE);
       }
       break;
     }
 
     // The user has performed a double tap, but not lifted her finger.
     case GESTURE_SECOND_SINGLE_TOUCH_DOWN: {
-      // If touch has moved noticeably (within StaticPrefs::APZMaxTapTime()),
+      // If touch has moved noticeably (within StaticPrefs::apz_max_tap_time()),
       // change state.
       if (MoveDistanceIsLarge()) {
         CancelLongTapTimeoutTask();
         CancelMaxTapTimeoutTask();
         mSingleTapSent = Nothing();
-        if (!StaticPrefs::APZOneTouchPinchEnabled()) {
+        if (!StaticPrefs::apz_one_touch_pinch_enabled()) {
           // If the one-touch-pinch feature is disabled, bail out of the double-
           // tap gesture instead.
           SetState(GESTURE_NONE);
           break;
         }
 
         SetState(GESTURE_ONE_TOUCH_PINCH);
 
@@ -624,13 +624,13 @@ void GestureEventListener::CreateMaxTapT
   MOZ_ASSERT(block);
   RefPtr<CancelableRunnable> task = NewCancelableRunnableMethod<bool>(
       "layers::GestureEventListener::HandleInputTimeoutMaxTap", this,
       &GestureEventListener::HandleInputTimeoutMaxTap,
       block->IsDuringFastFling());
 
   mMaxTapTimeoutTask = task;
   mAsyncPanZoomController->PostDelayedTask(task.forget(),
-                                           StaticPrefs::APZMaxTapTime());
+                                           StaticPrefs::apz_max_tap_time());
 }
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/apz/src/InputBlockState.cpp
+++ b/gfx/layers/apz/src/InputBlockState.cpp
@@ -145,17 +145,17 @@ bool InputBlockState::IsDownchainOf(Asyn
       seenA = true;
     }
   }
   return false;
 }
 
 void InputBlockState::SetScrolledApzc(AsyncPanZoomController* aApzc) {
   // An input block should only have one scrolled APZC.
-  MOZ_ASSERT(!mScrolledApzc || (StaticPrefs::APZAllowImmediateHandoff()
+  MOZ_ASSERT(!mScrolledApzc || (StaticPrefs::apz_allow_immediate_handoff()
                                     ? IsDownchainOf(mScrolledApzc, aApzc)
                                     : mScrolledApzc == aApzc));
 
   mScrolledApzc = aApzc;
 }
 
 AsyncPanZoomController* InputBlockState::GetScrolledApzc() const {
   return mScrolledApzc;
@@ -778,18 +778,18 @@ Maybe<ScrollDirection> TouchBlockState::
       aInput.mTouches.Length() != 1) {
     return Nothing();
   }
   ScreenPoint vector = aInput.mTouches[0].mScreenPoint - mSlopOrigin;
   double angle = atan2(vector.y, vector.x);  // range [-pi, pi]
   angle = fabs(angle);                       // range [0, pi]
 
   double angleThreshold = TouchActionAllowsPanningXY()
-                              ? StaticPrefs::APZAxisLockAngle()
-                              : StaticPrefs::APZAllowedDirectPanAngle();
+                              ? StaticPrefs::apz_axis_lock_lock_angle()
+                              : StaticPrefs::apz_axis_lock_direct_pan_angle();
   if (apz::IsCloseToHorizontal(angle, angleThreshold)) {
     return Some(ScrollDirection::eHorizontal);
   }
   if (apz::IsCloseToVertical(angle, angleThreshold)) {
     return Some(ScrollDirection::eVertical);
   }
   return Nothing();
 }
--- a/gfx/layers/apz/src/InputBlockState.h
+++ b/gfx/layers/apz/src/InputBlockState.h
@@ -103,17 +103,17 @@ class InputBlockState : public RefCounte
   RefPtr<AsyncPanZoomController> mTargetApzc;
   TargetConfirmationState mTargetConfirmed;
   bool mRequiresTargetConfirmation;
   const uint64_t mBlockId;
 
   // The APZC that was actually scrolled by events in this input block.
   // This is used in configurations where a single input block is only
   // allowed to scroll a single APZC (configurations where
-  // StaticPrefs::APZAllowImmediateHandoff() is false). Set the first time an
+  // StaticPrefs::apz_allow_immediate_handoff() is false). Set the first time an
   // input event in this block scrolls an APZC.
   RefPtr<AsyncPanZoomController> mScrolledApzc;
 
  protected:
   RefPtr<const OverscrollHandoffChain> mOverscrollHandoffChain;
 
   // Used to transform events from global screen space to |mTargetApzc|'s
   // screen space. It's cached at the beginning of the input block so that
--- a/gfx/layers/apz/src/InputQueue.cpp
+++ b/gfx/layers/apz/src/InputQueue.cpp
@@ -314,17 +314,17 @@ nsEventStatus InputQueue::ReceiveKeyboar
   }
 
   mQueuedInputs.AppendElement(MakeUnique<QueuedInput>(aEvent, *block));
 
   ProcessQueue();
 
   // If APZ is allowing passive listeners then we must dispatch the event to
   // content, otherwise we can consume the event.
-  return StaticPrefs::APZKeyboardPassiveListeners()
+  return StaticPrefs::apz_keyboard_passive_listeners()
              ? nsEventStatus_eConsumeDoDefault
              : nsEventStatus_eConsumeNoDefault;
 }
 
 static bool CanScrollTargetHorizontally(const PanGestureInput& aInitialEvent,
                                         PanGestureBlockState* aBlock) {
   PanGestureInput horizontalComponent = aInitialEvent;
   horizontalComponent.mPanDisplacement.y = 0;
@@ -547,17 +547,17 @@ bool InputQueue::IsDragOnScrollbar(bool 
 void InputQueue::ScheduleMainThreadTimeout(
     const RefPtr<AsyncPanZoomController>& aTarget,
     CancelableBlockState* aBlock) {
   INPQ_LOG("scheduling main thread timeout for target %p\n", aTarget.get());
   aBlock->StartContentResponseTimer();
   RefPtr<Runnable> timeoutTask = NewRunnableMethod<uint64_t>(
       "layers::InputQueue::MainThreadTimeout", this,
       &InputQueue::MainThreadTimeout, aBlock->GetBlockId());
-  int32_t timeout = StaticPrefs::APZContentResponseTimeout();
+  int32_t timeout = StaticPrefs::apz_content_response_timeout();
   if (timeout == 0) {
     // If the timeout is zero, treat it as a request to ignore any main
     // thread confirmation and unconditionally use fallback behaviour for
     // when a timeout is reached. This codepath is used by tests that
     // want to exercise the fallback behaviour.
     // To ensure the fallback behaviour is used unconditionally, the timeout
     // is run right away instead of using PostDelayedTask(). However,
     // we can't run it right here, because MainThreadTimeout() expects that
--- a/gfx/layers/apz/src/SimpleVelocityTracker.cpp
+++ b/gfx/layers/apz/src/SimpleVelocityTracker.cpp
@@ -81,51 +81,53 @@ float SimpleVelocityTracker::HandleDynam
   return velocity;
 }
 
 Maybe<float> SimpleVelocityTracker::ComputeVelocity(uint32_t aTimestampMs) {
   float velocity = 0;
   int count = 0;
   for (const auto& e : mVelocityQueue) {
     uint32_t timeDelta = (aTimestampMs - e.first);
-    if (timeDelta < StaticPrefs::APZVelocityRelevanceTime()) {
+    if (timeDelta < StaticPrefs::apz_velocity_relevance_time_ms()) {
       count++;
       velocity += e.second;
     }
   }
   mVelocityQueue.Clear();
   if (count > 1) {
     velocity /= count;
   }
   return Some(velocity);
 }
 
 void SimpleVelocityTracker::Clear() { mVelocityQueue.Clear(); }
 
 void SimpleVelocityTracker::AddVelocityToQueue(uint32_t aTimestampMs,
                                                float aVelocity) {
   mVelocityQueue.AppendElement(std::make_pair(aTimestampMs, aVelocity));
-  if (mVelocityQueue.Length() > StaticPrefs::APZMaxVelocityQueueSize()) {
+  if (mVelocityQueue.Length() > StaticPrefs::apz_max_velocity_queue_size()) {
     mVelocityQueue.RemoveElementAt(0);
   }
 }
 
 float SimpleVelocityTracker::ApplyFlingCurveToVelocity(float aVelocity) const {
   float newVelocity = aVelocity;
-  if (StaticPrefs::APZMaxVelocity() > 0.0f) {
+  if (StaticPrefs::apz_max_velocity_inches_per_ms() > 0.0f) {
     bool velocityIsNegative = (newVelocity < 0);
     newVelocity = fabs(newVelocity);
 
-    float maxVelocity = mAxis->ToLocalVelocity(StaticPrefs::APZMaxVelocity());
+    float maxVelocity =
+        mAxis->ToLocalVelocity(StaticPrefs::apz_max_velocity_inches_per_ms());
     newVelocity = std::min(newVelocity, maxVelocity);
 
-    if (StaticPrefs::APZCurveThreshold() > 0.0f &&
-        StaticPrefs::APZCurveThreshold() < StaticPrefs::APZMaxVelocity()) {
-      float curveThreshold =
-          mAxis->ToLocalVelocity(StaticPrefs::APZCurveThreshold());
+    if (StaticPrefs::apz_fling_curve_threshold_inches_per_ms() > 0.0f &&
+        StaticPrefs::apz_fling_curve_threshold_inches_per_ms() <
+            StaticPrefs::apz_max_velocity_inches_per_ms()) {
+      float curveThreshold = mAxis->ToLocalVelocity(
+          StaticPrefs::apz_fling_curve_threshold_inches_per_ms());
       if (newVelocity > curveThreshold) {
         // here, 0 < curveThreshold < newVelocity <= maxVelocity, so we apply
         // the curve
         float scale = maxVelocity - curveThreshold;
         float funcInput = (newVelocity - curveThreshold) / scale;
         float funcOutput = gVelocityCurveFunction->GetValue(
             funcInput, ComputedTimingFunction::BeforeFlag::Unset);
         float curvedVelocity = (funcOutput * scale) + curveThreshold;
--- a/gfx/layers/apz/test/gtest/TestPinching.cpp
+++ b/gfx/layers/apz/test/gtest/TestPinching.cpp
@@ -156,47 +156,50 @@ class APZCPinchLockingTester : public AP
         CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_START, mFocus,
                                 mSpan, mSpan, mcc->Time()),
         nullptr);
     mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
   }
 
   void twoFingerPan() {
     ScreenCoord panDistance =
-        StaticPrefs::APZPinchLockScrollLockThreshold() * 1.2 * tm->GetDPI();
+        StaticPrefs::apz_pinch_lock_scroll_lock_threshold() * 1.2 *
+        tm->GetDPI();
 
     mFocus = ScreenIntPoint((int)(mFocus.x + panDistance), (int)(mFocus.y));
 
     apzc->ReceiveInputEvent(
         CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE, mFocus,
                                 mSpan, mSpan, mcc->Time()),
         nullptr);
     mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
   }
 
   void twoFingerZoom() {
     float pinchDistance =
-        StaticPrefs::APZPinchLockSpanBreakoutThreshold() * 1.2 * tm->GetDPI();
+        StaticPrefs::apz_pinch_lock_span_breakout_threshold() * 1.2 *
+        tm->GetDPI();
 
     float newSpan = mSpan + pinchDistance;
 
     apzc->ReceiveInputEvent(
         CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE, mFocus,
                                 newSpan, mSpan, mcc->Time()),
         nullptr);
     mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
     mSpan = newSpan;
   }
 
   bool isPinchLockActive() {
     FrameMetrics originalMetrics = apzc->GetFrameMetrics();
 
     // Send a small scale input to the APZC
     float pinchDistance =
-        StaticPrefs::APZPinchLockSpanBreakoutThreshold() * 0.8 * tm->GetDPI();
+        StaticPrefs::apz_pinch_lock_span_breakout_threshold() * 0.8 *
+        tm->GetDPI();
     apzc->ReceiveInputEvent(
         CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE, mFocus,
                                 mSpan + pinchDistance, mSpan, mcc->Time()),
         nullptr);
 
     FrameMetrics result = apzc->GetFrameMetrics();
     bool lockActive =
         originalMetrics.GetZoom() == result.GetZoom() &&
@@ -247,32 +250,32 @@ TEST_F(APZCPinchGestureDetectorTester,
 
 TEST_F(APZCPinchGestureDetectorTester,
        Pinch_UseGestureDetector_TouchActionNone_NoAPZZoom) {
   SCOPED_GFX_PREF_BOOL("layout.css.touch_action.enabled", true);
   SCOPED_GFX_PREF_BOOL("apz.allow_zooming", false);
 
   // Since we are preventing the pinch action via touch-action we should not be
   // sending the pinch gesture notifications that would normally be sent when
-  // APZAllowZooming is false.
+  // apz_allow_zooming is false.
   EXPECT_CALL(*mcc, NotifyPinchGesture(_, _, _, _)).Times(0);
   nsTArray<uint32_t> behaviors = {mozilla::layers::AllowedTouchBehavior::NONE,
                                   mozilla::layers::AllowedTouchBehavior::NONE};
   DoPinchTest(false, &behaviors);
 }
 
 TEST_F(APZCPinchGestureDetectorTester, Pinch_PreventDefault) {
   DoPinchWithPreventDefaultTest();
 }
 
 TEST_F(APZCPinchGestureDetectorTester, Pinch_PreventDefault_NoAPZZoom) {
   SCOPED_GFX_PREF_BOOL("apz.allow_zooming", false);
 
   // Since we are preventing the pinch action we should not be sending the pinch
-  // gesture notifications that would normally be sent when APZAllowZooming is
+  // gesture notifications that would normally be sent when apz_allow_zooming is
   // false.
   EXPECT_CALL(*mcc, NotifyPinchGesture(_, _, _, _)).Times(0);
 
   DoPinchWithPreventDefaultTest();
 }
 
 TEST_F(APZCPinchGestureDetectorTester, Panning_TwoFingerFling_ZoomDisabled) {
   SCOPED_GFX_PREF_FLOAT("apz.fling_min_velocity_threshold", 0.0f);
@@ -430,21 +433,21 @@ TEST_F(APZCPinchTester, Panning_Beyond_L
 }
 
 TEST_F(APZCPinchGestureDetectorTester, Pinch_APZZoom_Disabled) {
   SCOPED_GFX_PREF_BOOL("apz.allow_zooming", false);
 
   FrameMetrics originalMetrics = GetPinchableFrameMetrics();
   apzc->SetFrameMetrics(originalMetrics);
 
-  // When APZAllowZooming is false, the ZoomConstraintsClient produces
+  // When apz_allow_zooming is false, the ZoomConstraintsClient produces
   // ZoomConstraints with mAllowZoom set to false.
   MakeApzcUnzoomable();
 
-  // With APZAllowZooming false, we expect the NotifyPinchGesture function to
+  // With apz_allow_zooming false, we expect the NotifyPinchGesture function to
   // get called as the pinch progresses, but the metrics shouldn't change.
   EXPECT_CALL(*mcc,
               NotifyPinchGesture(PinchGestureInput::PINCHGESTURE_START,
                                  apzc->GetGuid(), LayoutDeviceCoord(0), _))
       .Times(1);
   EXPECT_CALL(*mcc, NotifyPinchGesture(PinchGestureInput::PINCHGESTURE_SCALE,
                                        apzc->GetGuid(), _, _))
       .Times(AtLeast(1));
@@ -469,21 +472,21 @@ TEST_F(APZCPinchGestureDetectorTester, P
 
 TEST_F(APZCPinchGestureDetectorTester, Pinch_NoSpan) {
   SCOPED_GFX_PREF_BOOL("apz.allow_zooming", false);
   SCOPED_GFX_PREF_BOOL("layout.css.touch_action.enabled", false);
 
   FrameMetrics originalMetrics = GetPinchableFrameMetrics();
   apzc->SetFrameMetrics(originalMetrics);
 
-  // When APZAllowZooming is false, the ZoomConstraintsClient produces
+  // When apz_allow_zooming is false, the ZoomConstraintsClient produces
   // ZoomConstraints with mAllowZoom set to false.
   MakeApzcUnzoomable();
 
-  // With APZAllowZooming false, we expect the NotifyPinchGesture function to
+  // With apz_allow_zooming false, we expect the NotifyPinchGesture function to
   // get called as the pinch progresses, but the metrics shouldn't change.
   EXPECT_CALL(*mcc,
               NotifyPinchGesture(PinchGestureInput::PINCHGESTURE_START,
                                  apzc->GetGuid(), LayoutDeviceCoord(0), _))
       .Times(1);
   EXPECT_CALL(*mcc, NotifyPinchGesture(PinchGestureInput::PINCHGESTURE_SCALE,
                                        apzc->GetGuid(), _, _))
       .Times(AtLeast(1));
--- a/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp
+++ b/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp
@@ -519,16 +519,17 @@ TEST_F(APZScrollHandoffTester, Scrollgra
 
   // Check that the parent and child have scrolled as much as we expect.
   EXPECT_EQ(20, rootApzc->GetFrameMetrics().GetScrollOffset().y);
   EXPECT_EQ(15, childApzc->GetFrameMetrics().GetScrollOffset().y);
 }
 
 TEST_F(APZScrollHandoffTester, ScrollgrabFling) {
   SCOPED_GFX_PREF_FLOAT("apz.fling_min_velocity_threshold", 0.0f);
+
   // Set up the layer tree
   CreateScrollgrabLayerTree();
 
   RefPtr<TestAsyncPanZoomController> childApzc = ApzcOf(layers[1]);
 
   // Pan on the child, not enough to fully scroll the scrollgrab parent.
   Pan(childApzc, 80, 70);
 
--- a/gfx/layers/apz/util/CheckerboardReportService.cpp
+++ b/gfx/layers/apz/util/CheckerboardReportService.cpp
@@ -186,17 +186,17 @@ void CheckerboardReportService::GetRepor
     nsTArray<dom::CheckerboardReport>& aOutReports) {
   RefPtr<mozilla::layers::CheckerboardEventStorage> instance =
       mozilla::layers::CheckerboardEventStorage::GetInstance();
   MOZ_ASSERT(instance);
   instance->GetReports(aOutReports);
 }
 
 bool CheckerboardReportService::IsRecordingEnabled() const {
-  return StaticPrefs::APZRecordCheckerboarding();
+  return StaticPrefs::apz_record_checkerboarding();
 }
 
 void CheckerboardReportService::SetRecordingEnabled(bool aEnabled) {
   Preferences::SetBool("apz.record_checkerboarding", aEnabled);
 }
 
 void CheckerboardReportService::FlushActiveReports() {
   MOZ_ASSERT(XRE_IsParentProcess());
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -224,19 +224,19 @@ bool SharedFrameMetricsHelper::AboutToCh
                     aContentMetrics.GetScrollOffset();
   painted.Inflate(CSSMargin::FromAppUnits(nsMargin(1, 1, 1, 1)));
 
   // Inflate the rect by the danger zone. See the description of the danger zone
   // prefs in AsyncPanZoomController.cpp for an explanation of this.
   CSSRect showing =
       CSSRect(aCompositorMetrics.GetScrollOffset(),
               aCompositorMetrics.CalculateBoundedCompositedSizeInCssPixels());
-  showing.Inflate(
-      LayerSize(StaticPrefs::APZDangerZoneX(), StaticPrefs::APZDangerZoneY()) /
-      aCompositorMetrics.LayersPixelsPerCSSPixel());
+  showing.Inflate(LayerSize(StaticPrefs::apz_danger_zone_x(),
+                            StaticPrefs::apz_danger_zone_y()) /
+                  aCompositorMetrics.LayersPixelsPerCSSPixel());
 
   // Clamp both rects to the scrollable rect, because having either of those
   // exceed the scrollable rect doesn't make sense, and could lead to false
   // positives.
   painted = painted.Intersect(aContentMetrics.GetScrollableRect());
   showing = showing.Intersect(aContentMetrics.GetScrollableRect());
 
   if (!painted.Contains(showing)) {
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -1482,18 +1482,18 @@ bool AsyncCompositionManager::TransformS
 #if defined(MOZ_WIDGET_ANDROID)
 void AsyncCompositionManager::SetFixedLayerMargins(ScreenIntCoord aTop,
                                                    ScreenIntCoord aBottom) {
   mFixedLayerMargins.top = aTop;
   mFixedLayerMargins.bottom = aBottom;
 }
 ScreenMargin AsyncCompositionManager::GetFixedLayerMargins() const {
   ScreenMargin result = mFixedLayerMargins;
-  if (StaticPrefs::APZFixedMarginOverrideEnabled()) {
-    result.top = StaticPrefs::APZFixedMarginOverrideTop();
-    result.bottom = StaticPrefs::APZFixedMarginOverrideBottom();
+  if (StaticPrefs::apz_fixed_margin_override_enabled()) {
+    result.top = StaticPrefs::apz_fixed_margin_override_top();
+    result.bottom = StaticPrefs::apz_fixed_margin_override_bottom();
   }
   return result;
 }
 #endif  // defined(MOZ_WIDGET_ANDROID)
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -504,17 +504,17 @@ void RenderLayers(ContainerT* aContainer
               asyncTransform * aContainer->GetEffectiveTransform());
           asyncTransform =
               sampler->GetCurrentAsyncTransformWithOverscroll(wrapper)
                   .ToUnknownMatrix() *
               asyncTransform;
         }
       }
 
-      if (StaticPrefs::APZMinimap()) {
+      if (StaticPrefs::apz_minimap_enabled()) {
         RenderMinimap(aContainer, sampler, aManager, aClipRect, layer);
       }
     }
 
     // invariant: our GL context should be current here, I don't think we can
     // assert it though
   }
 }
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -3227,17 +3227,17 @@ void gfxPlatform::GetApzSupportInfo(mozi
     aObj.DefineProperty("ApzTouchInput", 1);
   }
 
   if (SupportsApzDragInput()) {
     aObj.DefineProperty("ApzDragInput", 1);
   }
 
   if (SupportsApzKeyboardInput() &&
-      !StaticPrefs::AccessibilityBrowseWithCaret()) {
+      !StaticPrefs::accessibility_browsewithcaret()) {
     aObj.DefineProperty("ApzKeyboardInput", 1);
   }
 
   if (SupportsApzAutoscrolling()) {
     aObj.DefineProperty("ApzAutoscrollInput", 1);
   }
 }
 
@@ -3472,25 +3472,25 @@ void gfxPlatform::ImportGPUDeviceData(
   gfxConfig::ImportChange(Feature::ADVANCED_LAYERS, aData.advancedLayers());
 }
 
 bool gfxPlatform::SupportsApzTouchInput() const {
   return dom::TouchEvent::PrefEnabled(nullptr);
 }
 
 bool gfxPlatform::SupportsApzDragInput() const {
-  return StaticPrefs::APZDragEnabled();
+  return StaticPrefs::apz_drag_enabled();
 }
 
 bool gfxPlatform::SupportsApzKeyboardInput() const {
-  return StaticPrefs::APZKeyboardEnabled();
+  return StaticPrefs::apz_keyboard_enabled();
 }
 
 bool gfxPlatform::SupportsApzAutoscrolling() const {
-  return StaticPrefs::APZAutoscrollEnabled();
+  return StaticPrefs::apz_autoscroll_enabled();
 }
 
 void gfxPlatform::InitOpenGLConfig() {
 #ifdef XP_WIN
   // Don't enable by default on Windows, since it could show up in about:support
   // even though it'll never get used. Only attempt if user enables the pref
   if (!Preferences::GetBool("layers.prefer-opengl")) {
     return;
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -6003,17 +6003,17 @@ void PresShell::Paint(nsView* aViewToPai
   NS_ASSERTION(aViewToPaint, "null view");
 
   MOZ_ASSERT(!mApproximateFrameVisibilityVisited, "Should have been cleared");
 
   if (!mIsActive) {
     return;
   }
 
-  if (StaticPrefs::APZKeyboardEnabled()) {
+  if (StaticPrefs::apz_keyboard_enabled()) {
     // Update the focus target for async keyboard scrolling. This will be
     // forwarded to APZ by nsDisplayList::PaintRoot. We need to to do this
     // before we enter the paint phase because dispatching eVoid events can
     // cause layout to happen.
     mAPZFocusTarget = FocusTarget(this, mAPZFocusSequenceNumber);
   }
 
   nsPresContext* presContext = GetPresContext();
--- a/layout/base/ZoomConstraintsClient.cpp
+++ b/layout/base/ZoomConstraintsClient.cpp
@@ -168,17 +168,17 @@ void ZoomConstraintsClient::ScreenSizeCh
 }
 
 static mozilla::layers::ZoomConstraints ComputeZoomConstraintsFromViewportInfo(
     const nsViewportInfo& aViewportInfo, Document* aDocument) {
   mozilla::layers::ZoomConstraints constraints;
   constraints.mAllowZoom = aViewportInfo.IsZoomAllowed() &&
                            nsLayoutUtils::AllowZoomingForDocument(aDocument);
   constraints.mAllowDoubleTapZoom =
-      constraints.mAllowZoom && StaticPrefs::APZAllowDoubleTapZooming();
+      constraints.mAllowZoom && StaticPrefs::apz_allow_double_tap_zooming();
   if (constraints.mAllowZoom) {
     constraints.mMinZoom.scale = aViewportInfo.GetMinZoom().scale;
     constraints.mMaxZoom.scale = aViewportInfo.GetMaxZoom().scale;
   } else {
     constraints.mMinZoom.scale = aViewportInfo.GetDefaultZoom().scale;
     constraints.mMaxZoom.scale = aViewportInfo.GetDefaultZoom().scale;
   }
   return constraints;
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -753,17 +753,17 @@ bool nsLayoutUtils::AsyncPanZoomEnabled(
   return widget->AsyncPanZoomEnabled();
 }
 
 bool nsLayoutUtils::AllowZoomingForDocument(
     const mozilla::dom::Document* aDocument) {
   // True if we allow zooming for all documents on this platform, or if we are
   // in RDM and handling meta viewports, which force zoom under some
   // circumstances.
-  return StaticPrefs::APZAllowZooming() ||
+  return StaticPrefs::apz_allow_zooming() ||
          (aDocument && aDocument->InRDMPane() &&
           nsLayoutUtils::ShouldHandleMetaViewport(aDocument));
 }
 
 float nsLayoutUtils::GetCurrentAPZResolutionScale(PresShell* aPresShell) {
   return aPresShell ? aPresShell->GetCumulativeNonRootScaleResolution() : 1.0;
 }
 
@@ -1045,17 +1045,17 @@ bool nsLayoutUtils::ShouldDisableApzForE
         return true;
       }
     }
   }
 
   if (!doc) {
     return false;
   }
-  return StaticPrefs::APZDisableForScrollLinkedEffects() &&
+  return StaticPrefs::apz_disable_for_scroll_linked_effects() &&
          doc->HasScrollLinkedEffect();
 }
 
 static bool GetDisplayPortData(
     nsIContent* aContent, DisplayPortPropertyData** aOutRectData,
     DisplayPortMarginsPropertyData** aOutMarginsData) {
   MOZ_ASSERT(aOutRectData && aOutMarginsData);
 
@@ -9248,17 +9248,17 @@ ScrollMetadata nsLayoutUtils::ComputeScr
   frameBounds.Deflate(boundMargins);
 
   metrics.SetCompositionBounds(frameBounds);
 
   metrics.SetRootCompositionSize(nsLayoutUtils::CalculateRootCompositionSize(
       aScrollFrame ? aScrollFrame : aForFrame, isRootContentDocRootScrollFrame,
       metrics));
 
-  if (StaticPrefs::APZPrintTree() || StaticPrefs::apz_test_logging_enabled()) {
+  if (StaticPrefs::apz_printtree() || StaticPrefs::apz_test_logging_enabled()) {
     if (nsIContent* content =
             frameForCompositionBoundsCalculation->GetContent()) {
       nsAutoString contentDescription;
       if (content->IsElement()) {
         content->AsElement()->Describe(contentDescription);
       } else {
         contentDescription.AssignLiteral("(not an element)");
       }
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1861,17 +1861,17 @@ void nsRefreshDriver::Tick(VsyncId aId, 
   mTickVsyncId = aId;
   mTickVsyncTime = aNowTime;
 
   gfxPlatform::GetPlatform()->SchedulePaintIfDeviceReset();
 
   // We want to process any pending APZ metrics ahead of their positions
   // in the queue. This will prevent us from spending precious time
   // painting a stale displayport.
-  if (StaticPrefs::APZPeekMessages()) {
+  if (StaticPrefs::apz_peek_messages_enabled()) {
     nsLayoutUtils::UpdateDisplayPortMarginsFromPendingMessages();
   }
 
   AutoTArray<nsCOMPtr<nsIRunnable>, 16> earlyRunners;
   earlyRunners.SwapElements(mEarlyRunners);
   for (auto& runner : earlyRunners) {
     runner->Run();
   }
--- a/layout/generic/ScrollVelocityQueue.cpp
+++ b/layout/generic/ScrollVelocityQueue.cpp
@@ -19,17 +19,17 @@ void ScrollVelocityQueue::Sample(const n
   maxVelocity = nsPresContext::CSSPixelsToAppUnits(maxVelocity);
   int maxOffset = maxVelocity * flingSensitivity;
   TimeStamp currentRefreshTime =
       mPresContext->RefreshDriver()->MostRecentRefresh();
   if (mSampleTime.IsNull()) {
     mAccumulator = nsPoint();
   } else {
     uint32_t durationMs = (currentRefreshTime - mSampleTime).ToMilliseconds();
-    if (durationMs > StaticPrefs::APZVelocityRelevanceTime()) {
+    if (durationMs > StaticPrefs::apz_velocity_relevance_time_ms()) {
       mAccumulator = nsPoint();
       mQueue.Clear();
     } else if (durationMs == 0) {
       mAccumulator += aScrollPosition - mLastPosition;
     } else {
       nsPoint velocity = mAccumulator * 1000 / durationMs;
       velocity.Clamp(maxVelocity);
       mQueue.AppendElement(std::make_pair(durationMs, velocity));
@@ -49,17 +49,17 @@ void ScrollVelocityQueue::TrimQueue() {
   }
 
   TimeStamp currentRefreshTime =
       mPresContext->RefreshDriver()->MostRecentRefresh();
   nsPoint velocity;
   uint32_t timeDelta = (currentRefreshTime - mSampleTime).ToMilliseconds();
   for (int i = mQueue.Length() - 1; i >= 0; i--) {
     timeDelta += mQueue[i].first;
-    if (timeDelta >= StaticPrefs::APZVelocityRelevanceTime()) {
+    if (timeDelta >= StaticPrefs::apz_velocity_relevance_time_ms()) {
       // The rest of the samples have expired and should be dropped
       for (; i >= 0; i--) {
         mQueue.RemoveElementAt(0);
       }
     }
   }
 }
 
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2462,17 +2462,17 @@ void ScrollFrameHelper::MarkRecentlyScro
   // reset the timer.
   ResetDisplayPortExpiryTimer();
 }
 
 void ScrollFrameHelper::ResetDisplayPortExpiryTimer() {
   if (mDisplayPortExpiryTimer) {
     mDisplayPortExpiryTimer->InitWithNamedFuncCallback(
         RemoveDisplayPortCallback, this,
-        StaticPrefs::APZDisplayPortExpiryTime(), nsITimer::TYPE_ONE_SHOT,
+        StaticPrefs::apz_displayport_expiry_ms(), nsITimer::TYPE_ONE_SHOT,
         "ScrollFrameHelper::ResetDisplayPortExpiryTimer");
   }
 }
 
 bool ScrollFrameHelper::AllowDisplayPortExpiration() {
   if (IsAlwaysActive()) {
     return false;
   }
@@ -2482,17 +2482,17 @@ bool ScrollFrameHelper::AllowDisplayPort
   return true;
 }
 
 void ScrollFrameHelper::TriggerDisplayPortExpiration() {
   if (!AllowDisplayPortExpiration()) {
     return;
   }
 
-  if (!StaticPrefs::APZDisplayPortExpiryTime()) {
+  if (!StaticPrefs::apz_displayport_expiry_ms()) {
     // a zero time disables the expiry
     return;
   }
 
   if (!mDisplayPortExpiryTimer) {
     mDisplayPortExpiryTimer = NS_NewTimer();
   }
   ResetDisplayPortExpiryTimer();
@@ -2798,17 +2798,17 @@ void ScrollFrameHelper::ScrollToImpl(nsP
   }
 
   ScrollVisual();
   mAnchor.UserScrolled();
 
   bool schedulePaint = true;
   if (nsLayoutUtils::AsyncPanZoomEnabled(mOuter) &&
       !nsLayoutUtils::ShouldDisableApzForElement(content) &&
-      StaticPrefs::APZPaintSkipping()) {
+      StaticPrefs::apz_paint_skipping_enabled()) {
     // If APZ is enabled with paint-skipping, there are certain conditions in
     // which we can skip paints:
     // 1) If APZ triggered this scroll, and the tile-aligned displayport is
     //    unchanged.
     // 2) If non-APZ triggered this scroll, but we can handle it by just asking
     //    APZ to update the scroll position. Again we make this conditional on
     //    the tile-aligned displayport being unchanged.
     // We do the displayport check first since it's common to all scenarios,
@@ -2833,17 +2833,17 @@ void ScrollFrameHelper::ScrollToImpl(nsP
         mScrollableByAPZ, HasPluginFrames(), HasPerspective(),
         HasBgAttachmentLocal(), mHasOutOfFlowContentInsideFilter);
     if (usingDisplayPort && displayPort.IsEqualEdges(oldDisplayPort) &&
         !HasPerspective() && !HasBgAttachmentLocal() &&
         !mHasOutOfFlowContentInsideFilter) {
       bool haveScrollLinkedEffects =
           content->GetComposedDoc()->HasScrollLinkedEffect();
       bool apzDisabled = haveScrollLinkedEffects &&
-                         StaticPrefs::APZDisableForScrollLinkedEffects();
+                         StaticPrefs::apz_disable_for_scroll_linked_effects();
       if (!apzDisabled && !HasPluginFrames()) {
         if (LastScrollOrigin() == nsGkAtoms::apz) {
           schedulePaint = false;
           PAINT_SKIP_LOG("Skipping due to APZ scroll\n");
         } else if (mScrollableByAPZ) {
           nsIWidget* widget = presContext->GetNearestWidget();
           LayerManager* manager = widget ? widget->GetLayerManager() : nullptr;
           if (manager) {
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -1140,17 +1140,17 @@ void nsDisplayListBuilder::AutoCurrentAc
 /* static */
 nsRect nsDisplayListBuilder::OutOfFlowDisplayData::ComputeVisibleRectForFrame(
     nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
     const nsRect& aVisibleRect, const nsRect& aDirtyRect,
     nsRect* aOutDirtyRect) {
   nsRect visible = aVisibleRect;
   nsRect dirtyRectRelativeToDirtyFrame = aDirtyRect;
 
-  if (StaticPrefs::APZAllowZooming() &&
+  if (StaticPrefs::apz_allow_zooming() &&
       nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame) &&
       aBuilder->IsPaintingToWindow()) {
     dirtyRectRelativeToDirtyFrame =
         nsRect(nsPoint(0, 0), aFrame->GetParent()->GetSize());
 
     // If there's a visual viewport size set, restrict the amount of the
     // fixed-position element we paint to the visual viewport. (In general
     // the fixed-position element can be as large as the layout viewport,
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -55,17 +55,17 @@
 //   many VarCaches that should be atomic are not, in particular because
 //   Atomic<float> is not available, alas.)
 //
 // Definitions of VarCache prefs in this file has the following form.
 //
 //   VARCACHE_PREF(
 //     <update-policy>,
 //     <pref-name-string>,
-//     <pref-name-id>,
+//      <pref-name-id>,  // indented one space to align with <pref-name-string>
 //     <cpp-type>, <default-value>
 //   )
 //
 // - <update-policy> is one of the following:
 //
 //   * Live: Evaluate the pref and set callback so it stays current/live. This
 //     is the normal policy.
 //
@@ -112,600 +112,584 @@
 
 //---------------------------------------------------------------------------
 // Prefs starting with "accessibility."
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
   Live,
   "accessibility.monoaudio.enable",
-  accessibility_monoaudio_enable,
+   accessibility_monoaudio_enable,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "accessibility.browsewithcaret",
-  AccessibilityBrowseWithCaret,
+   accessibility_browsewithcaret,
   RelaxedAtomicBool, false
 )
 
 //---------------------------------------------------------------------------
 // Prefs starting with "apz."
 // The apz prefs are explained in AsyncPanZoomController.cpp
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
   Live,
   "apz.allow_double_tap_zooming",
-  APZAllowDoubleTapZooming,
+   apz_allow_double_tap_zooming,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "apz.allow_immediate_handoff",
-  APZAllowImmediateHandoff,
+   apz_allow_immediate_handoff,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "apz.allow_zooming",
-  APZAllowZooming,
+   apz_allow_zooming,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.android.chrome_fling_physics.enabled",
-  APZUseChromeFlingPhysics,
+   apz_android_chrome_fling_physics_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.android.chrome_fling_physics.friction",
-  APZChromeFlingPhysicsFriction,
+   apz_android_chrome_fling_physics_friction,
   AtomicFloat, 0.015f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.android.chrome_fling_physics.inflexion",
-  APZChromeFlingPhysicsInflexion,
+   apz_android_chrome_fling_physics_inflexion,
   AtomicFloat, 0.35f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.android.chrome_fling_physics.stop_threshold",
-  APZChromeFlingPhysicsStopThreshold,
+   apz_android_chrome_fling_physics_stop_threshold,
   AtomicFloat, 0.1f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.autoscroll.enabled",
-  APZAutoscrollEnabled,
+   apz_autoscroll_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.axis_lock.breakout_angle",
-  APZAxisBreakoutAngle,
+   apz_axis_lock_breakout_angle,
   AtomicFloat, float(M_PI / 8.0) /* 22.5 degrees */
 )
 
 VARCACHE_PREF(
   Live,
   "apz.axis_lock.breakout_threshold",
-  APZAxisBreakoutThreshold,
+   apz_axis_lock_breakout_threshold,
   AtomicFloat, 1.0f / 32.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.axis_lock.direct_pan_angle",
-  APZAllowedDirectPanAngle,
+   apz_axis_lock_direct_pan_angle,
   AtomicFloat, float(M_PI / 3.0) /* 60 degrees */
 )
 
 VARCACHE_PREF(
   Live,
   "apz.axis_lock.lock_angle",
-  APZAxisLockAngle,
+   apz_axis_lock_lock_angle,
   AtomicFloat, float(M_PI / 6.0) /* 30 degrees */
 )
 
 VARCACHE_PREF(
   Live,
   "apz.axis_lock.mode",
-  APZAxisLockMode,
+   apz_axis_lock_mode,
   RelaxedAtomicInt32, 0
 )
 
 VARCACHE_PREF(
   Live,
   "apz.content_response_timeout",
-  APZContentResponseTimeout,
+   apz_content_response_timeout,
   RelaxedAtomicInt32, 400
 )
 
 VARCACHE_PREF(
   Live,
   "apz.danger_zone_x",
-  APZDangerZoneX,
+   apz_danger_zone_x,
   RelaxedAtomicInt32, 50
 )
 
 VARCACHE_PREF(
   Live,
   "apz.danger_zone_y",
-  APZDangerZoneY,
+   apz_danger_zone_y,
   RelaxedAtomicInt32, 100
 )
 
 VARCACHE_PREF(
   Live,
   "apz.disable_for_scroll_linked_effects",
-  APZDisableForScrollLinkedEffects,
+   apz_disable_for_scroll_linked_effects,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.displayport_expiry_ms",
-  APZDisplayPortExpiryTime,
+   apz_displayport_expiry_ms,
   RelaxedAtomicUint32, 15000
 )
 
 VARCACHE_PREF(
   Live,
   "apz.drag.enabled",
-  APZDragEnabled,
+   apz_drag_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.drag.initial.enabled",
-  APZDragInitiationEnabled,
+   apz_drag_initial_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.drag.touch.enabled",
-  APZTouchDragEnabled,
+   apz_touch_drag_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.enlarge_displayport_when_clipped",
-  APZEnlargeDisplayPortWhenClipped,
+   apz_enlarge_displayport_when_clipped,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fixed-margin-override.enabled",
-  APZFixedMarginOverrideEnabled,
+   apz_fixed_margin_override_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fixed-margin-override.bottom",
-  APZFixedMarginOverrideBottom,
+   apz_fixed_margin_override_bottom,
   RelaxedAtomicInt32, 0
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fixed-margin-override.top",
-  APZFixedMarginOverrideTop,
+   apz_fixed_margin_override_top,
   RelaxedAtomicInt32, 0
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_accel_base_mult",
-  APZFlingAccelBaseMultiplier,
+   apz_fling_accel_base_mult,
   AtomicFloat, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_accel_interval_ms",
-  APZFlingAccelInterval,
+   apz_fling_accel_interval_ms,
   RelaxedAtomicInt32, 500
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_accel_supplemental_mult",
-  APZFlingAccelSupplementalMultiplier,
+   apz_fling_accel_supplemental_mult,
   AtomicFloat, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_accel_min_velocity",
-  APZFlingAccelMinVelocity,
+   apz_fling_accel_min_velocity,
   AtomicFloat, 1.5f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.fling_curve_function_x1",
-  APZCurveFunctionX1,
+   apz_fling_curve_function_x1,
   float, 0.0f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.fling_curve_function_x2",
-  APZCurveFunctionX2,
+   apz_fling_curve_function_x2,
   float, 1.0f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.fling_curve_function_y1",
-  APZCurveFunctionY1,
+   apz_fling_curve_function_y1,
   float, 0.0f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.fling_curve_function_y2",
-  APZCurveFunctionY2,
+   apz_fling_curve_function_y2,
   float, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_curve_threshold_inches_per_ms",
-  APZCurveThreshold,
+   apz_fling_curve_threshold_inches_per_ms,
   AtomicFloat, -1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_friction",
-  APZFlingFriction,
+   apz_fling_friction,
   AtomicFloat, 0.002f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_min_velocity_threshold",
-  APZFlingMinVelocityThreshold,
+   apz_fling_min_velocity_threshold,
   AtomicFloat, 0.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_stop_on_tap_threshold",
-  APZFlingStopOnTapThreshold,
+   apz_fling_stop_on_tap_threshold,
   AtomicFloat, 0.05f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.fling_stopped_threshold",
-  APZFlingStoppedThreshold,
+   apz_fling_stopped_threshold,
   AtomicFloat, 0.01f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.frame_delay.enabled",
-  APZFrameDelayEnabled,
+   apz_frame_delay_enabled,
   RelaxedAtomicBool, false
 )
 
 #ifdef MOZ_WIDGET_GTK
 VARCACHE_PREF(
   Live,
   "apz.gtk.kinetic_scroll.enabled",
-  APZGTKKineticScrollEnabled,
+   apz_gtk_kinetic_scroll_enabled,
   RelaxedAtomicBool, false
 )
 #endif
 
 #if !defined(MOZ_WIDGET_ANDROID)
 # define PREF_VALUE true
 #else
 # define PREF_VALUE false
 #endif
 VARCACHE_PREF(
   Once,
   "apz.keyboard.enabled",
-  APZKeyboardEnabled,
+   apz_keyboard_enabled,
   bool, PREF_VALUE
 )
 #undef PREF_VALUE
 
 VARCACHE_PREF(
   Live,
   "apz.keyboard.passive-listeners",
-  APZKeyboardPassiveListeners,
+   apz_keyboard_passive_listeners,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.max_tap_time",
-  APZMaxTapTime,
+   apz_max_tap_time,
   RelaxedAtomicInt32, 300
 )
 
 VARCACHE_PREF(
   Live,
   "apz.max_velocity_inches_per_ms",
-  APZMaxVelocity,
+   apz_max_velocity_inches_per_ms,
   AtomicFloat, -1.0f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.max_velocity_queue_size",
-  APZMaxVelocityQueueSize,
+   apz_max_velocity_queue_size,
   uint32_t, 5
 )
 
 VARCACHE_PREF(
   Live,
   "apz.min_skate_speed",
-  APZMinSkateSpeed,
+   apz_min_skate_speed,
   AtomicFloat, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.minimap.enabled",
-  APZMinimap,
+   apz_minimap_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.one_touch_pinch.enabled",
-  APZOneTouchPinchEnabled,
+   apz_one_touch_pinch_enabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "apz.overscroll.enabled",
-  APZOverscrollEnabled,
+   apz_overscroll_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.overscroll.min_pan_distance_ratio",
-  APZMinPanDistanceRatio,
+   apz_overscroll_min_pan_distance_ratio,
   AtomicFloat, 1.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.overscroll.spring_stiffness",
-  APZOverscrollSpringStiffness,
+   apz_overscroll_spring_stiffness,
   AtomicFloat, 0.001f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.overscroll.stop_distance_threshold",
-  APZOverscrollStopDistanceThreshold,
+   apz_overscroll_stop_distance_threshold,
   AtomicFloat, 5.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.paint_skipping.enabled",
-  APZPaintSkipping,
+   apz_paint_skipping_enabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "apz.peek_messages.enabled",
-  APZPeekMessages,
+   apz_peek_messages_enabled,
   RelaxedAtomicBool, true
 )
 
 VARCACHE_PREF(
   Live,
   "apz.pinch_lock.mode",
-  APZPinchLockMode,
+   apz_pinch_lock_mode,
   RelaxedAtomicInt32, 1
 )
 
 VARCACHE_PREF(
   Live,
   "apz.pinch_lock.scroll_lock_threshold",
-  APZPinchLockScrollLockThreshold,
+   apz_pinch_lock_scroll_lock_threshold,
   AtomicFloat, 1.0f / 32.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.pinch_lock.span_breakout_threshold",
-  APZPinchLockSpanBreakoutThreshold,
+   apz_pinch_lock_span_breakout_threshold,
   AtomicFloat, 1.0f / 32.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.pinch_lock.span_lock_threshold",
-  APZPinchLockSpanLockThreshold,
+   apz_pinch_lock_span_lock_threshold,
   AtomicFloat, 1.0f / 32.0f
 )
 
 VARCACHE_PREF(
   Once,
   "apz.pinch_lock.buffer_max_age",
-  APZPinchLockBufferMaxAge,
+   apz_pinch_lock_buffer_max_age,
   int32_t, 50 // milliseconds
 )
 
 VARCACHE_PREF(
   Live,
   "apz.popups.enabled",
-  APZPopupsEnabled,
+   apz_popups_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.printtree",
-  APZPrintTree,
+   apz_printtree,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.record_checkerboarding",
-  APZRecordCheckerboarding,
+   apz_record_checkerboarding,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.second_tap_tolerance",
-  APZSecondTapTolerance,
+   apz_second_tap_tolerance,
   AtomicFloat, 0.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.test.fails_with_native_injection",
-  APZTestFailsWithNativeInjection,
+   apz_test_fails_with_native_injection,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.test.logging_enabled",
-  apz_test_logging_enabled,
+   apz_test_logging_enabled,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
   Live,
   "apz.touch_move_tolerance",
-  APZTouchMoveTolerance,
+   apz_touch_move_tolerance,
   AtomicFloat, 0.1f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.touch_start_tolerance",
-  APZTouchStartTolerance,
+   apz_touch_start_tolerance,
   AtomicFloat, 1.0f/4.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.velocity_bias",
-  APZVelocityBias,
+   apz_velocity_bias,
   AtomicFloat, 0.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.velocity_relevance_time_ms",
-  APZVelocityRelevanceTime,
+   apz_velocity_relevance_time_ms,
   RelaxedAtomicUint32, 150
 )
 
 VARCACHE_PREF(
   Live,
   "apz.x_skate_highmem_adjust",
-  APZXSkateHighMemAdjust,
+   apz_x_skate_highmem_adjust,
   AtomicFloat, 0.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.x_skate_size_multiplier",
-  APZXSkateSizeMultiplier,
+   apz_x_skate_size_multiplier,
   AtomicFloat, 1.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.x_stationary_size_multiplier",
-  APZXStationarySizeMultiplier,
+   apz_x_stationary_size_multiplier,
   AtomicFloat, 3.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.y_skate_highmem_adjust",
-  APZYSkateHighMemAdjust,
+   apz_y_skate_highmem_adjust,
   AtomicFloat, 0.0f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.y_skate_size_multiplier",
-  APZYSkateSizeMultiplier,
+   apz_y_skate_size_multiplier,
   AtomicFloat, 2.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.y_stationary_size_multiplier",
-  APZYStationarySizeMultiplier,
+   apz_y_stationary_size_multiplier,
   AtomicFloat, 3.5f
 )
 
 VARCACHE_PREF(
   Live,
   "apz.zoom_animation_duration_ms",
-  APZZoomAnimationDuration,
+   apz_zoom_animation_duration_ms,
   RelaxedAtomicInt32, 250
 )
 
 VARCACHE_PREF(
   Live,
   "apz.scale_repaint_delay_ms",
-  APZScaleRepaintDelay,
+   apz_scale_repaint_delay_ms,
   RelaxedAtomicInt32, 500
 )
 
 VARCACHE_PREF(
   Live,
   "apz.relative-update.enabled",
-  APZRelativeUpdate,
-  RelaxedAtomicBool, false
-)
-
-VARCACHE_PREF(
-  Live,
-  "full-screen-api.mouse-event-allow-left-button-only",
-  full_screen_api_mouse_event_allow_left_button_only,
-  bool, true
-)
-
-// When this pref is set, parent documents may consider child iframes've loaded
-// while they are still loading
-VARCACHE_PREF(
-  Live,
-  "dom.cross_origin_iframes_loaded_in_background",
-   dom_cross_origin_iframes_loaded_in_background,
-  bool, false
+   apz_relative_update_enabled,
+  RelaxedAtomicBool, false
 )
 
 //---------------------------------------------------------------------------
 // Prefs starting with "beacon."
 //---------------------------------------------------------------------------
 
 // Is support for Navigator.sendBeacon enabled?
 VARCACHE_PREF(
@@ -2643,16 +2627,25 @@ VARCACHE_PREF(
 // Is support for XMLDocument.load enabled?
 VARCACHE_PREF(
   Live,
   "dom.xmldocument.load.enabled",
   dom_xmldocument_load_enabled,
   bool, false
 )
 
+// When this pref is set, parent documents may consider child iframes have
+// loaded while they are still loading.
+VARCACHE_PREF(
+  Live,
+  "dom.cross_origin_iframes_loaded_in_background",
+   dom_cross_origin_iframes_loaded_in_background,
+  bool, false
+)
+
 // Is support for Navigator.geolocation enabled?
 VARCACHE_PREF(
   Live,
   "geo.enabled",
   geo_enabled,
   bool, true
 )
 
@@ -2731,16 +2724,23 @@ VARCACHE_PREF(
 
 VARCACHE_PREF(
   Live,
   "full-screen-api.allow-trusted-requests-only",
   full_screen_api_allow_trusted_requests_only,
   bool, true
 )
 
+VARCACHE_PREF(
+  Live,
+  "full-screen-api.mouse-event-allow-left-button-only",
+   full_screen_api_mouse_event_allow_left_button_only,
+  bool, true
+)
+
 //---------------------------------------------------------------------------
 // Prefs starting with "fuzzing.". It's important that these can only be
 // checked in fuzzing builds (when FUZZING is defined), otherwise you could
 // enable the fuzzing stuff on your regular build which would be bad :)
 //---------------------------------------------------------------------------
 
 #ifdef FUZZING
 VARCACHE_PREF(
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -3570,17 +3570,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 - (void)magnifyWithEvent:(NSEvent*)anEvent {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (!mGeckoChild) {
     return;
   }
 
   // FIXME: bug 1525793 -- this may need to handle zooming or not on a per-document basis.
-  if (StaticPrefs::APZAllowZooming()) {
+  if (StaticPrefs::apz_allow_zooming()) {
     NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(anEvent, [self window]);
     ScreenPoint position =
         ViewAs<ScreenPixel>([self convertWindowCoordinatesRoundDown:locationInWindow],
                             PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
     ExternalPoint screenOffset =
         ViewAs<ExternalPixel>(mGeckoChild->WidgetToScreenOffset(),
                               PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
 
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3052,17 +3052,17 @@ void nsWindow::OnScrollEvent(GdkEventScr
       // the GDK_SCROLL_SMOOTH direction on XInput2 and Wayland devices.
       mLastScrollEventTime = aEvent->time;
 
       // Special handling for touchpads to support flings
       // (also known as kinetic/inertial/momentum scrolling)
       GdkDevice* device = gdk_event_get_source_device((GdkEvent*)aEvent);
       GdkInputSource source = gdk_device_get_source(device);
       if (source == GDK_SOURCE_TOUCHSCREEN || source == GDK_SOURCE_TOUCHPAD) {
-        if (StaticPrefs::APZGTKKineticScrollEnabled() &&
+        if (StaticPrefs::apz_gtk_kinetic_scroll_enabled() &&
             gtk_check_version(3, 20, 0) == nullptr) {
           static auto sGdkEventIsScrollStopEvent =
               (gboolean(*)(const GdkEvent*))dlsym(
                   RTLD_DEFAULT, "gdk_event_is_scroll_stop_event");
 
           LOG(("[%d] pan smooth event dx=%f dy=%f inprogress=%d\n",
                aEvent->time, aEvent->delta_x, aEvent->delta_y, mPanInProgress));
           PanGestureInput::PanGestureType eventType =
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -854,17 +854,17 @@ bool nsBaseWidget::ComputeShouldAccelera
          WidgetTypeSupportsAcceleration();
 }
 
 bool nsBaseWidget::UseAPZ() {
   return (gfxPlatform::AsyncPanZoomEnabled() &&
           (WindowType() == eWindowType_toplevel ||
            WindowType() == eWindowType_child ||
            (WindowType() == eWindowType_popup && HasRemoteContent() &&
-            StaticPrefs::APZPopupsEnabled())));
+            StaticPrefs::apz_popups_enabled())));
 }
 
 bool nsBaseWidget::AllowWebRenderForThisWindow() {
   return WindowType() == eWindowType_toplevel ||
          WindowType() == eWindowType_child ||
          WindowType() == eWindowType_dialog ||
          (WindowType() == eWindowType_popup && HasRemoteContent());
 }
@@ -888,17 +888,17 @@ void nsBaseWidget::ConfigureAPZCTreeMana
   ConfigureAPZControllerThread();
 
   float dpi = GetDPI();
   // On Android the main thread is not the controller thread
   APZThreadUtils::RunOnControllerThread(
       NewRunnableMethod<float>("layers::IAPZCTreeManager::SetDPI", mAPZC,
                                &IAPZCTreeManager::SetDPI, dpi));
 
-  if (StaticPrefs::APZKeyboardEnabled()) {
+  if (StaticPrefs::apz_keyboard_enabled()) {
     KeyboardMap map = nsXBLWindowKeyHandler::CollectKeyboardShortcuts();
     // On Android the main thread is not the controller thread
     APZThreadUtils::RunOnControllerThread(NewRunnableMethod<KeyboardMap>(
         "layers::IAPZCTreeManager::SetKeyboardMap", mAPZC,
         &IAPZCTreeManager::SetKeyboardMap, map));
   }
 
   RefPtr<IAPZCTreeManager> treeManager = mAPZC;  // for capture by the lambdas
--- a/widget/windows/nsWindowBase.cpp
+++ b/widget/windows/nsWindowBase.cpp
@@ -128,17 +128,18 @@ void nsWindowBase::ChangedDPI() {
 }
 
 nsresult nsWindowBase::SynthesizeNativeTouchPoint(
     uint32_t aPointerId, nsIWidget::TouchPointerState aPointerState,
     LayoutDeviceIntPoint aPoint, double aPointerPressure,
     uint32_t aPointerOrientation, nsIObserver* aObserver) {
   AutoObserverNotifier notifier(aObserver, "touchpoint");
 
-  if (StaticPrefs::APZTestFailsWithNativeInjection() || !InitTouchInjection()) {
+  if (StaticPrefs::apz_test_fails_with_native_injection() ||
+      !InitTouchInjection()) {
     // If we don't have touch injection from the OS, or if we are running a test
     // that cannot properly inject events to satisfy the OS requirements (see
     // bug 1313170)  we can just fake it and synthesize the events from here.
     MOZ_ASSERT(NS_IsMainThread());
     if (aPointerState == TOUCH_HOVER) {
       return NS_ERROR_UNEXPECTED;
     }