Bug 1394926 - Add APZ autoscroll information to about:support. r=kats draft
authorBotond Ballo <botond@mozilla.com>
Tue, 29 Aug 2017 16:27:19 -0400
changeset 655313 1cc352dc9a19c4a15d5bf7e75370a68c13024dda
parent 654592 1b4c59eef820b46eb0037aca68f83a15088db45f
child 728790 837ec0462d1201415dfbc8494206bc4a13452475
push id76826
push userbballo@mozilla.com
push dateTue, 29 Aug 2017 20:27:41 +0000
reviewerskats
bugs1394926
milestone57.0a1
Bug 1394926 - Add APZ autoscroll information to about:support. r=kats MozReview-Commit-ID: FlZNdHuoirG
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPlatform.h
toolkit/content/aboutSupport.js
toolkit/locales/en-US/chrome/global/aboutSupport.properties
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2732,16 +2732,20 @@ gfxPlatform::GetApzSupportInfo(mozilla::
 
   if (SupportsApzDragInput()) {
     aObj.DefineProperty("ApzDragInput", 1);
   }
 
   if (SupportsApzKeyboardInput() && !gfxPrefs::AccessibilityBrowseWithCaret()) {
     aObj.DefineProperty("ApzKeyboardInput", 1);
   }
+
+  if (SupportsApzAutoscrolling()) {
+    aObj.DefineProperty("ApzAutoscrollInput", 1);
+  }
 }
 
 void
 gfxPlatform::GetTilesSupportInfo(mozilla::widget::InfoObject& aObj)
 {
   if (!gfxPrefs::LayersTilesEnabled()) {
     return;
   }
@@ -2907,16 +2911,22 @@ gfxPlatform::SupportsApzDragInput() cons
 }
 
 bool
 gfxPlatform::SupportsApzKeyboardInput() const
 {
   return gfxPrefs::APZKeyboardEnabled();
 }
 
+bool
+gfxPlatform::SupportsApzAutoscrolling() const
+{
+  return gfxPrefs::APZAutoscrollEnabled();
+}
+
 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/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -637,16 +637,17 @@ public:
      * Used to test which input types are handled via APZ.
      */
     virtual bool SupportsApzWheelInput() const {
       return false;
     }
     bool SupportsApzTouchInput() const;
     bool SupportsApzDragInput() const;
     bool SupportsApzKeyboardInput() const;
+    bool SupportsApzAutoscrolling() const;
 
     virtual void FlushContentDrawing() {}
 
     // If a device reset has occurred, schedule any necessary paints in the
     // widget. This should only be used within nsRefreshDriver.
     virtual void SchedulePaintIfDeviceReset() {}
 
     /**
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -253,17 +253,17 @@ var snapshotFormatters = {
       }
       return nameOrMsg;
     }
 
     // Read APZ info out of data.info, stripping it out in the process.
     let apzInfo = [];
     let formatApzInfo = function(info) {
       let out = [];
-      for (let type of ["Wheel", "Touch", "Drag", "Keyboard"]) {
+      for (let type of ["Wheel", "Touch", "Drag", "Keyboard", "Autoscroll"]) {
         let key = "Apz" + type + "Input";
 
         if (!(key in info))
           continue;
 
         delete info[key];
 
         let message = localizedMsg([type.toLowerCase() + "Enabled"]);
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
@@ -139,16 +139,17 @@ multiProcessStatus.9 = Disabled by graph
 multiProcessStatus.unknown = Unknown status
 
 asyncPanZoom = Asynchronous Pan/Zoom
 apzNone = none
 wheelEnabled = wheel input enabled
 touchEnabled = touch input enabled
 dragEnabled = scrollbar drag enabled
 keyboardEnabled = keyboard enabled
+autoscrollEnabled = autoscroll enabled
 
 # LOCALIZATION NOTE %1 will be replaced with the key of a preference.
 wheelWarning = async wheel input disabled due to unsupported pref: %S
 touchWarning = async touch input disabled due to unsupported pref: %S
 
 # LOCALIZATION NOTE Strings explaining why a feature is or is not available.
 disabledByBuild = disabled by build
 enabledByDefault = enabled by default