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 2021-12-07 16:32:05 +00:00
Родитель 3b35d24196
Коммит b6700e5c63
2 изменённых файлов: 8 добавлений и 2 удалений

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

@ -2303,7 +2303,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();
}

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

@ -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) {