lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 20226 discussions
[Git][tpo/applications/tor-browser][tor-browser-128.9.0esr-14.5-1] fixup! TB 40597: Implement TorSettings module
by morgan (@morgan) 08 Apr '25

08 Apr '25
morgan pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 6c29db65 by Caspar Schutijser at 2025-04-08T19:52:46+00:00 fixup! TB 40597: Implement TorSettings module TB 43628: TorConnect: handle unavailability of NetworkLinkService API Fixes TorConnect on e.g. OpenBSD. - - - - - 1 changed file: - toolkit/modules/TorConnect.sys.mjs Changes: ===================================== toolkit/modules/TorConnect.sys.mjs ===================================== @@ -16,7 +16,9 @@ ChromeUtils.defineESModuleGetters(lazy, { }); ChromeUtils.defineLazyGetter(lazy, "NetworkLinkService", () => { - return Cc["@mozilla.org/network/network-link-service;1"].getService( + // NetworkLinkService is unavailable on some platforms like openBSD. + // See tor-browser#43628. + return Cc["@mozilla.org/network/network-link-service;1"]?.getService( Ci.nsINetworkLinkService ); }); @@ -888,7 +890,7 @@ export const TorConnect = { */ _updateInternetStatus() { let newStatus; - if (lazy.NetworkLinkService.linkStatusKnown) { + if (lazy.NetworkLinkService?.linkStatusKnown) { newStatus = lazy.NetworkLinkService.isLinkUp ? InternetStatus.Online : InternetStatus.Offline; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6c29db6… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6c29db6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser] Pushed new tag mullvad-browser-128.9.0esr-14.5-1-build2
by morgan (@morgan) 08 Apr '25

08 Apr '25
morgan pushed new tag mullvad-browser-128.9.0esr-14.5-1-build2 at The Tor Project / Applications / Mullvad Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/tree/mullv… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.9.0esr-14.5-1] 4 commits: fixup! MB 112: Updater customization for Mullvad Browser
by morgan (@morgan) 08 Apr '25

08 Apr '25
morgan pushed to branch mullvad-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 9762aa0d by Henry Wilkes at 2025-04-08T20:09:01+01:00 fixup! MB 112: Updater customization for Mullvad Browser MB 411: Drop mullvadbrowser.post_update.url. Also, no longer require an override page to be set to open about:mullvad-browser after an update. - - - - - ca49f66b by Henry Wilkes at 2025-04-08T20:09:01+01:00 fixup! MB 39: Add home page about:mullvad-browser MB 411: Use the same update URL in about:mullvad-browser as the about dialog. - - - - - 02beae18 by Henry Wilkes at 2025-04-08T20:09:02+01:00 MB 419: Mullvad Browser migration procedures. This commit implements the the Mullvad Browser's version of _migrateUI. - - - - - e0823401 by Henry Wilkes at 2025-04-08T20:38:19+01:00 fixup! MB 1: Mullvad Browser branding MB 411: Set startup.homepage_override_url on mb-nightly to be used instead of app.releaseNotesURL.aboutDialog. - - - - - 4 changed files: - browser/branding/mb-nightly/pref/firefox-branding.js - browser/components/BrowserContentHandler.sys.mjs - browser/components/BrowserGlue.sys.mjs - browser/components/mullvad-browser/AboutMullvadBrowserParent.sys.mjs Changes: ===================================== browser/branding/mb-nightly/pref/firefox-branding.js ===================================== @@ -4,7 +4,11 @@ // This file contains branding-specific prefs. -pref("startup.homepage_override_url", ""); +// startup.homepage_override_url is used in about:mullvad-browser after an +// update because app.releaseNotesURL.aboutDialog is about:blank for mb-nightly. +// I.e. we want the update to show in about:mullvad-browser, whilst it is not +// shown in the about dialog. See mullvad-browser#411. +pref("startup.homepage_override_url", "https://nightlies.tbb.torproject.org/"); // app.update.url.manual: URL user can browse to manually if for some reason // all update installation attempts fail. // app.update.url.details: a default value for the "More information about this ===================================== browser/components/BrowserContentHandler.sys.mjs ===================================== @@ -876,18 +876,19 @@ nsBrowserContentHandler.prototype = { "%OLD_BASE_BROWSER_VERSION%", old_forkVersion ); - if (overridePage && AppConstants.BASE_BROWSER_UPDATE) { + if (AppConstants.BASE_BROWSER_UPDATE) { + // NOTE: We ignore any overridePage value, which can come from the + // openURL attribute within the updates.xml file. // Mullvad Browser, copied from tor-browser: Instead of opening // the post-update "override page" directly, we include a link in // about:mullvad-browser. - prefb.setCharPref("mullvadbrowser.post_update.url", overridePage); prefb.setBoolPref( "mullvadbrowser.post_update.shouldNotify", true ); - // If the user's homepage is about:tor, we will inform them - // about the update on that page; otherwise, we arrange to - // open about:tor in a secondary tab. + // If the user's homepage is about:mullvad-browser, we will inform + // them about the update on that page; otherwise, we arrange to + // open about:mullvad-browser in a secondary tab. overridePage = startPage === "about:mullvad-browser" ? "" ===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -1515,6 +1515,9 @@ BrowserGlue.prototype = { // Base Browser-specific version of _migrateUI. this._migrateUIBB(); + // Mullvad Browser-specific version of _migrateUI. + this._migrateUIMB(); + if (!Services.prefs.prefHasUserValue(PREF_PDFJS_ISDEFAULT_CACHE_STATE)) { lazy.PdfJs.checkIsDefault(this._isNewProfile); } @@ -4694,6 +4697,37 @@ BrowserGlue.prototype = { Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION); }, + // Use this method for any MB migration that can be run just before showing + // the UI. + // Anything that critically needs to be migrated earlier should not use this. + _migrateUIMB() { + // Version 1: Mullvad Browser 14.5a6: Clear home page update url preference + // (mullvad-browser#411). + const MB_MIGRATION_VERSION = 1; + const MIGRATION_PREF = "mullvadbrowser.migration.version"; + + // If we decide to force updating users to pass through any version + // following 14.5, we can remove this check, and check only whether + // MIGRATION_PREF has a user value, like Mozilla does. + if (this._isNewProfile) { + // Do not migrate fresh profiles + Services.prefs.setIntPref(MIGRATION_PREF, MB_MIGRATION_VERSION); + return; + } else if (this._isNewProfile === undefined) { + // If this happens, check if upstream updated their function and do not + // set this member anymore! + console.error("_migrateUIMB: this._isNewProfile is undefined."); + } + + const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0); + + if (currentVersion < 1) { + Services.prefs.clearUserPref("mullvadbrowser.post_update.url"); + } + + Services.prefs.setIntPref(MIGRATION_PREF, MB_MIGRATION_VERSION); + }, + async _showUpgradeDialog() { const data = await lazy.OnboardingMessageProvider.getUpgradeMessage(); const { gBrowser } = lazy.BrowserWindowTracker.getTopWindow(); ===================================== browser/components/mullvad-browser/AboutMullvadBrowserParent.sys.mjs ===================================== @@ -5,21 +5,28 @@ export class AboutMullvadBrowserParent extends JSWindowActorParent { receiveMessage(message) { const shouldNotifyPref = "mullvadbrowser.post_update.shouldNotify"; switch (message.name) { - case "AboutMullvadBrowser:GetUpdateData": + case "AboutMullvadBrowser:GetUpdateData": { if (!Services.prefs.getBoolPref(shouldNotifyPref, false)) { return Promise.resolve(null); } Services.prefs.clearUserPref(shouldNotifyPref); + // Try use the same URL as the about dialog. See mullvad-browser#411. + let updateURL = Services.urlFormatter.formatURLPref( + "app.releaseNotesURL.aboutDialog" + ); + if (updateURL === "about:blank") { + updateURL = Services.urlFormatter.formatURLPref( + "startup.homepage_override_url" + ); + } + return Promise.resolve({ version: Services.prefs.getCharPref( "browser.startup.homepage_override.mullvadbrowser.version" ), - url: - Services.prefs.getCharPref("mullvadbrowser.post_update.url", "") || - Services.urlFormatter.formatURLPref( - "startup.homepage_override_url" - ), + url: updateURL, }); + } } return undefined; } View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/26… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/26… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.9.0esr-14.5-1] BB 43544: DoH pane undefined error in Privacy and Security
by Dan Ballard (@dan) 08 Apr '25

08 Apr '25
Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 6b951761 by Dan Ballard at 2025-04-08T10:48:15-07:00 BB 43544: DoH pane undefined error in Privacy and Security From: Sarah Jamie Lewis <sarah(a)openprivacy.ca> Date: Fri, 28 Feb 2025 09:30:45 -0800 Subject: [PATCH 1/1] DoH Settings: Check for nulll gParentalControlsService When the parental controls service is disabled in a build, the DoH settings now display the correct stauts when Increased or Max Protection is enabled. Previously, selecting either of these options would cause DoH to be enabled, but the "Status" and "Provider" fields would not be properly populated, due to a check on the gParentalControlsService causing an error. This check is now identical to the same check in DownloadIntegration.sys.mjs Apply 1 suggestion(s) to 1 file(s) Co-authored-by: ma1 <giorgio(a)maone.net> - - - - - 1 changed file: - browser/components/preferences/privacy.js Changes: ===================================== browser/components/preferences/privacy.js ===================================== @@ -54,11 +54,12 @@ ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => { return new Localization(["branding/brand.ftl", "browser/aboutLogins.ftl"]); }); -XPCOMUtils.defineLazyServiceGetter( - lazy, - "gParentalControlsService", - "@mozilla.org/parental-controls-service;1", - "nsIParentalControlsService" +ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () => + "@mozilla.org/parental-controls-service;1" in Cc + ? Cc["@mozilla.org/parental-controls-service;1"].createInstance( + Ci.nsIParentalControlsService + ) + : null ); XPCOMUtils.defineLazyScriptGetter( @@ -741,7 +742,7 @@ var gPrivacyPane = { mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY ) { - if (lazy.gParentalControlsService.parentalControlsEnabled) { + if (lazy.gParentalControlsService?.parentalControlsEnabled) { return "preferences-doh-status-not-active"; } let confirmationState = Services.dns.currentTrrConfirmationState; @@ -764,7 +765,7 @@ var gPrivacyPane = { if ( (mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY) && - lazy.gParentalControlsService.parentalControlsEnabled + lazy.gParentalControlsService?.parentalControlsEnabled ) { errReason = Services.dns.getTRRSkipReasonName( Ci.nsITRRSkipReason.TRR_PARENTAL_CONTROL View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6b95176… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6b95176… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.9.0esr-14.5-1] BB 43544: DoH pane undefined error in Privacy and Security
by Dan Ballard (@dan) 08 Apr '25

08 Apr '25
Dan Ballard pushed to branch mullvad-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 26691804 by Dan Ballard at 2025-04-08T10:40:04-07:00 BB 43544: DoH pane undefined error in Privacy and Security From: Sarah Jamie Lewis <sarah(a)openprivacy.ca> Date: Fri, 28 Feb 2025 09:30:45 -0800 Subject: [PATCH 1/1] DoH Settings: Check for nulll gParentalControlsService When the parental controls service is disabled in a build, the DoH settings now display the correct stauts when Increased or Max Protection is enabled. Previously, selecting either of these options would cause DoH to be enabled, but the "Status" and "Provider" fields would not be properly populated, due to a check on the gParentalControlsService causing an error. This check is now identical to the same check in DownloadIntegration.sys.mjs Apply 1 suggestion(s) to 1 file(s) Co-authored-by: ma1 <giorgio(a)maone.net> - - - - - 1 changed file: - browser/components/preferences/privacy.js Changes: ===================================== browser/components/preferences/privacy.js ===================================== @@ -54,11 +54,12 @@ ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => { return new Localization(["branding/brand.ftl", "browser/aboutLogins.ftl"]); }); -XPCOMUtils.defineLazyServiceGetter( - lazy, - "gParentalControlsService", - "@mozilla.org/parental-controls-service;1", - "nsIParentalControlsService" +ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () => + "@mozilla.org/parental-controls-service;1" in Cc + ? Cc["@mozilla.org/parental-controls-service;1"].createInstance( + Ci.nsIParentalControlsService + ) + : null ); // TODO: module import via ChromeUtils.defineModuleGetter @@ -735,7 +736,7 @@ var gPrivacyPane = { mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY ) { - if (lazy.gParentalControlsService.parentalControlsEnabled) { + if (lazy.gParentalControlsService?.parentalControlsEnabled) { return "preferences-doh-status-not-active"; } let confirmationState = Services.dns.currentTrrConfirmationState; @@ -758,7 +759,7 @@ var gPrivacyPane = { if ( (mode == Ci.nsIDNSService.MODE_TRRFIRST || mode == Ci.nsIDNSService.MODE_TRRONLY) && - lazy.gParentalControlsService.parentalControlsEnabled + lazy.gParentalControlsService?.parentalControlsEnabled ) { errReason = Services.dns.getTRRSkipReasonName( Ci.nsITRRSkipReason.TRR_PARENTAL_CONTROL View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/266… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/266… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.9.0esr-14.5-1] 3 commits: fixup! TB 41668: Tweaks to the Base Browser updater for Tor Browser
by Pier Angelo Vendrame (@pierov) 08 Apr '25

08 Apr '25
Pier Angelo Vendrame pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: a6eda23a by Henry Wilkes at 2025-04-08T17:23:52+00:00 fixup! TB 41668: Tweaks to the Base Browser updater for Tor Browser TB 43567: Drop torbrowser.post_update.url. Also, no longer require an override page to be set to open about:tor after an update. - - - - - 4ef1a8dd by Henry Wilkes at 2025-04-08T17:23:52+00:00 fixup! TB 7494: Create local home page for TBB. TB 43567: Use the same update URL in about:tor as the about dialog. - - - - - bb06f3c6 by Henry Wilkes at 2025-04-08T17:23:52+00:00 fixup! TB 41435: Add a Tor Browser migration function TB 43567: Clear torbrowser.post_update.url. - - - - - 3 changed files: - browser/components/BrowserContentHandler.sys.mjs - browser/components/BrowserGlue.sys.mjs - browser/components/abouttor/AboutTorMessage.sys.mjs Changes: ===================================== browser/components/BrowserContentHandler.sys.mjs ===================================== @@ -876,18 +876,12 @@ nsBrowserContentHandler.prototype = { "%OLD_BASE_BROWSER_VERSION%", old_forkVersion ); - if (overridePage && AppConstants.BASE_BROWSER_UPDATE) { + if (AppConstants.BASE_BROWSER_UPDATE) { // Tor Browser: Instead of opening the post-update "override page" // directly, we ensure that about:tor will be opened, which should // notify the user that their browser was updated. - // - // The overridePage comes from the openURL attribute within the - // updates.xml file or, if no showURL action is present, from the - // startup.homepage_override_url pref. - Services.prefs.setCharPref( - "torbrowser.post_update.url", - overridePage - ); + // NOTE: We ignore any overridePage value, which can come from the + // openURL attribute within the updates.xml file. Services.prefs.setBoolPref( "torbrowser.post_update.shouldNotify", true ===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -4830,7 +4830,9 @@ BrowserGlue.prototype = { // Version 6: Tor Browser 14.5a3: Clear preference for TorSettings that is // no longer used (tor-browser#41921). // Drop unused TorConnect setting (tor-browser#43462). - const TBB_MIGRATION_VERSION = 6; + // Version 6: Tor Browser 14.5a6: Clear home page update url preference + // (tor-browser#43567). + const TBB_MIGRATION_VERSION = 7; const MIGRATION_PREF = "torbrowser.migration.version"; // If we decide to force updating users to pass through any version @@ -4917,6 +4919,10 @@ BrowserGlue.prototype = { Services.prefs.clearUserPref("torbrowser.bootstrap.allow_internet_test"); } + if (currentVersion < 7) { + Services.prefs.clearUserPref("torbrowser.post_update.url"); + } + Services.prefs.setIntPref(MIGRATION_PREF, TBB_MIGRATION_VERSION); }, ===================================== browser/components/abouttor/AboutTorMessage.sys.mjs ===================================== @@ -26,13 +26,20 @@ export const AboutTorMessage = { const shouldNotifyPref = "torbrowser.post_update.shouldNotify"; if (Services.prefs.getBoolPref(shouldNotifyPref, false)) { Services.prefs.clearUserPref(shouldNotifyPref); + // Try use the same URL as the about dialog. See tor-browser#43567. + let updateURL = Services.urlFormatter.formatURLPref( + "app.releaseNotesURL.aboutDialog" + ); + if (updateURL === "about:blank") { + updateURL = Services.urlFormatter.formatURLPref( + "startup.homepage_override_url" + ); + } return { updateVersion: Services.prefs.getCharPref( "browser.startup.homepage_override.torbrowser.version" ), - updateURL: - Services.prefs.getCharPref("torbrowser.post_update.url", "") || - Services.urlFormatter.formatURLPref("startup.homepage_override_url"), + updateURL, }; } const number = this._count; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f8f40d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f8f40d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.9.0esr-14.5-1] fixup! Base Browser strings
by ma1 (@ma1) 08 Apr '25

08 Apr '25
ma1 pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: f8f40d46 by Henry Wilkes at 2025-04-08T09:54:30+01:00 fixup! Base Browser strings TB 43624: Tweak the string letterboxing-size-status. NOTE: The string has not yet reached translators, so we do not need to change the ID. - - - - - 1 changed file: - toolkit/locales/en-US/toolkit/global/base-browser.ftl Changes: ===================================== toolkit/locales/en-US/toolkit/global/base-browser.ftl ===================================== @@ -17,14 +17,15 @@ basebrowser-rfp-maximize-warning-message = Maximizing the browser window can all basebrowser-rfp-restore-window-size-button-label = Restore basebrowser-rfp-restore-window-size-button-ak = R -## Letterbox size indicator (appearing on the bottom of the viewport) +## Letterboxing size indicator. -# Shows the current tab's letterboxed vieport size when resizing. -# "Letterbox(ing)" should be treated as a feature/product name, and likely not changed in other languages. +# Shows the current tab's Letterboxing dimensions in the bottom corner when resizing the window. +# The word "Letterboxing" is the proper noun for the Tor Browser feature, and is therefore capitalised. +# "Letterboxing" should be treated as a feature/product name, and likely not changed in other languages. # The "×" symbol is a unicode (U+00D7) symbol for multiply. # $width (Number) - The window width. The "NUMBER" function will format this number to the same locale, and the "useGrouping" option will remove grouping symbols, like thousand separators. # $height (Number) - The window height. -letterboxing-size-status = Letterbox size: { NUMBER($width, useGrouping: "false") } × { NUMBER($height, useGrouping: "false") } +letterboxing-size-status = Letterboxing size: { NUMBER($width, useGrouping: "false") } × { NUMBER($height, useGrouping: "false") } ## Tooltip for the about:addons recommended badge View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f8f40d4… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f8f40d4… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.9.0esr-14.5-1] fixup! [android] Implement Android-native Connection Assist UI
by Dan Ballard (@dan) 07 Apr '25

07 Apr '25
Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 36648663 by clairehurst at 2025-04-07T22:58:07+00:00 fixup! [android] Implement Android-native Connection Assist UI - - - - - 2 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistViewModel.kt Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt ===================================== @@ -47,6 +47,8 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { private var _binding: FragmentTorConnectionAssistBinding? = null private val binding get() = _binding!! + private lateinit var regionDropDownSpinnerAdapter: ArrayAdapter<String> + override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -127,7 +129,7 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { setTorConnectImage(screen) setTitle(screen) setQuickStart(screen) - setCountryDropDown(screen) + updateRegionDropdown(screen) setButton1(screen) setButton2(screen) setSplashLogo(screen) @@ -203,19 +205,18 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { } } - private fun setCountryDropDown(screen: ConnectAssistUiState) { + private fun updateRegionDropdown(screen: ConnectAssistUiState) { if (screen.regionDropDownVisible) { - val spinnerAdapter: ArrayAdapter<String> = initializeSpinner() if (binding.countryDropDown.isEmpty()) { - populateRegionDropDown(spinnerAdapter) - setOnItemSelectedListener() + regionDropDownSpinnerAdapter = initializeSpinner() + torConnectionAssistViewModel.fetchRegionNames() } - setFirstItemInCountryDropDown(spinnerAdapter, getString(screen.regionDropDownDefaultItem)) + setFirstItemInCountryDropDown(getString(screen.regionDropDownDefaultItem)) if (screen == ConnectAssistUiState.ChooseRegion || screen == ConnectAssistUiState.ConfirmRegion || screen == ConnectAssistUiState.RegionNotFound) { torConnectionAssistViewModel.selectDefaultRegion() - binding.countryDropDown.setSelection(spinnerAdapter.getPosition(torConnectionAssistViewModel.selectedCountryCode.value)) + setDropDownSelectionToSelectedCountryCode() } binding.unblockTheInternetInCountryDescription.visibility = View.VISIBLE @@ -226,14 +227,23 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { } } - private fun setFirstItemInCountryDropDown( - spinnerAdapter: ArrayAdapter<String>, - item: String, - ) { - if (!spinnerAdapter.isEmpty) { - spinnerAdapter.remove(spinnerAdapter.getItem(0)) + private fun setDropDownSelectionToSelectedCountryCode() { + binding.countryDropDown.setSelection( + indexOfSelectedCountryCode(), + ) + } + + private fun indexOfSelectedCountryCode() : Int { + return torConnectionAssistViewModel.regionCodeNameMap.value?.keys?.indexOf( + torConnectionAssistViewModel.selectedCountryCode.value, + )?.plus(1) ?: 0 + } + + private fun setFirstItemInCountryDropDown(item: String) { + if (!regionDropDownSpinnerAdapter.isEmpty) { + regionDropDownSpinnerAdapter.remove(regionDropDownSpinnerAdapter.getItem(0)) } - spinnerAdapter.insert(item, 0) + regionDropDownSpinnerAdapter.insert(item, 0) } private fun initializeSpinner(): ArrayAdapter<String> { @@ -245,26 +255,6 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { ) spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) binding.countryDropDown.adapter = spinnerAdapter - return spinnerAdapter - } - - private fun populateRegionDropDown(spinnerAdapter: ArrayAdapter<String>) { - torConnectionAssistViewModel.fetchRegionNames() - viewLifecycleOwner.lifecycleScope.launch { - repeatOnLifecycle(Lifecycle.State.STARTED) { - torConnectionAssistViewModel.regionCodeNameMap.collect { - Log.d(TAG, "regionCodeNameMap: $it") - if (it != null) { - spinnerAdapter.clear() - spinnerAdapter.add(getString(torConnectionAssistViewModel.torConnectScreen.value.regionDropDownDefaultItem)) - spinnerAdapter.addAll(it.values) - } - } - } - } - } - - private fun setOnItemSelectedListener() { binding.countryDropDown.onItemSelectedListener = object : AdapterView.OnItemSelectedListener { override fun onItemSelected( @@ -279,6 +269,20 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler { override fun onNothingSelected(parent: AdapterView<*>?) {} } + + viewLifecycleOwner.lifecycleScope.launch { + repeatOnLifecycle(Lifecycle.State.STARTED) { + torConnectionAssistViewModel.regionCodeNameMap.collect { + if (it != null) { + spinnerAdapter.clear() + spinnerAdapter.add(getString(torConnectionAssistViewModel.torConnectScreen.value.regionDropDownDefaultItem)) + spinnerAdapter.addAll(it.values) + } + } + } + } + + return spinnerAdapter } private fun setButton1(screen: ConnectAssistUiState) { ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistViewModel.kt ===================================== @@ -49,13 +49,14 @@ class TorConnectionAssistViewModel( fun fetchRegionNames() { torAndroidIntegration.regionNamesGet { regionNames : GeckoBundle? -> + Log.d(TAG, "fetchRegionNames() returned $regionNames") if (regionNames != null) { val codes: Array<String> = regionNames.keys() val regions = mutableMapOf<String, String>() for (code in codes) { regions[code] = regionNames.getString(code) } - regionCodeNameMap.value = regions + regionCodeNameMap.value = regions.toSortedMap(compareBy<String> { regions[it] }.thenBy { it }) } } } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3664866… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3664866… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.9.0esr-14.5-1] BB 41919: Letterboxing, add temporarily visible web content-size indicator on window resizing.
by ma1 (@ma1) 07 Apr '25

07 Apr '25
ma1 pushed to branch mullvad-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 8e3b1f41 by hackademix at 2025-04-08T00:13:48+02:00 BB 41919: Letterboxing, add temporarily visible web content-size indicator on window resizing. - - - - - 3 changed files: - browser/components/tabbrowser/content/tabbrowser.js - browser/themes/shared/tabbrowser/content-area.css - toolkit/components/resistfingerprinting/RFPHelper.sys.mjs Changes: ===================================== browser/components/tabbrowser/content/tabbrowser.js ===================================== @@ -7513,6 +7513,7 @@ var StatusPanel = { if (XULBrowserWindow.busyUI) { types.push("status"); } + types.push("letterboxingStatus"); types.push("defaultStatus"); for (type of types) { if ((text = XULBrowserWindow[type])) { ===================================== browser/themes/shared/tabbrowser/content-area.css ===================================== @@ -115,6 +115,7 @@ min-width: min(23em, 33%); } + &[type=letterboxingStatus], &[type=overLink] { transition: opacity 120ms ease-out, visibility 120ms; } @@ -123,12 +124,14 @@ direction: ltr; } + .exclude-letterboxing &[type=letterboxingStatus], &[inactive], :root[inDOMFullscreen] &:not([type=overLink]) { transition: none; opacity: 0; visibility: hidden; + &[previoustype=letterboxingStatus], &[previoustype=overLink] { transition: opacity 200ms ease-out, visibility 200ms; } @@ -177,6 +180,21 @@ } } +#statuspanel[type=letterboxingStatus] > #statuspanel-label, +#statuspanel[previoustype=letterboxingStatus][inactive] > #statuspanel-label { + background-image: url("chrome://browser/skin/window.svg"); + background-size: 1em; + background-repeat: no-repeat; + background-position-x: .5em; + background-position-y: center; + padding-inline-start: 2em; + -moz-context-properties: fill; + fill: var(--color-accent-primary); + @media (forced-colors) { + fill: var(--icon-color); + } +} + /** * Dialogs */ ===================================== toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ===================================== @@ -245,7 +245,7 @@ class _RFPHelper { switch (aMessage.type) { case "TabOpen": { let browser = aMessage.target.linkedBrowser; - this._roundOrResetContentSize(browser, /* isNewTab = */ true); + this._roundOrResetContentSize(browser, { isNewTab: true }); browser.ownerGlobal._rfpResizeObserver.observe(browser.parentElement); break; } @@ -509,7 +509,7 @@ class _RFPHelper { ); } - _roundOrResetContentSize(aBrowser, isNewTab = false) { + _roundOrResetContentSize(aBrowser, context = {}) { // We won't do anything for lazy browsers. if (!aBrowser?.isConnected) { return; @@ -518,7 +518,7 @@ class _RFPHelper { // this tab doesn't need letterboxing this._resetContentSize(aBrowser); } else { - this._roundContentSize(aBrowser, isNewTab); + this._roundContentSize(aBrowser, context); } } @@ -544,7 +544,8 @@ class _RFPHelper { /** * The function will round the given browser size */ - async _roundContentSize(aBrowser, isNewTab = false) { + async _roundContentSize(aBrowser, context) { + const { isResize, isNewTab } = context; let logPrefix = `_roundContentSize[${Math.random()}]`; log(logPrefix); let win = aBrowser.ownerGlobal; @@ -716,6 +717,26 @@ class _RFPHelper { borderRadius === 0 ? "hidden" : "", "--letterboxing-border-radius": borderRadius, }); + + if ( + isResize && + this.letterboxingEnabled && + (parentWidth > lastRoundedSize.width || + parentHeight > lastRoundedSize.height) + ) { + const updateStatus = async args => { + win.XULBrowserWindow.letterboxingStatus = args + ? await win.document.l10n.formatValue( + "letterboxing-size-status", + args + ) + : ""; + win.StatusPanel.update(); + }; + updateStatus(lastRoundedSize); + win.clearTimeout(win._letterboxingStatusTimeout); + win._letterboxingStatusTimeout = win.setTimeout(updateStatus, 1000); + } } // If the size of the content is already quantized, we do nothing. @@ -818,8 +839,12 @@ class _RFPHelper { aWindow.addEventListener("TabOpen", this); const resizeObserver = (aWindow._rfpResizeObserver = new aWindow.ResizeObserver(entries => { + const context = { isResize: true }; for (let { target } of entries) { - this._roundOrResetContentSize(target.querySelector("browser")); + this._roundOrResetContentSize( + target.querySelector("browser"), + context + ); } })); // observe resizing of each browser's parent (gets rid of RPC from content windows) View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/8e3… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/8e3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-128.9.0esr-14.5-1] BB 41919: Letterboxing, add temporarily visible web content-size indicator on window resizing.
by ma1 (@ma1) 07 Apr '25

07 Apr '25
ma1 pushed to branch base-browser-128.9.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: fdb125d5 by hackademix at 2025-04-08T00:13:43+02:00 BB 41919: Letterboxing, add temporarily visible web content-size indicator on window resizing. - - - - - 3 changed files: - browser/components/tabbrowser/content/tabbrowser.js - browser/themes/shared/tabbrowser/content-area.css - toolkit/components/resistfingerprinting/RFPHelper.sys.mjs Changes: ===================================== browser/components/tabbrowser/content/tabbrowser.js ===================================== @@ -7513,6 +7513,7 @@ var StatusPanel = { if (XULBrowserWindow.busyUI) { types.push("status"); } + types.push("letterboxingStatus"); types.push("defaultStatus"); for (type of types) { if ((text = XULBrowserWindow[type])) { ===================================== browser/themes/shared/tabbrowser/content-area.css ===================================== @@ -115,6 +115,7 @@ min-width: min(23em, 33%); } + &[type=letterboxingStatus], &[type=overLink] { transition: opacity 120ms ease-out, visibility 120ms; } @@ -123,12 +124,14 @@ direction: ltr; } + .exclude-letterboxing &[type=letterboxingStatus], &[inactive], :root[inDOMFullscreen] &:not([type=overLink]) { transition: none; opacity: 0; visibility: hidden; + &[previoustype=letterboxingStatus], &[previoustype=overLink] { transition: opacity 200ms ease-out, visibility 200ms; } @@ -177,6 +180,21 @@ } } +#statuspanel[type=letterboxingStatus] > #statuspanel-label, +#statuspanel[previoustype=letterboxingStatus][inactive] > #statuspanel-label { + background-image: url("chrome://browser/skin/window.svg"); + background-size: 1em; + background-repeat: no-repeat; + background-position-x: .5em; + background-position-y: center; + padding-inline-start: 2em; + -moz-context-properties: fill; + fill: var(--color-accent-primary); + @media (forced-colors) { + fill: var(--icon-color); + } +} + /** * Dialogs */ ===================================== toolkit/components/resistfingerprinting/RFPHelper.sys.mjs ===================================== @@ -245,7 +245,7 @@ class _RFPHelper { switch (aMessage.type) { case "TabOpen": { let browser = aMessage.target.linkedBrowser; - this._roundOrResetContentSize(browser, /* isNewTab = */ true); + this._roundOrResetContentSize(browser, { isNewTab: true }); browser.ownerGlobal._rfpResizeObserver.observe(browser.parentElement); break; } @@ -509,7 +509,7 @@ class _RFPHelper { ); } - _roundOrResetContentSize(aBrowser, isNewTab = false) { + _roundOrResetContentSize(aBrowser, context = {}) { // We won't do anything for lazy browsers. if (!aBrowser?.isConnected) { return; @@ -518,7 +518,7 @@ class _RFPHelper { // this tab doesn't need letterboxing this._resetContentSize(aBrowser); } else { - this._roundContentSize(aBrowser, isNewTab); + this._roundContentSize(aBrowser, context); } } @@ -544,7 +544,8 @@ class _RFPHelper { /** * The function will round the given browser size */ - async _roundContentSize(aBrowser, isNewTab = false) { + async _roundContentSize(aBrowser, context) { + const { isResize, isNewTab } = context; let logPrefix = `_roundContentSize[${Math.random()}]`; log(logPrefix); let win = aBrowser.ownerGlobal; @@ -716,6 +717,26 @@ class _RFPHelper { borderRadius === 0 ? "hidden" : "", "--letterboxing-border-radius": borderRadius, }); + + if ( + isResize && + this.letterboxingEnabled && + (parentWidth > lastRoundedSize.width || + parentHeight > lastRoundedSize.height) + ) { + const updateStatus = async args => { + win.XULBrowserWindow.letterboxingStatus = args + ? await win.document.l10n.formatValue( + "letterboxing-size-status", + args + ) + : ""; + win.StatusPanel.update(); + }; + updateStatus(lastRoundedSize); + win.clearTimeout(win._letterboxingStatusTimeout); + win._letterboxingStatusTimeout = win.setTimeout(updateStatus, 1000); + } } // If the size of the content is already quantized, we do nothing. @@ -818,8 +839,12 @@ class _RFPHelper { aWindow.addEventListener("TabOpen", this); const resizeObserver = (aWindow._rfpResizeObserver = new aWindow.ResizeObserver(entries => { + const context = { isResize: true }; for (let { target } of entries) { - this._roundOrResetContentSize(target.querySelector("browser")); + this._roundOrResetContentSize( + target.querySelector("browser"), + context + ); } })); // observe resizing of each browser's parent (gets rid of RPC from content windows) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fdb125d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fdb125d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • ...
  • 2023
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.