Skip to content

Commit

Permalink
Bug 1838415 - Introduce RFPTarget::RoundWindowSize. r=tjr
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Schuster committed Jun 26, 2023
1 parent 64bf8f9 commit 47164ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions toolkit/components/resistfingerprinting/RFPTargets.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ITEM_VALUE(FontVisibilityBaseSystem, 1llu << 42)
ITEM_VALUE(FontVisibilityLangPack, 1llu << 43)
ITEM_VALUE(DeviceSensors, 1llu << 44)
ITEM_VALUE(FrameRate, 1llu << 45)
ITEM_VALUE(RoundWindowSize, 1llu << 46)

// !!! Don't forget to update kDefaultFingerintingProtections in nsRFPService.cpp
// if necessary.
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/windowwatcher/nsWindowWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
"complicated, and this is a conservative behavior to avoid "
"exempting something that shouldn't be. It also presents a "
"uniform behavior for something that's very browser-related.",
RFPTarget::Unknown)) {
RFPTarget::RoundWindowSize)) {
/* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized
windows are broken. */
Expand Down
2 changes: 1 addition & 1 deletion xpfe/appshell/AppWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,7 @@ void AppWindow::SizeShell() {
if (nsContentUtils::ShouldResistFingerprinting(
"if RFP is enabled we want to round the dimensions of the new"
"new pop up window regardless of their origin",
RFPTarget::Unknown) &&
RFPTarget::RoundWindowSize) &&
windowType.EqualsLiteral("navigator:browser")) {
// Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) {
Expand Down

0 comments on commit 47164ea

Please sign in to comment.