Skip to content

Commit

Permalink
Bug 1825233 - Cut Pointer Events over to RFPTarget. r=tjr
Browse files Browse the repository at this point in the history
Depends on D173944

Differential Revision: https://phabricator.services.mozilla.com/D173945
  • Loading branch information
Tom Schuster committed Mar 31, 2023
1 parent d1c964c commit 11d40d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dom/events/PointerEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ bool PointerEvent::ShouldResistFingerprinting() {
// 3. This event is a mouse pointer event.
// We don't need to check for the system group since pointer events won't be
// dispatched to the system group.
if (!nsContentUtils::ShouldResistFingerprinting("Efficiency Check") ||
if (!nsContentUtils::ShouldResistFingerprinting("Efficiency Check",
RFPTarget::PointerEvents) ||
!mEvent->IsTrusted() ||
mEvent->AsPointerEvent()->mInputSource ==
MouseEvent_Binding::MOZ_SOURCE_MOUSE) {
Expand All @@ -281,7 +282,7 @@ bool PointerEvent::ShouldResistFingerprinting() {

// Pref is checked above, so use true as fallback.
nsCOMPtr<Document> doc = GetDocument();
return doc ? doc->ShouldResistFingerprinting() : true;
return doc ? doc->ShouldResistFingerprinting(RFPTarget::PointerEvents) : true;
}

} // namespace mozilla::dom
Expand Down
3 changes: 2 additions & 1 deletion toolkit/components/resistfingerprinting/RFPTargets.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@


ITEM_VALUE(TouchEvents, 0x0001)
// Reserving 2-4 for Keyboard Events and Pointer Events
ITEM_VALUE(PointerEvents, 0x0002)
// Reserving 3/4 for Keyboard Events

ITEM_VALUE(ScreenOrientation, 0x0005)

Expand Down

0 comments on commit 11d40d0

Please sign in to comment.