Bug 1351783 part 18 - Add async keyboard scrolling information to about:support. r?kats draft
authorRyan Hunt <rhunt@eqrion.net>
Thu, 15 Jun 2017 17:54:03 -0400
changeset 599282 497bdf0e1d1287f0a9d71bb3037f008cf50f216b
parent 599281 c31bc0f5c265b67271b14386f55151be3aa5e623
child 599283 1347f18bf194affa91714bf443707805fbe688de
push id65466
push userbmo:rhunt@eqrion.net
push dateThu, 22 Jun 2017 22:16:51 +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
@@ -2603,16 +2603,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;
   }
@@ -2765,16 +2769,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
@@ -629,16 +629,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