Bug 1382499 - Enhance fingerprinting resistance for Touch API r=arthuredelstein,bz

MozReview-Commit-ID: 8nzOkvIvwrD
This commit is contained in:
Chung-Sheng Fu
2017-07-31 17:30:38 +08:00
parent 52473fd05d
commit d8967dcf54
5 changed files with 59 additions and 14 deletions

View File

@@ -6,6 +6,7 @@
#include "InputData.h"
#include "mozilla/dom/Touch.h"
#include "nsContentUtils.h"
#include "nsDebug.h"
#include "nsThreadUtils.h"
#include "mozilla/MouseEvents.h"
@@ -130,10 +131,10 @@ MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
// Extract data from weird interfaces.
int32_t identifier = domTouch->Identifier();
int32_t radiusX = domTouch->RadiusX();
int32_t radiusY = domTouch->RadiusY();
float rotationAngle = domTouch->RotationAngle();
float force = domTouch->Force();
int32_t radiusX = domTouch->RadiusX(CallerType::System);
int32_t radiusY = domTouch->RadiusY(CallerType::System);
float rotationAngle = domTouch->RotationAngle(CallerType::System);
float force = domTouch->Force(CallerType::System);
SingleTouchData data(identifier,
ViewAs<ScreenPixel>(domTouch->mRefPoint,