Bug 1351783 part 18 - Add async keyboard scrolling information to about:support. r=kats
authorRyan Hunt <rhunt@eqrion.net>
Thu, 15 Jun 2017 17:54:03 -0400
changeset 600766 70e30c042f3863dd63645b4c4f001b370c63ec66
parent 600765 e37625d5695e96bbd554db809db07abbba56fe3e
child 600767 bbe0888e6d97bae668f6e8215d7c33d4a059b9a3
push id65868
push userbmo:rail@mozilla.com
push dateTue, 27 Jun 2017 20:33:55 +0000
reviewerskats
bugs1351783
milestone56.0a1
Bug 1351783 part 18 - Add async keyboard scrolling information to about:support. r=kats MozReview-Commit-ID: LYEcRNgqZ35
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
@@ -2630,16 +2630,20 @@ gfxPlatform::GetApzSupportInfo(mozilla::
 
   if (SupportsApzTouchInput()) {
     aObj.DefineProperty("ApzTouchInput", 1);
   }
 
   if (SupportsApzDragInput()) {
     aObj.DefineProperty("ApzDragInput", 1);
   }
+
+  if (SupportsApzKeyboardInput() && !gfxPrefs::AccessibilityBrowseWithCaret()) {
+    aObj.DefineProperty("ApzKeyboardInput", 1);
+  }
 }
 
 void
 gfxPlatform::GetTilesSupportInfo(mozilla::widget::InfoObject& aObj)
 {
   if (!gfxPrefs::LayersTilesEnabled()) {
     return;
   }
@@ -2799,16 +2803,22 @@ gfxPlatform::SupportsApzTouchInput() con
 }
 
 bool
 gfxPlatform::SupportsApzDragInput() const
 {
   return gfxPrefs::APZDragEnabled();
 }
 
+bool
+gfxPlatform::SupportsApzKeyboardInput() const
+{
+  return gfxPrefs::APZKeyboardEnabled();
+}
+
 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
@@ -635,16 +635,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;
 
     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
@@ -229,17 +229,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"]) {
+      for (let type of ["Wheel", "Touch", "Drag", "Keyboard"]) {
         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
@@ -133,12 +133,13 @@ multiProcessStatus.8 = Disabled forcibly
 multiProcessStatus.9 = Disabled by graphics hardware acceleration on Windows XP
 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
 
 # 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