mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1500672 - Part 2: Make Navigator return MaxTouchPointsOverride when in RDM. r=bradwerth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70128 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
dc7c4bf3db
commit
bee37397b8
@ -813,6 +813,15 @@ bool Navigator::Vibrate(const nsTArray<uint32_t>& aPattern) {
|
||||
//*****************************************************************************
|
||||
|
||||
uint32_t Navigator::MaxTouchPoints(CallerType aCallerType) {
|
||||
nsIDocShell* docshell = GetDocShell();
|
||||
BrowsingContext* bc = docshell ? docshell->GetBrowsingContext() : nullptr;
|
||||
|
||||
// Responsive Design Mode overrides the maxTouchPoints property when
|
||||
// touch simulation is enabled.
|
||||
if (bc && bc->InRDMPane()) {
|
||||
return bc->GetMaxTouchPointsOverride();
|
||||
}
|
||||
|
||||
// The maxTouchPoints is going to reveal the detail of users' hardware. So,
|
||||
// we will spoof it into 0 if fingerprinting resistance is on.
|
||||
if (aCallerType != CallerType::System &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user