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
  • ----- 2025 -----
  • 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
  • 19060 discussions
[Git][tpo/applications/tor-browser-build][main] Bug 41537: Add tools/count-mar-downloads
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 4178ea77 by Nicolas Vigier at 2025-08-14T16:41:33+00:00 Bug 41537: Add tools/count-mar-downloads Add a script to count how many mar files for each version have been downloaded from cdn.torproject.org. - - - - - 1 changed file: - + tools/count-mar-downloads Changes: ===================================== tools/count-mar-downloads ===================================== @@ -0,0 +1,122 @@ +#!/usr/bin/perl -w +# +# This script takes logs archive months as arguments. +# Example: count-mar-downloads 2025-08 2025-07 +# Check which months are available on https://collector.torproject.org/archive/webstats/ +# +# The script will dowload the log archives for the selected months, +# extract them, parse the logs and print download numbers per version +# numbers, OS, and incremental/full updates. +# +# The log files archives are stored in the tools/web-logs-count-mar-downloads +# directory. +# +use strict; +use FindBin; +use lib "$FindBin::Bin/../rbm/lib"; +use RBM::CaptureExec qw(capture_exec); +use File::Temp qw/tempdir/; +use File::Copy qw/move/; +use File::Find; + +if (!@ARGV) { + print "Usage: count-mar-downloads <month>\n"; + print "Example: count-mar-downloads 2025-08 2025-07\n"; + print "Check which months are available on https://collector.torproject.org/archive/webstats/\n"; + exit 1; +} + +my @months = @ARGV; + +my %downloads; + +my $weblogsdir = "$FindBin::Bin/web-logs-count-mar-downloads"; +mkdir $weblogsdir; +chdir $weblogsdir; + +sub exit_error { + print STDERR "Error: ", $_[0], "\n"; + exit (exists $_[1] ? $_[1] : 1); +} + +sub download_log_files { + my $tmpdir = tempdir(CLEANUP => 1); + foreach my $month (@months) { + my $file = "webstats-$month.tar"; + if (-f $file) { + print STDERR "Using existing file $file (remove it if you want to re-download it).\n"; + next; + } + my $url = "https://collector.torproject.org/archive/webstats/$file"; + exit_error "Error downloading $url" unless + system('wget', '-O', "$tmpdir/$file", $url) == 0; + move("$tmpdir/$file", "$weblogsdir/$file"); + } +} + +sub parse_log_file { + return unless -f $File::Find::name; + return unless $File::Find::name =~ m/\.xz$/; + + print STDERR "Reading $_\n"; + + my ($stdout, undef, $success) = capture_exec('xzcat', $File::Find::name); + foreach my $line (split /\n/, $stdout) { + my ($version, $os) = + ($line =~ m|^[^\s]+ - - \[.+\] "GET /aus1/torbrowser/([^/]+)/tor-browser-(.*)-\d.*_ALL\.mar HTTP/|); + if ($version) { + $downloads{$version}{total} += 1; + $downloads{$version}{full_update} += 1; + $downloads{$version}{OS}{$os} += 1; + next; + } + my $incremental_from; + ($version, $os, $incremental_from) = + ($line =~ m|^[^\s]+ - - \[.+\] "GET /aus1/torbrowser/([^/]+)/tor-browser-(.*)--(\d[^-]+)-.*_ALL\.incremental\.mar HTTP/|); + if ($incremental_from) { + $downloads{$version}{total} += 1; + $downloads{$version}{OS}{$os} += 1; + $downloads{$version}{incremental_update_total} += 1; + $downloads{$version}{incremental_update}{$incremental_from} += 1; + } + } +} + +sub parse_log_files { + my $tmpdir = tempdir(CLEANUP => 1); + foreach my $month (@months) { + my $file = "webstats-$month.tar"; + print STDERR "Extracting $file\n"; + my (undef, undef, $success) = capture_exec('tar', '-C', $tmpdir, '-xf', + $file, "webstats-$month/cdn.torproject.org"); + + find(\&parse_log_file, "$tmpdir/webstats-$month/cdn.torproject.org"); + } +} + +sub print_results { + print 'Download numbers for months ', join(' ', @months), ":\n\n"; + my @versions = sort { $downloads{$b}{total} <=> $downloads{$a}{total} } + keys %downloads; + foreach my $version (@versions) { + print "Version: $version\n"; + print " Total: $downloads{$version}{total}\n"; + print " Per OS:\n"; + foreach my $os (sort keys %{$downloads{$version}{OS}}) { + print " $os: $downloads{$version}{OS}{$os}\n"; + } + print " Full updates: $downloads{$version}{full_update}\n" + if $downloads{$version}{full_update}; + if ($downloads{$version}{incremental_update_total}) { + print " Incremental updates (total): $downloads{$version}{incremental_update_total}\n"; + foreach my $incremental_from (sort keys %{$downloads{$version}{incremental_update}}) { + print " Incremental updates from $incremental_from: $downloads{$version}{incremental_update}{$incremental_from}\n"; + } + } + print "\n"; + } +} + +download_log_files; +parse_log_files; +print_results; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/4… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/4… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-140.2.0esr-15.0-1] fixup! Firefox preference overrides.
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch mullvad-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser Commits: ed7f168e by Pier Angelo Vendrame at 2025-08-14T16:32:44+00:00 fixup! Firefox preference overrides. BB 41131: Make sure background tasks are not used for shutdown cleanup. privacy.sanitize.sanitizeOnShutdown (disabled by default) might try to use background tasks, without checking whether they are actually available (they are not for us, as we disable them at build time). - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -72,6 +72,12 @@ pref("browser.helperApps.deleteTempFileOnExit", true); // Prevent download stuffing / DOS (tor-browser#41764) pref("browser.download.enable_spam_prevention", true); +// tor-browser#41131: This is normally gated on +// privacy.sanitize.sanitizeOnShutdown, which is false by default. But in case +// users enable it, make sure background tasks are not used for this, since we +// disable them as well (but at compile time). +pref("network.cache.shutdown_purge_in_background_task", false); + // Misc privacy: Disk pref("signon.rememberSignons", false, locked); pref("browser.formfill.enable", false, locked); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/ed7… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/ed7… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-140.2.0esr-15.0-1] fixup! Firefox preference overrides.
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch base-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 4a69d655 by Pier Angelo Vendrame at 2025-08-14T16:31:40+00:00 fixup! Firefox preference overrides. BB 41131: Make sure background tasks are not used for shutdown cleanup. privacy.sanitize.sanitizeOnShutdown (disabled by default) might try to use background tasks, without checking whether they are actually available (they are not for us, as we disable them at build time). - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -72,6 +72,12 @@ pref("browser.helperApps.deleteTempFileOnExit", true); // Prevent download stuffing / DOS (tor-browser#41764) pref("browser.download.enable_spam_prevention", true); +// tor-browser#41131: This is normally gated on +// privacy.sanitize.sanitizeOnShutdown, which is false by default. But in case +// users enable it, make sure background tasks are not used for this, since we +// disable them as well (but at compile time). +pref("network.cache.shutdown_purge_in_background_task", false); + // Misc privacy: Disk pref("signon.rememberSignons", false); pref("browser.formfill.enable", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4a69d65… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4a69d65… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-140.2.0esr-15.0-1] fixup! Firefox preference overrides.
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 68840371 by Pier Angelo Vendrame at 2025-08-14T16:22:54+00:00 fixup! Firefox preference overrides. BB 41131: Make sure background tasks are not used for shutdown cleanup. privacy.sanitize.sanitizeOnShutdown (disabled by default) might try to use background tasks, without checking whether they are actually available (they are not for us, as we disable them at build time). - - - - - 1 changed file: - browser/app/profile/001-base-profile.js Changes: ===================================== browser/app/profile/001-base-profile.js ===================================== @@ -72,6 +72,12 @@ pref("browser.helperApps.deleteTempFileOnExit", true); // Prevent download stuffing / DOS (tor-browser#41764) pref("browser.download.enable_spam_prevention", true); +// tor-browser#41131: This is normally gated on +// privacy.sanitize.sanitizeOnShutdown, which is false by default. But in case +// users enable it, make sure background tasks are not used for this, since we +// disable them as well (but at compile time). +pref("network.cache.shutdown_purge_in_background_task", false); + // Misc privacy: Disk pref("signon.rememberSignons", false); pref("browser.formfill.enable", false); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6884037… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6884037… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-140.2.0esr-15.0-1] 2 commits: fixup! [android] Rename as Tor Browser
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 947a8538 by clairehurst at 2025-08-14T16:20:30+00:00 fixup! [android] Rename as Tor Browser tor-browser#43179 Make persistent 'private tabs' notification distinct from Firefox's - - - - - c8457722 by clairehurst at 2025-08-14T16:20:30+00:00 fixup! [android] TBA strings tor-browser#43179 Make persistent 'private tabs' notification distinct from Firefox's - - - - - 26 changed files: - + mobile/android/fenix/app/src/beta/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml - + mobile/android/fenix/app/src/beta/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/beta/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/beta/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/beta/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png - mobile/android/fenix/app/src/beta/res/values/colors.xml - + mobile/android/fenix/app/src/debug/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml - + mobile/android/fenix/app/src/debug/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/debug/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/debug/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/debug/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png - mobile/android/fenix/app/src/debug/res/values/colors.xml - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/session/PrivateNotificationService.kt - mobile/android/fenix/app/src/main/res/values/torbrowser_strings.xml - + mobile/android/fenix/app/src/nightly/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml - + mobile/android/fenix/app/src/nightly/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/nightly/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/nightly/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/nightly/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png - mobile/android/fenix/app/src/nightly/res/values/colors.xml - + mobile/android/fenix/app/src/release/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml - + mobile/android/fenix/app/src/release/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/release/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/release/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png - + mobile/android/fenix/app/src/release/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png - mobile/android/fenix/app/src/release/res/values/colors.xml Changes: ===================================== mobile/android/fenix/app/src/beta/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml ===================================== @@ -0,0 +1,24 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="256" + android:viewportHeight="257" + android:tint="#FFFFFF"> + <group android:scaleX="1.84" + android:scaleY="1.84" + android:translateX="-107.52" + android:translateY="-107.94"> + <group android:scaleX="0.4869866" + android:scaleY="0.4888889" + android:translateX="65.66572" + android:translateY="65.67778"> + <path + android:pathData="M62.56,111.94C67,111.94 70.72,110.38 73.92,107.17C77.13,103.96 78.68,99.93 78.68,94.86C78.68,90.5 77.04,86.73 73.65,83.34L73.63,83.32C70.34,79.95 66.63,78.31 62.29,78.31C58.59,78.31 55.28,79.9 52.17,83.17C49.12,86.38 47.63,90.16 47.63,94.72C47.63,97.37 47.99,99.8 48.7,101.94C49.48,104.04 50.53,105.88 51.84,107.43C53.11,108.84 54.66,109.98 56.45,110.81C58.27,111.56 60.33,111.94 62.56,111.94Z" + android:fillColor="#4A454E"/> + <path + android:pathData="M128,256.91C198.69,256.91 256,199.6 256,128.91C256,58.22 198.69,0.91 128,0.91C57.31,0.91 0,58.22 0,128.91C0,199.6 57.31,256.91 128,256.91ZM233,128.91C233,70.92 185.99,23.91 128,23.91V39.91C177.15,39.91 217,79.75 217,128.91C217,178.06 177.15,217.91 128,217.91V233.91C185.99,233.91 233,186.9 233,128.91ZM193.75,128.91C193.75,92.6 164.31,63.16 128,63.16V79.16C155.48,79.16 177.75,101.43 177.75,128.91C177.75,156.38 155.48,178.66 128,178.66V194.66C164.31,194.66 193.75,165.22 193.75,128.91ZM128,101.66C143.05,101.66 155.25,113.86 155.25,128.91C155.25,143.96 143.05,156.16 128,156.16V101.66ZM90.71,94.86C90.71,102.56 93.36,108.02 98.8,111.54C100.29,112.5 101.06,114.24 100.75,115.96L99.93,120.5C99.68,121.87 98.79,123.03 97.53,123.61C96.29,124.18 94.9,124.11 93.71,123.42C89.35,120.88 86.16,117.89 84.18,114.5C82.28,116.93 79.87,119.01 76.97,120.71L76.97,120.72L76.75,120.84C72.29,123.36 67.51,124.64 62.56,124.64C53.76,124.64 46.62,121.63 41.34,115.68L41.3,115.63C36.54,110.19 34.13,103.15 34.13,94.72C34.13,87.5 36.44,81.01 40.98,75.43L41.23,75.12L41.48,74.83C46.84,68.62 53.54,65.47 62.56,65.47C71.58,65.47 78.82,68.88 84.13,75.62C86.04,71.65 89.25,68.27 93.74,65.52C94.97,64.77 96.45,64.71 97.73,65.34C99.04,66 99.91,67.26 100.05,68.73L100.51,73.51C100.64,74.82 100.16,76.11 99.2,77.03C93.49,82.51 90.71,88.34 90.71,94.86Z" + android:fillColor="#4A454E" + android:fillType="evenOdd"/> + </group> + </group> +</vector> ===================================== mobile/android/fenix/app/src/beta/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/beta/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/beta/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/beta/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/beta/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/beta/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/beta/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/beta/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/beta/res/values/colors.xml ===================================== @@ -4,4 +4,5 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <resources> <color name="ic_launcher_background">@color/photonInk80</color> + <color name="tor_browser_close_tabs_notification_background">#2B8B76</color> </resources> ===================================== mobile/android/fenix/app/src/debug/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml ===================================== @@ -0,0 +1,16 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="256" + android:viewportHeight="257" + android:tint="#FFFFFF"> + <group android:scaleX="0.9164202" + android:scaleY="0.92" + android:translateX="10.69821" + android:translateY="10.28"> + <path + android:pathData="M128,256.91C198.69,256.91 256,199.6 256,128.91C256,58.22 198.69,0.91 128,0.91C57.31,0.91 0,58.22 0,128.91C0,199.6 57.31,256.91 128,256.91ZM233,128.91C233,70.92 185.99,23.91 128,23.91V39.91C177.15,39.91 217,79.75 217,128.91C217,178.06 177.15,217.91 128,217.91V233.91C185.99,233.91 233,186.9 233,128.91ZM193.75,128.91C193.75,92.6 164.31,63.16 128,63.16V79.16C155.48,79.16 177.75,101.43 177.75,128.91C177.75,156.38 155.48,178.66 128,178.66V194.66C164.31,194.66 193.75,165.22 193.75,128.91ZM128,101.66C143.05,101.66 155.25,113.86 155.25,128.91C155.25,143.96 143.05,156.16 128,156.16V101.66ZM94.04,61.23C94.36,61.18 94.46,60.77 94.2,60.59C89.25,57.25 83.29,55.31 76.87,55.31C59.75,55.31 45.87,69.16 45.87,86.24C45.87,103.33 59.75,117.18 76.87,117.18C84.6,117.18 91.66,114.35 97.09,109.69C97.34,109.48 97.19,109.08 96.86,109.07C83.98,108.56 73.7,97.99 73.7,85.01C73.7,73 82.52,63.04 94.04,61.23Z" + android:fillColor="#4A454E" + android:fillType="evenOdd"/> + </group> +</vector> ===================================== mobile/android/fenix/app/src/debug/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/debug/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/debug/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/debug/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/debug/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/debug/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/debug/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/debug/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/debug/res/values/colors.xml ===================================== @@ -4,4 +4,5 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <resources> <color name="ic_launcher_background">#220033</color> + <color name="tor_browser_close_tabs_notification_background">#556472</color> </resources> ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/session/PrivateNotificationService.kt ===================================== @@ -37,18 +37,27 @@ class PrivateNotificationService : AbstractPrivateNotificationService() { override val notificationsDelegate: NotificationsDelegate by lazy { components.notificationsDelegate } override fun NotificationCompat.Builder.buildNotification() { - setSmallIcon(R.drawable.ic_private_browsing) + setSmallIcon(R.drawable.ic_tor_browser_close_tabs_notification) val contentTitle = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - applicationContext.getString(R.string.notification_erase_title_android_14) + applicationContext.getString( + R.string.notification_close_tor_browser_tabs, + applicationContext.getString(R.string.app_name), + ) } else { applicationContext.getString(R.string.app_name_private_4, getString(R.string.app_name)) } val contentText = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - applicationContext.getString(R.string.notification_erase_text_android_14) + applicationContext.getString( + R.string.notification_close_tor_browser_tabs_long, + applicationContext.getString(R.string.app_name), + ) } else { - applicationContext.getString(R.string.notification_pbm_delete_text_2) + applicationContext.getString( + R.string.notification_close_tor_browser_tabs, + applicationContext.getString(R.string.app_name), + ) } setContentTitle(contentTitle) @@ -56,7 +65,7 @@ class PrivateNotificationService : AbstractPrivateNotificationService() { color = ContextCompat.getColor( this@PrivateNotificationService, - R.color.pbm_notification_color, + R.color.tor_browser_close_tabs_notification_background, ) } ===================================== mobile/android/fenix/app/src/main/res/values/torbrowser_strings.xml ===================================== @@ -137,4 +137,10 @@ <!-- Connection assist. Content Description for back button. Button will start the connection assist process again --> <string name="connection_assist_back_button_content_description_start_again">Start again</string> + + <!-- "Close %s's tabs?" --> + <string name="notification_close_tor_browser_tabs">Close %s’s tabs?</string> + <!-- "Close %s's tabs? (long)" --> + <string name="notification_close_tor_browser_tabs_long">Tap or swipe this notification to close %s’s tabs</string> + </resources> ===================================== mobile/android/fenix/app/src/nightly/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml ===================================== @@ -0,0 +1,21 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="256" + android:viewportHeight="257" + android:tint="#FFFFFF"> + <group android:scaleX="1.84" + android:scaleY="1.84" + android:translateX="-107.52" + android:translateY="-107.94"> + <group android:scaleX="0.4869866" + android:scaleY="0.4888889" + android:translateX="65.66572" + android:translateY="65.67778"> + <path + android:pathData="M128,256.91C198.69,256.91 256,199.6 256,128.91C256,58.22 198.69,0.91 128,0.91C57.31,0.91 0,58.22 0,128.91C0,199.6 57.31,256.91 128,256.91ZM233,128.91C233,70.92 185.99,23.91 128,23.91V39.91C177.15,39.91 217,79.75 217,128.91C217,178.06 177.15,217.91 128,217.91V233.91C185.99,233.91 233,186.9 233,128.91ZM193.75,128.91C193.75,92.6 164.31,63.16 128,63.16V79.16C155.48,79.16 177.75,101.43 177.75,128.91C177.75,156.38 155.48,178.66 128,178.66V194.66C164.31,194.66 193.75,165.22 193.75,128.91ZM128,101.66C143.05,101.66 155.25,113.86 155.25,128.91C155.25,143.96 143.05,156.16 128,156.16V101.66ZM94.04,61.23C94.36,61.18 94.46,60.77 94.2,60.59C89.25,57.25 83.29,55.31 76.87,55.31C59.75,55.31 45.87,69.16 45.87,86.24C45.87,103.33 59.75,117.18 76.87,117.18C84.6,117.18 91.66,114.35 97.09,109.69C97.34,109.48 97.19,109.08 96.86,109.07C83.98,108.56 73.7,97.99 73.7,85.01C73.7,73 82.52,63.04 94.04,61.23Z" + android:fillColor="#4A454E" + android:fillType="evenOdd"/> + </group> + </group> +</vector> ===================================== mobile/android/fenix/app/src/nightly/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/nightly/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/nightly/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/nightly/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/nightly/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/nightly/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/nightly/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/nightly/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/nightly/res/values/colors.xml ===================================== @@ -4,4 +4,5 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <resources> <color name="ic_launcher_background">#220033</color> + <color name="tor_browser_close_tabs_notification_background">#3731A1</color> </resources> ===================================== mobile/android/fenix/app/src/release/res/drawable-anydpi-v24/ic_tor_browser_close_tabs_notification.xml ===================================== @@ -0,0 +1,21 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="256" + android:viewportHeight="257" + android:tint="#FFFFFF"> + <group android:scaleX="1.84" + android:scaleY="1.84" + android:translateX="-107.52" + android:translateY="-107.94"> + <group android:scaleX="0.4869866" + android:scaleY="0.4888889" + android:translateX="65.66572" + android:translateY="65.67778"> + <path + android:pathData="M256,128.91C256,199.6 198.69,256.91 128,256.91C57.31,256.91 0,199.6 0,128.91C0,58.22 57.31,0.91 128,0.91C198.69,0.91 256,58.22 256,128.91ZM128,23.91C185.99,23.91 233,70.92 233,128.91C233,186.9 185.99,233.91 128,233.91V217.91C177.15,217.91 217,178.06 217,128.91C217,79.75 177.15,39.91 128,39.91V23.91ZM128,63.16C164.31,63.16 193.75,92.6 193.75,128.91C193.75,165.22 164.31,194.66 128,194.66V178.66C155.48,178.66 177.75,156.38 177.75,128.91C177.75,101.43 155.48,79.16 128,79.16V63.16ZM155.25,128.91C155.25,113.86 143.05,101.66 128,101.66V156.16C143.05,156.16 155.25,143.96 155.25,128.91Z" + android:fillColor="#4A454E" + android:fillType="evenOdd"/> + </group> + </group> +</vector> ===================================== mobile/android/fenix/app/src/release/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/release/res/drawable-hdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/release/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/release/res/drawable-mdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/release/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/release/res/drawable-xhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/release/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png ===================================== Binary files /dev/null and b/mobile/android/fenix/app/src/release/res/drawable-xxhdpi/ic_tor_browser_close_tabs_notification.png differ ===================================== mobile/android/fenix/app/src/release/res/values/colors.xml ===================================== @@ -4,4 +4,5 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <resources> <color name="ic_launcher_background">@color/photonInk80</color> + <color name="tor_browser_close_tabs_notification_background">#701498</color> </resources> View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/87c721… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/87c721… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-140.2.0esr-15.0-1] fixup! Add CI for Base Browser
by henry (@henry) 14 Aug '25

14 Aug '25
henry pushed to branch mullvad-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser Commits: f970b38c by henry at 2025-08-14T17:13:58+01:00 fixup! Add CI for Base Browser TB 44104: Do not run linter when a merge request has no overall change. We also use `\0` to separate file names, rather than `\n`. (cherry picked from commit 87c721a5889b1a2c4ecf9658afe72f78077fe8be) Co-authored-by: Henry Wilkes <henry(a)torproject.org> - - - - - 2 changed files: - .gitlab/ci/jobs/lint/helpers.py - .gitlab/ci/jobs/lint/lint.yml Changes: ===================================== .gitlab/ci/jobs/lint/helpers.py ===================================== @@ -84,6 +84,10 @@ def get_list_of_changed_files(): if os.getenv("CI_PIPELINE_SOURCE") == "merge_request_event": # For merge requests, the base_reference is the common ancestor between the MR and the target branch base_reference = os.getenv("CI_MERGE_REQUEST_DIFF_BASE_SHA") + if not base_reference: + # Probably because there has been no overall change. + # See gitlab.com/gitlab-org/gitlab/-/issues/375047#note_2648459916 + return [] else: # When not in merge requests, the base reference is the Firefox tag base_reference = get_firefox_tag(os.getenv("CI_COMMIT_BRANCH")) @@ -118,6 +122,8 @@ if __name__ == "__main__": if args.get_firefox_tag: print(get_firefox_tag(args.get_firefox_tag)) elif args.get_changed_files: - print("\n".join(get_list_of_changed_files())) + # Separate the file names with a 0 byte to be parsed by xargs -0. Also + # drop the trailing '\n'. + print("\0".join(get_list_of_changed_files()), end="") else: print("No valid option provided.") ===================================== .gitlab/ci/jobs/lint/lint.yml ===================================== @@ -18,7 +18,7 @@ lint-all: - firefox script: - ./mach configure --without-wasm-sandboxed-libraries --with-base-browser-version=0.0.0 - - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v + - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach lint -v rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Run job whenever a commit is merged to a protected branch View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/f97… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/f97… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-140.2.0esr-15.0-1] 3 commits: BB 44040: Modify prompt service for Base Browser.
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch mullvad-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser Commits: 3bd4ddd5 by Henry Wilkes at 2025-08-14T16:11:39+00:00 BB 44040: Modify prompt service for Base Browser. - - - - - 887c6e2e by Henry Wilkes at 2025-08-14T16:11:39+00:00 fixup! BB 40925: Implemented the Security Level component TB 44030: Show a warning before restarting the browser when applying a new security level. Also adapt the existing warning to use a destructive button and the button "Restart Tor Browser" rather than just "Restart". - - - - - b95639fd by Henry Wilkes at 2025-08-14T16:11:40+00:00 fixup! Base Browser strings TB 44030: Add strings for the new security level warning dialog. - - - - - 8 changed files: - browser/components/securitylevel/content/securityLevelDialog.js - browser/modules/SecurityLevelRestartNotification.sys.mjs - netwerk/base/nsIPrompt.idl - toolkit/components/prompts/content/commonDialog.js - toolkit/components/prompts/src/Prompter.sys.mjs - toolkit/components/windowwatcher/nsIPromptService.idl - toolkit/content/widgets/dialog.js - toolkit/locales/en-US/toolkit/global/base-browser.ftl Changes: ===================================== browser/components/securitylevel/content/securityLevelDialog.js ===================================== @@ -39,8 +39,8 @@ const gSecurityLevelDialog = { async init() { const dialog = document.getElementById("security-level-dialog"); dialog.addEventListener("dialogaccept", event => { + event.preventDefault(); if (this._acceptButton.disabled) { - event.preventDefault(); return; } this._commitChange(); @@ -158,7 +158,41 @@ const gSecurityLevelDialog = { /** * Commit the change in security level and restart the browser. */ - _commitChange() { + async _commitChange() { + const doNotWarnPref = "browser.security_level.disable_warn_before_restart"; + if (!Services.prefs.getBoolPref(doNotWarnPref, false)) { + const [titleString, bodyString, checkboxString, restartString] = + await document.l10n.formatValues([ + { id: "security-level-restart-warning-dialog-title" }, + { id: "security-level-restart-warning-dialog-body" }, + { id: "restart-warning-dialog-do-not-warn-checkbox" }, + { id: "restart-warning-dialog-restart-button" }, + ]); + const flags = + Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + + Services.prompt.BUTTON_POS_0_DEFAULT + + Services.prompt.BUTTON_DEFAULT_IS_DESTRUCTIVE + + Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL; + const propBag = await Services.prompt.asyncConfirmEx( + window.browsingContext.top, + Services.prompt.MODAL_TYPE_CONTENT, + titleString, + bodyString, + flags, + restartString, + null, + null, + checkboxString, + false, + { useTitle: true, noIcon: true } + ); + if (propBag.get("buttonNumClicked") !== 0) { + return; + } + if (propBag.get("checked")) { + Services.prefs.setBoolPref(doNotWarnPref, true); + } + } SecurityLevelPrefs.setSecurityLevelBeforeRestart(this._selectedLevel); Services.startup.quit( Services.startup.eAttemptQuit | Services.startup.eRestart ===================================== browser/modules/SecurityLevelRestartNotification.sys.mjs ===================================== @@ -42,11 +42,13 @@ export const SecurityLevelRestartNotification = { await lazy.NotificationStrings.formatValues([ { id: "security-level-restart-prompt-title" }, { id: "security-level-restart-prompt-body" }, - { id: "security-level-restart-prompt-button-restart" }, + { id: "restart-warning-dialog-restart-button" }, { id: "security-level-restart-prompt-button-ignore" }, ]); const buttonFlags = Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 + + Services.prompt.BUTTON_POS_0_DEFAULT + + Services.prompt.BUTTON_DEFAULT_IS_DESTRUCTIVE + Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1; const propBag = await Services.prompt.asyncConfirmEx( ===================================== netwerk/base/nsIPrompt.idl ===================================== @@ -67,6 +67,8 @@ interface nsIPrompt : nsISupports const unsigned long BUTTON_POS_1_IS_SECONDARY = 1 << 29; + const unsigned long BUTTON_DEFAULT_IS_DESTRUCTIVE = 1 << 30; + const unsigned long STD_OK_CANCEL_BUTTONS = (BUTTON_TITLE_OK * BUTTON_POS_0) + (BUTTON_TITLE_CANCEL * BUTTON_POS_1); const unsigned long STD_YES_NO_BUTTONS = (BUTTON_TITLE_YES * BUTTON_POS_0) + ===================================== toolkit/components/prompts/content/commonDialog.js ===================================== @@ -39,7 +39,7 @@ function commonDialogOnLoad() { ["promptUserAndPass", "promptPassword"].includes(args.promptType) || args.headerIconCSSValue; let root = document.documentElement; - if (needIconifiedHeader) { + if (needIconifiedHeader && !args.noIcon) { root.setAttribute("neediconheader", "true"); } let title = { raw: args.title }; @@ -107,6 +107,10 @@ function commonDialogOnLoad() { dialog.setAttribute("extra1-is-secondary", true); } + if (args.isDefaultDestructive) { + dialog.setAttribute("default-is-destructive", true); + } + Dialog = new CommonDialog(args, ui); window.addEventListener("dialogclosing", function (aEvent) { if (aEvent.detail?.abort) { ===================================== toolkit/components/prompts/src/Prompter.sys.mjs ===================================== @@ -1507,6 +1507,10 @@ class ModalPrompter { args.isExtra1Secondary = true; } + if (flags & Ci.nsIPrompt.BUTTON_DEFAULT_IS_DESTRUCTIVE) { + args.isDefaultDestructive = true; + } + if (flags & Ci.nsIPrompt.SHOW_SPINNER) { args.headerIconCSSValue = "url('chrome://global/skin/icons/loading.svg')"; } ===================================== toolkit/components/windowwatcher/nsIPromptService.idl ===================================== @@ -287,6 +287,8 @@ interface nsIPromptService : nsISupports */ const unsigned long BUTTON_POS_1_IS_SECONDARY = 1 << 29; + const unsigned long BUTTON_DEFAULT_IS_DESTRUCTIVE = 1 << 30; + /** * Selects the standard set of OK/Cancel buttons. */ ===================================== toolkit/content/widgets/dialog.js ===================================== @@ -21,7 +21,8 @@ static get observedAttributes() { return super.observedAttributes.concat( "subdialog", - "extra1-is-secondary" + "extra1-is-secondary", + "default-is-destructive" ); } @@ -40,6 +41,12 @@ if (name === "extra1-is-secondary" && AppConstants.XP_UNIX) { this.getButton("cancel").after(this.getButton("extra1")); } + if (name === "default-is-destructive") { + this.#setButtonIsDestructive( + this.getButton(this.defaultButton), + this.hasAttribute("default-is-destructive") + ); + } super.attributeChangedCallback(name, oldValue, newValue); } @@ -491,12 +498,17 @@ var oldDefaultButton = this.getButton(this.defaultButton); if (oldDefaultButton) { oldDefaultButton.removeAttribute("default"); + this.#setButtonIsDestructive(oldDefaultButton, false); } var newDefaultButton = this.getButton(aNewDefault); if (newDefaultButton) { this.setAttribute("defaultButton", aNewDefault); newDefaultButton.setAttribute("default", "true"); + this.#setButtonIsDestructive( + newDefaultButton, + this.hasAttribute("default-is-destructive") + ); } else { this.setAttribute("defaultButton", "none"); if (aNewDefault != "none") { @@ -507,6 +519,16 @@ } } + /** + * Mark or un-mark a button as a destructive action. + * + * @param {?Element} button - The button to mark. + * @param {boolean} isDestructive - Whether the button is destructive. + */ + #setButtonIsDestructive(button, isDestructive) { + button?.classList.toggle("danger-button", isDestructive); + } + _handleButtonCommand(aEvent) { return this._doButtonCommand(aEvent.target.getAttribute("dlgtype")); } ===================================== toolkit/locales/en-US/toolkit/global/base-browser.ftl ===================================== @@ -177,6 +177,13 @@ security-level-preferences-bullet-limit-media = Audio and video (HTML5 media), a security-level-preferences-bullet-disabled-javascript = JavaScript is disabled by default on all sites. security-level-preferences-bullet-limit-font-and-symbols-and-images = Some fonts, icons, math symbols, and images are disabled. +## Security level dialog warning the user about a restart. + +# '-brand-short-name' is the localized browser name, like "Tor Browser". +security-level-restart-warning-dialog-title = Restart { -brand-short-name } to apply changes? +# '-brand-short-name' is the localized browser name, like "Tor Browser". +security-level-restart-warning-dialog-body = { -brand-short-name } needs to restart to apply your changes. This will close all your windows and tabs. + ## Custom security level. ## Some custom preferences configuration has placed the user outside one of the standard three levels. @@ -188,5 +195,12 @@ security-level-summary-custom = Your custom browser preferences have resulted in security-level-restart-prompt-title = Your security level settings require a restart security-level-restart-prompt-body = You must restart { -brand-short-name } for your security level settings to be applied. This will close all your windows and tabs. -security-level-restart-prompt-button-restart = Restart security-level-restart-prompt-button-ignore = Ignore + +## Part of the restart dialogs for security level and new identity. + +# Checkbox to never show the restart warning dialog again. +restart-warning-dialog-do-not-warn-checkbox = Don’t show this warning again +# Button to restart the browser. +# '-brand-short-name' is the localized browser name, like "Tor Browser". +restart-warning-dialog-restart-button = Restart { -brand-short-name } View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/8c… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/8c… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-140.2.0esr-15.0-1] fixup! Add CI for Base Browser
by henry (@henry) 14 Aug '25

14 Aug '25
henry pushed to branch base-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: a449b858 by henry at 2025-08-14T16:12:32+00:00 fixup! Add CI for Base Browser TB 44104: Do not run linter when a merge request has no overall change. We also use `\0` to separate file names, rather than `\n`. (cherry picked from commit 87c721a5889b1a2c4ecf9658afe72f78077fe8be) Co-authored-by: Henry Wilkes <henry(a)torproject.org> - - - - - 2 changed files: - .gitlab/ci/jobs/lint/helpers.py - .gitlab/ci/jobs/lint/lint.yml Changes: ===================================== .gitlab/ci/jobs/lint/helpers.py ===================================== @@ -84,6 +84,10 @@ def get_list_of_changed_files(): if os.getenv("CI_PIPELINE_SOURCE") == "merge_request_event": # For merge requests, the base_reference is the common ancestor between the MR and the target branch base_reference = os.getenv("CI_MERGE_REQUEST_DIFF_BASE_SHA") + if not base_reference: + # Probably because there has been no overall change. + # See gitlab.com/gitlab-org/gitlab/-/issues/375047#note_2648459916 + return [] else: # When not in merge requests, the base reference is the Firefox tag base_reference = get_firefox_tag(os.getenv("CI_COMMIT_BRANCH")) @@ -118,6 +122,8 @@ if __name__ == "__main__": if args.get_firefox_tag: print(get_firefox_tag(args.get_firefox_tag)) elif args.get_changed_files: - print("\n".join(get_list_of_changed_files())) + # Separate the file names with a 0 byte to be parsed by xargs -0. Also + # drop the trailing '\n'. + print("\0".join(get_list_of_changed_files()), end="") else: print("No valid option provided.") ===================================== .gitlab/ci/jobs/lint/lint.yml ===================================== @@ -18,7 +18,7 @@ lint-all: - firefox script: - ./mach configure --without-wasm-sandboxed-libraries --with-base-browser-version=0.0.0 - - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v + - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach lint -v rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Run job whenever a commit is merged to a protected branch View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a449b85… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a449b85… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-140.2.0esr-15.0-1] fixup! Add CI for Base Browser
by henry (@henry) 14 Aug '25

14 Aug '25
henry pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 87c721a5 by Henry Wilkes at 2025-08-14T16:11:43+00:00 fixup! Add CI for Base Browser TB 44104: Do not run linter when a merge request has no overall change. We also use `\0` to separate file names, rather than `\n`. - - - - - 2 changed files: - .gitlab/ci/jobs/lint/helpers.py - .gitlab/ci/jobs/lint/lint.yml Changes: ===================================== .gitlab/ci/jobs/lint/helpers.py ===================================== @@ -84,6 +84,10 @@ def get_list_of_changed_files(): if os.getenv("CI_PIPELINE_SOURCE") == "merge_request_event": # For merge requests, the base_reference is the common ancestor between the MR and the target branch base_reference = os.getenv("CI_MERGE_REQUEST_DIFF_BASE_SHA") + if not base_reference: + # Probably because there has been no overall change. + # See gitlab.com/gitlab-org/gitlab/-/issues/375047#note_2648459916 + return [] else: # When not in merge requests, the base reference is the Firefox tag base_reference = get_firefox_tag(os.getenv("CI_COMMIT_BRANCH")) @@ -118,6 +122,8 @@ if __name__ == "__main__": if args.get_firefox_tag: print(get_firefox_tag(args.get_firefox_tag)) elif args.get_changed_files: - print("\n".join(get_list_of_changed_files())) + # Separate the file names with a 0 byte to be parsed by xargs -0. Also + # drop the trailing '\n'. + print("\0".join(get_list_of_changed_files()), end="") else: print("No valid option provided.") ===================================== .gitlab/ci/jobs/lint/lint.yml ===================================== @@ -18,7 +18,7 @@ lint-all: - firefox script: - ./mach configure --without-wasm-sandboxed-libraries --with-base-browser-version=0.0.0 - - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v + - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach lint -v rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Run job whenever a commit is merged to a protected branch View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/87c721a… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/87c721a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-140.2.0esr-15.0-1] 3 commits: BB 44040: Modify prompt service for Base Browser.
by morgan (@morgan) 14 Aug '25

14 Aug '25
morgan pushed to branch base-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: a20941b3 by Henry Wilkes at 2025-08-14T16:05:28+00:00 BB 44040: Modify prompt service for Base Browser. - - - - - babb3f1f by Henry Wilkes at 2025-08-14T16:05:28+00:00 fixup! BB 40925: Implemented the Security Level component TB 44030: Show a warning before restarting the browser when applying a new security level. Also adapt the existing warning to use a destructive button and the button "Restart Tor Browser" rather than just "Restart". - - - - - e094fd1a by Henry Wilkes at 2025-08-14T16:05:29+00:00 fixup! Base Browser strings TB 44030: Add strings for the new security level warning dialog. - - - - - 8 changed files: - browser/components/securitylevel/content/securityLevelDialog.js - browser/modules/SecurityLevelRestartNotification.sys.mjs - netwerk/base/nsIPrompt.idl - toolkit/components/prompts/content/commonDialog.js - toolkit/components/prompts/src/Prompter.sys.mjs - toolkit/components/windowwatcher/nsIPromptService.idl - toolkit/content/widgets/dialog.js - toolkit/locales/en-US/toolkit/global/base-browser.ftl Changes: ===================================== browser/components/securitylevel/content/securityLevelDialog.js ===================================== @@ -39,8 +39,8 @@ const gSecurityLevelDialog = { async init() { const dialog = document.getElementById("security-level-dialog"); dialog.addEventListener("dialogaccept", event => { + event.preventDefault(); if (this._acceptButton.disabled) { - event.preventDefault(); return; } this._commitChange(); @@ -158,7 +158,41 @@ const gSecurityLevelDialog = { /** * Commit the change in security level and restart the browser. */ - _commitChange() { + async _commitChange() { + const doNotWarnPref = "browser.security_level.disable_warn_before_restart"; + if (!Services.prefs.getBoolPref(doNotWarnPref, false)) { + const [titleString, bodyString, checkboxString, restartString] = + await document.l10n.formatValues([ + { id: "security-level-restart-warning-dialog-title" }, + { id: "security-level-restart-warning-dialog-body" }, + { id: "restart-warning-dialog-do-not-warn-checkbox" }, + { id: "restart-warning-dialog-restart-button" }, + ]); + const flags = + Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + + Services.prompt.BUTTON_POS_0_DEFAULT + + Services.prompt.BUTTON_DEFAULT_IS_DESTRUCTIVE + + Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL; + const propBag = await Services.prompt.asyncConfirmEx( + window.browsingContext.top, + Services.prompt.MODAL_TYPE_CONTENT, + titleString, + bodyString, + flags, + restartString, + null, + null, + checkboxString, + false, + { useTitle: true, noIcon: true } + ); + if (propBag.get("buttonNumClicked") !== 0) { + return; + } + if (propBag.get("checked")) { + Services.prefs.setBoolPref(doNotWarnPref, true); + } + } SecurityLevelPrefs.setSecurityLevelBeforeRestart(this._selectedLevel); Services.startup.quit( Services.startup.eAttemptQuit | Services.startup.eRestart ===================================== browser/modules/SecurityLevelRestartNotification.sys.mjs ===================================== @@ -42,11 +42,13 @@ export const SecurityLevelRestartNotification = { await lazy.NotificationStrings.formatValues([ { id: "security-level-restart-prompt-title" }, { id: "security-level-restart-prompt-body" }, - { id: "security-level-restart-prompt-button-restart" }, + { id: "restart-warning-dialog-restart-button" }, { id: "security-level-restart-prompt-button-ignore" }, ]); const buttonFlags = Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 + + Services.prompt.BUTTON_POS_0_DEFAULT + + Services.prompt.BUTTON_DEFAULT_IS_DESTRUCTIVE + Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1; const propBag = await Services.prompt.asyncConfirmEx( ===================================== netwerk/base/nsIPrompt.idl ===================================== @@ -67,6 +67,8 @@ interface nsIPrompt : nsISupports const unsigned long BUTTON_POS_1_IS_SECONDARY = 1 << 29; + const unsigned long BUTTON_DEFAULT_IS_DESTRUCTIVE = 1 << 30; + const unsigned long STD_OK_CANCEL_BUTTONS = (BUTTON_TITLE_OK * BUTTON_POS_0) + (BUTTON_TITLE_CANCEL * BUTTON_POS_1); const unsigned long STD_YES_NO_BUTTONS = (BUTTON_TITLE_YES * BUTTON_POS_0) + ===================================== toolkit/components/prompts/content/commonDialog.js ===================================== @@ -39,7 +39,7 @@ function commonDialogOnLoad() { ["promptUserAndPass", "promptPassword"].includes(args.promptType) || args.headerIconCSSValue; let root = document.documentElement; - if (needIconifiedHeader) { + if (needIconifiedHeader && !args.noIcon) { root.setAttribute("neediconheader", "true"); } let title = { raw: args.title }; @@ -107,6 +107,10 @@ function commonDialogOnLoad() { dialog.setAttribute("extra1-is-secondary", true); } + if (args.isDefaultDestructive) { + dialog.setAttribute("default-is-destructive", true); + } + Dialog = new CommonDialog(args, ui); window.addEventListener("dialogclosing", function (aEvent) { if (aEvent.detail?.abort) { ===================================== toolkit/components/prompts/src/Prompter.sys.mjs ===================================== @@ -1507,6 +1507,10 @@ class ModalPrompter { args.isExtra1Secondary = true; } + if (flags & Ci.nsIPrompt.BUTTON_DEFAULT_IS_DESTRUCTIVE) { + args.isDefaultDestructive = true; + } + if (flags & Ci.nsIPrompt.SHOW_SPINNER) { args.headerIconCSSValue = "url('chrome://global/skin/icons/loading.svg')"; } ===================================== toolkit/components/windowwatcher/nsIPromptService.idl ===================================== @@ -287,6 +287,8 @@ interface nsIPromptService : nsISupports */ const unsigned long BUTTON_POS_1_IS_SECONDARY = 1 << 29; + const unsigned long BUTTON_DEFAULT_IS_DESTRUCTIVE = 1 << 30; + /** * Selects the standard set of OK/Cancel buttons. */ ===================================== toolkit/content/widgets/dialog.js ===================================== @@ -21,7 +21,8 @@ static get observedAttributes() { return super.observedAttributes.concat( "subdialog", - "extra1-is-secondary" + "extra1-is-secondary", + "default-is-destructive" ); } @@ -40,6 +41,12 @@ if (name === "extra1-is-secondary" && AppConstants.XP_UNIX) { this.getButton("cancel").after(this.getButton("extra1")); } + if (name === "default-is-destructive") { + this.#setButtonIsDestructive( + this.getButton(this.defaultButton), + this.hasAttribute("default-is-destructive") + ); + } super.attributeChangedCallback(name, oldValue, newValue); } @@ -491,12 +498,17 @@ var oldDefaultButton = this.getButton(this.defaultButton); if (oldDefaultButton) { oldDefaultButton.removeAttribute("default"); + this.#setButtonIsDestructive(oldDefaultButton, false); } var newDefaultButton = this.getButton(aNewDefault); if (newDefaultButton) { this.setAttribute("defaultButton", aNewDefault); newDefaultButton.setAttribute("default", "true"); + this.#setButtonIsDestructive( + newDefaultButton, + this.hasAttribute("default-is-destructive") + ); } else { this.setAttribute("defaultButton", "none"); if (aNewDefault != "none") { @@ -507,6 +519,16 @@ } } + /** + * Mark or un-mark a button as a destructive action. + * + * @param {?Element} button - The button to mark. + * @param {boolean} isDestructive - Whether the button is destructive. + */ + #setButtonIsDestructive(button, isDestructive) { + button?.classList.toggle("danger-button", isDestructive); + } + _handleButtonCommand(aEvent) { return this._doButtonCommand(aEvent.target.getAttribute("dlgtype")); } ===================================== toolkit/locales/en-US/toolkit/global/base-browser.ftl ===================================== @@ -177,6 +177,13 @@ security-level-preferences-bullet-limit-media = Audio and video (HTML5 media), a security-level-preferences-bullet-disabled-javascript = JavaScript is disabled by default on all sites. security-level-preferences-bullet-limit-font-and-symbols-and-images = Some fonts, icons, math symbols, and images are disabled. +## Security level dialog warning the user about a restart. + +# '-brand-short-name' is the localized browser name, like "Tor Browser". +security-level-restart-warning-dialog-title = Restart { -brand-short-name } to apply changes? +# '-brand-short-name' is the localized browser name, like "Tor Browser". +security-level-restart-warning-dialog-body = { -brand-short-name } needs to restart to apply your changes. This will close all your windows and tabs. + ## Custom security level. ## Some custom preferences configuration has placed the user outside one of the standard three levels. @@ -188,5 +195,12 @@ security-level-summary-custom = Your custom browser preferences have resulted in security-level-restart-prompt-title = Your security level settings require a restart security-level-restart-prompt-body = You must restart { -brand-short-name } for your security level settings to be applied. This will close all your windows and tabs. -security-level-restart-prompt-button-restart = Restart security-level-restart-prompt-button-ignore = Ignore + +## Part of the restart dialogs for security level and new identity. + +# Checkbox to never show the restart warning dialog again. +restart-warning-dialog-do-not-warn-checkbox = Don’t show this warning again +# Button to restart the browser. +# '-brand-short-name' is the localized browser name, like "Tor Browser". +restart-warning-dialog-restart-button = Restart { -brand-short-name } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/fcff0e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/fcff0e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • ...
  • 1906
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.