mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1479549 Add a pref to disable double tap zooming in APZ r=botond
MozReview-Commit-ID: HK5RWuI6lIk
This commit is contained in:
parent
c503b4fea7
commit
6d045ccecb
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user