Pier Angelo Vendrame pushed to branch base-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
dc518fc9 by Pier Angelo Vendrame at 2024-03-06T19:21:22+01:00
fixup! Firefox preference overrides.
MB 80: Allow default browser on Windows for Mullvad Browser
- - - - -
afac3196 by Pier Angelo Vendrame at 2024-03-06T19:21:32+01:00
fixup! Bug 9173: Change the default Firefox profile directory to be relative.
Force `GenerateAppUserModelID` to use the profile directory in portable
mode.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- widget/windows/WinTaskbar.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -631,11 +631,6 @@ pref("privacy.query_stripping.strip_on_share.enabled", true);
pref("dom.text-recognition.enabled", false);
#ifdef XP_WIN
-// prefs to disable jump-list entries in the taskbar on Windows (see bug #12885)
-// this pref changes the app's set AUMID to be dependent on the profile path, rather than
-// attempting to read it from the registry; this is necessary so that the file generated
-// by the jumplist system can be properly deleted if it is disabled
-pref("taskbar.grouping.useprofile", true);
pref("browser.taskbar.lists.enabled", false);
pref("browser.taskbar.lists.frequent.enabled", false);
pref("browser.taskbar.lists.tasks.enabled", false);
=====================================
widget/windows/WinTaskbar.cpp
=====================================
@@ -209,6 +209,19 @@ bool WinTaskbar::GenerateAppUserModelID(nsAString& aAppUserModelId,
// If marked as such in prefs, use a hash of the profile path for the id
// instead of the install path hash setup by the installer.
bool useProfile = Preferences::GetBool("taskbar.grouping.useprofile", false);
+
+ {
+ // For portable mode, force the AUMID to be based on the profile directory
+ // instead of reading it from the registry.
+ bool isPortable = true;
+ // Do not even check if taskbar.grouping.useprofile is already true.
+ if (!useProfile &&
+ NS_SUCCEEDED(gDirServiceProvider->GetIsPortableMode(&isPortable)) &&
+ isPortable) {
+ useProfile = true;
+ }
+ }
+
if (useProfile) {
nsCOMPtr<nsIFile> profileDir;
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f3ff42…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f3ff42…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
e764744f by Pier Angelo Vendrame at 2024-03-04T11:24:56+01:00
Bug 41089: Register file types in the Mullvad Browser installer.
This step is needed to set Mullvad Browser as a default browser.
Also, we use the same way as Firefox to identify different installs
uniquely based on the hash of their installation directory.
Therefore, we need to build the CityHash NSIS plugin on Firefox and
consume it in browser.
We do the same for the ApplicationID plugin.
- - - - -
7 changed files:
- projects/browser/build
- projects/browser/config
- projects/browser/windows-installer/browser-install.nsi
- projects/browser/windows-installer/defines.nsh.in
- projects/browser/windows-installer/postupdate.nsi
- projects/browser/windows-installer/registry.nsh
- projects/firefox/build
Changes:
=====================================
projects/browser/build
=====================================
@@ -320,6 +320,7 @@ done
[% IF c('var/mullvad-browser') -%]
pushd $distdir/windows-installer
+ tar -xf $rootdir/[% c('input_files_by_name/firefox') %]/nsis-plugins.tar.[% c("compress_tar") %]
# While Firefox re-uses the uninstaller for this, we cannot do it, because
# we write the uninstaller from the installer.
# Instead, we need to write an updated postupdate.exe also when updating.
=====================================
projects/browser/config
=====================================
@@ -124,6 +124,7 @@ input_files:
- filename: 'defines.nsh'
content: '[% INCLUDE "windows-installer/defines.nsh.in" %]'
refresh_input: 1
+ enable: '[% c("var/windows") %]'
- filename: pe_checksum_fix.py
enable: '[% c("var/windows") %]'
# To generate a new keystore, see how-to-generate-keystore.txt
=====================================
projects/browser/windows-installer/browser-install.nsi
=====================================
@@ -1,5 +1,7 @@
+ !addplugindir nsis-plugins
!include "common.nsh"
!include "registry.nsh"
+ !include "Win\COM.nsh"
;--------------------------------
OutFile "browser-install.exe"
@@ -219,7 +221,7 @@ Section "Browser" SecBrowser
; Write the uninstaller
WriteUninstaller $INSTDIR\uninstall.exe
- !insertmacro UPDATE_REGISTRY
+ Call UpdateRegistry
CreateShortCut "$SMPROGRAMS\${DISPLAY_NAME}.lnk" "$INSTDIR\${EXE_NAME}"
${If} $createDesktopShortcut == "true"
@@ -238,24 +240,57 @@ FunctionEnd
;--------------------------------
; Uninstaller
+
+Function un.GetPathFromString
+ !insertmacro GetPathFromStringImp
+FunctionEnd
+
Section "Uninstall"
+ ; Currently, the uninstaller is written by the installer, only in install
+ ; mode, and we do not have any way to update it.
+ ; However, we keep postupdate.exe updated, so we can use that instead.
+ ExecWait '"$INSTDIR\postupdate.exe" /Uninstall' $0
+
RMDir /r "$INSTDIR"
DeleteRegKey HKCU "${UNINST_KEY}"
- StrCpy $0 ""
- ShellLink::GetShortCutTarget "$SMPROGRAMS\${DISPLAY_NAME}.lnk"
- Pop $0
- ${If} $0 == "$INSTDIR\${EXE_NAME}"
- Delete "$SMPROGRAMS\${DISPLAY_NAME}.lnk"
- ${EndIf}
+ StrCpy $2 "$SMPROGRAMS\${DISPLAY_NAME}.lnk"
+ StrCpy $3 ""
+ ShellLink::GetShortCutTarget "$2"
+ Pop $3
+ ${If} $3 == "$INSTDIR\${EXE_NAME}"
+ ; https://stackoverflow.com/questions/42816091/nsis-remove-pinned-icon-from-t…
+ !insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} ${IID_IStartMenuPinnedList} r0 ""
+ ${If} $0 P<> 0
+ System::Call 'SHELL32::SHCreateItemFromParsingName(ws, p0, g "${IID_IShellItem}", *p0r1)' "$2"
+ ${If} $1 P<> 0
+ ${IStartMenuPinnedList::RemoveFromList} $0 '(r1)'
+ ${IUnknown::Release} $1 ""
+ ${EndIf}
+ ${IUnknown::Release} $0 ""
+ ${EndIf}
- StrCpy $0 ""
- ShellLink::GetShortCutTarget "$DESKTOP\${DISPLAY_NAME}.lnk"
- Pop $0
- ${If} $0 == "$INSTDIR\${EXE_NAME}"
- Delete "$DESKTOP\${DISPLAY_NAME}.lnk"
+ Delete "$2"
${EndIf}
+ FindFirst $1 $2 "$DESKTOP\*.lnk"
+ loop:
+ IfErrors end
+ StrCpy $0 ""
+ ShellLink::GetShortCutTarget "$DESKTOP\$2"
+ ; Do not pop, and pass the value over
+ Call un.GetPathFromString
+ Pop $0
+ ${If} $0 == "$INSTDIR\${EXE_NAME}"
+ Delete "$DESKTOP\$2"
+ ${EndIf}
+ FindNext $1 $2
+ goto loop
+ end:
+ FindClose $1
+
+ ${RefreshShellIcons}
+
; TODO: Optionally remove profiles.
; This operation is not trivial, because it involes finding our installation
; hash, its associated default profile and making sure it is not shared with
=====================================
projects/browser/windows-installer/defines.nsh.in
=====================================
@@ -5,13 +5,7 @@
; Project and display name
!define PROJECT_NAME "[% c('var/Project_Name') %]"
-[% IF c("var/channel") == "release" -%]
- !define DISPLAY_NAME "[% c('var/Project_Name') %]"
-[% ELSIF c("var/testbuild") -%]
- !define DISPLAY_NAME "[% c('var/Project_Name') %] Testbuild"
-[% ELSE -%]
- !define DISPLAY_NAME "[% c('var/Project_Name_Channel') %]"
-[% END -%]
+ !define DISPLAY_NAME "[% c('var/display_name') %]"
!define NAME_NO_SPACES "[% c('var/ProjectName') %]"
!define UPDATE_CHANNEL "[% c('var/channel') FILTER ucfirst %]"
=====================================
projects/browser/windows-installer/postupdate.nsi
=====================================
@@ -1,3 +1,4 @@
+!addplugindir nsis-plugins
!include "FileFunc.nsh"
!include "LogicLib.nsh"
@@ -9,9 +10,14 @@ Icon "${ICON_NAME}"
RequestExecutionLevel user
Function .onInit
+ StrCpy $INSTDIR $EXEDIR
+
${GetOptions} $CMDLINE "/Visible" $0
IfErrors 0 +2
SetSilent silent
+ ${GetOptions} $CMDLINE "/Uninstall" $0
+ IfErrors +2 0
+ Call Uninstall
FunctionEnd
Section PostUpdate "PostUpdate"
@@ -19,10 +25,14 @@ Section PostUpdate "PostUpdate"
IfFileExists $EXEDIR\system-install 0 +2
StrCpy $0 "true"
${If} $0 == "true"
- StrCpy $INSTDIR $EXEDIR
- !insertmacro UPDATE_REGISTRY
+ Call UpdateRegistry
RMDir /r /REBOOTOK $EXEDIR\tobedeleted
${Else}
RMDir /r $EXEDIR\tobedeleted
${EndIf}
SectionEnd
+
+Function Uninstall
+ Call ClearRegistry
+ Quit
+FunctionEnd
=====================================
projects/browser/windows-installer/registry.nsh
=====================================
@@ -1,6 +1,39 @@
+; Utilities to update the registry values in installs.
+; Based on Firefox's NSIS scripts.
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME_NO_SPACES}${UPDATE_CHANNEL}"
-!macro UPDATE_REGISTRY
+; The only "public" functions of this file are UpdateRegistry and ClearRegistry.
+
+var aumid
+
+; Compute the AUMID we will use for our links.
+; We use the same strategy as Firefox: we hash the path of the installation
+; directory with CityHash64.
+; See InitHashAppModelId in toolkit/mozapps/installer/windows/nsis/common.nsh.
+; While we could differentiate between channels (we force one install for each
+; channel), following Firefox has the advantage that we have to adapt/rework
+; less stuff.
+Function ComputeAumid
+ StrCpy $0 $INSTDIR
+ ; NSIS command will not convert from short form to the long one.
+ ; So, this is the way they suggest to get the long name in their docs.
+ System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN}) i .r2'
+ ${If} $2 != "error"
+ CityHash::GetCityHash64 $1
+ Pop $aumid
+ ${Else}
+ StrCpy $aumid "error"
+ ${EndIf}
+FunctionEnd
+
+; Set the installation details.
+; See https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs.
+Function SetUninstallData
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "${DISPLAY_NAME}"
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$\"$INSTDIR\${EXE_NAME}$\""
WriteRegStr HKCU "${UNINST_KEY}" "DisplayVersion" "${VERSION}"
@@ -16,4 +49,332 @@
WriteRegStr HKCU "${UNINST_KEY}" "URLInfoAbout" "${URL_ABOUT}"
WriteRegStr HKCU "${UNINST_KEY}" "URLUpdateInfo" "${URL_UPDATE}"
WriteRegStr HKCU "${UNINST_KEY}" "HelpLink" "${URL_HELP}"
+FunctionEnd
+
+; Register a certain class in the form $browserName$className-$aumid.
+; The classes registered by Firefox are URL, HTML and PDF.
+; The default browser agent checks them before registering anything.
+; See SetDefaultBrowserUserChoice in
+; toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp, FormatProgID and
+; CheckProgIDExists in browser/components/shell/WindowsUserChoice.cpp.
+; See also AddHandlerValues in
+; toolkit/mozapps/installer/windows/nsis/common.nsh.
+Function RegisterClass
+ ; Based on Firefox's AddHandlerValues
+ Pop $3 ; Is this a protocol?
+ Pop $2 ; Icon index
+ Pop $1 ; Description
+ Pop $0 ; Class name
+
+ StrCpy $R0 "${NAME_NO_SPACES}$0-$aumid" ; Expanded class name
+ StrCpy $R1 "${PROJECT_NAME} $1" ; Description with project name
+ StrCpy $R2 "$INSTDIR\${EXE_NAME}" ; Full path to the main executable
+ StrCpy $R3 "Software\Classes\$R0" ; Registry key to update
+
+ WriteRegStr HKCU $R3 "" "$R1"
+ WriteRegStr HKCU $R3 "FriendlyTypeName" "$R1"
+ ${If} $3 == "true"
+ WriteRegStr HKCU $R3 "URL Protocol" ""
+ ${EndIf}
+ ; Firefox sets EditFlags only when empty
+ ReadRegDWORD $R4 HKCU $R3 "EditFlags"
+ ${If} $R4 == ""
+ WriteRegDWORD HKCU $R3 "EditFlags" 0x00000002
+ ${EndIf}
+ WriteRegStr HKCU "$R3\DefaultIcon" "" "$R2,$2"
+ WriteRegStr HKCU "$R3\shell" "" "open"
+ WriteRegStr HKCU "$R3\shell\open\command" "" '"$R2" -osint -url "%1"'
+FunctionEnd
+
+; Register all the classes we need to handle.
+; See RegisterClass.
+Function RegisterClasses
+ Push "URL"
+ Push "URL"
+ Push 1
+ Push true
+ Call RegisterClass
+
+ Push "HTML"
+ Push "HTML Document"
+ Push 1
+ Push false
+ Call RegisterClass
+
+ Push "PDF"
+ Push "PDF Document"
+ Push 5
+ Push false
+ Call RegisterClass
+FunctionEnd
+
+; Register the start menu entry.
+; Microsoft's documentation says this is deprecated after Windows 8, however
+; these entries are still visible in the settings application.
+; See the SetStartMenuInternet macro in
+; browser/installer/windows/nsis/shared.nsh.
+; We do not add entries for features we do not support, such as the safe mode.
+; Also, the functionality to hide/show shortcuts should not apply to Windows 10,
+; so we did not implement that as well.
+Function RegisterStartMenu
+ StrCpy $0 "Software\Clients\StartMenuInternet\${NAME_NO_SPACES}-$aumid"
+ StrCpy $1 "$INSTDIR\${EXE_NAME}"
+ StrCpy $2 "${NAME_NO_SPACES}-$aumid"
+ StrCpy $3 "${NAME_NO_SPACES}URL-$aumid"
+ StrCpy $4 "${NAME_NO_SPACES}HTML-$aumid"
+ StrCpy $5 "${NAME_NO_SPACES}PDF-$aumid"
+
+ WriteRegStr HKCU "$0" "" "${DISPLAY_NAME}"
+ WriteRegStr HKCU "$0\DefaultItcon" "" "$1,0"
+ WriteRegStr HKCU "$0\shell\open\command" "" '"$1"'
+ WriteRegStr HKCU "$0\Capabilities\StartMenu" "StartMenuInternet" "$2"
+ ; Same as Firefox, see SetStartMenuInternet
+ ; URLs
+ WriteRegStr HKCU "$0\Capabilities\URLAssociations" "http" "$3"
+ WriteRegStr HKCU "$0\Capabilities\URLAssociations" "https" "$3"
+ ; mailto is currently unsupported, but we could enable it here, if needed.
+ ; WriteRegStr HKCU "$0\Capabilities\URLAssociations" "mailto" "$3"
+ ; No need to uninstall FTP here, since we had never installed it.
+ ; HTML + aumid
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".htm" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".html" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".shtml" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".xht" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".xhtml" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".svg" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".webp" "$4"
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".avif" "$4"
+ ; PDF + aumid
+ WriteRegStr HKCU "$0\Capabilities\FileAssociations" ".pdf" "$5"
+
+ WriteRegStr HKCU "Software\RegisteredApplications" "$2" "$0\Capabilities"
+FunctionEnd
+
+; Copied from toolkit/mozapps/installer/windows/nsis/common.nsh.
+; Implemented as a macro first so that we can use it both in the installer (to
+; update the registry) and in the uninstaller (to check which links we have to
+; remove). The macro is then expanded in an installer function, and in an
+; uninstaller function, to avoid multiple copies of the same code.
+!macro GetPathFromStringImp
+ Exch $R9
+ Push $R8
+ Push $R7
+
+ StrCpy $R7 0 ; Set the counter to 0.
+
+ ; Handle quoted paths with arguments.
+ StrCpy $R8 $R9 1 ; Copy the first char.
+ StrCmp $R8 '"' +2 +1 ; Is it a "?
+ StrCmp $R8 "'" +1 +9 ; Is it a '?
+ StrCpy $R9 $R9 "" 1 ; Remove the first char.
+ IntOp $R7 $R7 + 1 ; Increment the counter.
+ StrCpy $R8 $R9 1 $R7 ; Starting from the counter copy the next char.
+ StrCmp $R8 "" end +1 ; Are there no more chars?
+ StrCmp $R8 '"' +2 +1 ; Is it a " char?
+ StrCmp $R8 "'" +1 -4 ; Is it a ' char?
+ StrCpy $R9 $R9 $R7 ; Copy chars up to the counter.
+ GoTo end
+
+ ; Handle DefaultIcon paths. DefaultIcon paths are not quoted and end with
+ ; a , and a number.
+ IntOp $R7 $R7 - 1 ; Decrement the counter.
+ StrCpy $R8 $R9 1 $R7 ; Copy one char from the end minus the counter.
+ StrCmp $R8 '' +4 +1 ; Are there no more chars?
+ StrCmp $R8 ',' +1 -3 ; Is it a , char?
+ StrCpy $R9 $R9 $R7 ; Copy chars up to the end minus the counter.
+ GoTo end
+
+ ; Handle unquoted paths with arguments. An unquoted path with arguments
+ ; must be an 8dot3 path.
+ StrCpy $R7 -1 ; Set the counter to -1 so it will start at 0.
+ IntOp $R7 $R7 + 1 ; Increment the counter.
+ StrCpy $R8 $R9 1 $R7 ; Starting from the counter copy the next char.
+ StrCmp $R8 "" end +1 ; Are there no more chars?
+ StrCmp $R8 " " +1 -3 ; Is it a space char?
+ StrCpy $R9 $R9 $R7 ; Copy chars up to the counter.
+
+ end:
+ ClearErrors
+
+ Pop $R7
+ Pop $R8
+ Exch $R9
!macroend
+
+Function GetPathFromString
+ !insertmacro GetPathFromStringImp
+FunctionEnd
+
+; Create a Software\Classes\Applications\$exeName.exe entry, shared by all the
+; installs.
+; If this key has already been registered by another channel/install, we just
+; make sure the open entry has the expected command line flags.
+; See SetStartMenuInternet in browser/installer/windows/nsis/shared.nsh.
+Function RegisterTypes
+ StrCpy $0 "Software\Classes\Applications\${EXE_NAME}"
+ StrCpy $1 "$0\shell\open\command"
+ StrCpy $2 "$0\SupportedTypes"
+
+ ReadRegStr $3 HKCU "$1" ""
+ ${If} $3 != ""
+ ; If the user already has something, we just update it to make sure it
+ ; contains the -osint flag. This should not be a problem if we created these
+ ; entries, but we still check them in case they were added manually.
+ Push $3
+ Call GetPathFromString
+ Pop $3
+ WriteRegStr HKCU "$1" "" '"$3" -osint -url "%1"'
+ ${Else}
+ WriteRegStr HKCU "$1" "" '"$INSTDIR\${EXE_NAME}" -osint -url "%1"'
+ WriteRegStr HKCU "$0\DefaultIcon" "" "$INSTDIR\${EXE_NAME},1"
+
+ ; Same as Firefox, see SetStartMenuInternet
+ WriteRegStr HKCU "$2" ".apng" ""
+ WriteRegStr HKCU "$2" ".bmp" ""
+ WriteRegStr HKCU "$2" ".flac" ""
+ WriteRegStr HKCU "$2" ".gif" ""
+ WriteRegStr HKCU "$2" ".htm" ""
+ WriteRegStr HKCU "$2" ".html" ""
+ WriteRegStr HKCU "$2" ".ico" ""
+ WriteRegStr HKCU "$2" ".jfif" ""
+ WriteRegStr HKCU "$2" ".jpeg" ""
+ WriteRegStr HKCU "$2" ".jpg" ""
+ WriteRegStr HKCU "$2" ".json" ""
+ WriteRegStr HKCU "$2" ".m4a" ""
+ WriteRegStr HKCU "$2" ".mp3" ""
+ WriteRegStr HKCU "$2" ".oga" ""
+ WriteRegStr HKCU "$2" ".ogg" ""
+ WriteRegStr HKCU "$2" ".ogv" ""
+ WriteRegStr HKCU "$2" ".opus" ""
+ WriteRegStr HKCU "$2" ".pdf" ""
+ WriteRegStr HKCU "$2" ".pjpeg" ""
+ WriteRegStr HKCU "$2" ".pjp" ""
+ WriteRegStr HKCU "$2" ".png" ""
+ WriteRegStr HKCU "$2" ".rdf" ""
+ WriteRegStr HKCU "$2" ".shtml" ""
+ WriteRegStr HKCU "$2" ".svg" ""
+ WriteRegStr HKCU "$2" ".webm" ""
+ WriteRegStr HKCU "$2" ".avif" ""
+ WriteRegStr HKCU "$2" ".xht" ""
+ WriteRegStr HKCU "$2" ".xhtml" ""
+ WriteRegStr HKCU "$2" ".xml" ""
+ ${EndIf}
+FunctionEnd
+
+; Set the AUMID to all links pointing to our exe in a certain directory.
+; See RegisterAumid.
+Function RegisterAumidDirectory
+ Pop $0
+ FindFirst $1 $2 "$0\*.lnk"
+ loop:
+ IfErrors end
+ ShellLink::GetShortCutTarget "$0\$2"
+ ; Do not pop, and pass the value over
+ Call GetPathFromString
+ Pop $3
+ ${If} $3 == "$INSTDIR\${EXE_NAME}"
+ ApplicationID::Set "$0\$2" "$aumid" "true"
+ ${EndIf}
+ FindNext $1 $2
+ goto loop
+ end:
+ FindClose $1
+FunctionEnd
+
+; Firefox expects the installer to write its AUMID in the registry.
+; It is hardcoded to use Software\Mozilla\Firefox\TaskBarIDs, but we change it
+; in widget/windows/WinTaskbar.cpp in one of our patches.
+; See InitHashAppModelId in toolkit/mozapps/installer/windows/nsis/common.nsh.
+;
+; In addition to that, we need to associate the AUMID to every link as per
+; specifications:
+; https://learn.microsoft.com/en-us/windows/win32/shell/appids#application-de…
+Function RegisterAumid
+ StrCpy $0 "Software\${APP_DIR}\${PROJECT_NAME}\TaskBarIDs"
+ WriteRegStr HKCU "$0" "$INSTDIR" "$aumid"
+
+ Push $DESKTOP
+ Call RegisterAumidDirectory
+ Push "$QUICKLAUNCH\User Pinned\TaskBar"
+ Call RegisterAumidDirectory
+ Push "$QUICKLAUNCH\User Pinned\StartMenu"
+ Call RegisterAumidDirectory
+FunctionEnd
+
+; Sets all the needed registry keys during an install, or run all the needed
+; maintenance in the post update.
+Function UpdateRegistry
+ Call SetUninstallData
+ Call ComputeAumid
+ ${If} $aumid != "error"
+ Call RegisterClasses
+ Call RegisterStartMenu
+ Call RegisterTypes
+ Call RegisterAumid
+ ${EndIf}
+FunctionEnd
+
+;--------------------------------
+; Uninstall helper
+; We do not ship an uninstaller in the updates.
+; However, to be able to undo changes done during the post update step, we call
+; `postupdate.exe` with the `/Uninstall`. They are implemented here.
+; `postupdate.exe` always runs as it was an installer, which is the reason for
+; which the following functions do not have the `un.` prefix.
+; However, they have an `Un` suffix, and each `Un$function` function undoes the
+; changes done by the corresponding `$function` function.
+
+Function UnregisterClass
+ Pop $0 ; Class name
+ StrCpy $1 "${NAME_NO_SPACES}$0-$aumid" ; Expanded class name
+ DeleteRegKey HKCU "Software\Classes\$1"
+FunctionEnd
+
+Function UnregisterClasses
+ Push "URL"
+ Call UnregisterClass
+ Push "HTML"
+ Call UnregisterClass
+ Push "PDF"
+ Call UnregisterClass
+FunctionEnd
+
+Function UnregisterStartMenu
+ DeleteRegValue HKCU "Software\RegisteredApplications" "${NAME_NO_SPACES}-$aumid"
+ DeleteRegKey HKCU "Software\Clients\StartMenuInternet\${NAME_NO_SPACES}-$aumid"
+FunctionEnd
+
+Function UnregisterTypes
+ StrCpy $0 "Software\Classes\Applications\${EXE_NAME}"
+ StrCpy $1 "$0\shell\open\command"
+ ReadRegStr $2 HKCU "$1" ""
+ ${If} $2 != ""
+ Push $2
+ Call GetPathFromString
+ Pop $3
+ ; Do not do anything if we are not the installation that created the keys.
+ ${If} $3 == "$INSTDIR\${EXE_NAME}"
+ DeleteRegKey HKCU "$0"
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+Function UnregisterAumid
+ DeleteRegValue HKCU "Software\${APP_DIR}\${PROJECT_NAME}\TaskBarIDs" "$INSTDIR"
+ ; No need to do anything on the links, as they will be deleted.
+FunctionEnd
+
+; Remove all the registry changes we have done.
+Function ClearRegistry
+ Call ComputeAumid
+ ${If} $aumid != "error"
+ ; We take for granted we do not have conflicting aumids.
+ Call UnregisterClasses
+ Call UnregisterStartMenu
+ Call UnregisterAumid
+ ${EndIf}
+ ; The types do not depend on the AUMID. So, even though we add them only
+ ; when we have an AUMID (they would be useless otherwise), we always check if
+ ; we should remove them.
+ Call UnregisterTypes
+FunctionEnd
=====================================
projects/firefox/build
=====================================
@@ -6,7 +6,8 @@
}) %]
distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/build
-mkdir -p [% dest_dir _ '/' _ c('filename') %]
+[% SET out_dir = dest_dir _ '/' _ c('filename') -%]
+mkdir -p [% out_dir %]
[% IF c("var/windows") -%]
# Setting up fxc2
@@ -276,6 +277,20 @@ cp -L obj-*/dist/bin/geckodriver* $distdir
[% END -%]
[% END -%]
+[% IF c("var/mullvad-browser") && c("var/windows") -%]
+ function make_nsis_plugin {
+ pushd "other-licenses/nsis/Contrib/$1"
+ make CXX=[% c("arch") %]-w64-mingw32-clang++
+ cp "$1.dll" $distdir/nsis-plugins/
+ [% c("touch") %] "$distdir/nsis-plugins/$1.dll"
+ popd
+ }
+
+ mkdir -p $distdir/nsis-plugins
+ make_nsis_plugin ApplicationID
+ make_nsis_plugin CityHash
+[% END -%]
+
cd $distdir
[% IF c("var/linux") -%]
@@ -328,7 +343,7 @@ echo "Starting to package artifacts $(date)"
[% c('tar', {
tar_src => [ browserdir ],
- tar_args => '-caf ' _ dest_dir _ '/' _ c('filename') _ '/browser.tar.' _ c('compress_tar'),
+ tar_args => '-caf ' _ out_dir _ '/browser.tar.' _ c('compress_tar'),
}) %]
# Debug symbols
@@ -339,13 +354,13 @@ echo "Starting to package artifacts $(date)"
mv include [% c('var/project-name') %]/
[% c('tar', {
tar_src => [ c('var/project-name') ],
- tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/browser-debug-symbols.tar.xz',
+ tar_args => '-cJf ' _ out_dir _ '/browser-debug-symbols.tar.xz',
}) %]
popd
[% ELSIF c("var/windows") -%]
[% c('zip', {
zip_src => [ 'Debug' ],
- zip_args => dest_dir _ '/' _ c('filename') _ '/browser-debug-symbols.zip',
+ zip_args => out_dir _ '/browser-debug-symbols.zip',
}) %]
[% END -%]
@@ -354,12 +369,12 @@ llvm-strip geckodriver*
[% IF c("var/windows") -%]
[% c('zip', {
zip_src => [ 'geckodriver.exe' ],
- zip_args => dest_dir _ '/' _ c('filename') _ '/geckodriver.zip',
+ zip_args => out_dir _ '/geckodriver.zip',
}) %]
[% ELSE -%]
[% c('tar', {
tar_src => [ 'geckodriver' ],
- tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver.tar.xz',
+ tar_args => '-cJf ' _ out_dir _ '/geckodriver.tar.xz',
}) %]
[% END -%]
@@ -367,12 +382,19 @@ llvm-strip geckodriver*
[% IF c("var/updater_enabled") -%]
[% c('zip', {
zip_src => [ 'mar-tools' ],
- zip_args => dest_dir _ '/' _ c('filename') _ '/' _ 'mar-tools-' _ c("var/osname") _ '-' _ c("var/torbrowser_version") _ '.zip',
+ zip_args => out_dir _ '/' _ 'mar-tools-' _ c("var/osname") _ '-' _ c("var/torbrowser_version") _ '.zip',
+ }) %]
+[% END -%]
+
+[% IF c("var/mullvad-browser") && c("var/windows") -%]
+ [% c('tar', {
+ tar_src => [ 'nsis-plugins' ],
+ tar_args => '-caf ' _ out_dir _ '/nsis-plugins.tar.' _ c('compress_tar'),
}) %]
[% END -%]
[% IF c("var/build_infos_json") -%]
- cat > "[% dest_dir _ '/' _ c('filename') _ '/build-infos.json' %]" << EOF_BUILDINFOS
+ cat > "[% out_dir _ '/build-infos.json' %]" << EOF_BUILDINFOS
{
"firefox_platform_version" : "[% c("var/firefox_platform_version") %]",
"firefox_buildid" : "$MOZ_BUILD_DATE"
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-115.8.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
572c0bd7 by Henry Wilkes at 2024-03-05T16:48:52+00:00
fixup! Add TorStrings module for localization
Bug 42305: Tidy up stable strings, ready for new translation CI.
Cherry-picked from Bug 42221: Remove unused strings now that 13.0 is stable.
Plus removed aboutTor.dtd after Bug 41333.
- - - - -
7 changed files:
- toolkit/torbutton/chrome/locale/en-US/aboutTBUpdate.dtd
- − toolkit/torbutton/chrome/locale/en-US/aboutTor.dtd
- toolkit/torbutton/chrome/locale/en-US/settings.properties
- toolkit/torbutton/chrome/locale/en-US/torConnect.properties
- toolkit/torbutton/chrome/locale/en-US/torbutton.dtd
- toolkit/torbutton/chrome/locale/en-US/torbutton.properties
- toolkit/torbutton/chrome/locale/en-US/torlauncher.properties
Changes:
=====================================
toolkit/torbutton/chrome/locale/en-US/aboutTBUpdate.dtd
=====================================
@@ -7,9 +7,6 @@
<!ENTITY aboutTBUpdate.version "Version">
<!ENTITY aboutTBUpdate.releaseDate "Release Date">
<!ENTITY aboutTBUpdate.releaseNotes "Release Notes">
-
-<!-- TODO: Remove the entries below when 13.0 becomes stable -->
-<!ENTITY aboutTBUpdate.updated "Tor Browser has been updated.">
<!-- LOCALIZATION NOTE: the following entities are used to create the link to
- obtain more information about the latest update.
- The markup on the page looks like this:
=====================================
toolkit/torbutton/chrome/locale/en-US/aboutTor.dtd deleted
=====================================
@@ -1,43 +0,0 @@
-<!-- Copyright (c) 2022, The Tor Project, Inc.
- - This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- Remove this entire file once stable reaches 13.0 -->
-
-<!ENTITY aboutTor.title "About Tor">
-
-<!ENTITY aboutTor.viewChangelog.label "View Changelog">
-
-<!ENTITY aboutTor.ready.label "Explore. Privately.">
-<!ENTITY aboutTor.ready2.label "You’re ready for the world’s most private browsing experience.">
-<!ENTITY aboutTor.failure.label "Something Went Wrong!">
-<!ENTITY aboutTor.failure2.label "Tor is not working in this browser.">
-
-<!ENTITY aboutTor.search.label "Search with DuckDuckGo">
-<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com">
-
-<!ENTITY aboutTor.torbrowser_user_manual_questions.label "Questions?">
-<!ENTITY aboutTor.torbrowser_user_manual_link.label "Check our Tor Browser Manual »">
-<!-- The next two entities are used within the browser's Help menu. -->
-<!ENTITY aboutTor.torbrowser_user_manual.accesskey "M">
-<!ENTITY aboutTor.torbrowser_user_manual.label "Tor Browser Manual">
-
-<!ENTITY aboutTor.tor_mission.label "The Tor Project is a US 501(c)(3) non-profit organization advancing human rights and freedoms by creating and deploying free and open source anonymity and privacy technologies, supporting their unrestricted availability and use, and furthering their scientific and popular understanding.">
-<!ENTITY aboutTor.getInvolved.label "Get Involved »">
-
-<!ENTITY aboutTor.newsletter.tagline "Get the latest news from Tor straight to your inbox.">
-<!ENTITY aboutTor.newsletter.link_text "Sign up for Tor News.">
-<!ENTITY aboutTor.donationBanner.freeToUse "Tor is free to use because of donations from people like you.">
-<!ENTITY aboutTor.donationBanner.buttonA "Donate Now">
-
-<!ENTITY aboutTor.alpha.ready.label "Test. Thoroughly.">
-<!ENTITY aboutTor.alpha.ready2.label "You’re ready to test the world’s most private browsing experience.">
-<!ENTITY aboutTor.alpha.bannerDescription "Tor Browser Alpha is an unstable version of Tor Browser you can use to preview new features, test their performance and provide feedback before release.">
-<!ENTITY aboutTor.alpha.bannerLink "Report a bug on the Tor Forum">
-
-<!ENTITY aboutTor.nightly.ready.label "Test. Thoroughly.">
-<!ENTITY aboutTor.nightly.ready2.label "You’re ready to test the world’s most private browsing experience.">
-<!ENTITY aboutTor.nightly.bannerDescription "Tor Browser Nightly is an unstable version of Tor Browser you can use to preview new features, test their performance and provide feedback before release.">
-<!ENTITY aboutTor.nightly.bannerLink "Report a bug on the Tor Forum">
=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -26,8 +26,6 @@ settings.quickstartCheckbox=Always connect automatically
# Bridge settings
settings.bridgesHeading=Bridges
-# Old description used up to 12.0 - TODO: remove when 12.5 becomes stable:
-settings.bridgesDescription=Bridges help you access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
settings.bridgesDescription2=Bridges help you securely access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
settings.bridgeLocation=Your location
settings.bridgeLocationAutomatic=Automatic
@@ -88,15 +86,6 @@ settings.builtinBridgeMeekAzureDescription2=Makes it look like you’re connecte
settings.bridgeButtonConnect=Connect
settings.bridgeButtonAccept=OK
-# Old dialog strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
-settings.builtinBridgeTitle=Built-In Bridges
-settings.builtinBridgeDescription=Tor Browser includes some specific types of bridges known as “pluggable transports”.
-settings.builtinBridgeObfs4=obfs4
-settings.builtinBridgeObfs4Description=obfs4 is a type of built-in bridge that makes your Tor traffic look random. They are also less likely to be blocked than their predecessors, obfs3 bridges.
-settings.builtinBridgeSnowflakeDescription=Snowflake is a built-in bridge that defeats censorship by routing your connection through Snowflake proxies, ran by volunteers.
-settings.builtinBridgeMeekAzureDescription=meek-azure is a built-in bridge that makes it look like you are using a Microsoft web site instead of using Tor.
-# end
-
# Request bridges dialog
settings.requestBridgeDialogTitle=Request Bridge
settings.submitCaptcha=Submit
@@ -132,7 +121,3 @@ settings.allowedPortsPlaceholder=Comma-separated values
# Log dialog
settings.torLogDialogTitle=Tor Logs
settings.copyLog=Copy Tor Log to Clipboard
-
-# Legacy strings - remove once 12.0 has gone EOL
-settings.provideBridgeTitle=Provide Bridge
-settings.provideBridgeHeader=Enter bridge information from a trusted source
=====================================
toolkit/torbutton/chrome/locale/en-US/torConnect.properties
=====================================
@@ -52,12 +52,3 @@ torConnect.autoBootstrappingFailed=Automatic configuration failed
torConnect.autoBootstrappingAllFailed=None of the configurations we tried worked
torConnect.cannotDetermineCountry=Unable to determine user country
torConnect.noSettingsForCountry=No settings available for your location
-
-# Urlbar strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
-torConnect.torNotConnectedConcise=Not Connected
-torConnect.torConnectingConcise=Connecting…
-torConnect.torConnectedConcise=Connected
-
-# connectMessage strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
-torConnect.tryAgainMessage=Tor Browser has failed to establish a connection to the Tor Network
-torConnect.connectMessage=Changes to Tor Settings will not take effect until you connect
=====================================
toolkit/torbutton/chrome/locale/en-US/torbutton.dtd
=====================================
@@ -8,9 +8,6 @@
<!ENTITY torbutton.context_menu.new_circuit_key "C">
<!ENTITY torbutton.circuit_display.title "Tor Circuit">
-<!-- Old circuit display strings used up to 12.0 - remove when 12.5 becomes
- - stable. -->
-<!ENTITY torbutton.circuit_display.new_circuit "New Circuit for this Site">
<!-- Onion services strings. Strings are kept here for ease of translation. -->
<!ENTITY torbutton.onionServices.authPrompt.tooltip "Open onion service client authentication prompt">
=====================================
toolkit/torbutton/chrome/locale/en-US/torbutton.properties
=====================================
@@ -22,25 +22,6 @@ torbutton.circuit_display.region-guard-node = %S (guard)
torbutton.circuit_display.new-circuit-guard-description = Your guard node may not change
torbutton.circuit_display.new-circuit-bridge-description = Your bridge may not change
-# Old circuit display strings used up to 12.0 - remove when 12.5 becomes stable:
-torbutton.circuit_display.relay = Relay
-torbutton.circuit_display.unknown_country = Unknown country
-torbutton.circuit_display.guard = Guard
-torbutton.circuit_display.guard_note = Your [Guard] node may not change.
-torbutton.circuit_display.learn_more = Learn more
-torbutton.circuit_display.click_to_copy = Click to Copy
-torbutton.circuit_display.copied = Copied!
-# end
-
-# External app blocker strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
-torbutton.popup.external.title = Download an external file type?
-torbutton.popup.external.app = Tor Browser cannot display this file. You will need to open it with another application.\n\n
-torbutton.popup.external.note = Some types of files can cause applications to connect to the Internet without using Tor.\n\n
-torbutton.popup.external.suggest = To be safe, you should only open downloaded files while offline, or use a Tor Live CD such as Tails.\n
-torbutton.popup.launch = Download file
-torbutton.popup.cancel = Cancel
-torbutton.popup.dontask = Automatically download files from now on
-
# Download pane warning
torbutton.download.warning.title = Be careful opening downloads
# %S will be a link to the Tails operating system website. With the content given by torbutton.download.warning.tails_brand_name
@@ -131,18 +112,3 @@ profileProblemTitle=%S Profile Problem
profileReadOnly=You cannot run %S from a read-only file system. Please copy %S to another location before trying to use it.
profileReadOnlyMac=You cannot run %S from a read-only file system. Please copy %S to your Desktop or Applications folder before trying to use it.
profileAccessDenied=%S does not have permission to access the profile. Please adjust your file system permissions and try again.
-
-# New identity warning
-torbutton.popup.no_newnym = Torbutton cannot safely give you a new identity. It does not have access to the Tor Control Port.\n\nAre you running Tor Browser Bundle?
-
-
-## Legacy
-
-# Preferences for mobile: these strings are still referenced, but we should
-# check whether this feature is still used
-torbutton.security_settings.menu.title = Security Settings
-
-# The notification that appears when maximizing the browser with letterboxing disabled
-# TODO: This string is not needed as of 12.5a5, and has a replacement in Base Browser!
-# To be removed when 12.0 will not need new updates.
-torbutton.maximize_warning = Maximizing Tor Browser can allow websites to determine your monitor size, which can be used to track you. We recommend that you leave Tor Browser windows in their original default size.
=====================================
toolkit/torbutton/chrome/locale/en-US/torlauncher.properties
=====================================
@@ -59,7 +59,3 @@ torlauncher.bootstrapWarning.pt_missing=missing pluggable transport
torlauncher.nsresult.NS_ERROR_NET_RESET=The connection to the server was lost.
torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Could not connect to the server.
torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to the proxy.
-
-## 12.5-only strings that can be removed once it goes EOL.
-
-torlauncher.tor_controlconn_failed=Could not connect to Tor control port.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/572c0bd…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/572c0bd…
You're receiving this email because of your account on gitlab.torproject.org.
ma1 pushed to branch mullvad-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
bbf5383c by hackademix at 2024-03-06T18:20:36+01:00
Bug 41918: Option to reuse last window size when letterboxing is enabled.
- - - - -
6 changed files:
- browser/app/profile/001-base-profile.js
- dom/base/nsContentUtils.cpp
- dom/base/nsContentUtils.h
- toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
- toolkit/components/windowwatcher/nsWindowWatcher.cpp
- xpfe/appshell/AppWindow.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -379,6 +379,8 @@ pref("privacy.resistFingerprinting.letterboxing", true);
pref("privacy.resistFingerprinting.letterboxing.vcenter", true);
// tor-browser#41917 letterboxing gradient background
pref("privacy.resistFingerprinting.letterboxing.gradient", true);
+// tor-browser#41918: should we reuse last window sizes if letterboxing is enabled
+pref("privacy.resistFingerprinting.letterboxing.rememberSize", false);
// tor-browser#41695: how many warnings we show if user closes them without restoring the window size
pref("privacy.resistFingerprinting.resizeWarnings", 3);
// tor-browser#33282: new windows start at 1400x900 when there's enough screen space, otherwise down by 200x100 blocks
=====================================
dom/base/nsContentUtils.cpp
=====================================
@@ -2663,6 +2663,18 @@ void nsContentUtils::CalcRoundedWindowSizeForResistingFingerprinting(
*aOutputHeight = resultHeight;
}
+bool nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting() {
+ return !(
+ Preferences::GetBool("privacy.resistFingerprinting.letterboxing",
+ false) &&
+ // We want to round window size at least once in the browser's life time:
+ // AppWindow::ForceRoundedDimensions() will set this preference to true.
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.didForceSize", false) &&
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.rememberSize", false));
+}
+
bool nsContentUtils::ThreadsafeIsCallerChrome() {
return NS_IsMainThread() ? IsCallerChrome()
: IsCurrentThreadRunningChromeWorker();
=====================================
dom/base/nsContentUtils.h
=====================================
@@ -406,6 +406,10 @@ class nsContentUtils {
bool aSetOuterWidth, bool aSetOuterHeight, int32_t* aOutputWidth,
int32_t* aOutputHeight);
+ // Tell if we actually want to round size of new windows for RFP,
+ // depending on letterboxing status and user's preference.
+ static bool ShouldRoundWindowSizeForResistingFingerprinting();
+
/**
* Returns the parent node of aChild crossing document boundaries, but skips
* any cross-process parent frames and continues with the nearest in-process
=====================================
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
=====================================
@@ -18,6 +18,8 @@ const kPrefLetterboxingVcenter =
"privacy.resistFingerprinting.letterboxing.vcenter";
const kPrefLetterboxingGradient =
"privacy.resistFingerprinting.letterboxing.gradient";
+const kPrefLetterboxingDidForceSize =
+ "privacy.resistFingerprinting.letterboxing.didForceSize";
const kTopicDOMWindowOpened = "domwindowopened";
@@ -221,6 +223,7 @@ class _RFPHelper {
_handlePrefChanged(data) {
switch (data) {
case kPrefResistFingerprinting:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
this._handleResistFingerprintingChanged();
break;
case kPrefSpoofEnglish:
@@ -228,6 +231,7 @@ class _RFPHelper {
this._handleSpoofEnglishChanged();
break;
case kPrefLetterboxing:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
case kPrefLetterboxingVcenter:
case kPrefLetterboxingGradient:
this._handleLetterboxingPrefChanged();
=====================================
toolkit/components/windowwatcher/nsWindowWatcher.cpp
=====================================
@@ -2333,7 +2333,9 @@ static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
screenDesktopRect.Size() / screenCssToDesktopScale;
if (aSizeSpec.SizeSpecified()) {
- if (!nsContentUtils::ShouldResistFingerprinting()) {
+ if (!(nsContentUtils::ShouldResistFingerprinting() &&
+ nsContentUtils::
+ ShouldRoundWindowSizeForResistingFingerprinting())) {
/* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized
windows are broken. */
=====================================
xpfe/appshell/AppWindow.cpp
=====================================
@@ -1123,8 +1123,9 @@ NS_IMETHODIMP AppWindow::GetAvailScreenSize(int32_t* aAvailWidth,
return NS_OK;
}
-// Rounds window size to 1000x1000, or, if there isn't enough available
-// screen space, to a multiple of 200x100.
+// Rounds window size to privacy.window.maxInnerWidth x
+// privacy.window.maxInnerWidth, or, if there isn't enough available screen
+// space, to a multiple of 200x100.
NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
if (mIsHiddenWindow) {
return NS_OK;
@@ -1164,6 +1165,11 @@ NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
SetPrimaryContentSize(targetSizeDev.width, targetSizeDev.height);
+ // Ensure we force initial rounded size at least once, as checked by
+ // nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting().
+ Preferences::SetBool("privacy.resistFingerprinting.letterboxing.didForceSize",
+ true);
+
return NS_OK;
}
@@ -2703,7 +2709,8 @@ 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") &&
- windowType.EqualsLiteral("navigator:browser")) {
+ windowType.EqualsLiteral("navigator:browser") &&
+ nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting()) {
// Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) {
ForceRoundedDimensions();
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/bbf…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/bbf…
You're receiving this email because of your account on gitlab.torproject.org.
ma1 pushed to branch base-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
f3ff4275 by hackademix at 2024-03-06T18:18:16+01:00
Bug 41918: Option to reuse last window size when letterboxing is enabled.
- - - - -
6 changed files:
- browser/app/profile/001-base-profile.js
- dom/base/nsContentUtils.cpp
- dom/base/nsContentUtils.h
- toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
- toolkit/components/windowwatcher/nsWindowWatcher.cpp
- xpfe/appshell/AppWindow.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -380,6 +380,8 @@ pref("privacy.resistFingerprinting.letterboxing", true);
pref("privacy.resistFingerprinting.letterboxing.vcenter", true);
// tor-browser#41917 letterboxing gradient background
pref("privacy.resistFingerprinting.letterboxing.gradient", true);
+// tor-browser#41918: should we reuse last window sizes if letterboxing is enabled
+pref("privacy.resistFingerprinting.letterboxing.rememberSize", false);
// tor-browser#41695: how many warnings we show if user closes them without restoring the window size
pref("privacy.resistFingerprinting.resizeWarnings", 3);
// tor-browser#33282: new windows start at 1400x900 when there's enough screen space, otherwise down by 200x100 blocks
=====================================
dom/base/nsContentUtils.cpp
=====================================
@@ -2663,6 +2663,18 @@ void nsContentUtils::CalcRoundedWindowSizeForResistingFingerprinting(
*aOutputHeight = resultHeight;
}
+bool nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting() {
+ return !(
+ Preferences::GetBool("privacy.resistFingerprinting.letterboxing",
+ false) &&
+ // We want to round window size at least once in the browser's life time:
+ // AppWindow::ForceRoundedDimensions() will set this preference to true.
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.didForceSize", false) &&
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.rememberSize", false));
+}
+
bool nsContentUtils::ThreadsafeIsCallerChrome() {
return NS_IsMainThread() ? IsCallerChrome()
: IsCurrentThreadRunningChromeWorker();
=====================================
dom/base/nsContentUtils.h
=====================================
@@ -406,6 +406,10 @@ class nsContentUtils {
bool aSetOuterWidth, bool aSetOuterHeight, int32_t* aOutputWidth,
int32_t* aOutputHeight);
+ // Tell if we actually want to round size of new windows for RFP,
+ // depending on letterboxing status and user's preference.
+ static bool ShouldRoundWindowSizeForResistingFingerprinting();
+
/**
* Returns the parent node of aChild crossing document boundaries, but skips
* any cross-process parent frames and continues with the nearest in-process
=====================================
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
=====================================
@@ -18,6 +18,8 @@ const kPrefLetterboxingVcenter =
"privacy.resistFingerprinting.letterboxing.vcenter";
const kPrefLetterboxingGradient =
"privacy.resistFingerprinting.letterboxing.gradient";
+const kPrefLetterboxingDidForceSize =
+ "privacy.resistFingerprinting.letterboxing.didForceSize";
const kTopicDOMWindowOpened = "domwindowopened";
@@ -221,6 +223,7 @@ class _RFPHelper {
_handlePrefChanged(data) {
switch (data) {
case kPrefResistFingerprinting:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
this._handleResistFingerprintingChanged();
break;
case kPrefSpoofEnglish:
@@ -228,6 +231,7 @@ class _RFPHelper {
this._handleSpoofEnglishChanged();
break;
case kPrefLetterboxing:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
case kPrefLetterboxingVcenter:
case kPrefLetterboxingGradient:
this._handleLetterboxingPrefChanged();
=====================================
toolkit/components/windowwatcher/nsWindowWatcher.cpp
=====================================
@@ -2333,7 +2333,9 @@ static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
screenDesktopRect.Size() / screenCssToDesktopScale;
if (aSizeSpec.SizeSpecified()) {
- if (!nsContentUtils::ShouldResistFingerprinting()) {
+ if (!(nsContentUtils::ShouldResistFingerprinting() &&
+ nsContentUtils::
+ ShouldRoundWindowSizeForResistingFingerprinting())) {
/* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized
windows are broken. */
=====================================
xpfe/appshell/AppWindow.cpp
=====================================
@@ -1123,8 +1123,9 @@ NS_IMETHODIMP AppWindow::GetAvailScreenSize(int32_t* aAvailWidth,
return NS_OK;
}
-// Rounds window size to 1000x1000, or, if there isn't enough available
-// screen space, to a multiple of 200x100.
+// Rounds window size to privacy.window.maxInnerWidth x
+// privacy.window.maxInnerWidth, or, if there isn't enough available screen
+// space, to a multiple of 200x100.
NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
if (mIsHiddenWindow) {
return NS_OK;
@@ -1164,6 +1165,11 @@ NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
SetPrimaryContentSize(targetSizeDev.width, targetSizeDev.height);
+ // Ensure we force initial rounded size at least once, as checked by
+ // nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting().
+ Preferences::SetBool("privacy.resistFingerprinting.letterboxing.didForceSize",
+ true);
+
return NS_OK;
}
@@ -2703,7 +2709,8 @@ 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") &&
- windowType.EqualsLiteral("navigator:browser")) {
+ windowType.EqualsLiteral("navigator:browser") &&
+ nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting()) {
// Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) {
ForceRoundedDimensions();
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f3ff427…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f3ff427…
You're receiving this email because of your account on gitlab.torproject.org.
ma1 pushed to branch tor-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
f4471d9f by hackademix at 2024-03-06T16:53:19+00:00
Bug 41918: Option to reuse last window size when letterboxing is enabled.
- - - - -
6 changed files:
- browser/app/profile/001-base-profile.js
- dom/base/nsContentUtils.cpp
- dom/base/nsContentUtils.h
- toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
- toolkit/components/windowwatcher/nsWindowWatcher.cpp
- xpfe/appshell/AppWindow.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -380,6 +380,8 @@ pref("privacy.resistFingerprinting.letterboxing", true);
pref("privacy.resistFingerprinting.letterboxing.vcenter", true);
// tor-browser#41917 letterboxing gradient background
pref("privacy.resistFingerprinting.letterboxing.gradient", true);
+// tor-browser#41918: should we reuse last window sizes if letterboxing is enabled
+pref("privacy.resistFingerprinting.letterboxing.rememberSize", false);
// tor-browser#41695: how many warnings we show if user closes them without restoring the window size
pref("privacy.resistFingerprinting.resizeWarnings", 3);
// tor-browser#33282: new windows start at 1400x900 when there's enough screen space, otherwise down by 200x100 blocks
=====================================
dom/base/nsContentUtils.cpp
=====================================
@@ -2663,6 +2663,18 @@ void nsContentUtils::CalcRoundedWindowSizeForResistingFingerprinting(
*aOutputHeight = resultHeight;
}
+bool nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting() {
+ return !(
+ Preferences::GetBool("privacy.resistFingerprinting.letterboxing",
+ false) &&
+ // We want to round window size at least once in the browser's life time:
+ // AppWindow::ForceRoundedDimensions() will set this preference to true.
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.didForceSize", false) &&
+ Preferences::GetBool(
+ "privacy.resistFingerprinting.letterboxing.rememberSize", false));
+}
+
bool nsContentUtils::ThreadsafeIsCallerChrome() {
return NS_IsMainThread() ? IsCallerChrome()
: IsCurrentThreadRunningChromeWorker();
=====================================
dom/base/nsContentUtils.h
=====================================
@@ -406,6 +406,10 @@ class nsContentUtils {
bool aSetOuterWidth, bool aSetOuterHeight, int32_t* aOutputWidth,
int32_t* aOutputHeight);
+ // Tell if we actually want to round size of new windows for RFP,
+ // depending on letterboxing status and user's preference.
+ static bool ShouldRoundWindowSizeForResistingFingerprinting();
+
/**
* Returns the parent node of aChild crossing document boundaries, but skips
* any cross-process parent frames and continues with the nearest in-process
=====================================
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
=====================================
@@ -18,6 +18,8 @@ const kPrefLetterboxingVcenter =
"privacy.resistFingerprinting.letterboxing.vcenter";
const kPrefLetterboxingGradient =
"privacy.resistFingerprinting.letterboxing.gradient";
+const kPrefLetterboxingDidForceSize =
+ "privacy.resistFingerprinting.letterboxing.didForceSize";
const kTopicDOMWindowOpened = "domwindowopened";
@@ -221,6 +223,7 @@ class _RFPHelper {
_handlePrefChanged(data) {
switch (data) {
case kPrefResistFingerprinting:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
this._handleResistFingerprintingChanged();
break;
case kPrefSpoofEnglish:
@@ -228,6 +231,7 @@ class _RFPHelper {
this._handleSpoofEnglishChanged();
break;
case kPrefLetterboxing:
+ Service.prefs.clearUserPref(kPrefLetterboxingDidForceSize);
case kPrefLetterboxingVcenter:
case kPrefLetterboxingGradient:
this._handleLetterboxingPrefChanged();
=====================================
toolkit/components/windowwatcher/nsWindowWatcher.cpp
=====================================
@@ -2333,7 +2333,9 @@ static void SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
screenDesktopRect.Size() / screenCssToDesktopScale;
if (aSizeSpec.SizeSpecified()) {
- if (!nsContentUtils::ShouldResistFingerprinting()) {
+ if (!(nsContentUtils::ShouldResistFingerprinting() &&
+ nsContentUtils::
+ ShouldRoundWindowSizeForResistingFingerprinting())) {
/* Unlike position, force size out-of-bounds check only if
size actually was specified. Otherwise, intrinsically sized
windows are broken. */
=====================================
xpfe/appshell/AppWindow.cpp
=====================================
@@ -1123,8 +1123,9 @@ NS_IMETHODIMP AppWindow::GetAvailScreenSize(int32_t* aAvailWidth,
return NS_OK;
}
-// Rounds window size to 1000x1000, or, if there isn't enough available
-// screen space, to a multiple of 200x100.
+// Rounds window size to privacy.window.maxInnerWidth x
+// privacy.window.maxInnerWidth, or, if there isn't enough available screen
+// space, to a multiple of 200x100.
NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
if (mIsHiddenWindow) {
return NS_OK;
@@ -1164,6 +1165,11 @@ NS_IMETHODIMP AppWindow::ForceRoundedDimensions() {
SetPrimaryContentSize(targetSizeDev.width, targetSizeDev.height);
+ // Ensure we force initial rounded size at least once, as checked by
+ // nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting().
+ Preferences::SetBool("privacy.resistFingerprinting.letterboxing.didForceSize",
+ true);
+
return NS_OK;
}
@@ -2703,7 +2709,8 @@ 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") &&
- windowType.EqualsLiteral("navigator:browser")) {
+ windowType.EqualsLiteral("navigator:browser") &&
+ nsContentUtils::ShouldRoundWindowSizeForResistingFingerprinting()) {
// Once we've got primary content, force dimensions.
if (mPrimaryContentShell || mPrimaryBrowserParent) {
ForceRoundedDimensions();
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f4471d9…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f4471d9…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch mullvad-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
187a1c0b by Pier Angelo Vendrame at 2024-03-06T17:41:34+01:00
fixup! Firefox preference overrides.
Bug 42377: Hidden fonts should obey the allow list.
Remove .Helvetica Neue DeskInterface from the allow list.
This font might not be actually available, and in any case fonts
starting with period will not be displayed by the browser.
- - - - -
fd5f4778 by Pier Angelo Vendrame at 2024-03-06T17:41:45+01:00
Bug 42377: Hidden fonts should obey the allow list.
Hidden font families were automatically added to the
`font.system.whitelist`, which is a behavior that conflicts with our
font picking.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- gfx/thebes/gfxPlatformFontList.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -654,7 +654,7 @@ pref("toolkit.winRegisterApplicationRestart", false);
pref("gfx.bundled-fonts.activate", 1);
#ifdef XP_MACOSX
-pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, .Helvetica Neue DeskInterface, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
+pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
// Armenian
pref("font.name-list.serif.x-armn", "Noto Serif Armenian, Times, Times New Roman");
=====================================
gfx/thebes/gfxPlatformFontList.cpp
=====================================
@@ -401,12 +401,6 @@ void gfxPlatformFontList::ApplyWhitelist() {
AutoTArray<RefPtr<gfxFontFamily>, 128> accepted;
bool whitelistedFontFound = false;
for (const auto& entry : mFontFamilies) {
- if (entry.GetData()->IsHidden()) {
- // Hidden system fonts are exempt from whitelisting, but don't count
- // towards determining whether we "kept" any (user-visible) fonts
- accepted.AppendElement(entry.GetData());
- continue;
- }
nsAutoCString fontFamilyName(entry.GetKey());
ToLowerCase(fontFamilyName);
if (familyNamesWhitelist.Contains(fontFamilyName)) {
@@ -442,8 +436,7 @@ void gfxPlatformFontList::ApplyWhitelist(
AutoTArray<fontlist::Family::InitData, 128> accepted;
bool keptNonHidden = false;
for (auto& f : aFamilies) {
- if (f.mVisibility == FontVisibility::Hidden ||
- familyNamesWhitelist.Contains(f.mKey)) {
+ if (familyNamesWhitelist.Contains(f.mKey)) {
accepted.AppendElement(f);
if (f.mVisibility != FontVisibility::Hidden) {
keptNonHidden = true;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/82…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/82…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch base-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
d89c5260 by Pier Angelo Vendrame at 2024-03-06T17:40:57+01:00
fixup! Firefox preference overrides.
Bug 42377: Hidden fonts should obey the allow list.
Remove .Helvetica Neue DeskInterface from the allow list.
This font might not be actually available, and in any case fonts
starting with period will not be displayed by the browser.
- - - - -
047d94e4 by Pier Angelo Vendrame at 2024-03-06T17:41:06+01:00
Bug 42377: Hidden fonts should obey the allow list.
Hidden font families were automatically added to the
`font.system.whitelist`, which is a behavior that conflicts with our
font picking.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- gfx/thebes/gfxPlatformFontList.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -656,7 +656,7 @@ pref("toolkit.winRegisterApplicationRestart", false);
pref("gfx.bundled-fonts.activate", 1);
#ifdef XP_MACOSX
-pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, .Helvetica Neue DeskInterface, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
+pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
// Armenian
pref("font.name-list.serif.x-armn", "Noto Serif Armenian, Times, Times New Roman");
=====================================
gfx/thebes/gfxPlatformFontList.cpp
=====================================
@@ -401,12 +401,6 @@ void gfxPlatformFontList::ApplyWhitelist() {
AutoTArray<RefPtr<gfxFontFamily>, 128> accepted;
bool whitelistedFontFound = false;
for (const auto& entry : mFontFamilies) {
- if (entry.GetData()->IsHidden()) {
- // Hidden system fonts are exempt from whitelisting, but don't count
- // towards determining whether we "kept" any (user-visible) fonts
- accepted.AppendElement(entry.GetData());
- continue;
- }
nsAutoCString fontFamilyName(entry.GetKey());
ToLowerCase(fontFamilyName);
if (familyNamesWhitelist.Contains(fontFamilyName)) {
@@ -442,8 +436,7 @@ void gfxPlatformFontList::ApplyWhitelist(
AutoTArray<fontlist::Family::InitData, 128> accepted;
bool keptNonHidden = false;
for (auto& f : aFamilies) {
- if (f.mVisibility == FontVisibility::Hidden ||
- familyNamesWhitelist.Contains(f.mKey)) {
+ if (familyNamesWhitelist.Contains(f.mKey)) {
accepted.AppendElement(f);
if (f.mVisibility != FontVisibility::Hidden) {
keptNonHidden = true;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/01ceac…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/01ceac…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
406293f5 by Pier Angelo Vendrame at 2024-03-06T11:30:40+01:00
fixup! Firefox preference overrides.
Bug 42377: Hidden fonts should obey the allow list.
Remove .Helvetica Neue DeskInterface from the allow list.
This font might not be actually available, and in any case fonts
starting with period will not be displayed by the browser.
- - - - -
a8c62f72 by Pier Angelo Vendrame at 2024-03-06T17:00:49+01:00
Bug 42377: Hidden fonts should obey the allow list.
Hidden font families were automatically added to the
`font.system.whitelist`, which is a behavior that conflicts with our
font picking.
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js
- gfx/thebes/gfxPlatformFontList.cpp
Changes:
=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -656,7 +656,7 @@ pref("toolkit.winRegisterApplicationRestart", false);
pref("gfx.bundled-fonts.activate", 1);
#ifdef XP_MACOSX
-pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, .Helvetica Neue DeskInterface, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
+pref("font.system.whitelist", "AppleGothic, Apple Color Emoji, Arial, Courier, Courier New, Geneva, Georgia, Heiti TC, Helvetica, Helvetica Neue, Hiragino Kaku Gothic ProN, Kailasa, Lucida Grande, Menlo, Monaco, PingFang HK, PingFang SC, PingFang TC, Songti SC, Songti TC, Tahoma, Thonburi, Times, Times New Roman, Verdana, STIX Two Math, Noto Sans Adlam, Noto Sans Armenian, Noto Sans Balinese, Noto Sans Bamum, Noto Sans Bassa Vah, Noto Sans Batak, Noto Sans Bengali, Noto Sans Buginese, Noto Sans Buhid, Noto Sans Canadian Aboriginal, Noto Sans Chakma, Noto Sans Cham, Noto Sans Cherokee, Noto Sans Coptic, Noto Sans Deseret, Noto Sans Devanagari, Noto Sans Elbasan, Noto Sans Ethiopic, Noto Sans Georgian, Noto Sans Grantha, Noto Sans Gujarati, Noto Sans Gunjala Gondi, Noto Sans Gurmukhi, Noto Sans Hanifi Rohingya, Noto Sans Hanunoo, Noto Sans Hebrew, Noto Sans Kannada, Noto Sans Khmer, Noto Sans Javanese, Noto Sans Kayah Li, Noto Sans Khojki, Noto Sans Khudawadi, Noto Sans Lao, Noto Sans Lepcha, Noto Sans Limbu, Noto Sans Lisu, Noto Sans Mahajani, Noto Sans Malayalam, Noto Sans Mandaic, Noto Sans Masaram Gondi, Noto Sans Medefaidrin, Noto Sans Meetei Mayek, Noto Sans Mende Kikakui, Noto Sans Miao, Noto Sans Modi, Noto Sans Mongolian, Noto Sans Mro, Noto Sans Myanmar, Noto Sans Multani, Noto Sans Newa, Noto Sans New Tai Lue, Noto Sans NKo, Noto Sans Ol Chiki, Noto Sans Oriya, Noto Sans Osage, Noto Sans Osmanya, Noto Sans Pahawh Hmong, Noto Sans Pau Cin Hau, Noto Sans Rejang, Noto Sans Runic, Noto Sans Samaritan, Noto Sans Saurashtra, Noto Sans Sharada, Noto Sans Shavian, Noto Sans Sinhala, Noto Sans Sora Sompeng, Noto Sans Soyombo, Noto Sans Sundanese, Noto Sans Syloti Nagri, Noto Sans Symbols 2, Noto Sans Symbols, Noto Sans Syriac, Noto Sans Tagalog, Noto Sans Tagbanwa, Noto Sans Tai Le, Noto Sans Tai Tham, Noto Sans Tai Viet, Noto Sans Takri, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Thaana, Noto Sans Tifinagh Adrar, Noto Sans Tifinagh Agraw Imazighen, Noto Sans Tifinagh Ahaggar, Noto Sans Tifinagh Air, Noto Sans Tifinagh APT, Noto Sans Tifinagh Azawagh, Noto Sans Tifinagh Ghat, Noto Sans Tifinagh Hawad, Noto Sans Tifinagh, Noto Sans Tifinagh Rhissa Ixa, Noto Sans Tifinagh SIL, Noto Sans Tifinagh Tawellemmet, Noto Sans Tirhuta, Noto Sans Vai, Noto Sans Wancho, Noto Sans Warang Citi, Noto Sans Yi, Noto Sans Zanabazar Square, Noto Serif Armenian, Noto Serif Balinese, Noto Serif Bengali, Noto Serif Devanagari, Noto Serif Dogra, Noto Serif Ethiopic, Noto Serif Georgian, Noto Serif Grantha, Noto Serif Gujarati, Noto Serif Gurmukhi, Noto Serif Hebrew, Noto Serif Kannada, Noto Serif Khmer, Noto Serif Khojki, Noto Serif Lao, Noto Serif Malayalam, Noto Serif Myanmar, Noto Serif NP Hmong, Noto Serif Sinhala, Noto Serif Tamil, Noto Serif Telugu, Noto Serif Tibetan, Noto Serif Yezidi");
// Armenian
pref("font.name-list.serif.x-armn", "Noto Serif Armenian, Times, Times New Roman");
=====================================
gfx/thebes/gfxPlatformFontList.cpp
=====================================
@@ -401,12 +401,6 @@ void gfxPlatformFontList::ApplyWhitelist() {
AutoTArray<RefPtr<gfxFontFamily>, 128> accepted;
bool whitelistedFontFound = false;
for (const auto& entry : mFontFamilies) {
- if (entry.GetData()->IsHidden()) {
- // Hidden system fonts are exempt from whitelisting, but don't count
- // towards determining whether we "kept" any (user-visible) fonts
- accepted.AppendElement(entry.GetData());
- continue;
- }
nsAutoCString fontFamilyName(entry.GetKey());
ToLowerCase(fontFamilyName);
if (familyNamesWhitelist.Contains(fontFamilyName)) {
@@ -442,8 +436,7 @@ void gfxPlatformFontList::ApplyWhitelist(
AutoTArray<fontlist::Family::InitData, 128> accepted;
bool keptNonHidden = false;
for (auto& f : aFamilies) {
- if (f.mVisibility == FontVisibility::Hidden ||
- familyNamesWhitelist.Contains(f.mKey)) {
+ if (familyNamesWhitelist.Contains(f.mKey)) {
accepted.AppendElement(f);
if (f.mVisibility != FontVisibility::Hidden) {
keptNonHidden = true;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a85148…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a85148…
You're receiving this email because of your account on gitlab.torproject.org.