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 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • 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
  • 21411 discussions
[Git][tpo/applications/mullvad-browser][mullvad-browser-153.1.0esr-16.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 25 Aug '26

25 Aug '26
Pier Angelo Vendrame pushed to branch mullvad-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 54923f4a by Pier Angelo Vendrame at 2026-08-25T16:57:36+02:00 fixup! Firefox preference overrides. BB 45243: Disable taskbar tabs. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -796,6 +796,9 @@ pref("privacy.globalprivacycontrol.pbmode.enabled", true); // Disable platform text recognition functionality (tor-browser#42057) pref("dom.text-recognition.enabled", false); +// tor-browser#45243: Disable taskbar tabs, as they need more polish from us. +pref("browser.taskbarTabs.enabled", false); + #ifdef XP_WIN pref("browser.taskbar.lists.enabled", false); pref("browser.taskbar.lists.frequent.enabled", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/549… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/549… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] fixup! Firefox preference overrides.
by Pier Angelo Vendrame (@pierov) 25 Aug '26

25 Aug '26
Pier Angelo Vendrame pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: d9c1c6b9 by Pier Angelo Vendrame at 2026-08-25T16:43:57+02:00 fixup! Firefox preference overrides. BB 45243: Disable taskbar tabs. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -803,6 +803,9 @@ pref("privacy.globalprivacycontrol.pbmode.enabled", true); // Disable platform text recognition functionality (tor-browser#42057) pref("dom.text-recognition.enabled", false); +// tor-browser#45243: Disable taskbar tabs, as they need more polish from us. +pref("browser.taskbarTabs.enabled", false); + #ifdef XP_WIN pref("browser.taskbar.lists.enabled", false); pref("browser.taskbar.lists.frequent.enabled", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d9c1c6b… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d9c1c6b… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] 2 commits: fixup! TB 34403: [android] Disable Normal mode by default.
by brizental (@brizental) 25 Aug '26

25 Aug '26
brizental pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 4ba775a2 by Beatriz Rizental at 2026-08-24T15:13:56-03:00 fixup! TB 34403: [android] Disable Normal mode by default. Bug 44210: Drop disableNormalModeByDefault setting. This setting is not useful, because it (1) is not changeable by the user and (2) it just adds complexity to the original patch to disable normal mode. - - - - - f6924714 by Beatriz Rizental at 2026-08-24T15:13:57-03:00 fixup! TB 34403: [android] Disable Normal mode by default. Bug 44210: [EXTRA] Drop test changes from original patch. These test changes justse rebase conflicts. We are not running these tests yet. Let's drop it for now and deal with it when we decide to run the tests -- if we do. - - - - - 10 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/bookmarks/BookmarksScreen.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/browsingmode/BrowsingModeManager.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/search/ApplicationSearchMiddleware.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/HttpsOnlyFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/TabsSettingsFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt - mobile/android/fenix/app/src/main/res/values/preference_keys.xml - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/utils/SettingsTest.kt Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/bookmarks/BookmarksScreen.kt ===================================== @@ -82,7 +82,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.core.graphics.toColorInt -import androidx.compose.ui.platform.LocalContext import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable @@ -128,7 +127,6 @@ import org.mozilla.fenix.components.components import org.mozilla.fenix.compose.Favicon import org.mozilla.fenix.compose.list.SelectableFaviconListItem import org.mozilla.fenix.compose.list.SelectableIconListItem -import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.getRootView import org.mozilla.fenix.ext.components import org.mozilla.fenix.search.SearchFragmentAction.SuggestionClicked @@ -1129,15 +1127,11 @@ private fun BookmarkListOverflowMenu( onDismissRequest: () -> Unit, store: BookmarksStore, ) { - val menuItems = listOfNotNull( + val menuItems = listOf( MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_select_all_bookmarks), onClick = { store.dispatch(BookmarksListMenuAction.SelectAll) }, ), - MenuItem.TextItem( - text = Text.Resource(R.string.bookmark_menu_open_in_new_tab_button), - onClick = { store.dispatch(BookmarksListMenuAction.MultiSelect.OpenInNormalTabsClicked) }, - ).takeIf { !LocalContext.current.components.settings.shouldDisableNormalMode }, MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_open_in_private_tab_button), onClick = { store.dispatch(BookmarksListMenuAction.MultiSelect.OpenInPrivateTabsClicked) }, @@ -1198,7 +1192,7 @@ private fun BookmarkListItemMenu( bookmark: BookmarkItem.Bookmark, store: BookmarksStore, ) { - val menuItems = listOfNotNull( + val menuItems = listOf( MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_select_button), onClick = { store.dispatch(BookmarksListMenuAction.Bookmark.SelectClicked(bookmark)) }, @@ -1217,10 +1211,6 @@ private fun BookmarkListItemMenu( text = Text.Resource(R.string.bookmark_menu_share_button), onClick = { store.dispatch(BookmarksListMenuAction.Bookmark.ShareClicked(bookmark)) }, ), - MenuItem.TextItem( - text = Text.Resource(R.string.bookmark_menu_open_in_new_tab_button), - onClick = { store.dispatch(BookmarksListMenuAction.Bookmark.OpenInNormalTabClicked(bookmark)) }, - ).takeIf { !LocalContext.current.components.settings.shouldDisableNormalMode }, MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_open_in_private_tab_button), onClick = { store.dispatch(BookmarksListMenuAction.Bookmark.OpenInPrivateTabClicked(bookmark)) }, @@ -1245,7 +1235,7 @@ private fun BookmarkListFolderMenu( folder: BookmarkItem.Folder, store: BookmarksStore, ) { - val menuItems = listOfNotNull( + val menuItems = listOf( MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_select_button), onClick = { store.dispatch(BookmarksListMenuAction.Folder.SelectClicked(folder)) }, @@ -1260,10 +1250,6 @@ private fun BookmarkListFolderMenu( store.dispatch(BookmarksListMenuAction.Folder.MoveClicked(folder)) }, ), - MenuItem.TextItem( - text = Text.Resource(R.string.bookmark_menu_open_all_in_tabs_button), - onClick = { store.dispatch(BookmarksListMenuAction.Folder.OpenAllInNormalTabClicked(folder)) }, - ).takeIf { !LocalContext.current.components.settings.shouldDisableNormalMode }, MenuItem.TextItem( text = Text.Resource(R.string.bookmark_menu_open_all_in_private_tabs_button), onClick = { store.dispatch(BookmarksListMenuAction.Folder.OpenAllInPrivateTabClicked(folder)) }, ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/browsingmode/BrowsingModeManager.kt ===================================== @@ -74,17 +74,7 @@ class DefaultBrowsingModeManager( * Returns the [BrowsingMode] set by the [intent] or the last known [BrowsingMode]. */ private fun getModeFromIntentOrLastKnown(intent: Intent?): BrowsingMode { - if (settings.shouldDisableNormalMode) { - return BrowsingMode.Private - } - - intent?.toSafeIntent()?.let { - if (it.hasExtra(PRIVATE_BROWSING_MODE)) { - val startPrivateMode = it.getBooleanExtra(PRIVATE_BROWSING_MODE, false) - return BrowsingMode.fromBoolean(isPrivate = startPrivateMode) - } - } - - return settings.lastKnownMode + // tor-browser#44210: Hard-code always on PBM. + return BrowsingMode.Private } } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/search/ApplicationSearchMiddleware.kt ===================================== @@ -18,7 +18,6 @@ import mozilla.components.browser.state.state.BrowserState import mozilla.components.feature.search.ext.createApplicationSearchEngine import mozilla.components.lib.state.Middleware import mozilla.components.lib.state.Store -import org.mozilla.fenix.ext.components import org.mozilla.fenix.R import mozilla.components.ui.icons.R as iconsR @@ -35,7 +34,7 @@ const val TABS_SEARCH_ENGINE_ID = "tabs_search_engine_id" * @param scope [CoroutineScope] used to launch coroutines. */ class ApplicationSearchMiddleware( - private val context: Context, + context: Context, private val stringProvider: (Int) -> String = { context.getString(it) }, private val bitmapProvider: (Int) -> Bitmap = { getDrawable(context, it)?.toBitmap()!! }, private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO), @@ -55,7 +54,7 @@ class ApplicationSearchMiddleware( private fun loadSearchEngines( store: Store<BrowserState, BrowserAction>, ) = scope.launch { - val searchEngines = listOfNotNull( + val searchEngines = listOf( createApplicationSearchEngine( id = BOOKMARKS_SEARCH_ENGINE_ID, name = stringProvider(R.string.library_bookmarks), @@ -68,12 +67,6 @@ class ApplicationSearchMiddleware( url = "", icon = bitmapProvider(iconsR.drawable.mozac_ic_tab_tray_24), ), - createApplicationSearchEngine( - id = HISTORY_SEARCH_ENGINE_ID, - name = stringProvider(R.string.library_history), - url = "", - icon = bitmapProvider(iconsR.drawable.mozac_ic_history_24), - ).takeIf { !context.components.settings.shouldDisableNormalMode }, ) store.dispatch(SearchAction.ApplicationSearchEnginesLoaded(searchEngines)) ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/HttpsOnlyFragment.kt ===================================== @@ -62,7 +62,7 @@ class HttpsOnlyFragment : Fragment(), SystemInsetsPaddedFragment { updateEngineHttpsOnlyMode() } - binding.httpsOnlyModes.isGone = requireContext().components.settings.shouldDisableNormalMode + binding.httpsOnlyModes.isGone = true return binding.root } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -331,15 +331,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment, getString(R.string.delete_browsing_data_quit_off) } // Hide "Delete browsing data on quit" when in Private Browsing-only mode - deleteBrowsingDataPreference.isVisible = - !deleteBrowsingDataPreference.context.components.settings.shouldDisableNormalMode - - - if (!settings.shouldDisableNormalMode) { - val tabSettingsPreference = - requirePreference<Preference>(R.string.pref_key_tabs) - tabSettingsPreference.summary = context?.components?.settings?.getTabTimeoutString() - } + deleteBrowsingDataPreference.isVisible = false // val autofillPreference = requirePreference<Preference>(R.string.pref_key_credit_cards) // autofillPreference.title = if (settings.addressFeature) { ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/TabsSettingsFragment.kt ===================================== @@ -49,11 +49,11 @@ class TabsSettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragm setPreferencesFromResource(R.xml.tabs_preferences, rootKey) findPreference<RadioButtonPreference>(getString(R.string.pref_key_close_tabs_manually))?.parent?.apply { - isVisible = !context.components.settings.shouldDisableNormalMode + isVisible = false } findPreference<PreferenceCategory>(getString(R.string.pref_key_inactive_tabs_category))?.apply { - isVisible = !context.components.settings.shouldDisableNormalMode + isVisible = false } startForResult = registerForActivityResult( ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt ===================================== @@ -49,7 +49,7 @@ class SearchEngineFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragm } findPreference<CheckBoxPreference>(getString(R.string.pref_key_show_search_suggestions_in_private))?.apply { - isVisible = !context.components.settings.shouldDisableNormalMode + isVisible = false } view?.hideKeyboard() ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -881,14 +881,9 @@ class Settings( default = 1f, ) - val shouldDisableNormalMode by booleanPreference( - appContext.getPreferenceKey(R.string.pref_key_disable_normal_mode), - true - ) - val shouldShowHistorySuggestions by booleanPreference( appContext.getPreferenceKey(R.string.pref_key_search_browsing_history), - default = !shouldDisableNormalMode, + default = false, ) val shouldShowBookmarkSuggestions by booleanPreference( @@ -1463,7 +1458,7 @@ class Settings( get() { val lastKnownModeWasPrivate = preferences.getBoolean( appContext.getPreferenceKey(R.string.pref_key_last_known_mode_private), - shouldDisableNormalMode, + true, ) return if (lastKnownModeWasPrivate) { @@ -1705,7 +1700,7 @@ class Settings( var shouldShowSearchSuggestionsInPrivate by booleanPreference( appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions_in_private), - default = shouldDisableNormalMode, + default = true, ) /** ===================================== mobile/android/fenix/app/src/main/res/values/preference_keys.xml ===================================== @@ -48,7 +48,6 @@ <string name="pref_key_delete_permissions_now" translatable="false">pref_key_delete_permissions_now</string> <string name="pref_key_delete_downloads_now" translatable="false">pref_key_delete_downloads_now</string> <string name="pref_key_delete_browsing_data_on_quit_categories" translatable="false">pref_key_delete_browsing_data_on_quit_categories</string> - <string name="pref_key_disable_normal_mode" translatable="false">pref_key_disable_normal_mode</string> <string name="pref_key_last_known_mode_private" translatable="false">pref_key_last_known_mode_private</string> <string name="pref_key_addons" translatable="false">pref_key_addons</string> <string name="pref_key_install_local_addon" translatable="false">pref_key_install_local_addon</string> ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/utils/SettingsTest.kt ===================================== @@ -66,13 +66,13 @@ class SettingsTest { fun launchLinksInPrivateTab() { // When just created // Then - assertTrue(settings.openLinksInAPrivateTab) + assertFalse(settings.openLinksInAPrivateTab) // When - settings.openLinksInAPrivateTab = false + settings.openLinksInAPrivateTab = true // Then - assertFalse(settings.openLinksInAPrivateTab) + assertTrue(settings.openLinksInAPrivateTab) } @Test View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/03e9a8… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/03e9a8… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] Bug 2059471: Do not spoof screen orientation when it is locked. r=tjr
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 03e9a8f0 by Pier Angelo Vendrame at 2026-08-24T13:43:42+00:00 Bug 2059471: Do not spoof screen orientation when it is locked. r=tjr Differential Revision: https://phabricator.services.mozilla.com/D315317 - - - - - 1 changed file: - dom/base/ScreenOrientation.cpp Changes: ===================================== dom/base/ScreenOrientation.cpp ===================================== @@ -709,8 +709,11 @@ OrientationType ScreenOrientation::DeviceType(CallerType aCallerType) const { if (!bc) { return nsRFPService::GetDefaultOrientationType(); } - CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); - return nsRFPService::ViewportSizeToOrientationType(size.width, size.height); + if (bc->GetOrientationLock() == hal::ScreenOrientation::None) { + CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); + return nsRFPService::ViewportSizeToOrientationType(size.width, + size.height); + } } return mType; } @@ -723,8 +726,10 @@ uint16_t ScreenOrientation::DeviceAngle(CallerType aCallerType) const { if (!bc) { return 0; } - CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); - return nsRFPService::ViewportSizeToAngle(size.width, size.height); + if (bc->GetOrientationLock() == hal::ScreenOrientation::None) { + CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); + return nsRFPService::ViewportSizeToAngle(size.width, size.height); + } } return mAngle; } @@ -740,7 +745,8 @@ OrientationType ScreenOrientation::GetType(CallerType aCallerType, OrientationType orientation = bc->GetCurrentOrientationType(); if (nsContentUtils::ShouldResistFingerprinting( - aCallerType, GetRelevantGlobal(), RFPTarget::ScreenOrientation)) { + aCallerType, GetRelevantGlobal(), RFPTarget::ScreenOrientation) && + bc->GetOrientationLock() == hal::ScreenOrientation::None) { CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); return nsRFPService::ViewportSizeToOrientationType(size.width, size.height); } @@ -758,7 +764,8 @@ uint16_t ScreenOrientation::GetAngle(CallerType aCallerType, uint16_t angle = static_cast<uint16_t>(bc->GetCurrentOrientationAngle()); if (nsContentUtils::ShouldResistFingerprinting( - aCallerType, GetRelevantGlobal(), RFPTarget::ScreenOrientation)) { + aCallerType, GetRelevantGlobal(), RFPTarget::ScreenOrientation) && + bc->GetOrientationLock() == hal::ScreenOrientation::None) { CSSIntSize size = bc->TopInnerSizeSpoofedForRFP(); return nsRFPService::ViewportSizeToAngle(size.width, size.height); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/03e9a8f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/03e9a8f… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-153.1.0esr-16.0-1] Bug 2063031 - Spoof video PiP size under RFP. r=media-playback-reviewers,kpatenio,alwu,tjr
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch mullvad-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 3c57281c by Pier Angelo Vendrame at 2026-08-24T13:41:46+00:00 Bug 2063031 - Spoof video PiP size under RFP. r=media-playback-reviewers,kpatenio,alwu,tjr Differential Revision: https://phabricator.services.mozilla.com/D318184 - - - - - 6 changed files: - dom/media/PictureInPictureWindow.cpp - dom/media/PictureInPictureWindow.h - dom/media/mediaelement/HTMLVideoElement.cpp - dom/media/mediaelement/HTMLVideoElement.h - toolkit/components/pictureinpicture/tests/browser.toml - + toolkit/components/pictureinpicture/tests/browser_resistFingerprinting.js Changes: ===================================== dom/media/PictureInPictureWindow.cpp ===================================== @@ -47,6 +47,11 @@ int32_t PictureInPictureWindow::Width() const { if (!IsStateOpened()) { return 0; } + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + return VideoSizeForRFP().width; + } return mWidth; } @@ -57,14 +62,54 @@ int32_t PictureInPictureWindow::Height() const { if (!IsStateOpened()) { return 0; } + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + return VideoSizeForRFP().height; + } return mHeight; } +gfx::IntSize PictureInPictureWindow::VideoSizeForRFP() const { + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (!videoElement) { + return {0, 0}; + } + + // From PictureInPicture.sys.mjs: "The Picture in Picture window will be a + // maximum of a quarter of the screen height, and a third of the screen + // width.". + // Pretend we are maximizing the video in a 1920x1080 display. + const uint32_t maxWidth = 1920 / 3; + const uint32_t maxHeight = 1080 / 4; + uint32_t width = videoElement->VideoWidth(); + uint32_t height = videoElement->VideoHeight(); + if ((height > maxHeight || width > maxWidth) && height > 0) { + double aspectRatio = static_cast<double>(width) / height; + if (width >= height) { + width = maxWidth; + height = static_cast<uint32_t>(round(maxWidth / aspectRatio)); + } else { + height = maxHeight; + width = static_cast<uint32_t>(round(maxHeight * aspectRatio)); + } + } + return {width, height}; +} + void PictureInPictureWindow::NotifyDimensionsChanged(int32_t aWidth, int32_t aHeight) { mWidth = aWidth; mHeight = aHeight; + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + // With RFP, we spoof the window size to a fixed size that depends on the + // video, therefore it does not make sense to trigger a resize event. + return; + } + // When the size of a Picture-in-Picture window pipWindow changes, // the user agent MUST queue a task to fire an event named resize at // pipWindow. ===================================== dom/media/PictureInPictureWindow.h ===================================== @@ -47,6 +47,8 @@ class PictureInPictureWindow final : public DOMEventTargetHelper { private: bool IsStateOpened() const { return mOpened; } + gfx::IntSize VideoSizeForRFP() const; + WeakPtr<HTMLVideoElement> mAssociatedVideoElement; int32_t mWidth = 0; int32_t mHeight = 0; ===================================== dom/media/mediaelement/HTMLVideoElement.cpp ===================================== @@ -315,7 +315,7 @@ bool HTMLVideoElement::IsInteractiveHTMLContent() const { HTMLMediaElement::IsInteractiveHTMLContent(); } -gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() { +gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() const { const auto& sz = mMediaInfo.mVideo.mDisplay; // Prefer the size of the container as it's more up to date. @@ -324,7 +324,7 @@ gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() { .valueOr(sz); } -uint32_t HTMLVideoElement::VideoWidth() { +uint32_t HTMLVideoElement::VideoWidth() const { if (!HasVideo()) { return 0; } @@ -336,7 +336,7 @@ uint32_t HTMLVideoElement::VideoWidth() { return size.width; } -uint32_t HTMLVideoElement::VideoHeight() { +uint32_t HTMLVideoElement::VideoHeight() const { if (!HasVideo()) { return 0; } ===================================== dom/media/mediaelement/HTMLVideoElement.h ===================================== @@ -96,9 +96,9 @@ class HTMLVideoElement final : public HTMLMediaElement { SetUnsignedIntAttr(nsGkAtoms::height, aValue, 0, aRv); } - uint32_t VideoWidth(); + uint32_t VideoWidth() const; - uint32_t VideoHeight(); + uint32_t VideoHeight() const; VideoRotation RotationDegrees() const { return mMediaInfo.mVideo.mRotation; } @@ -179,7 +179,7 @@ class HTMLVideoElement final : public HTMLMediaElement { void CreateVideoWakeLockIfNeeded(); void ReleaseVideoWakeLockIfExists(); - gfx::IntSize GetVideoIntrinsicDimensions(); + gfx::IntSize GetVideoIntrinsicDimensions() const; RefPtr<WakeLock> mScreenWakeLock; ===================================== toolkit/components/pictureinpicture/tests/browser.toml ===================================== @@ -158,6 +158,8 @@ support-files = ["test-page-with-nan-video-duration.html"] ["browser_removeVideoElement.js"] +["browser_resistFingerprinting.js"] + ["browser_resizeVideo.js"] skip-if = [ "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'", # Bug 1594223 ===================================== toolkit/components/pictureinpicture/tests/browser_resistFingerprinting.js ===================================== @@ -0,0 +1,154 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +async function testResizePip(isRFP, src) { + clearSavedPosition(); + + await BrowserTestUtils.withNewTab( + { + url: TEST_PAGE, + gBrowser, + }, + async browser => { + let videoID = "with-controls"; + + let [width, height, pipWidth, pipHeight] = await SpecialPowers.spawn( + browser, + [videoID, src], + async (videoID, src) => { + content.window.resizeEverCalled = false; + let video = content.wrappedJSObject.document.getElementById(videoID); + if (src) { + let { promise, resolve } = Promise.withResolvers(); + video.addEventListener("canplay", resolve); + video.src = src; + await promise; + } + content.document.notifyUserGestureActivation(); + let pip = await video.requestPictureInPicture(); + pip.addEventListener( + "resize", + () => (content.window.resizeEverCalled = true) + ); + return [video.width, video.height, pip.width, pip.height]; + } + ); + info( + `Video size is ${width}x${height}. PiP size is ${pipWidth}x${pipHeight}` + ); + + const { PictureInPicture } = ChromeUtils.importESModule( + "moz-src:///toolkit/components/pictureinpicture/PictureInPicture.sys.mjs" + ); + let pipWindow = PictureInPicture.apiPipWindow?.get(); + Assert.ok(pipWindow, "We found the chrome PiP window."); + + let pipBrowser = pipWindow.document.getElementById("browser"); + await SpecialPowers.spawn(pipBrowser, [], async () => { + let { + promise: setupPromise, + resolve: setupResolve, + reject: setupReject, + } = Promise.withResolvers(); + content.resizePromise = new Promise(resizeResolve => { + let firstObserved = false; + // Scope the observer to the content because we need to block on the + // setup before resizing, therefore we need two separate promises and + // the observer needs to outlive this spawn call. + content.observer = new content.ResizeObserver(() => { + // Attaching the element will trigger a first call to this callback. + // Therefore, we need to ignore it. + if (firstObserved) { + resizeResolve(); + } else { + firstObserved = true; + setupResolve(); + } + }); + let video = content.document.querySelector("video"); + if (video) { + content.observer.observe(video); + } else { + setupReject(new Error("Video not found in the PiP window.")); + } + }); + await setupPromise; + }); + + pipWindow.resizeTo(pipWidth * 2, pipHeight * 2); + await SpecialPowers.spawn(pipBrowser, [], async () => { + await content.resizePromise; + content.observer.disconnect(); + await new Promise(resolve => content.requestAnimationFrame(resolve)); + }); + + let [pipWidthAfter, pipHeightAfter] = await SpecialPowers.spawn( + browser, + [videoID], + async videoID => { + let video = content.wrappedJSObject.document.getElementById(videoID); + // We already have the window, no need to simulate another user + // interaction. + let pip = await video.requestPictureInPicture(); + return [pip.width, pip.height]; + } + ); + info( + `PiP size after resizing ${isRFP ? "with" : "without"} RFP ` + + `is ${pipWidthAfter}x${pipHeightAfter}` + ); + + if (isRFP) { + Assert.equal(pipWidth, pipWidthAfter, "RFP spoofed PiP width."); + Assert.equal(pipHeight, pipHeightAfter, "RFP spoofed PiP height."); + } else { + Assert.notEqual( + pipWidth, + pipWidthAfter, + "After resizing the PiP window, PiP width was updated." + ); + Assert.notEqual( + pipHeight, + pipHeightAfter, + "After resizing the PiP window, PiP height was updated." + ); + } + + let everResized = await SpecialPowers.spawn(browser, [], async () => { + await content.document.exitPictureInPicture(); + return content.window.resizeEverCalled; + }); + Assert.equal( + everResized, + !isRFP, + `We expected the resize handler ${isRFP ? "not " : ""}to be ever called.` + ); + } + ); +} + +add_task(async function test_video_pip_size() { + await testResizePip(false, "test-video.mp4"); +}); + +add_task(async function test_video_pip_size_vertical() { + await testResizePip(false, "test-video-vertical.mp4"); +}); + +add_task(async function test_video_pip_size_rfp() { + await SpecialPowers.pushPrefEnv({ + set: [["privacy.resistFingerprinting", true]], + }); + await testResizePip(true, "test-video.mp4"); + await SpecialPowers.popPrefEnv(); +}); + +add_task(async function test_video_pip_size_rfp_vertical() { + await SpecialPowers.pushPrefEnv({ + set: [["privacy.resistFingerprinting", true]], + }); + await testResizePip(true, "test-video-vertical.mp4"); + await SpecialPowers.popPrefEnv(); +}); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/3c5… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/3c5… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] Bug 2063031 - Spoof video PiP size under RFP. r=media-playback-reviewers,kpatenio,alwu,tjr
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 3c9945e2 by Pier Angelo Vendrame at 2026-08-24T13:35:37+00:00 Bug 2063031 - Spoof video PiP size under RFP. r=media-playback-reviewers,kpatenio,alwu,tjr Differential Revision: https://phabricator.services.mozilla.com/D318184 - - - - - 6 changed files: - dom/media/PictureInPictureWindow.cpp - dom/media/PictureInPictureWindow.h - dom/media/mediaelement/HTMLVideoElement.cpp - dom/media/mediaelement/HTMLVideoElement.h - toolkit/components/pictureinpicture/tests/browser.toml - + toolkit/components/pictureinpicture/tests/browser_resistFingerprinting.js Changes: ===================================== dom/media/PictureInPictureWindow.cpp ===================================== @@ -47,6 +47,11 @@ int32_t PictureInPictureWindow::Width() const { if (!IsStateOpened()) { return 0; } + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + return VideoSizeForRFP().width; + } return mWidth; } @@ -57,14 +62,54 @@ int32_t PictureInPictureWindow::Height() const { if (!IsStateOpened()) { return 0; } + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + return VideoSizeForRFP().height; + } return mHeight; } +gfx::IntSize PictureInPictureWindow::VideoSizeForRFP() const { + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (!videoElement) { + return {0, 0}; + } + + // From PictureInPicture.sys.mjs: "The Picture in Picture window will be a + // maximum of a quarter of the screen height, and a third of the screen + // width.". + // Pretend we are maximizing the video in a 1920x1080 display. + const uint32_t maxWidth = 1920 / 3; + const uint32_t maxHeight = 1080 / 4; + uint32_t width = videoElement->VideoWidth(); + uint32_t height = videoElement->VideoHeight(); + if ((height > maxHeight || width > maxWidth) && height > 0) { + double aspectRatio = static_cast<double>(width) / height; + if (width >= height) { + width = maxWidth; + height = static_cast<uint32_t>(round(maxWidth / aspectRatio)); + } else { + height = maxHeight; + width = static_cast<uint32_t>(round(maxHeight * aspectRatio)); + } + } + return {width, height}; +} + void PictureInPictureWindow::NotifyDimensionsChanged(int32_t aWidth, int32_t aHeight) { mWidth = aWidth; mHeight = aHeight; + RefPtr<HTMLVideoElement> videoElement = mAssociatedVideoElement.get(); + if (videoElement && videoElement->OwnerDoc()->ShouldResistFingerprinting( + RFPTarget::ScreenRect)) { + // With RFP, we spoof the window size to a fixed size that depends on the + // video, therefore it does not make sense to trigger a resize event. + return; + } + // When the size of a Picture-in-Picture window pipWindow changes, // the user agent MUST queue a task to fire an event named resize at // pipWindow. ===================================== dom/media/PictureInPictureWindow.h ===================================== @@ -47,6 +47,8 @@ class PictureInPictureWindow final : public DOMEventTargetHelper { private: bool IsStateOpened() const { return mOpened; } + gfx::IntSize VideoSizeForRFP() const; + WeakPtr<HTMLVideoElement> mAssociatedVideoElement; int32_t mWidth = 0; int32_t mHeight = 0; ===================================== dom/media/mediaelement/HTMLVideoElement.cpp ===================================== @@ -315,7 +315,7 @@ bool HTMLVideoElement::IsInteractiveHTMLContent() const { HTMLMediaElement::IsInteractiveHTMLContent(); } -gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() { +gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() const { const auto& sz = mMediaInfo.mVideo.mDisplay; // Prefer the size of the container as it's more up to date. @@ -324,7 +324,7 @@ gfx::IntSize HTMLVideoElement::GetVideoIntrinsicDimensions() { .valueOr(sz); } -uint32_t HTMLVideoElement::VideoWidth() { +uint32_t HTMLVideoElement::VideoWidth() const { if (!HasVideo()) { return 0; } @@ -336,7 +336,7 @@ uint32_t HTMLVideoElement::VideoWidth() { return size.width; } -uint32_t HTMLVideoElement::VideoHeight() { +uint32_t HTMLVideoElement::VideoHeight() const { if (!HasVideo()) { return 0; } ===================================== dom/media/mediaelement/HTMLVideoElement.h ===================================== @@ -96,9 +96,9 @@ class HTMLVideoElement final : public HTMLMediaElement { SetUnsignedIntAttr(nsGkAtoms::height, aValue, 0, aRv); } - uint32_t VideoWidth(); + uint32_t VideoWidth() const; - uint32_t VideoHeight(); + uint32_t VideoHeight() const; VideoRotation RotationDegrees() const { return mMediaInfo.mVideo.mRotation; } @@ -179,7 +179,7 @@ class HTMLVideoElement final : public HTMLMediaElement { void CreateVideoWakeLockIfNeeded(); void ReleaseVideoWakeLockIfExists(); - gfx::IntSize GetVideoIntrinsicDimensions(); + gfx::IntSize GetVideoIntrinsicDimensions() const; RefPtr<WakeLock> mScreenWakeLock; ===================================== toolkit/components/pictureinpicture/tests/browser.toml ===================================== @@ -158,6 +158,8 @@ support-files = ["test-page-with-nan-video-duration.html"] ["browser_removeVideoElement.js"] +["browser_resistFingerprinting.js"] + ["browser_resizeVideo.js"] skip-if = [ "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'", # Bug 1594223 ===================================== toolkit/components/pictureinpicture/tests/browser_resistFingerprinting.js ===================================== @@ -0,0 +1,154 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +async function testResizePip(isRFP, src) { + clearSavedPosition(); + + await BrowserTestUtils.withNewTab( + { + url: TEST_PAGE, + gBrowser, + }, + async browser => { + let videoID = "with-controls"; + + let [width, height, pipWidth, pipHeight] = await SpecialPowers.spawn( + browser, + [videoID, src], + async (videoID, src) => { + content.window.resizeEverCalled = false; + let video = content.wrappedJSObject.document.getElementById(videoID); + if (src) { + let { promise, resolve } = Promise.withResolvers(); + video.addEventListener("canplay", resolve); + video.src = src; + await promise; + } + content.document.notifyUserGestureActivation(); + let pip = await video.requestPictureInPicture(); + pip.addEventListener( + "resize", + () => (content.window.resizeEverCalled = true) + ); + return [video.width, video.height, pip.width, pip.height]; + } + ); + info( + `Video size is ${width}x${height}. PiP size is ${pipWidth}x${pipHeight}` + ); + + const { PictureInPicture } = ChromeUtils.importESModule( + "moz-src:///toolkit/components/pictureinpicture/PictureInPicture.sys.mjs" + ); + let pipWindow = PictureInPicture.apiPipWindow?.get(); + Assert.ok(pipWindow, "We found the chrome PiP window."); + + let pipBrowser = pipWindow.document.getElementById("browser"); + await SpecialPowers.spawn(pipBrowser, [], async () => { + let { + promise: setupPromise, + resolve: setupResolve, + reject: setupReject, + } = Promise.withResolvers(); + content.resizePromise = new Promise(resizeResolve => { + let firstObserved = false; + // Scope the observer to the content because we need to block on the + // setup before resizing, therefore we need two separate promises and + // the observer needs to outlive this spawn call. + content.observer = new content.ResizeObserver(() => { + // Attaching the element will trigger a first call to this callback. + // Therefore, we need to ignore it. + if (firstObserved) { + resizeResolve(); + } else { + firstObserved = true; + setupResolve(); + } + }); + let video = content.document.querySelector("video"); + if (video) { + content.observer.observe(video); + } else { + setupReject(new Error("Video not found in the PiP window.")); + } + }); + await setupPromise; + }); + + pipWindow.resizeTo(pipWidth * 2, pipHeight * 2); + await SpecialPowers.spawn(pipBrowser, [], async () => { + await content.resizePromise; + content.observer.disconnect(); + await new Promise(resolve => content.requestAnimationFrame(resolve)); + }); + + let [pipWidthAfter, pipHeightAfter] = await SpecialPowers.spawn( + browser, + [videoID], + async videoID => { + let video = content.wrappedJSObject.document.getElementById(videoID); + // We already have the window, no need to simulate another user + // interaction. + let pip = await video.requestPictureInPicture(); + return [pip.width, pip.height]; + } + ); + info( + `PiP size after resizing ${isRFP ? "with" : "without"} RFP ` + + `is ${pipWidthAfter}x${pipHeightAfter}` + ); + + if (isRFP) { + Assert.equal(pipWidth, pipWidthAfter, "RFP spoofed PiP width."); + Assert.equal(pipHeight, pipHeightAfter, "RFP spoofed PiP height."); + } else { + Assert.notEqual( + pipWidth, + pipWidthAfter, + "After resizing the PiP window, PiP width was updated." + ); + Assert.notEqual( + pipHeight, + pipHeightAfter, + "After resizing the PiP window, PiP height was updated." + ); + } + + let everResized = await SpecialPowers.spawn(browser, [], async () => { + await content.document.exitPictureInPicture(); + return content.window.resizeEverCalled; + }); + Assert.equal( + everResized, + !isRFP, + `We expected the resize handler ${isRFP ? "not " : ""}to be ever called.` + ); + } + ); +} + +add_task(async function test_video_pip_size() { + await testResizePip(false, "test-video.mp4"); +}); + +add_task(async function test_video_pip_size_vertical() { + await testResizePip(false, "test-video-vertical.mp4"); +}); + +add_task(async function test_video_pip_size_rfp() { + await SpecialPowers.pushPrefEnv({ + set: [["privacy.resistFingerprinting", true]], + }); + await testResizePip(true, "test-video.mp4"); + await SpecialPowers.popPrefEnv(); +}); + +add_task(async function test_video_pip_size_rfp_vertical() { + await SpecialPowers.pushPrefEnv({ + set: [["privacy.resistFingerprinting", true]], + }); + await testResizePip(true, "test-video-vertical.mp4"); + await SpecialPowers.popPrefEnv(); +}); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3c9945e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3c9945e… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-153.1.0esr-16.0-1] fixup! Firefox preference overrides.
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch mullvad-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 6fe0b290 by Henry Wilkes at 2026-08-24T13:31:33+00:00 fixup! Firefox preference overrides. BB 45208: Enable the settings redesign. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -246,10 +246,6 @@ pref("browser.safebrowsing.provider.mozilla.gethashURL", ""); // https://bugzilla.mozilla.org/show_bug.cgi?id=1915280 pref("browser.uitour.enabled", false); -// tor-browser#45110: Disable unified settings until we have migrated all our -// settings and have applied our desired changes to upstream new designs. -pref("browser.settings-redesign.enabled", false); - // Make sure Unified Telemetry is really disabled, see: #18738. pref("toolkit.telemetry.unified", false); // This needs to be locked, or nightly builds will automatically lock it to true View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/6fe… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/6fe… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] fixup! Firefox preference overrides.
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: f0d9b219 by Henry Wilkes at 2026-08-24T13:27:33+00:00 fixup! Firefox preference overrides. BB 45208: Enable the settings redesign. - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -249,10 +249,6 @@ pref("browser.safebrowsing.provider.mozilla.gethashURL", ""); // https://bugzilla.mozilla.org/show_bug.cgi?id=1915280 pref("browser.uitour.enabled", false); -// tor-browser#45110: Disable unified settings until we have migrated all our -// settings and have applied our desired changes to upstream new designs. -pref("browser.settings-redesign.enabled", false); - // Make sure Unified Telemetry is really disabled, see: #18738. pref("toolkit.telemetry.unified", false); // This needs to be locked, or nightly builds will automatically lock it to true View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f0d9b21… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f0d9b21… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-153.1.0esr-16.0-1] 2 commits: fixup! BB 41369: Improve Firefox language settings for multi-lingual packages
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch mullvad-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 54a1eb5f by Henry Wilkes at 2026-08-24T13:26:00+00:00 fixup! BB 41369: Improve Firefox language settings for multi-lingual packages BB 45195: Change the subcategory for the language notification. - - - - - 89ccd3f3 by Henry Wilkes at 2026-08-24T13:26:00+00:00 fixup! BB 41454: Move focus after calling openPreferences for a sub-category. BB 43640: Modify the focus handling to work with the new settings redesign. - - - - - 5 changed files: - browser/base/content/languageNotification.js - browser/components/preferences/config/languages.mjs - browser/components/preferences/findInPage.js - browser/components/preferences/main.inc.xhtml - browser/components/preferences/preferences.js Changes: ===================================== browser/base/content/languageNotification.js ===================================== @@ -46,7 +46,7 @@ window.addEventListener("load", () => { { "l10n-id": "language-notification-button", callback() { - openPreferences("general-language"); + openPreferences("languages-browser-languages"); }, }, ]; ===================================== browser/components/preferences/config/languages.mjs ===================================== @@ -862,6 +862,7 @@ SettingGroupManager.registerGroups({ inProgress: true, l10nId: "browser-language-heading", headingLevel: 2, + subcategory: "browser-languages", iconSrc: "chrome://browser/skin/sidebar/firefox.svg", items: [ { ===================================== browser/components/preferences/findInPage.js ===================================== @@ -72,7 +72,11 @@ var gSearchResultsPane = { this.searchInput.addEventListener("input", this); window.addEventListener("DOMContentLoaded", () => { this.searchInput.updateComplete.then(() => { - this.searchInput.focus(); + // To avoid a race with `scrollAndHighlight`, we only move the focus + // if it remains at the top of the document. tor-browser#43640. + if (document.activeElement === document.body) { + this.searchInput.focus(); + } }); // Initialize other panes in an idle callback. window.requestIdleCallback(() => this.initializeCategories()); ===================================== browser/components/preferences/main.inc.xhtml ===================================== @@ -65,7 +65,7 @@ <!-- Languages --> <html:setting-group groupid="browserLanguage" data-srd-migrated="" hidden="true" data-category="paneGeneral"></html:setting-group> <html:setting-group groupid="websiteLanguage" data-srd-migrated="" hidden="true" data-category="paneGeneral"></html:setting-group> -<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true" data-subcategory="language" data-srd-groupid="browserLanguage"> +<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true" data-srd-groupid="browserLanguage"> <label><html:h2 data-l10n-id="language-header"/></label> <vbox id="browserLanguagesBox" align="start" hidden="true"> ===================================== browser/components/preferences/preferences.js ===================================== @@ -961,24 +961,28 @@ function scrollAndHighlight(subcategory) { return; } - // We assign a tabindex=-1 to the element so that we can focus it. This allows - // us to move screen reader's focus to an arbitrary position on the page. - // See tor-browser#41454 and mozilla bug 1799153. - const doFocus = () => { - elements[0].setAttribute("tabindex", "-1"); - Services.focus.setFocus(elements[0], Services.focus.FLAG_NOSCROLL); - // Immediately remove again now that it has focus. - elements[0].removeAttribute("tabindex"); - }; - // The element is not always immediately focusable, so we wait until document - // load. - if (document.readyState === "complete") { - doFocus(); + // We focus the first element that we can focus. + // See tor-browser#41454, tor-browser#45195 and mozilla bug 1799153. + let focusTarget = elements[0]; + if (focusTarget.tagName === "setting-group") { + focusTarget = focusTarget.fieldsetEl; + // Make the heading focusable. + focusTarget.focusableHeading = true; + focusTarget.updateComplete.then(() => { + focusTarget.focusHeading(); + }); } else { - // Wait until document load to move focus. - // NOTE: This should be called after DOMContentLoaded, where the searchInput - // is focused. - window.addEventListener("load", doFocus, { once: true }); + // Try focus directly using the focus method, which can be overridden. + focusTarget.focus(); + if (!focusTarget.contains(document.activeElement)) { + // Else, try focus the first focusable target. + Services.focus.moveFocus( + window, + focusTarget, + Services.focus.MOVEFOCUS_FIRST, + Services.focus.FLAG_NOSCROLL + ); + } } elements[0].scrollIntoView({ View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/ff… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/ff… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-153.1.0esr-16.0-1] 3 commits: fixup! BB 41369: Improve Firefox language settings for multi-lingual packages
by morgan (@morgan) 24 Aug '26

24 Aug '26
morgan pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 8eb85eec by Henry Wilkes at 2026-08-24T13:07:13+00:00 fixup! BB 41369: Improve Firefox language settings for multi-lingual packages BB 45195: Change the subcategory for the language notification. - - - - - 108ff310 by Henry Wilkes at 2026-08-24T13:07:13+00:00 fixup! BB 41454: Move focus after calling openPreferences for a sub-category. BB 43640: Modify the focus handling to work with the new settings redesign. - - - - - 1ab24002 by Henry Wilkes at 2026-08-24T13:07:13+00:00 fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection TB 45195: Add the "viewlogs" subcategory. - - - - - 6 changed files: - browser/base/content/languageNotification.js - browser/components/preferences/config/languages.mjs - browser/components/preferences/findInPage.js - browser/components/preferences/main.inc.xhtml - browser/components/preferences/preferences.js - browser/components/torpreferences/config/connection.mjs Changes: ===================================== browser/base/content/languageNotification.js ===================================== @@ -46,7 +46,7 @@ window.addEventListener("load", () => { { "l10n-id": "language-notification-button", callback() { - openPreferences("general-language"); + openPreferences("languages-browser-languages"); }, }, ]; ===================================== browser/components/preferences/config/languages.mjs ===================================== @@ -862,6 +862,7 @@ SettingGroupManager.registerGroups({ inProgress: true, l10nId: "browser-language-heading", headingLevel: 2, + subcategory: "browser-languages", iconSrc: "chrome://browser/skin/sidebar/firefox.svg", items: [ { ===================================== browser/components/preferences/findInPage.js ===================================== @@ -72,7 +72,11 @@ var gSearchResultsPane = { this.searchInput.addEventListener("input", this); window.addEventListener("DOMContentLoaded", () => { this.searchInput.updateComplete.then(() => { - this.searchInput.focus(); + // To avoid a race with `scrollAndHighlight`, we only move the focus + // if it remains at the top of the document. tor-browser#43640. + if (document.activeElement === document.body) { + this.searchInput.focus(); + } }); // Initialize other panes in an idle callback. window.requestIdleCallback(() => this.initializeCategories()); ===================================== browser/components/preferences/main.inc.xhtml ===================================== @@ -65,7 +65,7 @@ <!-- Languages --> <html:setting-group groupid="browserLanguage" data-srd-migrated="" hidden="true" data-category="paneGeneral"></html:setting-group> <html:setting-group groupid="websiteLanguage" data-srd-migrated="" hidden="true" data-category="paneGeneral"></html:setting-group> -<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true" data-subcategory="language" data-srd-groupid="browserLanguage"> +<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true" data-srd-groupid="browserLanguage"> <label><html:h2 data-l10n-id="language-header"/></label> <vbox id="browserLanguagesBox" align="start" hidden="true"> ===================================== browser/components/preferences/preferences.js ===================================== @@ -994,24 +994,28 @@ function scrollAndHighlight(subcategory) { return; } - // We assign a tabindex=-1 to the element so that we can focus it. This allows - // us to move screen reader's focus to an arbitrary position on the page. - // See tor-browser#41454 and mozilla bug 1799153. - const doFocus = () => { - elements[0].setAttribute("tabindex", "-1"); - Services.focus.setFocus(elements[0], Services.focus.FLAG_NOSCROLL); - // Immediately remove again now that it has focus. - elements[0].removeAttribute("tabindex"); - }; - // The element is not always immediately focusable, so we wait until document - // load. - if (document.readyState === "complete") { - doFocus(); + // We focus the first element that we can focus. + // See tor-browser#41454, tor-browser#45195 and mozilla bug 1799153. + let focusTarget = elements[0]; + if (focusTarget.tagName === "setting-group") { + focusTarget = focusTarget.fieldsetEl; + // Make the heading focusable. + focusTarget.focusableHeading = true; + focusTarget.updateComplete.then(() => { + focusTarget.focusHeading(); + }); } else { - // Wait until document load to move focus. - // NOTE: This should be called after DOMContentLoaded, where the searchInput - // is focused. - window.addEventListener("load", doFocus, { once: true }); + // Try focus directly using the focus method, which can be overridden. + focusTarget.focus(); + if (!focusTarget.contains(document.activeElement)) { + // Else, try focus the first focusable target. + Services.focus.moveFocus( + window, + focusTarget, + Services.focus.MOVEFOCUS_FIRST, + Services.focus.FLAG_NOSCROLL + ); + } } elements[0].scrollIntoView({ ===================================== browser/components/torpreferences/config/connection.mjs ===================================== @@ -205,6 +205,7 @@ SettingGroupManager.registerGroups({ }, { id: "torViewLog", + subcategory: "viewlogs", l10nId: "tor-view-log-button2", control: "moz-box-button", }, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/abfb08… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/abfb08… You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • ...
  • 2142
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.