Bug 1743486: More Cut over for resistinfingerprinting API: UseStandinsForNativeColors and Appwindow r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D132515
This commit is contained in:
codyd
2022-03-01 19:11:54 +00:00
parent 68fc5e1a45
commit cc862f5656
2 changed files with 8 additions and 2 deletions

View File

@@ -2297,7 +2297,11 @@ bool nsContentUtils::ShouldResistFingerprinting(nsIChannel* aChannel) {
/* static */
bool nsContentUtils::UseStandinsForNativeColors() {
return ShouldResistFingerprinting() ||
return ShouldResistFingerprinting(
"we want to have consistent colors across the browser if RFP is "
"enabled, so we check the global preference"
"not excluding chrome browsers or webpages, so we call the legacy "
"RFP function to prevent that") ||
StaticPrefs::ui_use_standins_for_native_colors();
}

View File

@@ -2630,7 +2630,9 @@ void AppWindow::SizeShell() {
// If we're using fingerprint resistance, we're going to resize the window
// once we have primary content.
if (nsContentUtils::ShouldResistFingerprinting() &&
if (nsContentUtils::ShouldResistFingerprinting(
"if RFP is enabled we want to round the dimensions of the new"
"new pop up window regardless of their origin") &&
windowType.EqualsLiteral("navigator:browser")) {
// Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) {