mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
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:
parent
129739246b
commit
a8ce6a74f6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user