Bug 1832845: Remove privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts pref. r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D218851
This commit is contained in:
Fatih 2024-08-09 12:07:05 +00:00
Родитель d35449d57e
Коммит 29e951c39b
3 изменённых файлов: 8 добавлений и 19 удалений

Просмотреть файл

@ -70,15 +70,18 @@ function enableResistFingerprinting(
) { ) {
return SpecialPowers.pushPrefEnv({ return SpecialPowers.pushPrefEnv({
set: [ set: [
["privacy.resistFingerprinting", true], ["privacy.fingerprintingProtection", true],
[
"privacy.fingerprintingProtection.overrides",
"+CanvasRandomization,+CanvasImageExtractionPrompt,+CanvasExtractionFromThirdPartiesIsBlocked" +
(autoDeclineNoInput
? ",+CanvasExtractionBeforeUserInputIsBlocked"
: ""),
],
[ [
"privacy.resistFingerprinting.randomDataOnCanvasExtract", "privacy.resistFingerprinting.randomDataOnCanvasExtract",
randomDataOnCanvasExtract, randomDataOnCanvasExtract,
], ],
[
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts",
autoDeclineNoInput,
],
], ],
}); });
} }

Просмотреть файл

@ -195,8 +195,6 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
bool hidePermissionDoorhanger = false; bool hidePermissionDoorhanger = false;
if (!aDocument->ShouldResistFingerprinting( if (!aDocument->ShouldResistFingerprinting(
RFPTarget::CanvasImageExtractionPrompt) && RFPTarget::CanvasImageExtractionPrompt) &&
StaticPrefs::
privacy_resistFingerprinting_autoDeclineNoUserInputCanvasPrompts() &&
aDocument->ShouldResistFingerprinting( aDocument->ShouldResistFingerprinting(
RFPTarget::CanvasExtractionBeforeUserInputIsBlocked)) { RFPTarget::CanvasExtractionBeforeUserInputIsBlocked)) {
// If so, see if this is in response to user input. // If so, see if this is in response to user input.
@ -212,8 +210,6 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
// and show some sort of prompt maybe with the doorhanger, maybe not // and show some sort of prompt maybe with the doorhanger, maybe not
hidePermissionDoorhanger |= hidePermissionDoorhanger |=
StaticPrefs::
privacy_resistFingerprinting_autoDeclineNoUserInputCanvasPrompts() &&
aDocument->ShouldResistFingerprinting( aDocument->ShouldResistFingerprinting(
RFPTarget::CanvasExtractionBeforeUserInputIsBlocked) && RFPTarget::CanvasExtractionBeforeUserInputIsBlocked) &&
!dom::UserActivation::IsHandlingUserInput(); !dom::UserActivation::IsHandlingUserInput();

Просмотреть файл

@ -14510,16 +14510,6 @@
value: true value: true
mirror: always mirror: always
# We automatically decline canvas permission requests if they are not initiated
# from user input. Just in case that breaks something, we allow the user to
# revert this behavior with this obscure pref. We do not intend to support this
# long term. If you do set it, to work around some broken website, please file
# a bug with information so we can understand why it is needed.
- name: privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts
type: bool
value: true
mirror: always
# This pref can be used to disable mozAddonManager entirely for fingerprinting # This pref can be used to disable mozAddonManager entirely for fingerprinting
# reasons. Someone like Tor browser will use this pref. # reasons. Someone like Tor browser will use this pref.
# NOTE: We'd like this to be a "hidden" pref once StaticPrefs supports it. # NOTE: We'd like this to be a "hidden" pref once StaticPrefs supports it.