Bug 1810959 - Use precise RFP check for PresShell::EventHandler::DispatchEventToDOM. r=masayuki,tjr

Differential Revision: https://phabricator.services.mozilla.com/D167137
This commit is contained in:
Tom Schuster 2023-01-25 08:39:22 +00:00
parent cd1ae66bc1
commit 87ff1c1ea1
2 changed files with 2 additions and 5 deletions

View file

@ -8634,7 +8634,8 @@ nsresult PresShell::EventHandler::DispatchEventToDOM(
}
}
if (eventTarget) {
if (aEvent->IsBlockedForFingerprintingResistance()) {
if (eventTarget->OwnerDoc()->ShouldResistFingerprinting() &&
aEvent->IsBlockedForFingerprintingResistance()) {
aEvent->mFlags.mOnlySystemGroupDispatchInContent = true;
} else if (aEvent->mMessage == eKeyPress) {
// If eKeyPress event is marked as not dispatched in the default event

View file

@ -498,10 +498,6 @@ bool WidgetEvent::IsAllowedToDispatchInSystemGroup() const {
}
bool WidgetEvent::IsBlockedForFingerprintingResistance() const {
if (!nsContentUtils::ShouldResistFingerprinting()) {
return false;
}
switch (mClass) {
case eKeyboardEventClass: {
const WidgetKeyboardEvent* keyboardEvent = AsKeyboardEvent();