diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index bf861f24058c..ecdee2b77b07 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -1417,7 +1417,8 @@ APZCTreeManager::ProcessTouchInput(MultiTouchInput& aInput, // 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 = gfxPrefs::APZDragEnabled() && hitScrollbarNode && + mInScrollbarTouchDrag = gfxPrefs::APZDragEnabled() && + gfxPrefs::APZTouchDragEnabled() && hitScrollbarNode && hitScrollbarNode->IsScrollThumbNode() && hitScrollbarNode->GetScrollThumbData().mIsAsyncDraggable; diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 9e730e4c06b4..fb953aef4231 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -199,6 +199,19 @@ typedef GenericFlingAnimation FlingAnimation; * disable the expiry behavior entirely. * Units: milliseconds * + * \li\b apz.drag.enabled + * Setting this pref to true will cause APZ to handle mouse-dragging of + * scrollbar thumbs. + * + * \li\b apz.drag.initial.enabled + * Setting this pref to true will cause APZ to try to handle mouse-dragging + * of scrollbar thumbs without an initial round-trip to content to start it + * if possible. Only has an effect if apz.drag.enabled is also true. + * + * \li\b apz.drag.touch.enabled + * Setting this pref to true will cause APZ to handle touch-dragging of + * scrollbar thumbs. Only has an effect if apz.drag.enabled is also true. + * * \li\b apz.enlarge_displayport_when_clipped * Pref that enables enlarging of the displayport along one axis when the * generated displayport's size is beyond that of the scrollable rect on the diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 20a5e83f33c3..f84e05fa113e 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -298,6 +298,7 @@ private: DECL_GFX_PREF(Live, "apz.displayport_expiry_ms", APZDisplayPortExpiryTime, uint32_t, 15000); DECL_GFX_PREF(Live, "apz.drag.enabled", APZDragEnabled, bool, false); DECL_GFX_PREF(Live, "apz.drag.initial.enabled", APZDragInitiationEnabled, bool, false); + DECL_GFX_PREF(Live, "apz.drag.touch.enabled", APZTouchDragEnabled, bool, false); DECL_GFX_PREF(Live, "apz.enlarge_displayport_when_clipped", APZEnlargeDisplayPortWhenClipped, bool, false); DECL_GFX_PREF(Live, "apz.fling_accel_base_mult", APZFlingAccelBaseMultiplier, float, 1.0f); DECL_GFX_PREF(Live, "apz.fling_accel_interval_ms", APZFlingAccelInterval, int32_t, 500); diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index e195f5f437c1..6d8f7e6447c6 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -674,6 +674,7 @@ pref("apz.axis_lock.direct_pan_angle", "1.047197"); // PI / 3 (60 degrees) pref("apz.content_response_timeout", 400); pref("apz.drag.enabled", true); pref("apz.drag.initial.enabled", true); +pref("apz.drag.touch.enabled", true); pref("apz.danger_zone_x", 50); pref("apz.danger_zone_y", 100); pref("apz.disable_for_scroll_linked_effects", false);