Bug 860493: Add pref to disable history swipe animations. r=felipe
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Wed, 16 May 2018 23:09:45 -0400
changeset 418595 59cc6b99727e58e3b214266c45089d945999c285
parent 418594 5a43d47a768cbfc844eb9fb20c51bff9f840c69c
child 418596 c95d5c9994e8f625a9c03ee7aea9dade1ea1c42f
push id103344
push userspohl@mozilla.com
push dateThu, 17 May 2018 03:10:17 +0000
treeherdermozilla-inbound@c95d5c9994e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs860493
milestone62.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 860493: Add pref to disable history swipe animations. r=felipe
browser/app/profile/firefox.js
browser/base/content/browser-gestureSupport.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -615,17 +615,17 @@ pref("browser.gesture.pinch.in.shift", "
 #endif
 pref("browser.gesture.twist.latched", false);
 pref("browser.gesture.twist.threshold", 0);
 pref("browser.gesture.twist.right", "cmd_gestureRotateRight");
 pref("browser.gesture.twist.left", "cmd_gestureRotateLeft");
 pref("browser.gesture.twist.end", "cmd_gestureRotateEnd");
 pref("browser.gesture.tap", "cmd_fullZoomReset");
 
-pref("browser.snapshots.limit", 0);
+pref("browser.history_swipe_animation.disabled", false);
 
 // 0: Nothing happens
 // 1: Scrolling contents
 // 2: Go back or go forward, in your history
 // 3: Zoom in or out (reflowing zoom).
 // 4: Treat vertical wheel as horizontal scroll
 // 5: Zoom in or out (pinch zoom).
 #ifdef XP_MACOSX
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -581,17 +581,20 @@ var gHistorySwipeAnimation = {
    */
   init: function HSA_init() {
     if (!this._isSupported()) {
       return;
     }
 
     this.isLTR = document.documentElement.matches(":-moz-locale-dir(ltr)");
     this._isStoppingAnimation = false;
-    this.active = true;
+    if (!Services.prefs.getBoolPref("browser.history_swipe_animation.disabled",
+                                    false)) {
+      this.active = true;
+    }
   },
 
   /**
    * Uninitializes the support for history swipe animations.
    */
   uninit: function HSA_uninit() {
     this.active = false;
     this.isLTR = false;