Bug 1838415 - Introduce RFPTarget::RoundWindowSize. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D181239
This commit is contained in:
Tom Schuster 2023-06-26 07:17:38 +00:00
parent 64bf8f966f
commit 47164ea0eb
3 changed files with 3 additions and 2 deletions

View file

@ -67,6 +67,7 @@ ITEM_VALUE(FontVisibilityBaseSystem, 1llu << 42)
ITEM_VALUE(FontVisibilityLangPack, 1llu << 43) ITEM_VALUE(FontVisibilityLangPack, 1llu << 43)
ITEM_VALUE(DeviceSensors, 1llu << 44) ITEM_VALUE(DeviceSensors, 1llu << 44)
ITEM_VALUE(FrameRate, 1llu << 45) ITEM_VALUE(FrameRate, 1llu << 45)
ITEM_VALUE(RoundWindowSize, 1llu << 46)
// !!! Don't forget to update kDefaultFingerintingProtections in nsRFPService.cpp // !!! Don't forget to update kDefaultFingerintingProtections in nsRFPService.cpp
// if necessary. // if necessary.

View file

@ -2337,7 +2337,7 @@ static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
"complicated, and this is a conservative behavior to avoid " "complicated, and this is a conservative behavior to avoid "
"exempting something that shouldn't be. It also presents a " "exempting something that shouldn't be. It also presents a "
"uniform behavior for something that's very browser-related.", "uniform behavior for something that's very browser-related.",
RFPTarget::Unknown)) { RFPTarget::RoundWindowSize)) {
/* Unlike position, force size out-of-bounds check only if /* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized size actually was specified. Otherwise, intrinsically sized
windows are broken. */ windows are broken. */

View file

@ -2700,7 +2700,7 @@ void AppWindow::SizeShell() {
if (nsContentUtils::ShouldResistFingerprinting( if (nsContentUtils::ShouldResistFingerprinting(
"if RFP is enabled we want to round the dimensions of the new" "if RFP is enabled we want to round the dimensions of the new"
"new pop up window regardless of their origin", "new pop up window regardless of their origin",
RFPTarget::Unknown) && RFPTarget::RoundWindowSize) &&
windowType.EqualsLiteral("navigator:browser")) { windowType.EqualsLiteral("navigator:browser")) {
// Once we've got primary content, force dimensions. // Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) { if (mPrimaryContentShell || mPrimaryBrowserParent) {