Bug 1351783 part 18 - Add async keyboard scrolling information to about:support. r?kats
MozReview-Commit-ID: LYEcRNgqZ35
--- 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