Bug 1405112 - report whether the user has a touch screen when reporting site issues r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D6058

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Arshad Kazmi 2018-09-25 19:27:20 +00:00
parent 129739246b
commit a8ce6a74f6

View File

@ -36,6 +36,15 @@ Object.defineProperty(details, "blockList", {
},
});
Object.defineProperty(details, "hasTouchScreen", {
enumerable: true,
get() {
// return a boolean to indicate there's a touch screen detected or not
let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
return gfxInfo.getInfo().ApzTouchInput == 1;
},
});
if (AppConstants.platform == "linux") {
XPCOMUtils.defineLazyPreferenceGetter(details, "layers.acceleration.force-enabled", "layers.acceleration.force-enabled", false);
}