Bug 1479549 Add a pref to disable double tap zooming in APZ r=botond

MozReview-Commit-ID: HK5RWuI6lIk
This commit is contained in:
Randall Barker 2018-07-24 13:51:01 -07:00
parent c503b4fea7
commit 6d045ccecb
4 changed files with 6 additions and 1 deletions

View File

@ -133,6 +133,9 @@ typedef PlatformSpecificStateBase PlatformSpecificState; // no extra state, jus
* \li\b apz.allow_checkerboarding
* Pref that allows or disallows checkerboarding
*
* \li\b apz.allow_double_tap_zooming
* Pref that allows or disallows double tap to zoom
*
* \li\b apz.allow_immediate_handoff
* If set to true, scroll can be handed off from one APZC to another within
* a single input block. If set to false, a single input block can only

View File

@ -293,6 +293,7 @@ private:
// The apz prefs are explained in AsyncPanZoomController.cpp
DECL_GFX_PREF(Live, "apz.allow_checkerboarding", APZAllowCheckerboarding, bool, true);
DECL_GFX_PREF(Live, "apz.allow_double_tap_zooming", APZAllowDoubleTapZooming, bool, true);
DECL_GFX_PREF(Live, "apz.allow_immediate_handoff", APZAllowImmediateHandoff, bool, true);
DECL_GFX_PREF(Live, "apz.allow_zooming", APZAllowZooming, bool, false);
DECL_GFX_PREF(Live, "apz.android.chrome_fling_physics.enabled", APZUseChromeFlingPhysics, bool, false);

View File

@ -181,7 +181,7 @@ ComputeZoomConstraintsFromViewportInfo(const nsViewportInfo& aViewportInfo)
{
mozilla::layers::ZoomConstraints constraints;
constraints.mAllowZoom = aViewportInfo.IsZoomAllowed() && gfxPrefs::APZAllowZooming();
constraints.mAllowDoubleTapZoom = constraints.mAllowZoom;
constraints.mAllowDoubleTapZoom = constraints.mAllowZoom && gfxPrefs::APZAllowDoubleTapZooming();
if (constraints.mAllowZoom) {
constraints.mMinZoom.scale = aViewportInfo.GetMinZoom().scale;
constraints.mMaxZoom.scale = aViewportInfo.GetMaxZoom().scale;

View File

@ -642,6 +642,7 @@ pref("layers.geometry.d3d11.enabled", true);
// APZ preferences. For documentation/details on what these prefs do, check
// gfx/layers/apz/src/AsyncPanZoomController.cpp.
pref("apz.allow_checkerboarding", true);
pref("apz.allow_double_tap_zooming", true);
pref("apz.allow_immediate_handoff", true);
pref("apz.allow_zooming", false);
pref("apz.android.chrome_fling_physics.enabled", true);