tbb-commits
Threads by month
- ----- 2026 -----
- 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
- 1 participants
- 20130 discussions
[Git][tpo/applications/tor-browser-build][main] Bug 41727: Rewrite the list_toolchain_updates_checks scripts
by boklm (@boklm) 09 Mar '26
by boklm (@boklm) 09 Mar '26
09 Mar '26
boklm pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
7f96b8ad by Nicolas Vigier at 2026-03-09T20:40:48+01:00
Bug 41727: Rewrite the list_toolchain_updates_checks scripts
The following changes have been done in this commit:
- The various small scripts extracting informations from the firefox and
application-services sources tree in the various
`list_toolchain_updates_*` files have been put in the scripts
`extract-firefox-versions-infos` and
`extract-application-services-versions-infos`, in the directory
`tools/toolchain-updates`. Some have been deduplicated (the ones
extracting some information from the same file). Those two scripts
output a json file containing the informations extracted from the
source tree, and the corresponding rbm project, option and targets
to query the current version in tor-browser-build of each of those
components.
- The `check-versions` scripts takes the json output from the
`extract-*-versions-infos` scripts and check the current version in
tor-browser-build of each of the components, and lists the one that
are up-to-date, the ones that need an update and the ones that caused
an error (either extracting the information from the source tree or
from rbm config).
- The `list-toolchain-updates` script calls the
`extract-*-versions-infos` scripts from the source tree, in the
`git_clones` directory after doing a checkout of the commit defined in
the `list_toolchain_updates` target and saves the json outputs. It
then calls the `check-versions` script on those json files. The
`list-toolchain-updates` script can be run with `make
list_toolchain_updates`.
- The old list_toolchain_updates scripts have been removed.
This rewrites provides the following improvements:
- Running `make list_toolchain_updates` is much faster than before. We
are now running the script to extract version information directly
from `git_clones` (after a checkout of the correct commit), which
avoids creating/extracting a tarball of the sources (which was the
part taking the most time).
- It should be much easier to modify/debug the scripts to extract version
information (`extract-*-versions-infos`) since they can now be run from
a source tree with no modification (this was not the case with the
previous scripts since we had a single script generated from a template
to extract version informations and compare them with current used
version).
- Once rbm#40091 is implemented (adding some easy way to update a value
from rbm config), it should be easy to update the `check-versions`
script to generate a script to apply the expected toolchain changes.
- - - - -
20 changed files:
- Makefile
- doc/MAKEFILE.txt
- doc/how-to-update-glean-parser.txt
- projects/android-ndk/config
- projects/application-services/config
- − projects/application-services/list_toolchain_updates_checks
- − projects/common/list_toolchain_updates
- − projects/common/list_toolchain_updates-common-firefox-geckoview
- projects/firefox/config
- − projects/firefox/list_toolchain_updates_checks
- projects/geckoview/config
- − projects/geckoview/list_toolchain_updates_checks
- projects/python/config
- rbm.conf
- − tools/list_toolchain_updates
- + tools/toolchain-updates/ExtractVersionsInfos.pm
- + tools/toolchain-updates/check-versions
- + tools/toolchain-updates/extract-application-services-versions-infos
- + tools/toolchain-updates/extract-firefox-versions-infos
- + tools/toolchain-updates/list-toolchain-updates
Changes:
=====================================
Makefile
=====================================
@@ -432,22 +432,7 @@ list_translation_updates-alpha:
$(rbm) showconf --target alpha --step list_updates translation list_updates
list_toolchain_updates:
- tools/list_toolchain_updates
-
-list_toolchain_updates-firefox-linux: submodule-update
- $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-linux-x86_64
-
-list_toolchain_updates-firefox-windows: submodule-update
- $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-windows-x86_64
-
-list_toolchain_updates-firefox-macos: submodule-update
- $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-macos
-
-list_toolchain_updates-application-services: submodule-update
- $(rbm) build application-services --step list_toolchain_updates --target nightly --target torbrowser-android-armv7
-
-list_toolchain_updates-geckoview: submodule-update
- $(rbm) build geckoview --step list_toolchain_updates --target nightly --target torbrowser-android-armv7
+ @tools/toolchain-updates/list-toolchain-updates
create_glean_deps_tarball: submodule-update
$(rbm) build glean-parser --target alpha --target torbrowser-android-armv7
=====================================
doc/MAKEFILE.txt
=====================================
@@ -179,10 +179,9 @@ and compare them with the checksum from sha256sums-unsigned-build.txt.
* Toolchain updates *
*********************
-list_toolchain_updates-{application-services,firefox-linux,firefox-macos,
- firefox-windows,geckoview}
--------------------------------------------------------------------------
-List toolchain updates required for building selected component/platform.
+list_toolchain_updates
+----------------------
+List toolchain updates required.
firefox-{linux-x86_64,linux-aarch64,windows-x86_64,windows-i686,
=====================================
doc/how-to-update-glean-parser.txt
=====================================
@@ -8,8 +8,8 @@ There are three steps involved in the process:
1)
-Running `make list_toolchain_updates-geckoview` should tell
-you which version of `glean_parser` is needed.
+Running `make list_toolchain_updates` should tell you which version of
+`glean_parser` is needed.
2)
=====================================
projects/android-ndk/config
=====================================
@@ -3,7 +3,7 @@ filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("co
version: 29.0.14206865
var:
- release: 29
+ release: r29
setup: |
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
@@ -13,6 +13,6 @@ var:
export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
input_files:
- - URL: 'https://dl.google.com/android/repository/android-ndk-r[% c("var/release") %]-linux.zip'
+ - URL: 'https://dl.google.com/android/repository/android-ndk-[% c("var/release") %]-linux.zip'
name: ndk
sha256sum: 4abbbcdc842f3d4879206e9695d52709603e52dd68d3c1fff04b3b5e7a308ecf
=====================================
projects/application-services/config
=====================================
@@ -27,11 +27,16 @@ var:
nss_sha256sum: fb5aa56fa35d963d4c65278328e2e9c99c2484c86f0e41537412477739dcf997
cargo_vendor_include_config: 1
+ application-services_versions_infos: '[% exec(c("basedir") _ "/tools/toolchain-updates/extract-application-services-versions-infos") %]'
+
targets:
nightly:
git_hash: '[% c("version") %]-TORBROWSER'
tag_gpg_id: 0
+ list_toolchain_updates:
+ git_hash: 'v[% c("version") %]'
+
steps:
build:
filename: '[% project %]-[% c("version") %]-[% c("var/rebuild_date") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
@@ -97,9 +102,3 @@ steps:
filename: 'gradle-dependencies-list-[% c("version") %].txt'
var:
generate_gradle_dependencies_list: 1
-
- list_toolchain_updates:
- git_hash: 'v[% c("version") %]'
- input_files: []
- container:
- use_container: 0
=====================================
projects/application-services/list_toolchain_updates_checks deleted
=====================================
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-# compileSdkVersion
-read -d '' p << 'EOF' || true
-if (m/^\\s*compileSdkMajorVersion:\\s([^"]*),/) {
- $major = $1;
-}
-if (m/^\\s*compileSdkMinorVersion:\\s([^"]*),/) {
- $minor = $1;
-}
-if ($major && $minor) {
- print "$major.$minor.0";
- exit 0;
-}
-EOF
-needed=$(cat build.gradle | perl -ne "$p")
-current=[% pc("android-sdk", "version") %]
-check_update_needed compileSdkVersion "$needed" "$current"
-
-
-# gradle
-read -d '' p << 'EOF' || true
-if (m|distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)…) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
-current='[% c("var/gradle_version") %]'
-check_update_needed gradle "$needed" "$current"
-
-
-# nss-nspr
-read -d '' p << 'EOF' || true
-if (m/NSS_ARCHIVE="nss-(.*-with-nspr-.*)\\.tar\\.gz"/) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat libs/build-all.sh | perl -ne "$p")
-current='[% c("var/nss_version") %]-with-nspr-[% c("var/nspr_version") %]'
-check_update_needed nss-nspr "$needed" "$current"
-
-# nss-sha256sum
-read -d '' p << 'EOF' || true
-if (m/NSS_SHA256="([^"]+)"/) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat libs/build-all.sh | perl -ne "$p")
-current='[% c("var/nss_sha256sum") %]'
-check_update_needed nss-sha256sum "$needed" "$current"
-
-# uniffi
-p='while (<>) {
- if (m/^\s*uniffi\s*=\s*\{[^}]*version\s*=\s*"([^"]*)"/) {
- print $1;
- exit;
- }
-}'
-needed=$(cat components/autofill/Cargo.toml | perl -ne "$p")
-current='[% pc("uniffi-rs", "version") %]'
-check_update_needed uniffi "$needed" "$current"
=====================================
projects/common/list_toolchain_updates deleted
=====================================
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-set -e
-
-rootdir="$(pwd)"
-no_updates="$rootdir/no_updates.txt"
-updates="$rootdir/updates.txt"
-
-tar -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
-cd [% project %]-[% c('version') %]
-
-function check_update_needed() {
- name="$1"
- v1="$2"
- v2="$3"
- if test "$v1" = "$v2"
- then
- echo "* $name ($v1)" >> "$no_updates"
- else
- echo "* $name needs to be updated to $v1 (currently at $v2)" >> "$updates"
- fi
-}
-
-[% INCLUDE list_toolchain_updates_checks %]
-
-echo '### Component: [% project %] ([% c("git_hash") %])'
-
-if test -f "$updates"
-then
- echo "The following components need to be updated:"
- cat "$updates"
- echo
-fi
-if test -f "$no_updates"
-then
- echo "The following components don't need to be updated:"
- cat "$no_updates"
-fi
=====================================
projects/common/list_toolchain_updates-common-firefox-geckoview deleted
=====================================
@@ -1,178 +0,0 @@
-#!/bin/bash
-
-# rust
-[% IF c("var/linux") || c("var/android");
- SET toolchain_alias='linux64-rust';
- ELSIF c("var/windows");
- SET toolchain_alias='mingw32-rust';
- ELSIF c("var/macos");
- SET toolchain_alias='linux64-rust-macos';
- END; %]
-read -d '' p << 'EOF' || true
-sub as_array {
- ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
-}
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/rust.yml');
-foreach my $t (keys %$d) {
- next unless ref $d->{$t}{run}{'toolchain-alias'} eq 'HASH';
- my $talias = as_array($d->{$t}{run}{'toolchain-alias'}{'by-project'}{default});
- if (grep { $_ eq '[% toolchain_alias %]' } @$talias) {
- my $channel;
- foreach my $arg (@{$d->{$t}{run}{arguments}}) {
- if ($arg eq '--channel') {
- $channel = 1;
- next;
- }
- if ($channel) {
- print $arg;
- exit;
- }
- }
- }
-}
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("rust", "version") %]'
-check_update_needed rust "$needed" "$current"
-
-
-# clang
-[% IF c("var/linux") || c("var/android");
- SET toolchain_alias='linux64-clang';
- ELSIF c("var/windows");
- SET toolchain_alias='linux64-clang-mingw-x64';
- ELSIF c("var/macos");
- SET toolchain_alias='macosx64-clang';
- END; %]
-read -d '' p << 'EOF' || true
-sub as_array {
- ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
-}
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/clang.yml');
-my $clang_toolchain;
-my $clang_fetch;
-TOOLCHAIN: foreach my $t (keys %$d) {
- my $aliases = as_array($d->{$t}{run}{'toolchain-alias'}{'by-project'}{default});
- foreach my $alias (@$aliases) {
- if ($alias eq '[% toolchain_alias %]') {
- foreach my $fetch (@{$d->{$t}{fetches}{toolchain}}) {
- $clang_toolchain = $fetch if $fetch =~ m/^.*-clang-.*/;
- }
- foreach my $fetch (@{$d->{$t}{fetches}{fetch}}) {
- $clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
- }
- last TOOLCHAIN;
- }
- }
-}
-
-if (!$clang_toolchain && !$clang_fetch) {
- print STDERR "Error: could not find clang toolchain\\n";
- exit 1;
-}
-
-if (!$clang_fetch) {
- foreach my $fetch (@{$d->{$clang_toolchain}{fetches}{fetch}}) {
- $clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
- }
-}
-
-if (!$clang_fetch) {
- print STDERR "Error: could not find clang fetch\\n";
- exit 1;
-}
-
-my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $fetch->{$clang_fetch}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("llvm-project", "git_hash") %]'
-check_update_needed clang "$needed" "$current"
-
-
-# cbindgen
-read -d '' p << 'EOF' || true
-my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-my $revision;
-T: foreach my $t (keys %$fetch) {
- if ($fetch->{$t}{'fetch-alias'} eq 'cbindgen') {
- $revision = $fetch->{$t}{fetch}{revision};
- last T;
- }
-}
-exit 1 unless $revision;
-print $revision;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("cbindgen", "git_hash") %]'
-check_update_needed cbindgen "$needed" "$current"
-
-
-# nasm
-read -d '' p << 'EOF' || true
-my $nasm = YAML::XS::LoadFile('taskcluster/kinds/toolchain/nasm.yml');
-my $linux64 = 'linux64-nasm';
-print substr $nasm->{$linux64}{'fetches'}{'fetch'}[0], 5;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("nasm", "version") %]'
-check_update_needed nasm "$needed" "$current"
-
-
-# node
-read -d '' p << 'EOF' || true
-sub l {
- ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
-}
-
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/node.yml');
-my $node_toolchain;
-T: foreach my $t (keys %$d) {
- foreach my $alias (@{l($d->{$t}{run}{'toolchain-alias'})}) {
- if ($alias eq 'linux64-node') {
- foreach my $fetch (@{$d->{$t}{fetches}{fetch}}) {
- if ($fetch =~ m/^nodejs-.*/) {
- $node_toolchain = $fetch;
- last T;
- }
- }
- }
- }
-}
-
-exit 1 unless $node_toolchain;
-
-my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-my ($version) = $fetch->{$node_toolchain}{fetch}{url} =~ m|^https://nodejs.org/dist/v([^/]+)/|;
-print "$version\\n";
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("node", "version") %]'
-check_update_needed node "$needed" "$current"
-
-
-# Python
-read -d '' p << 'EOF' || true
-if (m/^\\s*MINIMUM_MINOR_VERSION = ([0-9]+)/) {
- print $1;
- exit;
-}
-EOF
-needed=3.$(cat python/mozboot/bin/bootstrap.py | perl -ne "$p")
-current="3.9" # 3.11.x on Debian bookworm, 3.13.11 on our python project
-check_update_needed python "$needed" "$current"
-
-
-# binutils
-read -d '' p << 'EOF' || true
-
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/misc.yml');
-my $f = $d->{'linux64-binutils'}{fetches}{fetch}[0];
-my ($version) = $f =~ m|^binutils-([0-9\\.]+)|;
-exit 1 unless $version;
-print "$version\\n";
-EOF
-
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("binutils", "version") %]'
-check_update_needed binutils "$needed" "$current"
=====================================
projects/firefox/config
=====================================
@@ -63,6 +63,8 @@ var:
windows_rs_version: '0.62.2'
windows_rs_sha256sum: 527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580
+ firefox_versions_infos: '[% exec(c("basedir") _ "/tools/toolchain-updates/extract-firefox-versions-infos") %]'
+
steps:
src-tarballs:
filename: 'src-[% project %]-[% c("version") %].tar.xz'
@@ -90,13 +92,6 @@ steps:
nightly:
version: '[% c("abbrev") %]'
- list_toolchain_updates:
- git_hash: '[% c("var/upstream_firefox_commit") %]'
- tag_gpg_id: 0
- input_files: []
- container:
- use_container: 0
-
targets:
firefoxbrowser:
git_hash: '[% c("var/upstream_firefox_commit") %]'
@@ -168,6 +163,10 @@ targets:
- python3-zstandard
- wine
+ list_toolchain_updates:
+ git_hash: '[% c("var/upstream_firefox_commit") %]'
+ tag_gpg_id: 0
+
input_files:
- project: container-image
- filename: 'mozconfig'
=====================================
projects/firefox/list_toolchain_updates_checks deleted
=====================================
@@ -1,157 +0,0 @@
-#!/bin/bash
-
-[% INCLUDE 'list_toolchain_updates-common-firefox-geckoview' %]
-
-[% IF c("var/macos") %]
-# macosx-sdk-version
-read -d '' p << 'EOF' || true
-sub l {
- ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
-}
-
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/macos-sdk.yml');
-
-foreach my $t (keys %$d) {
- foreach my $alias (@{l($d->{$t}{run}{'toolchain-alias'})}) {
- if ($alias eq 'macosx64-sdk') {
- if ($t =~ m/^macosx64-sdk-(.*)/) {
- print "$1";
- exit 0;
- }
- }
- }
-}
-
-exit 1;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("macosx-toolchain", "version") %]'
-check_update_needed macos-sdk-version "$needed" "$current"
-
-# macos-sdk-sha512sum
-read -d '' p << 'EOF' || true
-sub l {
- ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
-}
-
-my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/macos-sdk.yml');
-
-foreach my $t (keys %$d) {
- foreach my $alias (@{l($d->{$t}{run}{'toolchain-alias'})}) {
- if ($alias eq 'macosx64-sdk') {
- if ($t =~ m/^macosx64-sdk-(.*)/) {
- print $d->{$t}{run}{'arguments'}[1];
- exit 0;
- }
- }
- }
-}
-
-exit 1;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("macosx-toolchain", "var/sdk_sha512sum") %]'
-check_update_needed macos-sdk-sha512sum "$needed" "$current"
-
-# cctools
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{'cctools-port'}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("cctools", "git_hash") %]'
-check_update_needed cctools "$needed" "$current"
-
-# libdispatch
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{'libdispatch'}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("libdispatch", "git_hash") %]'
-check_update_needed libtapi "$needed" "$current"
-
-# libtapi
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{'libtapi'}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("libtapi", "git_hash") %]'
-check_update_needed libtapi "$needed" "$current"
-
-# End of macOS checks
-[% END -%]
-
-
-[% IF c("var/windows") %]
-# mingw-w64-clang
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{'mingw-w64'}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("mingw-w64-clang", "git_hash") %]'
-check_update_needed mingw-w64-clang "$needed" "$current"
-
-
-# fxc2
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{fxc2}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("fxc2", "git_hash") %]'
-check_update_needed fxc2 "$needed" "$current"
-
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-my $url = $d->{'windows-rs'}{fetch}{url};
-if ($url =~ m|crates/windows/(.+)/download$|) {
- print $1;
- exit 0;
-}
-print STDERR "windows-rs url not found ($url)\\n";
-exit 1
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% c("var/windows_rs_version") %]'
-check_update_needed windows-rs "$needed" "$current"
-
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-my $sha256 = $d->{'windows-rs'}{fetch}{sha256};
-exit 1 unless $sha256;
-print $sha256;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% c("var/windows_rs_sha256sum") %]'
-check_update_needed windows-rs-sha256sum "$needed" "$current"
-
-# windows-app-sdk
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-my $sha256 = $d->{'windowsappsdk-redist'}{fetch}{sha256};
-exit 1 unless $sha256;
-print $sha256;
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("windows-app-sdk", "var/windowsappsdk_sha256sum") %]'
-check_update_needed windowsappsdk_sha256sum "$needed" "$current"
-
-# End of Windows checks
-[% END -%]
-
-
-[% IF c("var/rlbox") %]
-# wasi-sdk
-read -d '' p << 'EOF' || true
-my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
-print $d->{'wasi-sdk'}{fetch}{revision};
-EOF
-needed=$(perl -MYAML::XS -e "$p")
-current='[% pc("wasi-sysroot", "git_hash") %]'
-check_update_needed wasi-sdk "$needed" "$current"
-
-# End RLBox
-[% END -%]
=====================================
projects/geckoview/config
=====================================
@@ -155,13 +155,6 @@ steps:
name: bundletool
sha256sum: '[% c("var/bundletool_hash") %]'
- list_toolchain_updates:
- git_hash: '[% pc("firefox", "var/upstream_firefox_commit") %]'
- tag_gpg_id: 0
- input_files: []
- container:
- use_container: 0
-
input_files:
- project: container-image
- filename: 'mozconfig'
=====================================
projects/geckoview/list_toolchain_updates_checks deleted
=====================================
@@ -1,124 +0,0 @@
-#!/bin/bash
-
-[% INCLUDE 'list_toolchain_updates-common-firefox-geckoview' %]
-
-# ndk version
-read -d '' p << 'EOF' || true
-if (m/^\\s*NDK_VERSION\\s*=\\s*"(.+)"/) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat python/mozboot/mozboot/android.py | perl -ne "$p")
-current='r[% pc("android-ndk", "var/release") %]'
-check_update_needed ndk_release_name "$needed" "$current"
-
-
-# build_tools
-read -d '' p << 'EOF' || true
-if (m/build-tools;(.+)$/) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat python/mozboot/mozboot/android-packages.txt | perl -ne "$p")
-current='[% pc("android-sdk", "version") %]'
-check_update_needed build_tools "$needed" "$current"
-
-
-# cmdline-tools
-read -d '' p << 'EOF' || true
-my $v, $s;
-while (<>) {
- if (m/^\\s*CMDLINE_TOOLS_VERSION_STRING\\s*=\\s*"(.+)"/) {
- $s = $1;
- }
- if (m/^\\s*CMDLINE_TOOLS_VERSION\\s*=\\s*"(.+)"/) {
- $v = $1;
- }
- if ($v && $s) {
- print "$s-$v";
- exit;
- }
-}
-EOF
-needed=$(cat python/mozboot/mozboot/android.py | perl -e "$p")
-current='[% pc("android-sdk", "var/commandlinetools_version_string") %]-[% pc("android-sdk", "var/commandlinetools_version") %]'
-check_update_needed cmdline-tools "$needed" "$current"
-
-
-# min-android
-read -d '' p << 'EOF' || true
-use Path::Tiny;
-my $f;
-foreach (path('build/moz.configure/android-ndk.configure')->lines_utf8) {
- if ($_ eq "def min_android_version():\\n") {
- $f = $_;
- next;
- } else {
- next unless $f;
- }
- m/return "([0-9]+)"/;
- if ($1) {
- print $1;
- exit;
- }
-}
-EOF
-needed=$(perl -e "$p")
-current='[% c("var/android_min_api") %]'
-check_update_needed min-android "$needed" "$current"
-
-
-# gradle
-read -d '' p << 'EOF' || true
-if (m{distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)…) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
-current='[% c("var/gradle_version") %]'
-check_update_needed gradle "$needed" "$current"
-
-
-# bundletool
-read -d '' p << 'EOF' || true
-if (m{^BUNDLETOOL_VERSION\\s*=\\s*"(.+)"}) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat python/mozboot/mozboot/android.py | perl -ne "$p")
-current='[% c("var/bundletool_version") %]'
-check_update_needed bundletool "$needed" "$current"
-
-
-# glean version
-read -d '' p << 'EOF' || true
-if (m{^glean\\s*=\\s*"(.+)"}) {
- print $1;
- exit;
-}
-EOF
-needed=$(cat gradle/libs.versions.toml | perl -ne "$p")
-current='[% pc("glean", "version") %]'
-check_update_needed glean "$needed" "$current"
-
-
-# glean-parser version
-read -d '' p << 'EOF' || true
-if (m{^glean_parser-(.+)\.dist-info}) {
- print $1;
- exit;
-}
-EOF
-needed=$(ls third_party/python/glean_parser | perl -ne "$p")
-current='[% pc("glean-parser", "version") %]'
-check_update_needed glean-parser "$needed" "$current"
-
-# terser
-
-needed=$(jq -r '.dependencies.terser' tools/terser/package.json)
-current='[% pc("terser", "version") %]'
-check_update_needed terser "$needed" "$current"
=====================================
projects/python/config
=====================================
@@ -19,6 +19,17 @@ var:
tar -C /var/tmp/dist -xf $rootdir/[% c("python_tarfile") %]
export PATH=/var/tmp/dist/python/bin:"$PATH"
+ # This variable is used by tools/toolchain-updates/extract-firefox-versions-infos
+ # to notice when the minimum python version required by firefox is
+ # changing, so that we can review if we need to update python.
+ #
+ # Currently this custom python build is used on Linux only.
+ #
+ # Debian includes the following python versions:
+ # bookworm (used for Android): 3.11.2
+ # trixie (windows, macos): 3.13.5
+ firefox_minimum_python_version: 3.9
+
input_files:
- project: container-image
- name: python
=====================================
rbm.conf
=====================================
@@ -14,10 +14,6 @@ container:
build: 1
steps:
- list_toolchain_updates:
- build_log: '-'
- list_toolchain_updates: '[% INCLUDE list_toolchain_updates %]'
-
cargo_vendor:
filename: '[% project %]-vendor-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
output_dir: "out/[% project %]/cargo_vendor"
=====================================
tools/list_toolchain_updates deleted
=====================================
@@ -1,35 +0,0 @@
-#!/bin/bash
-#
-# This script runs all `make list_toolchain_updates-*` commands, save
-# their outputs to a file (tmp/toolchain_updates.txt) and print it
-# (again) at the end.
-#
-set -e
-
-script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-cd "$script_dir"/..
-
-output_file="$script_dir/../tmp/toolchain_updates.txt"
-
-rm -f "$output_file"
-
-function list_toolchain_updates {
- for cmd in \
- list_toolchain_updates-firefox-linux \
- list_toolchain_updates-firefox-windows \
- list_toolchain_updates-firefox-macos \
- list_toolchain_updates-application-services \
- list_toolchain_updates-geckoview
- do
- line_title="** $cmd **"
- line_size=$(echo "$line_title" | wc -m)
- line_line=$(perl -e 'print "*" x ('$line_size' - 1), "\n"')
- echo "$line_line"; echo "$line_title"; echo "$line_line"; echo
- make -s $cmd
- echo; echo; echo "$line_line"; echo "$line_line"; echo; echo
- done
-}
-
-list_toolchain_updates | tee -a "$output_file"
-
-echo "See also tmp/toolchain_updates.txt"
=====================================
tools/toolchain-updates/ExtractVersionsInfos.pm
=====================================
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+package ExtractVersionsInfos;
+
+use Exporter;
+our @ISA = qw/Exporter/;
+our @EXPORT = qw/*version_infos *rbm_os_target set_version_info
+ get_version_info set_rbm_info set_error as_array/;
+
+our %version_infos;
+
+our %rbm_os_target = (
+ linux => 'torbrowser-linux-x86_64',
+ windows => 'torbrowser-windows-x86_64',
+ macos => 'torbrowser-macos-aarch64',
+ android => 'torbrowser-android-aarch64',
+);
+
+sub set_version_info {
+ my ($name, $value) = @_;
+ $version_infos{$name}->{expected_value} = $value;
+}
+
+sub get_version_info {
+ return $version_infos{$_[0]}->{expected_value};
+}
+
+sub set_rbm_info {
+ my ($name, $rbm_info) = @_;
+ $version_infos{$name}->{rbm_info} = $rbm_info;
+}
+
+sub set_error {
+ $version_infos{$_[0]}->{error} = 1;
+}
+
+sub as_array {
+ return [] unless defined $_[0];
+ return ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
+}
+
+1;
=====================================
tools/toolchain-updates/check-versions
=====================================
@@ -0,0 +1,117 @@
+#!/usr/bin/perl -w
+#
+# This script takes one or more json file as command line arguments, as
+# created by the `extract-*-versions-infos` files. For each component
+# defined in the json this script checks the expected value and compares
+# it with the current value in the rbm config. It then lists all
+# components that are up-to-date, components that need an update, and
+# components where there was an error (error when extracting the value
+# from the sources tree, or getting the value from the rbm config).
+
+use strict;
+
+use English;
+use FindBin;
+use YAML::XS qw(LoadFile);
+use JSON qw/decode_json/;
+use Path::Tiny;
+use Capture::Tiny qw(capture);
+
+my @base_targets = qw/nightly/;
+my @default_targets = qw/torbrowser-linux-x86_64/;
+my $rbm = "$FindBin::Bin/../../rbm/rbm";
+
+sub exit_error {
+ print STDERR "Error: ", $_[0], "\n";
+ exit (exists $_[1] ? $_[1] : 1);
+}
+
+sub capture_exec {
+ my @cmd = @_;
+ my ($stdout, $stderr, $exit) = capture {
+ system(@cmd);
+ };
+ return ($stdout, $stderr, $exit == 0, $exit) if wantarray();
+ return $stdout;
+}
+
+if (!@ARGV) {
+ exit_error "usage: $0 <json-file...>";
+}
+
+my %version_infos;
+foreach my $input_file (@ARGV) {
+ my $infos = decode_json path($input_file)->slurp_utf8;
+ exit_error "Error reading $input_file" unless $infos;
+ %version_infos = ( %version_infos, %$infos );
+}
+
+my %component_need_update;
+my %component_ok;
+my %component_error_extract;
+my %component_error_rbm;
+
+foreach my $component (keys %version_infos) {
+ print "Checking $component\n";
+ my $rbm_info = $version_infos{$component}{rbm_info};
+ my @targets = ( @base_targets,
+ $rbm_info->{targets} ? @{$rbm_info->{targets}} : @default_targets );
+ @targets = map { ('--target', $_ ) } @targets;
+ my @cmd = ($rbm, 'showconf', $rbm_info->{project}, $rbm_info->{option},
+ @targets);
+ if ($version_infos{$component}{error}) {
+ $component_error_extract{$component} = 1;
+ next;
+ }
+ my ($stdout, $stderr, $success) = capture_exec(@cmd);
+ if (!$success) {
+ $component_error_rbm{$component} = $stderr;
+ next;
+ }
+ chomp $stdout;
+ if ($stdout eq $version_infos{$component}{expected_value}) {
+ $component_ok{$component} = $stdout;
+ next;
+ }
+ $component_need_update{$component}{expected_value} =
+ $version_infos{$component}->{expected_value};
+ $component_need_update{$component}{current_value} = $stdout;
+}
+
+if (!%component_need_update && !%component_error_extract && !%component_error_rbm) {
+ print "Everything is up-to-date\n";
+ exit 0;
+}
+
+if (%component_ok) {
+ print "The following components are up-to-date:\n";
+ foreach my $component (sort keys %component_ok) {
+ print "- $component ($component_ok{$component})\n";
+ }
+ print "\n";
+}
+
+if (%component_error_extract) {
+ print "There was an error extracting the following components info from source tree:\n";
+ foreach my $component (sort keys %component_error_extract) {
+ print "- $component\n";
+ }
+ print "\n";
+}
+
+if (%component_error_rbm) {
+ print "There was an error extracting the following components from rbm config:\n";
+ foreach my $component (sort keys %component_error_rbm) {
+ print "- $component\n";
+ }
+ print "\n";
+}
+
+if (%component_need_update) {
+ print "The following components need an update:\n";
+ foreach my $component (sort keys %component_need_update) {
+ print "- $component\n";
+ print " current: $component_need_update{$component}{current_value}\n";
+ print " expected: $component_need_update{$component}{expected_value}\n";
+ }
+}
=====================================
tools/toolchain-updates/extract-application-services-versions-infos
=====================================
@@ -0,0 +1,119 @@
+#!/usr/bin/perl -w
+#
+# This script extract version informations from an application-services
+# tree. It will output on stdout a json file containing version
+# information found in the firefox tree. The json file also include
+# information about which rbm project, option and targets can be used
+# to query (and later update) the current value in `tor-browser-build`
+# (this part is done by the `check-versions` script).
+#
+# This script should be run from the root of an application-services
+# tree, without argument.
+
+use strict;
+use English;
+use YAML::XS qw(LoadFile);
+use Path::Tiny;
+use JSON qw/decode_json/;
+use FindBin;
+use lib $FindBin::Bin;
+use ExtractVersionsInfos;
+
+## compileSdkVersion
+sub get_compilesdk_info {
+ my $component = 'appservices/android-sdk';
+ set_rbm_info($component, {
+ project => 'android-sdk',
+ option => 'version',
+ });
+ my @lines = path('build.gradle')->lines_utf8;
+ my ($major, $minor);
+ foreach my $line (@lines) {
+ if ($line =~ m/^\s*MINIMUM_MINOR_VERSION = ([0-9]+)/) {
+ set_version_info('python', "3.$1");
+ return;
+ }
+ if ($line =~ m/^\s*compileSdkMajorVersion:\s([^"]*),/) {
+ $major = $1;
+ } elsif ($line =~ m/^\s*compileSdkMinorVersion:\s([^"]*),/) {
+ $minor = $1;
+ }
+ if ($major && $minor) {
+ set_version_info($component, "$major.$minor.0");
+ return;
+ }
+ }
+ set_error($component);
+}
+
+## gradle
+sub get_gradle_info {
+ my $component = 'appservices/gradle';
+ set_rbm_info($component, {
+ project => 'application-services',
+ option => 'var/gradle_version',
+ });
+ my @lines = path('gradle/wrapper/gradle-wrapper.properties')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m|distributionUrl=https\\://services.gradle.org/distributions/gradle-(.*)-.…) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+# nss-nspr
+sub get_nss_info {
+ my %component_option = (
+ nss => 'var/nss_version',
+ nspr => 'var/nspr_version',
+ 'nss-sha256sum' => 'var/nss_sha256sum',
+ );
+ foreach my $component (keys %component_option) {
+ set_rbm_info($component, {
+ project => 'application-services',
+ option => $component_option{$component},
+ });
+ }
+ my ($nss, $sha256sum);
+ my @lines = path('libs/build-all.sh')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m/NSS_ARCHIVE="nss-(.*)-with-nspr-(.*)\.tar\.gz"/) {
+ set_version_info('nss', $1);
+ set_version_info('nspr', $2);
+ $nss = 1;
+ }
+ if ($line =~ m/NSS_SHA256="([^"]+)"/) {
+ set_version_info('nss-sha256sum', $1);
+ $sha256sum = 1;
+ }
+ return if ($nss && $sha256sum);
+ }
+ set_error('nss') unless $nss;
+ set_error('nspr') unless $nss;
+ set_error('nss-sha256sum') unless $sha256sum;
+}
+
+## uniffi
+sub get_uniffi_info {
+ my $component = 'uniffi';
+ set_rbm_info($component, {
+ project => 'uniffi-rs',
+ option => 'version',
+ });
+ my @lines = path('components/autofill/Cargo.toml')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m/^\s*uniffi\s*=\s*\{[^}]*version\s*=\s*"([^"]*)"/) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+get_compilesdk_info;
+get_gradle_info;
+get_nss_info;
+get_uniffi_info;
+print JSON->new->utf8->canonical->pretty->encode(\%version_infos);
=====================================
tools/toolchain-updates/extract-firefox-versions-infos
=====================================
@@ -0,0 +1,481 @@
+#!/usr/bin/perl -w
+#
+# This script extracts version informations from a firefox tree. It will
+# output on stdout a json file containing version information found in
+# the firefox tree. The json file also include information about which
+# rbm project, option and targets can be used to query (and later update)
+# the current value in `tor-browser-build` (this part is done by the
+# `check-versions` script).
+#
+# This script should be run from the root of a firefox tree, without
+# argument.
+#
+#
+# == How to add extraction of a new version information ==
+#
+# - Copy the `get_glean_info` function (as an example of basic extraction
+# function) and rename it with the name of the new component
+# - Add the new function to the list of functions being called, at the
+# end of the file
+# - Update `$component` with the name of the component
+# - Update the `set_rbm_info` call with the rbm project, option and
+# target (optional) used query the current version in `tor-browser-build`.
+# - Update the file path in the `my @lines = ...` line to the path in
+# the source tree where the information can be found
+# - Update the regexp to match the line containing the information we
+# want to extract. The part between parenthesis will be stored as `$1`,
+# which we can use in the `set_version_info` call to save the
+# information we extracted. If the information was not found,
+# `set_error` is used to register an error.
+#
+# Alternatively it should be possible to write an additional script to
+# extract some informations from the sources, and output them in the
+# same json format as this script.
+
+use strict;
+use English;
+use YAML::XS qw(LoadFile);
+use Path::Tiny;
+use JSON qw/decode_json/;
+use FindBin;
+use lib $FindBin::Bin;
+use ExtractVersionsInfos;
+
+# taskcluster/kinds/toolchain/rust.yml
+#
+## Rust ##
+sub get_rust_info {
+ my $infos = YAML::XS::LoadFile('taskcluster/kinds/toolchain/rust.yml');
+ my %toolchain_aliases = (
+ linux => 'linux64-rust',
+ windows => 'mingw32-rust',
+ macos => 'linux64-rust-macos',
+ );
+ foreach my $os (keys %toolchain_aliases) {
+ TOOLCHAIN_ALIAS: foreach my $t (keys %$infos) {
+ next unless ref $infos->{$t}{run}{'toolchain-alias'} eq 'HASH';
+ my $talias = as_array($infos->{$t}{run}{'toolchain-alias'}{'by-project'}{default});
+ if (grep { $_ eq $toolchain_aliases{$os} } @$talias) {
+ my $channel;
+ foreach my $arg (@{$infos->{$t}{run}{arguments}}) {
+ if ($arg eq '--channel') {
+ $channel = 1;
+ next;
+ }
+ if ($channel) {
+ set_version_info("rust-$os", $arg);
+ last TOOLCHAIN_ALIAS;
+ }
+ }
+ }
+ }
+
+ set_error("rust-$os") unless get_version_info("rust-$os");
+ set_rbm_info("rust-$os", {
+ project => 'rust',
+ option => 'version',
+ targets => [ $rbm_os_target{$os} ],
+ });
+ }
+}
+
+
+# taskcluster/kinds/toolchain/clang.yml
+#
+## clang ##
+sub get_clang_info {
+ my %toolchain_aliases = (
+ linux => 'linux64-clang',
+ windows => 'linux64-clang-mingw-x64',
+ macos => 'macosx64-clang',
+ );
+ my $infos = YAML::XS::LoadFile('taskcluster/kinds/toolchain/clang.yml');
+ OS: foreach my $os (keys %toolchain_aliases) {
+ my $clang_toolchain;
+ my $clang_fetch;
+ TOOLCHAIN: foreach my $t (keys %$infos) {
+ next unless ref $infos->{$t}{run}{'toolchain-alias'} eq 'HASH';
+ next unless $infos->{$t}{run}{'toolchain-alias'}{'by-project'}{default};
+ my $aliases = as_array($infos->{$t}{run}{'toolchain-alias'}{'by-project'}{default});
+ foreach my $alias (@$aliases) {
+ if ($alias eq $toolchain_aliases{$os}) {
+ foreach my $fetch (@{$infos->{$t}{fetches}{toolchain}}) {
+ $clang_toolchain = $fetch if $fetch =~ m/^.*-clang-.*/;
+ }
+ foreach my $fetch (@{$infos->{$t}{fetches}{fetch}}) {
+ $clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
+ }
+ last TOOLCHAIN;
+ }
+ }
+ }
+
+ if (!$clang_toolchain && !$clang_fetch) {
+ print STDERR "Error: could not find clang toolchain for $toolchain_aliases{$os}\n";
+ set_error("clang-$os");
+ next OS;
+ }
+
+ if (!$clang_fetch) {
+ foreach my $fetch (@{$infos->{$clang_toolchain}{fetches}{fetch}}) {
+ $clang_fetch = $fetch if $fetch =~ m/^clang-.*/;
+ }
+ }
+
+ if (!$clang_fetch) {
+ print STDERR "Error: could not find clang fetch for $toolchain_aliases{$os}\n";
+ set_error("clang-$os");
+ next OS;
+ }
+
+ my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
+ set_version_info("clang-$os", $fetch->{$clang_fetch}{fetch}{revision});
+
+ set_rbm_info("clang-$os", {
+ project => 'llvm-project',
+ option => 'git_hash',
+ targets => [ $rbm_os_target{$os} ],
+ });
+ }
+}
+
+## cbindgen
+sub get_cbindgen_info {
+ my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
+ my $revision;
+ T: foreach my $t (keys %$fetch) {
+ next unless $fetch->{$t}{'fetch-alias'};
+ if ($fetch->{$t}{'fetch-alias'} eq 'cbindgen') {
+ $revision = $fetch->{$t}{fetch}{revision};
+ last T;
+ }
+ }
+ return 0 unless $revision;
+ set_version_info('cbindgen', $revision);
+ set_rbm_info('cbindgen', {
+ project => 'cbindgen',
+ option => 'git_hash',
+ });
+}
+
+## nasm
+sub get_nasm_info {
+ my $nasm = YAML::XS::LoadFile('taskcluster/kinds/toolchain/nasm.yml');
+ my $fetch = $nasm->{'linux64-nasm'}{'fetches'}{'fetch'}[0];
+ return set_error('nasm') unless $fetch;
+ set_version_info('nasm', substr $fetch, 5);
+ set_rbm_info('nasm', {
+ project => 'nasm',
+ option => 'version',
+ });
+}
+
+## node
+sub get_node_info {
+ my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/node.yml');
+ my $node_toolchain;
+ T: foreach my $t (keys %$d) {
+ foreach my $alias (@{as_array($d->{$t}{run}{'toolchain-alias'})}) {
+ if ($alias eq 'linux64-node') {
+ foreach my $fetch (@{$d->{$t}{fetches}{fetch}}) {
+ if ($fetch =~ m/^nodejs-.*/) {
+ $node_toolchain = $fetch;
+ last T;
+ }
+ }
+ }
+ }
+ }
+
+ return set_error('node') unless $node_toolchain;
+
+ my $fetch = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
+ my ($version) = $fetch->{$node_toolchain}{fetch}{url} =~ m|^https://nodejs.org/dist/v([^/]+)/|;
+ return set_error('node') unless $version;
+ set_version_info('node', $version);
+ set_rbm_info('node', {
+ project => 'node',
+ option => 'version',
+ });
+}
+
+## Python
+sub get_python_info {
+ my $component = 'minimum_python';
+ set_rbm_info($component, {
+ project => 'python',
+ option => 'var/firefox_minimum_python_version',
+ });
+ my @lines = path('python/mozboot/bin/bootstrap.py')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m/^\s*MINIMUM_MINOR_VERSION = ([0-9]+)/) {
+ set_version_info($component, "3.$1");
+ return;
+ }
+ }
+ set_error($component);
+}
+
+## binutils
+sub get_binutils_info {
+ my $component = 'binutils';
+ set_rbm_info($component, {
+ project => 'binutils',
+ option => 'version',
+ });
+ my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/misc.yml');
+ my $f = $d->{'linux64-binutils'}{fetches}{fetch}[0];
+ my ($version) = $f =~ m|^binutils-([0-9\\.]+)|;
+ return set_error($component) unless $version;
+ set_version_info($component, $version);
+}
+
+## macosx-sdk
+sub get_macosx_sdk_info {
+ set_rbm_info('macosx-sdk-version', {
+ project => 'macosx-toolchain',
+ option => 'version',
+ targets => [ $rbm_os_target{macos} ],
+ });
+ set_rbm_info('macosx-sdk-sha512sum', {
+ project => 'macosx-toolchain',
+ option => 'var/sdk_sha512sum',
+ targets => [ $rbm_os_target{macos} ],
+ });
+ my $d = YAML::XS::LoadFile('taskcluster/kinds/toolchain/macos-sdk.yml');
+
+ foreach my $t (keys %$d) {
+ foreach my $alias (@{as_array($d->{$t}{run}{'toolchain-alias'})}) {
+ if ($alias eq 'macosx64-sdk') {
+ if ($t =~ m/^macosx64-sdk-(.*)/) {
+ set_version_info('macosx-sdk-version', $1);
+ set_version_info('macosx-sdk-sha512sum', $d->{$t}{run}{'arguments'}[1]);
+ return;
+ }
+ }
+ }
+ }
+
+ set_error('macosx-sdk-version');
+ set_error('macosx-sdk-sha512sum');
+}
+
+## taskcluster/kinds/fetch/toolchains.yml
+sub get_toolchains_fetch_info {
+ my @projects = qw/cctools libdispatch libtapi mingw-w64-clang fxc2 wasi-sysroot/;
+ # projects which have a different name in toolchains.yml
+ my %toolchain_names = (
+ cctools => 'cctools-port',
+ 'wasi-sysroot' => 'wasi-sdk',
+ 'mingw-w64-clang' => 'mingw-w64',
+ );
+ # projects which have an different rbm option than git_hash
+ my %rbm_option = (
+ 'windows-app-sdk' => 'var/windowsappsdk_sha256sum',
+ );
+ my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
+ foreach my $name (@projects) {
+ set_rbm_info($name,
+ {
+ project => $name,
+ option => ($rbm_option{$name} ? $rbm_option{$name} : 'git_hash'),
+ });
+ my $toolchain_name = $toolchain_names{$name} ? $toolchain_names{$name} : $name;
+ my $revision = $d->{$toolchain_name}{fetch}{revision};
+ if ($revision) {
+ set_version_info($name, $revision);
+ } else {
+ set_error($name);
+ }
+ }
+
+ set_rbm_info('windows-rs', {
+ project => 'firefox',
+ option => 'var/windows_rs_version',
+ });
+ my $winrs_url = $d->{'windows-rs'}{fetch}{url};
+ if ($winrs_url =~ m|crates/windows/(.+)/download$|) {
+ set_version_info('windows-rs', $1);
+ } else {
+ set_error('windows-rs');
+ }
+
+ set_rbm_info('windows-rs-sha256sum', {
+ project => 'firefox',
+ option => 'var/windows_rs_sha256sum',
+ });
+ my $winrs_sha256 = $d->{'windows-rs'}{fetch}{sha256};
+ if ($winrs_sha256) {
+ set_version_info('windows-rs-sha256sum', $winrs_sha256);
+ } else {
+ set_error('windows-rs-sha256sum');
+ }
+}
+
+## Extract infos from python/mozboot/mozboot/android.py
+sub get_mozboot_android_info {
+ my %component_project = (
+ ndk => 'android-ndk',
+ commandlinetools_version_string => 'android-sdk',
+ commandlinetools_version => 'android-sdk',
+ bundletool => 'geckoview',
+ );
+ my %component_option = (
+ ndk => 'var/release',
+ commandlinetools_version_string => 'var/commandlinetools_version_string',
+ commandlinetools_version => 'var/commandlinetools_version',
+ bundletool => 'var/bundletool_version',
+ );
+ my %component_NAME = (
+ ndk => 'NDK_VERSION',
+ commandlinetools_version_string => 'CMDLINE_TOOLS_VERSION_STRING',
+ commandlinetools_version => 'CMDLINE_TOOLS_VERSION',
+ bundletool => 'BUNDLETOOL_VERSION',
+ );
+ foreach my $component (keys %component_project) {
+ set_rbm_info($component, {
+ project => $component_project{$component},
+ option => $component_option{$component},
+ targets => [ $rbm_os_target{android} ],
+ });
+ }
+ my %versions;
+ my @lines = path('python/mozboot/mozboot/android.py')->lines_utf8;
+ foreach my $line (@lines) {
+ foreach my $component (keys %component_NAME) {
+ if ($line =~ m/^\s*$component_NAME{$component}\s*=\s*"(.+)"/) {
+ $versions{$component} = $1;
+ }
+ }
+ }
+ foreach my $component (keys %component_NAME) {
+ if ($versions{$component}) {
+ set_version_info($component, $versions{$component});
+ } else {
+ set_error($component);
+ }
+ }
+}
+
+sub get_build_tools_info {
+ my $component = 'build_tools';
+ set_rbm_info($component, {
+ project => 'android-sdk',
+ option => 'version',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my @lines = path('python/mozboot/mozboot/android-packages.txt')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m/build-tools;(.+)$/) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+sub get_min_android_info {
+ my $component = 'min-android';
+ set_rbm_info($component, {
+ project => 'geckoview',
+ option => 'var/android_min_api',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my @lines = path('build/moz.configure/android-ndk.configure')->lines_utf8;
+ my $f;
+ foreach my $line (@lines) {
+ if ($line eq "def min_android_version():\n") {
+ $f = $line;
+ next;
+ }
+ next unless $f;
+ if ($line =~ m/return "([0-9]+)"/) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+sub get_gradle_info {
+ my $component = 'geckoview/gradle';
+ set_rbm_info($component, {
+ project => 'geckoview',
+ option => 'var/gradle_version',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my @lines = path('gradle/wrapper/gradle-wrapper.properties')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m{distributionUrl=https\\://services.gradle.org/distributions/gradle-(.*)-(…) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+sub get_glean_info {
+ my $component = 'glean';
+ set_rbm_info($component, {
+ project => 'glean',
+ option => 'version',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my @lines = path('gradle/libs.versions.toml')->lines_utf8;
+ foreach my $line (@lines) {
+ if ($line =~ m{^glean\s*=\s*"(.+)"}) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+sub get_glean_parser_info {
+ my $component = 'glean-parser';
+ set_rbm_info($component, {
+ project => 'glean-parser',
+ option => 'version',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my $files = path('third_party/python/glean_parser');
+ foreach my $file ($files->children) {
+ if ($file->basename =~ m{^glean_parser-(.+)\.dist-info}) {
+ set_version_info($component, $1);
+ return;
+ }
+ }
+ set_error($component);
+}
+
+sub get_terser_info {
+ my $component = 'terser';
+ set_rbm_info($component, {
+ project => 'terser',
+ option => 'version',
+ targets => [ $rbm_os_target{android} ],
+ });
+ my $version_infos = decode_json path('tools/terser/package.json')->slurp_utf8;
+ if ($version_infos->{dependencies}{terser}) {
+ set_version_info($component, $version_infos->{dependencies}{terser});
+ } else {
+ set_error($component);
+ }
+}
+
+get_rust_info;
+get_clang_info;
+get_cbindgen_info;
+get_nasm_info;
+get_node_info;
+get_python_info;
+get_macosx_sdk_info;
+get_toolchains_fetch_info;
+get_mozboot_android_info;
+get_build_tools_info;
+get_min_android_info;
+get_gradle_info;
+get_glean_info;
+get_glean_parser_info;
+get_terser_info;
+print JSON->new->utf8->canonical->pretty->encode(\%version_infos);
=====================================
tools/toolchain-updates/list-toolchain-updates
=====================================
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Run this script to check which toolchain updates are needed.
+#
+# It can be run with `make list_toolchain_updates`.
+
+set -e
+
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+tbb_dir="$script_dir/../.."
+tmpdir=$(mktemp -d)
+trap "rm -Rf $tmpdir" EXIT
+
+firefox_infos="$tmpdir/firefox-infos.json"
+appservices_infos="$tmpdir/application-services-infos.json"
+
+echo "Extracting firefox versions infos"
+"$tbb_dir"/rbm/rbm showconf --target list_toolchain_updates --target torbrowser-linux-x86_64 \
+ firefox var/firefox_versions_infos > "$firefox_infos"
+
+echo "Extracting application-services versions infos"
+"$tbb_dir"/rbm/rbm showconf --target list_toolchain_updates --target torbrowser-android-aarch64 \
+ application-services var/application-services_versions_infos > "$appservices_infos"
+
+echo "Checking needed updates"
+"$script_dir"/check-versions "$firefox_infos" "$appservices_infos"
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/mullvad-browser] Deleted branch mullvad-browser-148.0a1-16.0-1
by Dan Ballard (@dan) 09 Mar '26
by Dan Ballard (@dan) 09 Mar '26
09 Mar '26
Dan Ballard deleted branch mullvad-browser-148.0a1-16.0-1 at The Tor Project / Applications / Mullvad Browser
--
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] TB 44721 [android]: Force running the DependencyTask (oss-licenses-plugin)
by clairehurst (@clairehurst) 05 Mar '26
by clairehurst (@clairehurst) 05 Mar '26
05 Mar '26
clairehurst pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
40f79b9c by Nicolas Vigier at 2026-03-05T14:25:35-07:00
TB 44721 [android]: Force running the DependencyTask (oss-licenses-plugin)
For some reason gradle thinks the DependencyTask is up-to-date and skips
it, causing the LicensesTask to fail due to missing depencies.json file
(which should have been generated by the DependencyTask).
- - - - -
1 changed file:
- mobile/android/fenix/app/build.gradle
Changes:
=====================================
mobile/android/fenix/app/build.gradle
=====================================
@@ -972,4 +972,6 @@ tasks.withType(DependencyTask).configureEach { task ->
// make the dependency task depend on its cleanup task.
task.dependsOn(tasks.named(cleanUpTaskName))
+
+ task.outputs.upToDateWhen { false }
}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/40f79b9…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/40f79b9…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] 12 commits: fixup! BB 42728: Modify ./mach lint to skip unused linters
by henry (@henry) 05 Mar '26
by henry (@henry) 05 Mar '26
05 Mar '26
henry pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
f9003fe3 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! BB 42728: Modify ./mach lint to skip unused linters
TB 44406: Re-enable stylelint.
- - - - -
d28011e1 by Henry Wilkes at 2026-03-05T17:34:22+00:00
amend! TB 41817: tor-browser semantic colors.
TB 41817: tor-browser semantic styling.
Note for rebases
================
DO NOT MANUALLY RESOLVE CONFLICTS in the following directory:
toolkit/themes/shared/design-system/dist/
These files are generated by `./mach buildtokens`.
See tor-browser#44406.
When resolving conflicts, first resolve other conflicts outside the
'dist' directory, if there are any:
git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
Then regenerate these 'dist' files:
./mach buildtokens
Then add the generated files as resolved:
git add toolkit/themes/shared/design-system/dist/
- - - - -
5a02868a by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! BB 40925: Implemented the Security Level component
TB 44406: Use size tokens.
- - - - -
b1dd6076 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! BB 32308: Use direct browser sizing for letterboxing.
TB 44406: Use size tokens.
- - - - -
d698a94d by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! BB 41919: Letterboxing, add temporarily visible web content-size indicator on window resizing.
TB 44406: Use size tokens.
- - - - -
838343b0 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 7494: Create local home page for TBB.
TB 44406: Use size tokens.
- - - - -
c5b30f96 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 30237: Add v3 onion services client authentication prompt
TB 44406: Use size tokens.
- - - - -
7a8a80b9 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 40458: Implement .tor.onion aliases
TB 44406: Use size tokens.
- - - - -
80e20a04 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 41600: Add a tor circuit display panel.
TB 44406: Use size tokens.
- - - - -
80b3e2f0 by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
TB 44406: Use size tokens.
- - - - -
bfe30c8d by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser
TB 44406: Use size tokens.
- - - - -
dbee23bb by Henry Wilkes at 2026-03-05T17:34:22+00:00
fixup! TB 40701: Add security warning when downloading a file
TB 44406: Use size tokens.
- - - - -
30 changed files:
- .stylelintrc.js
- browser/components/abouttor/content/aboutTor.css
- browser/components/onionservices/content/authPreferences.css
- browser/components/onionservices/content/onionservices.css
- browser/components/rulesets/content/aboutRulesets.css
- browser/components/securitylevel/content/securityLevelPanel.css
- browser/components/securitylevel/content/securityLevelPreferences.css
- browser/components/torcircuit/content/torCircuitPanel.css
- browser/components/torpreferences/content/torPreferences.css
- browser/themes/shared/browser-shared.css
- browser/themes/shared/downloads/contentAreaDownloadsView.css
- browser/themes/shared/tabbrowser/content-area.css
- browser/themes/shared/tor-urlbar-button.css
- python/mozlint/mozlint/cli.py
- toolkit/components/resistfingerprinting/content/letterboxing.css
- toolkit/components/torconnect/content/aboutTorConnect.css
- toolkit/components/torconnect/content/aboutTorConnect.html
- toolkit/components/torconnect/content/torConnectTitlebarStatus.css
- toolkit/themes/shared/design-system/config/tokens-config.js
- toolkit/themes/shared/design-system/dist/tokens-brand.css
- toolkit/themes/shared/design-system/dist/tokens-figma-colors.json
- toolkit/themes/shared/design-system/dist/tokens-figma-primitives.json
- toolkit/themes/shared/design-system/dist/tokens-figma-theme.json
- toolkit/themes/shared/design-system/dist/tokens-platform.css
- toolkit/themes/shared/design-system/dist/tokens-shared.css
- toolkit/themes/shared/design-system/dist/tokens-table.mjs
- toolkit/themes/shared/design-system/src/design-tokens.json
- toolkit/themes/shared/desktop-jar.inc.mn
- − toolkit/themes/shared/tor-colors.css
- + toolkit/themes/shared/tor-common.css
Changes:
=====================================
.stylelintrc.js
=====================================
@@ -274,9 +274,9 @@ module.exports = {
// Remove this line setting `csscontrols/use-logical` to null after implementing fixes
"csstools/use-logical": null,
"stylelint-plugin-mozilla/no-base-design-tokens": true,
- "stylelint-plugin-mozilla/use-design-tokens": true,
- "stylelint-plugin-mozilla/no-non-semantic-token-usage": true,
- "stylelint-plugin-mozilla/use-size-tokens": true,
+ "stylelint-plugin-mozilla/use-design-tokens": false,
+ "stylelint-plugin-mozilla/no-non-semantic-token-usage": false,
+ "stylelint-plugin-mozilla/use-size-tokens": false,
},
overrides: [
=====================================
browser/components/abouttor/content/aboutTor.css
=====================================
@@ -1,4 +1,3 @@
-@import url("chrome://global/skin/tor-colors.css");
@import url("chrome://global/skin/onion-pattern.css");
body {
@@ -23,7 +22,7 @@ body {
/* NOTE: "form" will be given a maximum width of --form-max-width. */
/ 1fr minmax(max-content, var(--form-max-width)) 1fr;
justify-items: center;
- padding-inline: 20px;
+ padding-inline: var(--space-large);
}
body:not(.initialized) {
@@ -37,12 +36,10 @@ h1 {
grid-area: heading;
display: flex;
align-items: center;
- gap: 16px;
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-font-size-tokens */
+ gap: var(--space-large);
font-size: 40px;
margin-block-start: 0;
- margin-block-end: 40px;
- margin-inline: 20px;
+ margin-block-end: var(--space-small);
}
#tor-browser-logo {
@@ -61,17 +58,17 @@ body:not(.is-testing) #tor-browser-home-heading-testing {
#tor-check {
grid-area: tor-check;
display: flex;
- gap: 10px;
+ gap: var(--space-small);
align-items: center;
- padding-inline: 23px;
- padding-block: 11px;
+ padding-inline: var(--space-xlarge);
+ padding-block: var(--space-medium);
border-radius: var(--border-radius-medium);
- margin-block-start: 0;
- margin-block-end: 30px;
+ margin-block-start: var(--space-xxlarge);
+ margin-block-end: 0;
}
.tor-home-box {
- border: 1px solid var(--border-color);
+ border: var(--border-width) solid var(--border-color);
background-color: var(--background-color-box-info);
max-width: var(--form-max-width);
width: -moz-available;
@@ -84,8 +81,8 @@ body:not(.show-tor-check) #tor-check {
#tor-check-icon {
flex: 0 0 auto;
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
-moz-context-properties: fill;
fill: currentColor;
}
@@ -97,31 +94,31 @@ body:not(.show-tor-check) #tor-check {
.home-message {
grid-area: message;
text-align: center;
- margin-block: 1.6em;
+ margin-block: var(--space-xlarge);
}
.message-emoji {
- height: 1em;
+ height: var(--icon-size);
vertical-align: sub;
- margin-inline-end: 0.3em;
+ margin-inline-end: var(--space-xsmall);
}
#search-form {
grid-area: form;
/* Occupy the entire "form" block. */
justify-self: stretch;
+ margin-block-start: var(--space-xxlarge);
background: var(--background-color-canvas);
display: flex;
align-items: stretch;
/* Padding between elements. */
- --form-padding: 12px;
- --form-border-width: 1px;
+ --form-padding: var(--space-medium);
+ --form-border-width: var(--border-width);
/* Padding between elements and the parent's border edge. */
--form-outer-padding: calc(var(--form-padding) - var(--form-border-width));
--form-radius-container: var(--border-radius-medium);
--form-radius: calc(var(--form-radius-container) - var(--form-border-width));
- --logo-size: 30px;
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-radius-tokens */
+ --logo-size: var(--icon-size-xlarge);
border-radius: var(--form-radius-container);
border-width: var(--form-border-width);
border-style: solid;
@@ -151,12 +148,10 @@ body:not(.show-tor-check) #tor-check {
padding-inline-end: var(--form-padding);
padding-inline-start: calc(var(--form-outer-padding) + var(--logo-size) /* logo */ + var(--form-padding) /* padding after logo. */);
/* Make sure clickable area does not extend beyond the form's border. */
- /* stylelint-disable stylelint-plugin-mozilla/use-border-radius-tokens */
border-start-start-radius: var(--form-radius);
border-end-start-radius: var(--form-radius);
border-start-end-radius: 0;
border-end-end-radius: 0;
- /* stylelint-enable stylelint-plugin-mozilla/use-border-radius-tokens */
/* Focus and outline styling move to the parent. */
background: none;
border: none;
@@ -168,15 +163,13 @@ body:not(.show-tor-check) #tor-check {
align-content: center;
padding-block: var(--form-outer-padding);
padding-inline-end: var(--form-outer-padding);
- /* stylelint-disable stylelint-plugin-mozilla/use-border-radius-tokens */
border-start-end-radius: var(--form-radius);
border-end-end-radius: var(--form-radius);
border-start-start-radius: 0;
border-end-start-radius: 0;
- /* stylelint-enable stylelint-plugin-mozilla/use-border-radius-tokens */
padding-inline-start: 0;
/* Non-clickable gap between input and toggle. */
- margin-inline-start: 0.5em;
+ margin-inline-start: var(--space-small);
}
#survey {
@@ -188,11 +181,10 @@ body:not(.show-tor-check) #tor-check {
". buttons buttons" min-content
/ min-content 1fr min-content;
border-radius: var(--border-radius-small);
- /* Remove 1px from padding for border. */
- padding-block: 3px 11px;
- padding-inline: 15px 3px;
- gap: 8px;
- margin-block-end: 1.6em;
+ padding-block: var(--space-xsmall) var(--space-medium);
+ padding-inline: var(--space-large) var(--space-xsmall);
+ gap: var(--space-small);
+ margin-block-end: var(--space-xlarge);
}
body:not(.show-survey) #survey {
@@ -205,9 +197,9 @@ body:not(.show-survey) #survey {
#survey-icon {
grid-area: icon;
- width: 24px;
- height: 24px;
- padding: 8px;
+ width: var(--icon-size-large);
+ height: var(--icon-size-large);
+ padding: var(--space-small);
border-radius: var(--border-radius-circle);
}
@@ -218,18 +210,18 @@ body:not(.show-survey) #survey {
#survey-icon,
#survey-heading {
- margin-block-start: 8px;
+ margin-block-start: var(--space-small);
}
#survey-body {
grid-area: body;
- margin-block-end: 8px;
+ margin-block-end: var(--space-small);
}
#survey-buttons {
grid-area: buttons;
display: flex;
- gap: 8px;
+ gap: var(--space-small);
}
#survey-buttons > * {
@@ -248,7 +240,7 @@ body:not(.show-survey) #survey {
/* On dark background */
:root {
background-color: #2c0449;
- --focus-outline-color: var(--tor-focus-outline-color-dark);
+ --focus-outline-color: var(--focus-outline-color-tor-dark);
--focus-outline: var(--focus-outline-width) solid var(--focus-outline-color);
--onion-pattern-stroke-color: #3e0663;
--onion-pattern-fill-color: #350556;
@@ -271,9 +263,9 @@ body:not(.show-survey) #survey {
--button-text-color-ghost: var(--button-text-color);
--button-text-color-ghost-hover: var(--button-text-color);
--button-text-color-ghost-active: var(--button-text-color);
- --link-color: var(--tor-link-color-dark);
- --link-color-hover: var(--tor-link-color-hover-dark);
- --link-color-active: var(--tor-link-color-active-dark);
+ --link-color: var(--link-color-tor-dark);
+ --link-color-hover: var(--link-color-tor-hover-dark);
+ --link-color-active: var(--link-color-tor-active-dark);
}
#search-form {
@@ -286,8 +278,7 @@ body:not(.show-survey) #survey {
#search-form:has(#search-input:focus-visible) {
/* Use a light-themed inner-border to contrast with the dark-themed
* focus outline. */
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-color-tokens */
- border-color: var(--tor-focus-outline-color-light);
+ border-color: var(--focus-outline-color-tor-light);
}
#search-form.onionized-search:has(#search-input:not(:focus-visible)) {
@@ -298,16 +289,16 @@ body:not(.show-survey) #survey {
/* Light background. */
#search-form > * {
- --focus-outline-color: var(--tor-focus-outline-color-light);
+ --focus-outline-color: var(--focus-outline-color-tor-light);
--focus-outline: var(--focus-outline-width) solid var(--focus-outline-color);
/* Variables used for --toggle- variables. */
- --color-accent-primary: var(--tor-button-background-color-light);
- --color-accent-primary-hover: var(--tor-button-background-color-hover-light);
- --color-accent-primary-active: var(--tor-button-background-color-active-light);
+ --color-accent-primary: var(--button-background-color-tor-light);
+ --color-accent-primary-hover: var(--button-background-color-tor-hover-light);
+ --color-accent-primary-active: var(--button-background-color-tor-active-light);
}
#search-form.onionized-search #onionize-toggle {
- color: var(--tor-link-color-light);
+ color: var(--link-color);
}
#survey {
@@ -321,9 +312,9 @@ body:not(.show-survey) #survey {
#survey-launch {
color: var(--text-color-light);
- --button-background-color-primary: var(--tor-button-background-color-dark);
- --button-background-color-primary-hover: var(--tor-button-background-color-hover-dark);
- --button-background-color-primary-active: var(--tor-button-background-color-active-dark);
+ --button-background-color-primary: var(--button-background-color-tor-dark);
+ --button-background-color-primary-hover: var(--button-background-color-tor-hover-dark);
+ --button-background-color-primary-active: var(--button-background-color-tor-active-dark);
}
}
@@ -342,7 +333,7 @@ body.show-yec h1 {
#yec-banner {
grid-area: heading;
border-radius: var(--border-radius-medium);
- border: 1px solid var(--border-color);
+ border: var(--border-width) solid var(--border-color);
display: grid;
grid-template:
"yec-heading yec-image" auto
@@ -356,10 +347,10 @@ body.show-yec h1 {
padding-inline: 47px 47px;
box-sizing: border-box;
max-width: 850px;
- margin-block-end: 40px;
+ margin-block-end: var(--space-small);
/* Position for the close button. */
position: relative;
- gap: 0 24px;
+ gap: 0 var(--space-xlarge);
}
#yec-image {
@@ -371,12 +362,12 @@ body.show-yec h1 {
* contrast or forced color theme. */
background-color: var(--yec-image-background);
border-radius: var(--border-radius-medium);
- padding: 4px;
+ padding: var(--space-xsmall);
height: 196px;
- border: 1px solid transparent;
+ border: var(--border-width) solid transparent;
/* Remove border and padding from the layout size. These parts are only
* visible in contrast or forced color themes. */
- margin: -5px;
+ margin: calc(-1 * (var(--border-width) + var(--space-xsmall)));
/* Do not let forced colors ignore the background-color, which is needed to
* see the drawing. */
forced-color-adjust: none;
@@ -388,15 +379,14 @@ body.show-yec h1 {
#yec-heading {
grid-area: yec-heading;
- margin-block: 0 16px;
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-font-size-tokens */
+ margin-block: 0 var(--space-large);
font-size: 64px;
font-weight: var(--font-weight);
}
#yec-body {
grid-area: yec-body;
- margin-block: 0 12px;
+ margin-block: 0 var(--space-medium);
}
#yec-body-highlight {
@@ -405,7 +395,7 @@ body.show-yec h1 {
#yec-matching {
grid-area: yec-matching;
- margin-block: 0 32px;
+ margin-block: 0 var(--space-xxlarge);
}
#yec-donate-link {
@@ -414,7 +404,7 @@ body.show-yec h1 {
/* Style like a button. */
font-weight: var(--button-font-weight);
color: var(--button-text-color);
- border: 1px solid var(--button-border-color);
+ border: var(--border-width) solid var(--button-border-color);
border-radius: var(--button-border-radius);
background-color: var(--button-background-color);
padding: var(--button-padding);
@@ -423,7 +413,7 @@ body.show-yec h1 {
text-decoration: none;
display: flex;
align-items: center;
- gap: 8px;
+ gap: var(--space-small);
white-space: nowrap;
}
@@ -450,8 +440,8 @@ body.show-yec h1 {
#yec-close {
position: absolute;
- inset-block-start: 16px;
- inset-inline-end: 16px;
+ inset-block-start: var(--space-large);
+ inset-inline-end: var(--space-large);
}
@media (max-width: 768px) {
@@ -464,11 +454,11 @@ body.show-yec h1 {
"yec-matching" auto
"yec-donate" min-content
/ 1fr;
- padding-block: 31px 39px;
- padding-inline: 15px;
+ padding-block: var(--space-xxlarge);
+ padding-inline: var(--space-large);
/* Match max-width of the form. */
max-width: var(--form-max-width);
- margin-block-end: 32px;
+ margin-block-end: var(--space-xxlarge);
}
#yec-image {
@@ -476,18 +466,17 @@ body.show-yec h1 {
}
#yec-heading {
- margin-block-start: 16px;
+ margin-block-start: var(--space-large);
text-align: center;
text-wrap-style: balance;
}
#yec-heading {
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-font-size-tokens */
font-size: 50px;
}
#yec-matching {
- margin-block-end: 16px;
+ margin-block-end: var(--space-large);
}
#yec-donate-link {
=====================================
browser/components/onionservices/content/authPreferences.css
=====================================
@@ -1,7 +1,7 @@
/* Copyright (c) 2020, The Tor Project, Inc. */
#onionservices-savedkeys-dialog {
- min-width: 45em;
+ min-width: 700px;
}
#onionservices-savedkeys-tree treechildren::-moz-tree-cell-text {
@@ -9,8 +9,8 @@
}
#onionservices-savedkeys-errorContainer {
- margin-block-start: 4px;
- min-height: 3em;
+ margin-block-start: var(--space-xsmall);
+ min-height: var(--size-item-xlarge);
}
#onionservices-savedkeys-errorContainer:not(.show-error) {
@@ -18,7 +18,7 @@
}
#onionservices-savedkeys-errorIcon {
- margin-inline-end: 4px;
+ margin-inline-end: var(--space-xsmall);
list-style-image: url("chrome://global/skin/icons/warning.svg");
-moz-context-properties: fill;
fill: var(--icon-color-warning);
=====================================
browser/components/onionservices/content/onionservices.css
=====================================
@@ -7,8 +7,8 @@
#tor-clientauth-notification-key {
box-sizing: border-box;
width: 100%;
- margin-top: 15px;
- padding: 6px;
+ margin-top: var(--space-large);
+ padding: var(--space-small);
}
/* Start of rules adapted from
@@ -16,7 +16,7 @@
* use the same rules).
*/
#tor-clientauth-notification-key.invalid {
- border: 1px solid var(--outline-color-error);
+ border: var(--border-width) solid var(--outline-color-error);
}
#tor-clientauth-warning {
@@ -26,10 +26,10 @@
background: var(--button-background-color-destructive);
color: var(--button-text-color-destructive);
border-radius: var(--border-radius-xsmall);
- inset-inline-start: 3px;
- padding: 5px 12px;
+ inset-inline-start: var(--space-xsmall);
+ padding: var(--space-xsmall) var(--space-medium);
position: relative;
- top: 6px;
+ inset-block-start: var(--space-small);
z-index: 1;
}
@@ -39,16 +39,16 @@
#tor-clientauth-warning::before {
background: var(--button-background-color-destructive);
- bottom: -8px;
+ inset-block-end: calc(-1 * var(--space-small));
+ inset-block-start: calc(-1 * var(--space-small));
content: ".";
- height: 16px;
- inset-inline-start: 12px;
+ height: var(--size-item-small);
+ inset-inline-start: var(--space-medium);
position: absolute;
text-indent: -999px;
- top: -7px;
transform: rotate(45deg);
white-space: nowrap;
- width: 16px;
+ width: var(--size-item-small);
z-index: -1;
}
=====================================
browser/components/rulesets/content/aboutRulesets.css
=====================================
@@ -11,7 +11,7 @@ body {
label {
display: flex;
align-items: center;
- padding: 6px 0;
+ padding: var(--space-small) 0;
}
input[type="text"] {
@@ -40,7 +40,7 @@ dt {
}
dd {
- margin: 8px 0 0 0;
+ margin: var(--space-small) 0 0 0;
padding: 0;
max-width: 600px;
box-sizing: border-box;
@@ -50,7 +50,7 @@ hr {
width: 40px;
margin: 0;
border: none;
- border-top: 1px solid var(--border-color);
+ border-block-start: var(--border-width) solid var(--border-color);
}
.hidden {
@@ -85,11 +85,11 @@ hr {
}
#warning-description {
- margin: 30px 0 16px 0;
+ margin: var(--space-xxlarge) 0 var(--space-large) 0;
}
#warning-buttonbar {
- margin-top: 30px;
+ margin-top: var(--space-xxlarge);
text-align: right;
}
@@ -113,7 +113,7 @@ hr {
section {
display: none;
flex: 1 0 auto;
- padding: 40px;
+ padding: var(--space-xxlarge);
}
.title {
@@ -121,25 +121,25 @@ section {
align-items: center;
width: var(--content-width);
max-width: 100%;
- padding-bottom: 16px;
- border-bottom: 1px solid var(--border-color);
+ padding-bottom: var(--space-large);
+ border-bottom: var(--border-width) solid var(--border-color);
}
.title h1 {
margin: 0;
padding: 0;
- padding-inline-start: 35px;
+ padding-inline-start: var(--space-xxlarge);
font-size: var(--font-size-xlarge);
font-weight: var(--font-weight-bold);
background-image: url("chrome://browser/content/rulesets/securedrop.svg");
background-position: 0 center;
- background-size: 22px;
- min-height: 22px;
+ background-size: var(--icon-size-large);
+ min-height: var(--icon-size-large);
background-repeat: no-repeat;
}
#main-content h1:dir(rtl) {
- background-position: right 0 top 4px;
+ background-position: right 0 center;
}
/* Ruleset list */
@@ -150,15 +150,15 @@ aside {
flex: 0 0 var(--sidebar-width);
box-sizing: border-box;
- border-inline-end: 1px solid var(--border-color);
+ border-inline-end: var(--border-width) solid var(--border-color);
background-color: var(--background-color-box);
}
#ruleset-heading {
- padding: 16px;
+ padding: var(--space-large);
text-align: center;
font-weight: var(--font-weight-bold);
- border-bottom: 1px solid var(--border-color);
+ border-bottom: var(--border-width) solid var(--border-color);
}
#ruleset-list-container {
@@ -166,7 +166,7 @@ aside {
}
#ruleset-list-empty {
- padding: 16px;
+ padding: var(--space-large);
text-align: center;
}
@@ -183,10 +183,10 @@ aside {
display: flex;
align-items: center;
margin: 0;
- padding: 10px 18px;
+ padding: var(--space-medium) var(--space-large);
list-style: none;
border-inline-start: 4px solid transparent;
- border-bottom: 1px solid var(--border-color);
+ border-block-end: var(--border-width) solid var(--border-color);
}
#ruleset-list li:last-child {
@@ -194,11 +194,11 @@ aside {
}
#ruleset-list .icon {
- width: 16px;
- height: 16px;
- margin-inline-end: 12px;
+ width: var(--icon-size);
+ height: var(--icon-size);
+ margin-inline-end: var(--space-medium);
background-image: url("chrome://browser/content/rulesets/securedrop.svg");
- background-size: 16px;
+ background-size: var(--icon-size);
}
#ruleset-list .icon.has-favicon {
@@ -215,7 +215,6 @@ aside {
}
#ruleset-list .selected {
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-color-tokens */
border-inline-start-color: var(--color-accent-primary);
}
@@ -243,7 +242,7 @@ aside {
}
#ruleset-jwk-value {
- padding: 8px;
+ padding: var(--space-small);
border-radius: var(--border-radius-xsmall);
background-color: var(--background-color-box);
font-size: var(--font-size-small);
@@ -254,10 +253,10 @@ aside {
#ruleset-edit {
margin-inline-start: auto;
- padding-inline-start: 32px;
+ padding-inline-start: var(--space-xxlarge);
background-image: url("chrome://global/skin/icons/edit.svg");
background-repeat: no-repeat;
- background-position: 8px;
+ background-position: var(--space-small);
-moz-context-properties: fill;
fill: currentColor;
min-width: auto;
@@ -273,7 +272,7 @@ aside {
}
#ruleset-updated {
- margin-top: 24px;
+ margin-top: var(--space-xlarge);
color: var(--text-color-deemphasized);
font-size: var(--font-size-small);
}
=====================================
browser/components/securitylevel/content/securityLevelPanel.css
=====================================
@@ -1,25 +1,25 @@
/* Security Level CSS */
#securityLevel-background {
- min-height: 10em;
- padding-inline: 16px;
- column-gap: 0.5em;
+ min-height: 150px;
+ padding-inline: var(--space-large);
+ column-gap: var(--space-small);
display: grid;
grid-template:
- "top-pad icon" 16px
+ "top-pad icon" var(--space-large)
"title icon" auto
"body icon" auto
"learn-more icon" auto
- "bottom-pad icon" minmax(8px, 1fr)
+ "bottom-pad icon" minmax(var(--space-small), 1fr)
/ auto auto;
}
#securityLevel-background-image {
grid-area: icon;
- --security-level-icon-size: 9em;
+ --security-level-icon-size: 130px;
width: var(--security-level-icon-size);
height: var(--security-level-icon-size);
- margin-block: 0.4em;
+ margin-block: var(--space-small);
/* Middle of shield aligns with the panel padding: */
margin-inline-end: calc(-0.5 * var(--security-level-icon-size));
align-self: start;
@@ -50,12 +50,12 @@
}
#securityLevel-background p {
- margin-block: 0 16px;
+ margin-block: 0 var(--space-large);
}
/* Override margin in panelUI-shared.css */
#securityLevel-panel toolbarseparator#securityLevel-separator {
- margin-inline: 16px;
+ margin-inline: var(--space-large);
}
#securityLevel-level {
@@ -65,7 +65,7 @@
}
#securityLevel-summary {
- max-width: 20em;
+ max-width: 300px;
grid-area: body;
}
=====================================
browser/components/securitylevel/content/securityLevelPreferences.css
=====================================
@@ -10,8 +10,8 @@
.security-level-icon {
grid-area: icon;
align-self: start;
- width: 24px;
- height: 24px;
+ width: var(--icon-size-large);
+ height: var(--icon-size-large);
-moz-context-properties: fill;
fill: var(--icon-color);
margin-block-start: var(--space-xsmall);
@@ -97,7 +97,7 @@
#security-level-current {
margin-block-start: var(--space-large);
background: var(--background-color-box);
- border: 1px solid var(--border-color);
+ border: var(--border-width) solid var(--border-color);
border-radius: var(--border-radius-small);
padding: var(--space-medium);
}
=====================================
browser/components/torcircuit/content/torCircuitPanel.css
=====================================
@@ -1,8 +1,8 @@
/* Toolbar button */
#tor-circuit-button-icon {
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
/* We want to set flat fill if we have prefers-contrast. Otherwise, we want a
* gradient fill depending on the dark mode.
* context-fill is insufficient for a linear gradient, so we instead use the
@@ -69,10 +69,10 @@
#tor-circuit-alias img {
-moz-context-properties: fill;
fill: currentColor;
- width: 14px;
- height: 14px;
+ width: var(--icon-size);
+ height: var(--icon-size);
flex: 0 0 auto;
- margin-inline-end: 0.25em;
+ margin-inline-end: var(--space-xsmall);
}
#tor-circuit-alias-label {
@@ -107,8 +107,8 @@
* list item so that the different parts visually connect.
* Using list-style-image does not give us enough control over sizing the
* image. So instead we use a background-image. */
- padding-inline-start: 1.5em;
- padding-block: 6px;
+ padding-inline-start: var(--space-xlarge);
+ padding-block: var(--space-small);
background-image: url("chrome://browser/content/tor-circuit-node-middle.svg");
-moz-context-properties: fill;
/* Light Gray 50 */
@@ -118,7 +118,7 @@
/* Bump the size by small amount to prevent rendering gaps.
* We're assuming here that each line will have the same height so that each
* image has the same size. */
- background-size: auto calc(100% + 0.5px);
+ background-size: auto calc(100% + 2px);
background-repeat: no-repeat;
}
@@ -155,11 +155,11 @@
}
.tor-circuit-region-flag {
- margin-inline-end: 0.5em;
- height: 16px;
+ margin-inline-end: var(--space-small);
+ height: var(--icon-size);
align-self: center;
/* Don't occupy any vertical height. */
- margin-block: -8px;
+ margin-block: calc(-0.5 * var(--icon-size));
}
.tor-circuit-region-flag.no-region-flag-src {
@@ -169,10 +169,9 @@
.tor-circuit-addresses {
/* FIXME: Use a standard font size. Likely will be replaced with the conflux
* design. */
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-font-size-tokens */
font-size: 0.9em;
font-family: monospace;
- margin-inline-start: 0.75em;
+ margin-inline-start: var(--space-medium);
}
.tor-circuit-ip-address {
=====================================
browser/components/torpreferences/content/torPreferences.css
=====================================
@@ -1,4 +1,4 @@
-@import url("chrome://global/skin/tor-colors.css");
+@import url("chrome://global/skin/tor-common.css");
#category-connection > .category-icon {
list-style-image: url("chrome://global/content/torconnect/tor-connect.svg");
@@ -16,29 +16,32 @@ button.spoof-button-disabled {
}
.tor-loading-icon {
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
-moz-context-properties: fill;
- /* Use --tor-text-color. This will have good contrast for this small icon
- * against the background. And it will match the surrounding text for high
- * contrast and forced colour themes. */
- fill: var(--tor-text-color);
+ /* Use --text-color-tor. This will have good contrast for this small icon
+ * against the background. */
+ fill: var(--text-color-tor);
content: url("chrome://global/skin/icons/loading.svg");
+
+ @media (forced-colors) or (prefers-contrast) {
+ fill: currentColor;
+ }
}
.tor-toggle {
- margin-block: 16px;
+ margin-block: var(--space-large);
width: max-content;
}
/* Status */
#network-status-internet-area {
- margin-block: 16px;
+ margin-block: var(--space-large);
}
#network-status-tor-area {
- margin-block: 0 32px;
+ margin-block: 0 var(--space-xxlarge);
}
.network-status-area {
@@ -52,9 +55,9 @@ button.spoof-button-disabled {
}
.network-status-icon {
- width: 18px;
- height: 18px;
- margin-inline-end: 8px;
+ width: var(--icon-size);
+ height: var(--icon-size);
+ margin-inline-end: var(--space-small);
-moz-context-properties: fill, stroke;
fill: var(--icon-color);
stroke: var(--icon-color);
@@ -83,11 +86,11 @@ button.spoof-button-disabled {
.network-status-label {
font-weight: var(--font-weight-bold);
- margin-inline-end: 0.75em;
+ margin-inline-end: var(--space-medium);
}
.network-status-result {
- margin-inline-end: 0.75em;
+ margin-inline-end: var(--space-medium);
}
#network-status-tor-area.status-connected #network-status-tor-connect-button {
@@ -141,7 +144,7 @@ button.spoof-button-disabled {
display: flex;
min-width: max-content;
align-items: center;
- gap: 0.5em;
+ gap: var(--space-small);
font-size: var(--font-size-small);
}
@@ -154,10 +157,12 @@ button.spoof-button-disabled {
* using it for text colors, so we only enable these rules when not using a
* high contrast theme or forced colors. */
.bridge-status-badge.bridge-status-connected {
- color: var(--tor-text-color);
+ color: var(--text-color-tor);
}
.bridge-status-badge.bridge-status-current-built-in {
+ /* Using the accent colour should be avoided. Will likely be replaced in
+ * tor-browser#44421. */
color: var(--color-accent-primary);
}
}
@@ -167,8 +172,8 @@ button.spoof-button-disabled {
}
.bridge-status-icon {
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
background-repeat: no-repeat;
background-position: center center;
-moz-context-properties: fill;
@@ -198,7 +203,7 @@ button.spoof-button-disabled {
#tor-bridges-none,
#tor-bridges-current {
margin-inline: 0;
- margin-block: 32px;
+ margin-block: var(--space-xxlarge);
}
#tor-bridges-none:not([hidden]) {
@@ -206,16 +211,16 @@ button.spoof-button-disabled {
justify-items: center;
text-align: center;
padding-block: 64px;
- padding-inline: 32px;
- gap: 16px;
+ padding-inline: var(--space-xxlarge);
+ gap: var(--space-large);
border-radius: var(--border-radius-small);
color: var(--text-color-deemphasized);
border: 2px dashed var(--border-color-deemphasized);
}
#tor-bridges-none-icon {
- width: 20px;
- height: 20px;
+ width: var(--icon-size-medium);
+ height: var(--icon-size-medium);
content: url("chrome://browser/content/torpreferences/bridge.svg");
-moz-context-properties: fill;
fill: currentColor;
@@ -223,10 +228,10 @@ button.spoof-button-disabled {
.tor-bridges-box,
.tor-bridges-details-box {
- padding: 16px;
+ padding: var(--space-large);
border-radius: var(--border-radius-small);
background: var(--background-color-box-info);
- border: 1px solid var(--border-color);
+ border: var(--border-width) solid var(--border-color);
}
@media not forced-colors {
@@ -240,9 +245,9 @@ button.spoof-button-disabled {
min-width: max-content;
grid-template: "heading source button" min-content / max-content 1fr max-content;
align-items: center;
- border-block-end: 1px solid var(--border-color);
- padding-block-end: 16px;
- margin-block-end: 16px;
+ border-block-end: var(--border-width) solid var(--border-color);
+ padding-block-end: var(--space-large);
+ margin-block-end: var(--space-large);
white-space: nowrap;
}
@@ -251,8 +256,8 @@ button.spoof-button-disabled {
}
.tor-bridges-source-label {
- margin-inline-start: 2em;
- margin-inline-end: 8px;
+ margin-inline-start: var(--space-xxlarge);
+ margin-inline-end: var(--space-small);
grid-area: source;
justify-self: end;
}
@@ -264,7 +269,7 @@ button.spoof-button-disabled {
#tor-bridges-lox-label:not([hidden]) {
display: flex;
align-items: center;
- gap: 6px;
+ gap: var(--space-small);
}
#tor-bridges-lox-label > * {
@@ -273,20 +278,20 @@ button.spoof-button-disabled {
#tor-bridges-lox-label-icon {
content: url("chrome://browser/content/torpreferences/lox-bridge-pass.svg");
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
-moz-context-properties: fill;
fill: var(--icon-color);
}
.tor-bridges-options-button {
- padding: 3px;
+ padding: var(--space-xsmall);
margin: 0;
min-height: auto;
min-width: auto;
box-sizing: content-box;
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
background-image: url("chrome://global/skin/icons/more.svg");
background-repeat: no-repeat;
background-position: center center;
@@ -302,8 +307,8 @@ button.spoof-button-disabled {
"type status" min-content
"description description" auto
/ max-content 1fr;
- gap: 12px 1.5em;
- margin-block-end: 16px;
+ gap: var(--space-medium) var(--space-xlarge);
+ margin-block-end: var(--space-large);
}
#tor-bridges-built-in-type-name {
@@ -323,8 +328,8 @@ button.spoof-button-disabled {
.tor-bridges-grid:not([hidden]) {
display: grid;
grid-template-columns: max-content repeat(4, max-content) 1fr;
- --tor-bridges-grid-column-gap: 8px;
- --tor-bridges-grid-column-short-gap: 4px;
+ --tor-bridges-grid-column-gap: var(--space-small);
+ --tor-bridges-grid-column-short-gap: var(--space-xsmall);
/* For #tor-bridges-grid-display we want each grid item to have the same
* height so that their focus outlines match. */
align-items: stretch;
@@ -358,7 +363,7 @@ button.spoof-button-disabled {
grid-column: 1 / -1;
grid-template-columns: subgrid;
/* Add 16px gap between rows, plus 8px at the start and end of the grid. */
- padding-block: 8px;
+ padding-block: var(--space-small);
}
#tor-bridges-grid-display .tor-bridges-grid-cell:focus-visible {
@@ -391,12 +396,12 @@ button.spoof-button-disabled {
.tor-bridges-emoji-icon {
display: block;
box-sizing: content-box;
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
/* color-light-gray-10, color-dark-gray-60 */
background: light-dark(#f9f9fb, #2b2a33);
border-radius: var(--border-radius-small);
- padding: 8px;
+ padding: var(--space-small);
}
.tor-bridges-grid-end-block {
@@ -414,7 +419,7 @@ button.spoof-button-disabled {
.tor-bridges-address-cell {
/* base size */
- width: 10em;
+ width: 150px;
flex: 1 0 auto;
}
@@ -448,7 +453,7 @@ button.spoof-button-disabled {
}
.tor-bridges-details-box {
- margin-block-start: 24px;
+ margin-block-start: var(--space-xlarge);
}
#tor-bridges-share:not([hidden]) {
@@ -460,13 +465,13 @@ button.spoof-button-disabled {
"description . ." 1fr
"description copy qr" min-content
/ 1fr max-content max-content;
- gap: 0 8px;
+ gap: 0 var(--space-small);
align-items: center;
}
.tor-bridges-share-heading {
grid-area: heading;
- margin-block-end: 4px;
+ margin-block-end: var(--space-xsmall);
}
#tor-bridges-share-description {
@@ -483,13 +488,13 @@ button.spoof-button-disabled {
#tor-bridges-qr-addresses-button {
grid-area: qr;
- padding: 5px;
+ padding: var(--space-xsmall);
margin: 0;
min-height: auto;
min-width: auto;
box-sizing: content-box;
- width: 24px;
- height: 24px;
+ width: var(--icon-size-large);
+ height: var(--icon-size-large);
background-image: url("chrome://browser/content/torpreferences/bridge-qr.svg");
background-repeat: no-repeat;
background-position: center center;
@@ -500,7 +505,7 @@ button.spoof-button-disabled {
}
#tor-bridges-lox-status {
- margin-block-start: 8px;
+ margin-block-start: var(--space-small);
}
.tor-bridges-lox-box:not([hidden]) {
@@ -511,7 +516,7 @@ button.spoof-button-disabled {
". invites button" min-content
/ min-content 1fr max-content;
align-items: start;
- gap: 8px;
+ gap: var(--space-small);
}
.tor-bridges-lox-image-outer {
@@ -535,9 +540,8 @@ button.spoof-button-disabled {
.tor-bridges-lox-image-inner {
grid-area: image;
- /* Extra 4px space for gaussian blur. */
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
align-self: center;
justify-self: center;
-moz-context-properties: fill;
@@ -570,7 +574,7 @@ button.spoof-button-disabled {
/* Align the icons, as if list markers. */
grid-template-columns: max-content 1fr;
align-items: start;
- gap: 8px 0;
+ gap: var(--space-small) 0;
}
.tor-bridges-lox-list-item:not([hidden]) {
@@ -580,11 +584,11 @@ button.spoof-button-disabled {
.tor-bridges-lox-list-item:not([hidden])::before {
/* We use ::before rather than list-style-image to have more control. */
box-sizing: content-box;
- width: 18px;
- height: 18px;
- margin-inline: 4px 6px;
+ width: var(--icon-size);
+ height: var(--icon-size);
+ margin-inline: var(--space-xsmall) var(--space-small);
/* We want the icons to be center-aligned relative to the *first* line. */
- margin-block-start: calc((1lh - 18px) / 2);
+ margin-block-start: calc((1lh - var(--icon-size)) / 2);
/* We use display: grid rather than display: block. Otherwise the content will
* be offset vertically by the line-height. */
display: grid;
@@ -622,23 +626,22 @@ button.spoof-button-disabled {
}
.tor-bridges-provider-heading {
- margin-block: 48px 8px;
+ margin-block: var(--space-xxlarge) var(--space-small);
}
#tor-bridges-provider-area {
display: grid;
grid-template-columns: 1fr 1fr;
- gap: 16px;
+ gap: var(--space-large);
align-items: start;
- margin-block-start: 24px;
+ margin-block-start: var(--space-xlarge);
}
#tor-bridges-provider-list {
display: grid;
grid-template-columns: max-content max-content;
- /* 24px gap between items. */
- gap: 24px 12px;
- margin-block: 16px;
+ gap: var(--space-xlarge) var(--space-medium);
+ margin-block: var(--space-large);
padding: 0;
}
@@ -648,13 +651,12 @@ button.spoof-button-disabled {
grid-template-columns: subgrid;
align-items: center;
justify-items: start;
- /* 8px gap between the name and instruction. */
- gap: 8px 12px;
+ gap: var(--space-small) var(--space-medium);
}
.tor-bridges-provider-icon {
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
-moz-context-properties: fill;
fill: var(--icon-color);
}
@@ -695,7 +697,7 @@ button.spoof-button-disabled {
}
#tor-bridges-request-description {
- margin-block: 12px 16px;
+ margin-block: var(--space-medium) var(--space-large);
}
#tor-bridges-open-request-dialog-button {
@@ -714,7 +716,7 @@ button.spoof-button-disabled {
/* Request bridges */
image#torPreferences-requestBridge-captchaImage {
- margin: 16px 0 8px 0;
+ margin: var(--space-large) 0 var(--space-small) 0;
min-height: 140px;
}
@@ -732,15 +734,15 @@ button#torPreferences-requestBridge-refreshCaptchaButton {
}
dialog#torPreferences-requestBridge-dialog > hbox {
- margin-bottom: 1em;
+ margin-bottom: var(--space-large);
}
/*
Various elements that really should be lining up don't because they have inconsistent margins
*/
.torMarginFix {
- margin-left: 4px;
- margin-right: 4px;
+ margin-left: var(--space-xsmall);
+ margin-right: var(--space-xsmall);
}
/* Show bridge QR dialog */
@@ -756,8 +758,8 @@ dialog#torPreferences-requestBridge-dialog > hbox {
background: var(--qr-zero);
/* Padding is needed in case the dark theme is used so the bits don't blend
with whatever the default background color is. */
- padding: 10px;
- margin-block: 4px 8px;
+ padding: var(--space-medium);
+ margin-block: var(--space-xsmall) var(--space-small);
border-radius: var(--border-radius-small);
display: grid;
align-items: center;
@@ -777,7 +779,7 @@ dialog#torPreferences-requestBridge-dialog > hbox {
/* Share the same grid area as #bridgeQr-target. */
grid-area: qr;
content: url("chrome://browser/content/torpreferences/bridge.svg");
- padding: 10px;
+ padding: var(--space-small);
border-radius: var(--border-radius-medium);
box-sizing: content-box;
width: 52px;
@@ -796,8 +798,8 @@ dialog#torPreferences-requestBridge-dialog > hbox {
". remaining button" min-content
"message message message" auto
/ 1fr max-content max-content;
- gap: 8px;
- margin-block: 16px 8px;
+ gap: var(--space-small);
+ margin-block: var(--space-large) var(--space-small);
align-items: center;
}
@@ -832,7 +834,7 @@ dialog#torPreferences-requestBridge-dialog > hbox {
#lox-invite-dialog-connecting {
color: var(--text-color-deemphasized);
/* Gap with #user-provide-bridge-loading-icon. */
- margin-inline-start: 0.5em;
+ margin-inline-start: var(--space-small);
}
#lox-invite-dialog-generate-area:not(.show-connecting) #lox-invite-dialog-connecting {
@@ -855,8 +857,8 @@ dialog#torPreferences-requestBridge-dialog > hbox {
#lox-invite-dialog-list {
flex: 1 1 auto;
/* basis height */
- height: 10em;
- margin-block: 8px;
+ height: 160px;
+ margin-block: var(--space-small);
}
.lox-invite-dialog-list-item {
@@ -864,21 +866,13 @@ dialog#torPreferences-requestBridge-dialog > hbox {
overflow-x: hidden;
/* FIXME: ellipsis does not show. */
text-overflow: ellipsis;
- padding-block: 6px;
- padding-inline: 8px;
+ padding-block: var(--space-small);
+ padding-inline: var(--space-small);
}
/* Builtin bridge dialog */
-#torPreferences-builtinBridge-header {
- margin: 8px 0 10px 0;
-}
-
-#torPreferences-builtinBridge-description {
- margin-bottom: 18px;
-}
-
#torPreferences-builtinBridge-typeSelection {
- margin-bottom: 16px;
+ margin-block-end: var(--space-large);
}
#torPreferences-builtinBridge-typeSelection radio label {
@@ -927,7 +921,7 @@ groupbox#torPreferences-bridges-group textarea {
}
#user-provide-bridge-textarea-label {
- margin-block: 16px 6px;
+ margin-block: var(--space-large) var(--space-small);
flex: 0 0 auto;
align-self: start;
}
@@ -942,7 +936,7 @@ groupbox#torPreferences-bridges-group textarea {
#user-provide-bridge-message-area {
flex: 0 0 auto;
- margin-block: 8px 12px;
+ margin-block: var(--space-small) var(--space-medium);
align-self: end;
display: flex;
align-items: center;
@@ -969,7 +963,7 @@ groupbox#torPreferences-bridges-group textarea {
#user-provide-bridge-connecting {
color: var(--text-color-deemphasized);
/* Gap with #user-provide-bridge-loading-icon. */
- margin-inline-start: 0.5em;
+ margin-inline-start: var(--space-small);
}
#user-provide-bridge-dialog:not(.show-connecting) #user-provide-bridge-connecting {
@@ -999,7 +993,7 @@ groupbox#torPreferences-bridges-group textarea {
#user-provide-bridge-grid-display {
flex: 0 1 auto;
overflow: auto;
- margin-block: 8px;
+ margin-block: var(--space-small);
}
#user-provide-bridge-grid-display:focus-visible {
@@ -1014,7 +1008,7 @@ groupbox#torPreferences-bridges-group textarea {
}
#torPreferences-connection-header {
- margin: 4px 0 14px 0;
+ margin: var(--space-xsmall) 0 var(--space-large) 0;
}
#torPreferences-connection-grid {
@@ -1041,13 +1035,13 @@ groupbox#torPreferences-bridges-group textarea {
#tor-log-table {
flex: 1 0 auto;
overflow: auto;
- min-height: 20em;
- height: 20em;
+ min-height: 300px;
+ height: 300px;
display: flex;
flex-direction: column;
padding: var(--space-small);
- margin-block-end: 4px;
- border: 1px solid var(--border-color);
+ margin-block-end: var(--space-xsmall);
+ border: var(--border-width) solid var(--border-color);
border-radius: var(--border-radius-small);
font-size: var(--font-size-small);
}
=====================================
browser/themes/shared/browser-shared.css
=====================================
@@ -29,7 +29,7 @@
@import url("chrome://browser/skin/customizableui/customizeMode.css");
@import url("chrome://browser/skin/UITour.css");
@import url("chrome://browser/skin/formautofill-notification.css");
-@import url("chrome://global/skin/tor-colors.css");
+@import url("chrome://global/skin/tor-common.css");
@import url("chrome://browser/skin/tor-urlbar-button.css");
@import url("chrome://browser/skin/onionlocation.css");
=====================================
browser/themes/shared/downloads/contentAreaDownloadsView.css
=====================================
@@ -26,5 +26,5 @@
}
#aboutDownloadsTorWarning {
- margin-block-end: 8px;
+ margin-block-end: var(--space-small);
}
=====================================
browser/themes/shared/tabbrowser/content-area.css
=====================================
@@ -390,16 +390,16 @@ split-view-footer {
#statuspanel:is([type="letterboxingStatus"], [previoustype="letterboxingStatus"][inactive]) > #statuspanel-label {
background-image: url("chrome://browser/skin/window.svg");
- background-size: 1em;
+ background-size: var(--icon-size);
background-repeat: no-repeat;
background-position-y: center;
- background-position-x: left 0.5em;
+ background-position-x: left var(--space-small);
&:-moz-locale-dir(rtl) {
- background-position-x: right 0.5em;
+ background-position-x: right var(--space-small);
}
- padding-inline-start: 2em;
+ padding-inline-start: calc(var(--space-small) + var(--icon-size) + var(--space-small));
-moz-context-properties: fill;
fill: var(--color-accent-primary);
@media (forced-colors) {
=====================================
browser/themes/shared/tor-urlbar-button.css
=====================================
@@ -1,10 +1,9 @@
.tor-urlbar-button:not([hidden]) {
display: flex;
align-items: center;
- gap: 0.5em;
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-radius-tokens */
+ gap: var(--space-small);
border-radius: var(--urlbar-inner-border-radius);
- --tor-urlbar-button-inline-padding: 8px;
+ --tor-urlbar-button-inline-padding: var(--space-small);
padding-inline: var(--tor-urlbar-button-inline-padding);
margin: 0;
}
=====================================
python/mozlint/mozlint/cli.py
=====================================
@@ -38,7 +38,6 @@ INACTIVE_LINTERS = [
"updatebot",
"typescript",
"wpt",
- "stylelint",
"glean-parser",
]
=====================================
toolkit/components/resistfingerprinting/content/letterboxing.css
=====================================
@@ -17,9 +17,6 @@
}
}
-/* stylelint-disable stylelint-plugin-mozilla/use-border-color-tokens */
-/* stylelint-disable stylelint-plugin-mozilla/use-border-radius-tokens */
-
#tabbrowser-tabbox.letterboxing {
--letterboxing-bgcolor: var(--background-color-canvas);
/* Match the border radius used for the sidebar. */
@@ -28,7 +25,7 @@
--letterboxing-vertical-alignment: start;
--letterboxing-shadow: none;
--letterboxing-outline-color: var(--border-color);
- --letterboxing-outline-width: 1px;
+ --letterboxing-outline-width: var(--border-width);
@media not ((prefers-contrast) or (forced-colors)) {
/* Match the #sidebar outline width. */
=====================================
toolkit/components/torconnect/content/aboutTorConnect.css
=====================================
@@ -1,7 +1,6 @@
/* Copyright (c) 2021, The Tor Project, Inc. */
@import url("chrome://global/skin/error-pages.css");
-@import url("chrome://global/skin/tor-colors.css");
@import url("chrome://global/skin/onion-pattern.css");
body:not(.loaded) {
@@ -12,7 +11,7 @@ body:not(.loaded) {
#breadcrumbs {
display: flex;
align-items: center;
- margin: 0 0 24px 0;
+ margin: 0 0 var(--space-xlarge) 0;
}
#breadcrumbs.hidden {
@@ -23,8 +22,8 @@ body:not(.loaded) {
.breadcrumb-separator {
display: flex;
margin: 0;
- margin-inline-start: 20px;
- padding: 8px;
+ margin-inline-start: var(--space-large);
+ padding: var(--space-small);
}
.breadcrumb-item {
@@ -45,7 +44,7 @@ body:not(.loaded) {
}
.breadcrumb-separator {
- width: 15px;
+ width: var(--icon-size);
list-style-image: url("chrome://global/content/torconnect/arrow-right.svg");
}
@@ -55,7 +54,7 @@ body:not(.loaded) {
.breadcrumb-icon {
display: inline list-item;
- height: 16px;
+ height: var(--icon-size);
list-style-position: inside;
-moz-context-properties: fill, stroke;
fill: currentColor;
@@ -110,7 +109,7 @@ body:not(.loaded) {
#locationDropdownLabel {
margin-block: auto;
- margin-inline: 4px;
+ margin-inline: var(--space-xsmall);
}
#locationDropdownLabel.error {
@@ -120,16 +119,16 @@ body:not(.loaded) {
/* this follows similar css in error-pages.css for buttons */
@media only screen and (min-width: 480px) {
form#locationDropdown {
- margin-inline: 4px;
+ margin-inline: var(--space-xsmall);
/* subtracting out the margin is needeed because by
default forms have different margins than buttons */
- max-width: calc(100% - 8px);
+ max-width: calc(100% - 2 * var(--space-xsmall));
}
}
@media only screen and (max-width: 480px) {
#tryAgainButton {
- margin-top: 4px;
+ margin-top: var(--space-xsmall);
}
}
@@ -182,7 +181,6 @@ form#locationDropdown select {
background-image: linear-gradient(var(--progressbar-shadow-start), var(--background-color-canvas) 100%), var(--progressbar-gradient);
animation: var(--progress-animation);
filter: blur(5px);
- /* stylelint-disable-next-line stylelint-plugin-mozilla/use-border-radius-tokens */
border-end-end-radius: 33px;
}
@@ -190,10 +188,8 @@ form#locationDropdown select {
z-index: 2;
width: var(--progress-percent);
height: var(--progress-bar-height);
- /* stylelint-disable stylelint-plugin-mozilla/use-border-radius-tokens */
border-start-end-radius: calc(var(--progress-bar-height) / 2);
border-end-end-radius: calc(var(--progress-bar-height) / 2);
- /* stylelint-enable stylelint-plugin-mozilla/use-border-radius-tokens */
background-image: var(--progressbar-gradient);
animation: var(--progress-animation);
}
@@ -239,13 +235,13 @@ form#locationDropdown select {
/* mirrors p element spacing */
#viewLogButton {
- margin: 1em 0;
+ margin: var(--space-large) 0;
}
body.aboutTorConnect {
justify-content: space-between;
- /* Always reserve 150px for the background, plus 15px padding with content. */
- padding-block-end: calc(var(--onion-pattern-height) + 15px);
+ /* Always reserve 150px for the background, plus padding with content. */
+ padding-block-end: calc(var(--onion-pattern-height) + var(--space-large));
}
body.aboutTorConnect .title {
=====================================
toolkit/components/torconnect/content/aboutTorConnect.html
=====================================
@@ -6,6 +6,7 @@
http-equiv="Content-Security-Policy"
content="default-src chrome:; object-src 'none'"
/>
+ <link rel="stylesheet" href="chrome://global/skin/tor-common.css" />
<link
rel="stylesheet"
href="chrome://global/content/torconnect/aboutTorConnect.css"
=====================================
toolkit/components/torconnect/content/torConnectTitlebarStatus.css
=====================================
@@ -1,8 +1,7 @@
.tor-connect-titlebar-status:not([hidden]) {
display: flex;
align-items: center;
- /* Want same as .private-browsing-indicator-with-label */
- margin-inline: 7px;
+ margin-inline: var(--space-small);
#navigator-toolbox[tabs-hidden] #TabsToolbar > & {
/* Hide in the tabs bar when the tabs bar is hidden. E.g. when using
@@ -18,7 +17,7 @@
}
.tor-connect-titlebar-status-label {
- margin-inline: 6px;
+ margin-inline: var(--space-small);
white-space: nowrap;
}
@@ -26,8 +25,8 @@
-moz-context-properties: fill, stroke;
fill: var(--icon-color);
stroke: var(--icon-color);
- width: 16px;
- height: 16px;
+ width: var(--icon-size);
+ height: var(--icon-size);
object-fit: none;
--num-animation-steps: 8;
/* First frame has no offset. */
@@ -52,12 +51,12 @@
@media not ((prefers-contrast) or (forced-colors)) {
/* Make the connected text and icon purple. */
.tor-connect-titlebar-status.tor-connect-status-connected {
- color: var(--tor-text-color);
+ color: var(--text-color-tor);
}
.tor-connect-titlebar-status.tor-connect-status-connected img {
- fill: var(--tor-text-color);
- stroke: var(--tor-text-color);
+ fill: var(--text-color-tor);
+ stroke: var(--text-color-tor);
}
}
=====================================
toolkit/themes/shared/design-system/config/tokens-config.js
=====================================
@@ -72,6 +72,28 @@ let customFileHeader = ({ surface, platform }) => {
].join("\n");
let commentString = [
+ // Add an additional note for Tor Browser developers! See tor-browser#44406.
+ "/* Tor Browser instructions",
+ " * ========================",
+ " *",
+ " * DO NOT EDIT this file directly!",
+ " *",
+ " * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!",
+ " *",
+ " * This is a file generated by `./mach buildtokens`.",
+ " *",
+ " * When resolving conflicts, first resolve other conflicts outside the",
+ " * 'dist' directory, if there are any:",
+ " * git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'",
+ " *",
+ " * Then regenerate these 'dist' files:",
+ " *",
+ " * ./mach buildtokens",
+ " *",
+ " * Then add the generated files as resolved:",
+ " *",
+ " * git add toolkit/themes/shared/design-system/dist/",
+ " */",
"/* DO NOT EDIT this file directly, instead modify design-tokens.json",
" * and run `npm run build` to see your changes. */",
].join("\n");
=====================================
toolkit/themes/shared/design-system/dist/tokens-brand.css
=====================================
@@ -2,6 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* Tor Browser instructions
+ * ========================
+ *
+ * DO NOT EDIT this file directly!
+ *
+ * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!
+ *
+ * This is a file generated by `./mach buildtokens`.
+ *
+ * When resolving conflicts, first resolve other conflicts outside the
+ * 'dist' directory, if there are any:
+ * git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
+ *
+ * Then regenerate these 'dist' files:
+ *
+ * ./mach buildtokens
+ *
+ * Then add the generated files as resolved:
+ *
+ * git add toolkit/themes/shared/design-system/dist/
+ */
/* DO NOT EDIT this file directly, instead modify design-tokens.json
* and run `npm run build` to see your changes. */
=====================================
toolkit/themes/shared/design-system/dist/tokens-figma-colors.json
=====================================
@@ -135,5 +135,11 @@
"color/black/alpha/60": "oklch(0 0 0 / 60%)",
"color/black/alpha/70": "oklch(0 0 0 / 70%)",
"color/black/alpha/80": "oklch(0 0 0 / 80%)",
- "color/black/alpha/90": "oklch(0 0 0 / 90%)"
+ "color/black/alpha/90": "oklch(0 0 0 / 90%)",
+ "color/accent/tor/light": "{Colors$color/purple/60}",
+ "color/accent/tor/dark": "{Colors$color/purple/30}",
+ "color/accent/tor/hover/light": "{Colors$color/purple/70}",
+ "color/accent/tor/hover/dark": "{Colors$color/purple/20}",
+ "color/accent/tor/active/light": "{Colors$color/purple/80}",
+ "color/accent/tor/active/dark": "{Colors$color/purple/10}"
}
=====================================
toolkit/themes/shared/design-system/dist/tokens-figma-primitives.json
=====================================
@@ -6,6 +6,12 @@
"border/radius/medium": 8,
"border/radius/large": 16,
"border/width": 1,
+ "button/background/color/tor/light": "{Colors$color/accent/tor/light}",
+ "button/background/color/tor/dark": "{Colors$color/accent/tor/dark}",
+ "button/background/color/tor/hover/light": "{Colors$color/accent/tor/hover/light}",
+ "button/background/color/tor/hover/dark": "{Colors$color/accent/tor/hover/dark}",
+ "button/background/color/tor/active/light": "{Colors$color/accent/tor/active/light}",
+ "button/background/color/tor/active/dark": "{Colors$color/accent/tor/active/dark}",
"button/border/radius": "{Primitives$border/radius/medium}",
"button/min/height": "{Primitives$size/item/large}",
"button/min/height/small": "{Primitives$size/item/medium}",
@@ -14,8 +20,16 @@
"button/padding/icon": 0,
"button/size/icon": "{Primitives$button/min/height}",
"button/size/icon/small": "{Primitives$button/min/height/small}",
+ "button/text/color/tor/light": "{Colors$color/gray/05}",
+ "button/text/color/tor/dark": "{Colors$color/gray/100}",
+ "button/text/color/tor/hover/light": "{Colors$color/gray/05}",
+ "button/text/color/tor/hover/dark": "{Colors$color/gray/100}",
+ "button/text/color/tor/active/light": "{Colors$color/gray/05}",
+ "button/text/color/tor/active/dark": "{Colors$color/gray/100}",
"checkbox/margin/inline": "{Primitives$space/small}",
"checkbox/size": "{Primitives$size/item/small}",
+ "focus/outline/color/tor/light": "{Colors$color/accent/tor/light}",
+ "focus/outline/color/tor/dark": "{Colors$color/accent/tor/dark}",
"focus/outline/inset": -2,
"focus/outline/offset": 2,
"focus/outline/width": 2,
@@ -26,6 +40,12 @@
"icon/size/large": "{Primitives$size/item/medium}",
"icon/size/xlarge": "{Primitives$size/item/large}",
"input/text/min/height": "{Primitives$button/min/height}",
+ "link/color/tor/light": "{Colors$color/accent/tor/light}",
+ "link/color/tor/dark": "{Colors$color/accent/tor/dark}",
+ "link/color/tor/hover/light": "{Colors$color/accent/tor/hover/light}",
+ "link/color/tor/hover/dark": "{Colors$color/accent/tor/hover/dark}",
+ "link/color/tor/active/light": "{Colors$color/accent/tor/active/light}",
+ "link/color/tor/active/dark": "{Colors$color/accent/tor/active/dark}",
"link/focus/outline/offset": 1,
"page/main/content/width": 664,
"size/item/xsmall": 12,
@@ -71,5 +91,7 @@
"box/shadow/level-4/shadow-2/x": 0,
"box/shadow/level-4/shadow-2/y": 4,
"box/shadow/level-4/shadow-2/blur": 16,
- "box/shadow/level-4/shadow-2/spread": 0
+ "box/shadow/level-4/shadow-2/spread": 0,
+ "text/color/tor/light": "{Colors$color/purple/60}",
+ "text/color/tor/dark": "{Colors$color/purple/20}"
}
=====================================
toolkit/themes/shared/design-system/dist/tokens-figma-theme.json
=====================================
@@ -189,6 +189,21 @@
"dark": "{Theme$button/background/color/active}",
"forcedColors": "{Theme$button/background/color/active}"
},
+ "button/background/color/tor": {
+ "light": "{Primitives$button/background/color/tor/light}",
+ "dark": "{Primitives$button/background/color/tor/dark}",
+ "forcedColors": "{Theme$button/background/color/primary}"
+ },
+ "button/background/color/tor/hover": {
+ "light": "{Primitives$button/background/color/tor/hover/light}",
+ "dark": "{Primitives$button/background/color/tor/hover/dark}",
+ "forcedColors": "{Theme$button/background/color/primary/hover}"
+ },
+ "button/background/color/tor/active": {
+ "light": "{Primitives$button/background/color/tor/active/light}",
+ "dark": "{Primitives$button/background/color/tor/active/dark}",
+ "forcedColors": "{Theme$button/background/color/primary/active}"
+ },
"button/border": {
"light": "{Primitives$border/width} solid {Theme$button/border/color}",
"dark": "{Primitives$border/width} solid {Theme$button/border/color}",
@@ -401,6 +416,21 @@
"dark": "{Theme$button/text/color/active}",
"forcedColors": "{Theme$button/text/color/active}"
},
+ "button/text/color/tor": {
+ "light": "{Primitives$button/text/color/tor/light}",
+ "dark": "{Primitives$button/text/color/tor/dark}",
+ "forcedColors": "{Theme$button/text/color/primary}"
+ },
+ "button/text/color/tor/hover": {
+ "light": "{Primitives$button/text/color/tor/hover/light}",
+ "dark": "{Primitives$button/text/color/tor/hover/dark}",
+ "forcedColors": "{Theme$button/text/color/primary/hover}"
+ },
+ "button/text/color/tor/active": {
+ "light": "{Primitives$button/text/color/tor/active/light}",
+ "dark": "{Primitives$button/text/color/tor/active/dark}",
+ "forcedColors": "{Theme$button/text/color/primary/active}"
+ },
"color/accent/primary": {
"light": "{Colors$color/blue/60}",
"dark": "{Colors$color/cyan/30}",
@@ -421,6 +451,21 @@
"dark": "{Colors$color/cyan/30}",
"forcedColors": "{HCM Theme$SelectedItem}"
},
+ "color/accent/tor": {
+ "light": "{Colors$color/accent/tor/light}",
+ "dark": "{Colors$color/accent/tor/dark}",
+ "forcedColors": "{Theme$color/accent/primary}"
+ },
+ "color/accent/tor/hover": {
+ "light": "{Colors$color/accent/tor/hover/light}",
+ "dark": "{Colors$color/accent/tor/hover/dark}",
+ "forcedColors": "{Theme$color/accent/primary/hover}"
+ },
+ "color/accent/tor/active": {
+ "light": "{Colors$color/accent/tor/active/light}",
+ "dark": "{Colors$color/accent/tor/active/dark}",
+ "forcedColors": "{Theme$color/accent/primary/active}"
+ },
"focus/outline": {
"light": "{Primitives$focus/outline/width} solid {Theme$focus/outline/color}",
"dark": "{Primitives$focus/outline/width} solid {Theme$focus/outline/color}",
@@ -431,6 +476,11 @@
"dark": "{Theme$color/accent/primary}",
"forcedColors": "{Theme$text/color}"
},
+ "focus/outline/color/tor": {
+ "light": "{Primitives$focus/outline/color/tor/light}",
+ "dark": "{Primitives$focus/outline/color/tor/dark}",
+ "forcedColors": "{Theme$focus/outline/color}"
+ },
"icon/color": {
"light": "{Colors$color/gray/70}",
"dark": "{Colors$color/gray/05}",
@@ -476,6 +526,21 @@
"dark": "{Theme$link/color}",
"forcedColors": "{Theme$link/color}"
},
+ "link/color/tor": {
+ "light": "{Primitives$link/color/tor/light}",
+ "dark": "{Primitives$link/color/tor/dark}",
+ "forcedColors": "{Theme$link/color}"
+ },
+ "link/color/tor/hover": {
+ "light": "{Primitives$link/color/tor/hover/light}",
+ "dark": "{Primitives$link/color/tor/hover/dark}",
+ "forcedColors": "{Theme$link/color/hover}"
+ },
+ "link/color/tor/active": {
+ "light": "{Primitives$link/color/tor/active/light}",
+ "dark": "{Primitives$link/color/tor/active/dark}",
+ "forcedColors": "{Theme$link/color/active}"
+ },
"outline/color/error": {
"light": "{Colors$color/red/70}",
"dark": "{Colors$color/red/20}",
@@ -553,5 +618,10 @@
"light": "{Theme$text/color}",
"dark": "{Theme$text/color}",
"forcedColors": "{HCM Theme$SelectedItemText}"
+ },
+ "text/color/tor": {
+ "light": "{Primitives$text/color/tor/light}",
+ "dark": "{Primitives$text/color/tor/dark}",
+ "forcedColors": "inherit"
}
}
=====================================
toolkit/themes/shared/design-system/dist/tokens-platform.css
=====================================
@@ -2,6 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* Tor Browser instructions
+ * ========================
+ *
+ * DO NOT EDIT this file directly!
+ *
+ * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!
+ *
+ * This is a file generated by `./mach buildtokens`.
+ *
+ * When resolving conflicts, first resolve other conflicts outside the
+ * 'dist' directory, if there are any:
+ * git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
+ *
+ * Then regenerate these 'dist' files:
+ *
+ * ./mach buildtokens
+ *
+ * Then add the generated files as resolved:
+ *
+ * git add toolkit/themes/shared/design-system/dist/
+ */
/* DO NOT EDIT this file directly, instead modify design-tokens.json
* and run `npm run build` to see your changes. */
=====================================
toolkit/themes/shared/design-system/dist/tokens-shared.css
=====================================
@@ -2,6 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* Tor Browser instructions
+ * ========================
+ *
+ * DO NOT EDIT this file directly!
+ *
+ * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!
+ *
+ * This is a file generated by `./mach buildtokens`.
+ *
+ * When resolving conflicts, first resolve other conflicts outside the
+ * 'dist' directory, if there are any:
+ * git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
+ *
+ * Then regenerate these 'dist' files:
+ *
+ * ./mach buildtokens
+ *
+ * Then add the generated files as resolved:
+ *
+ * git add toolkit/themes/shared/design-system/dist/
+ */
/* DO NOT EDIT this file directly, instead modify design-tokens.json
* and run `npm run build` to see your changes. */
@@ -66,6 +87,15 @@
--button-background-color-primary-disabled: var(--button-background-color-primary);
--button-background-color-primary-selected: var(--button-background-color-primary-active);
--button-background-color-selected: var(--button-background-color-active);
+ --button-background-color-tor: light-dark(var(--button-background-color-tor-light), var(--button-background-color-tor-dark));
+ --button-background-color-tor-hover: light-dark(var(--button-background-color-tor-hover-light), var(--button-background-color-tor-hover-dark));
+ --button-background-color-tor-active: light-dark(var(--button-background-color-tor-active-light), var(--button-background-color-tor-active-dark));
+ --button-background-color-tor-active-dark: var(--color-accent-tor-active-dark);
+ --button-background-color-tor-active-light: var(--color-accent-tor-active-light);
+ --button-background-color-tor-dark: var(--color-accent-tor-dark);
+ --button-background-color-tor-hover-dark: var(--color-accent-tor-hover-dark);
+ --button-background-color-tor-hover-light: var(--color-accent-tor-hover-light);
+ --button-background-color-tor-light: var(--color-accent-tor-light);
--button-border: var(--border-width) solid var(--button-border-color);
--button-border-color: transparent;
--button-border-color-hover: var(--button-border-color);
@@ -118,12 +148,30 @@
--button-text-color-primary-disabled: var(--button-text-color-primary);
--button-text-color-primary-selected: var(--button-text-color-primary-active);
--button-text-color-selected: var(--button-text-color-active);
+ --button-text-color-tor: light-dark(var(--button-text-color-tor-light), var(--button-text-color-tor-dark));
+ --button-text-color-tor-hover: light-dark(var(--button-text-color-tor-hover-light), var(--button-text-color-tor-hover-dark));
+ --button-text-color-tor-active: light-dark(var(--button-text-color-tor-active-light), var(--button-text-color-tor-active-dark));
+ --button-text-color-tor-active-dark: var(--color-gray-100);
+ --button-text-color-tor-active-light: var(--color-gray-05);
+ --button-text-color-tor-dark: var(--color-gray-100);
+ --button-text-color-tor-hover-dark: var(--color-gray-100);
+ --button-text-color-tor-hover-light: var(--color-gray-05);
+ --button-text-color-tor-light: var(--color-gray-05);
/** Checkbox **/
--checkbox-margin-inline: var(--space-small);
--checkbox-size: var(--size-item-small); /* TODO Bug 1876537: Make this em-based, probably? */
/** Color **/
+ --color-accent-tor: light-dark(var(--color-accent-tor-light), var(--color-accent-tor-dark));
+ --color-accent-tor-hover: light-dark(var(--color-accent-tor-hover-light), var(--color-accent-tor-hover-dark));
+ --color-accent-tor-active: light-dark(var(--color-accent-tor-active-light), var(--color-accent-tor-active-dark));
+ --color-accent-tor-active-dark: var(--color-purple-10);
+ --color-accent-tor-active-light: var(--color-purple-80);
+ --color-accent-tor-dark: var(--color-purple-30);
+ --color-accent-tor-hover-dark: var(--color-purple-20);
+ --color-accent-tor-hover-light: var(--color-purple-70);
+ --color-accent-tor-light: var(--color-purple-60);
--color-black: #000000;
--color-black-alpha-10: oklch(0 0 0 / 10%);
--color-black-alpha-20: oklch(0 0 0 / 20%);
@@ -265,6 +313,9 @@
/** Focus Outline **/
--focus-outline: var(--focus-outline-width) solid var(--focus-outline-color);
--focus-outline-color: var(--color-accent-primary);
+ --focus-outline-color-tor: light-dark(var(--focus-outline-color-tor-light), var(--focus-outline-color-tor-dark));
+ --focus-outline-color-tor-dark: var(--color-accent-tor-dark);
+ --focus-outline-color-tor-light: var(--color-accent-tor-light);
--focus-outline-inset: calc(-1 * var(--focus-outline-width));
--focus-outline-offset: 2px;
--focus-outline-width: 2px;
@@ -297,6 +348,15 @@
--input-text-min-height: var(--button-min-height);
/** Link **/
+ --link-color-tor: light-dark(var(--link-color-tor-light), var(--link-color-tor-dark));
+ --link-color-tor-hover: light-dark(var(--link-color-tor-hover-light), var(--link-color-tor-hover-dark));
+ --link-color-tor-active: light-dark(var(--link-color-tor-active-light), var(--link-color-tor-active-dark));
+ --link-color-tor-active-dark: var(--color-accent-tor-active-dark);
+ --link-color-tor-active-light: var(--color-accent-tor-active-light);
+ --link-color-tor-dark: var(--color-accent-tor-dark);
+ --link-color-tor-hover-dark: var(--color-accent-tor-hover-dark);
+ --link-color-tor-hover-light: var(--color-accent-tor-hover-light);
+ --link-color-tor-light: var(--color-accent-tor-light);
/**
* Not using --force-outline-offset for links because that's intended for
* elements with a background, and we only want a slight offset here while
@@ -328,6 +388,9 @@
--text-color-deemphasized: color-mix(in srgb, currentColor 69%, transparent);
--text-color-error: light-dark(var(--color-red-70), var(--color-red-20));
--text-color-list-item-hover: var(--text-color);
+ --text-color-tor: light-dark(var(--text-color-tor-light), var(--text-color-tor-dark));
+ --text-color-tor-dark: var(--color-purple-20);
+ --text-color-tor-light: var(--color-purple-60);
}
}
@@ -358,9 +421,23 @@
--border-color-transparent: CanvasText;
/** Button **/
+ --button-background-color-tor: var(--button-background-color-primary);
+ --button-background-color-tor-hover: var(--button-background-color-primary-hover);
+ --button-background-color-tor-active: var(--button-background-color-primary-active);
--button-border-color: var(--button-text-color);
--button-text-color-ghost-hover: var(--button-text-color-hover);
--button-text-color-ghost-active: var(--button-text-color-active);
+ --button-text-color-tor: var(--button-text-color-primary);
+ --button-text-color-tor-hover: var(--button-text-color-primary-hover);
+ --button-text-color-tor-active: var(--button-text-color-primary-active);
+
+ /** Color **/
+ --color-accent-tor: var(--color-accent-primary);
+ --color-accent-tor-hover: var(--color-accent-primary-hover);
+ --color-accent-tor-active: var(--color-accent-primary-active);
+
+ /** Focus Outline **/
+ --focus-outline-color-tor: var(--focus-outline-color);
/** Icon **/
--icon-color: var(--text-color);
@@ -369,6 +446,11 @@
--icon-color-success: var(--icon-color);
--icon-color-warning: var(--icon-color);
+ /** Link **/
+ --link-color-tor: var(--link-color);
+ --link-color-tor-hover: var(--link-color-hover);
+ --link-color-tor-active: var(--link-color-active);
+
/** Outline Color **/
--outline-color-error: var(--border-color);
@@ -377,6 +459,7 @@
--text-color-deemphasized: inherit;
--text-color-error: inherit;
--text-color-list-item-hover: SelectedItemText;
+ --text-color-tor: inherit;
}
}
}
@@ -409,6 +492,9 @@
--button-background-color-destructive-active: var(--button-background-color-primary-active);
--button-background-color-destructive-disabled: var(--button-background-color-primary-disabled);
--button-background-color-primary-disabled: var(--button-text-color-disabled);
+ --button-background-color-tor: var(--button-background-color-primary);
+ --button-background-color-tor-hover: var(--button-background-color-primary-hover);
+ --button-background-color-tor-active: var(--button-background-color-primary-active);
--button-border-color: var(--border-color-interactive);
--button-border-color-hover: var(--border-color-interactive-hover);
--button-border-color-active: var(--border-color-interactive-active);
@@ -433,25 +519,36 @@
--button-text-color-ghost-active: var(--button-text-color-active);
--button-text-color-primary: ButtonFace;
--button-text-color-primary-hover: SelectedItemText;
+ --button-text-color-tor: var(--button-text-color-primary);
+ --button-text-color-tor-hover: var(--button-text-color-primary-hover);
+ --button-text-color-tor-active: var(--button-text-color-primary-active);
/** Color **/
--color-accent-primary: ButtonText;
--color-accent-primary-hover: SelectedItem;
--color-accent-primary-active: var(--color-accent-primary-hover);
--color-accent-primary-selected: SelectedItem;
+ --color-accent-tor: var(--color-accent-primary);
+ --color-accent-tor-hover: var(--color-accent-primary-hover);
+ --color-accent-tor-active: var(--color-accent-primary-active);
/** Focus Outline **/
--focus-outline-color: var(--text-color);
+ --focus-outline-color-tor: var(--focus-outline-color);
/** Link **/
--link-color: LinkText;
--link-color-hover: LinkText;
--link-color-active: ActiveText;
+ --link-color-tor: var(--link-color);
+ --link-color-tor-hover: var(--link-color-hover);
+ --link-color-tor-active: var(--link-color-active);
--link-color-visited: var(--link-color);
/** Text **/
--text-color-disabled: GrayText;
--text-color-accent-primary-selected: SelectedItemText;
+ --text-color-tor: inherit;
}
}
}
=====================================
toolkit/themes/shared/design-system/dist/tokens-table.mjs
=====================================
@@ -2,6 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* Tor Browser instructions
+ * ========================
+ *
+ * DO NOT EDIT this file directly!
+ *
+ * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!
+ *
+ * This is a file generated by `./mach buildtokens`.
+ *
+ * When resolving conflicts, first resolve other conflicts outside the
+ * 'dist' directory, if there are any:
+ * git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
+ *
+ * Then regenerate these 'dist' files:
+ *
+ * ./mach buildtokens
+ *
+ * Then add the generated files as resolved:
+ *
+ * git add toolkit/themes/shared/design-system/dist/
+ */
/* DO NOT EDIT this file directly, instead modify design-tokens.json
* and run `npm run build` to see your changes. */
@@ -208,6 +229,48 @@ export const tokensTable = {
},
name: "--color-accent-primary-selected",
},
+ { value: "var(--color-purple-60)", name: "--color-accent-tor-light" },
+ { value: "var(--color-purple-30)", name: "--color-accent-tor-dark" },
+ {
+ value: {
+ light: "var(--color-accent-tor-light)",
+ dark: "var(--color-accent-tor-dark)",
+ prefersContrast: "var(--color-accent-primary)",
+ forcedColors: "var(--color-accent-primary)",
+ default:
+ "light-dark(var(--color-accent-tor-light), var(--color-accent-tor-dark))",
+ },
+ name: "--color-accent-tor",
+ },
+ { value: "var(--color-purple-70)", name: "--color-accent-tor-hover-light" },
+ { value: "var(--color-purple-20)", name: "--color-accent-tor-hover-dark" },
+ {
+ value: {
+ light: "var(--color-accent-tor-hover-light)",
+ dark: "var(--color-accent-tor-hover-dark)",
+ prefersContrast: "var(--color-accent-primary-hover)",
+ forcedColors: "var(--color-accent-primary-hover)",
+ default:
+ "light-dark(var(--color-accent-tor-hover-light), var(--color-accent-tor-hover-dark))",
+ },
+ name: "--color-accent-tor-hover",
+ },
+ {
+ value: "var(--color-purple-80)",
+ name: "--color-accent-tor-active-light",
+ },
+ { value: "var(--color-purple-10)", name: "--color-accent-tor-active-dark" },
+ {
+ value: {
+ light: "var(--color-accent-tor-active-light)",
+ dark: "var(--color-accent-tor-active-dark)",
+ prefersContrast: "var(--color-accent-primary-active)",
+ forcedColors: "var(--color-accent-primary-active)",
+ default:
+ "light-dark(var(--color-accent-tor-active-light), var(--color-accent-tor-active-dark))",
+ },
+ name: "--color-accent-tor-active",
+ },
],
"background-color": [
{
@@ -426,6 +489,63 @@ export const tokensTable = {
value: "var(--button-background-color-active)",
name: "--button-background-color-selected",
},
+ {
+ value: "var(--color-accent-tor-light)",
+ name: "--button-background-color-tor-light",
+ },
+ {
+ value: "var(--color-accent-tor-dark)",
+ name: "--button-background-color-tor-dark",
+ },
+ {
+ value: {
+ light: "var(--button-background-color-tor-light)",
+ dark: "var(--button-background-color-tor-dark)",
+ prefersContrast: "var(--button-background-color-primary)",
+ forcedColors: "var(--button-background-color-primary)",
+ default:
+ "light-dark(var(--button-background-color-tor-light), var(--button-background-color-tor-dark))",
+ },
+ name: "--button-background-color-tor",
+ },
+ {
+ value: "var(--color-accent-tor-hover-light)",
+ name: "--button-background-color-tor-hover-light",
+ },
+ {
+ value: "var(--color-accent-tor-hover-dark)",
+ name: "--button-background-color-tor-hover-dark",
+ },
+ {
+ value: {
+ light: "var(--button-background-color-tor-hover-light)",
+ dark: "var(--button-background-color-tor-hover-dark)",
+ prefersContrast: "var(--button-background-color-primary-hover)",
+ forcedColors: "var(--button-background-color-primary-hover)",
+ default:
+ "light-dark(var(--button-background-color-tor-hover-light), var(--button-background-color-tor-hover-dark))",
+ },
+ name: "--button-background-color-tor-hover",
+ },
+ {
+ value: "var(--color-accent-tor-active-light)",
+ name: "--button-background-color-tor-active-light",
+ },
+ {
+ value: "var(--color-accent-tor-active-dark)",
+ name: "--button-background-color-tor-active-dark",
+ },
+ {
+ value: {
+ light: "var(--button-background-color-tor-active-light)",
+ dark: "var(--button-background-color-tor-active-dark)",
+ prefersContrast: "var(--button-background-color-primary-active)",
+ forcedColors: "var(--button-background-color-primary-active)",
+ default:
+ "light-dark(var(--button-background-color-tor-active-light), var(--button-background-color-tor-active-dark))",
+ },
+ name: "--button-background-color-tor-active",
+ },
{
value: "var(--background-color-box-info)",
name: "--promo-background-color",
@@ -957,6 +1077,57 @@ export const tokensTable = {
value: "var(--button-text-color-active)",
name: "--button-text-color-selected",
},
+ { value: "var(--color-gray-05)", name: "--button-text-color-tor-light" },
+ { value: "var(--color-gray-100)", name: "--button-text-color-tor-dark" },
+ {
+ value: {
+ light: "var(--button-text-color-tor-light)",
+ dark: "var(--button-text-color-tor-dark)",
+ prefersContrast: "var(--button-text-color-primary)",
+ forcedColors: "var(--button-text-color-primary)",
+ default:
+ "light-dark(var(--button-text-color-tor-light), var(--button-text-color-tor-dark))",
+ },
+ name: "--button-text-color-tor",
+ },
+ {
+ value: "var(--color-gray-05)",
+ name: "--button-text-color-tor-hover-light",
+ },
+ {
+ value: "var(--color-gray-100)",
+ name: "--button-text-color-tor-hover-dark",
+ },
+ {
+ value: {
+ light: "var(--button-text-color-tor-hover-light)",
+ dark: "var(--button-text-color-tor-hover-dark)",
+ prefersContrast: "var(--button-text-color-primary-hover)",
+ forcedColors: "var(--button-text-color-primary-hover)",
+ default:
+ "light-dark(var(--button-text-color-tor-hover-light), var(--button-text-color-tor-hover-dark))",
+ },
+ name: "--button-text-color-tor-hover",
+ },
+ {
+ value: "var(--color-gray-05)",
+ name: "--button-text-color-tor-active-light",
+ },
+ {
+ value: "var(--color-gray-100)",
+ name: "--button-text-color-tor-active-dark",
+ },
+ {
+ value: {
+ light: "var(--button-text-color-tor-active-light)",
+ dark: "var(--button-text-color-tor-active-dark)",
+ prefersContrast: "var(--button-text-color-primary-active)",
+ forcedColors: "var(--button-text-color-primary-active)",
+ default:
+ "light-dark(var(--button-text-color-tor-active-light), var(--button-text-color-tor-active-dark))",
+ },
+ name: "--button-text-color-tor-active",
+ },
{
value: {
forcedColors: "LinkText",
@@ -993,6 +1164,57 @@ export const tokensTable = {
},
name: "--link-color-visited",
},
+ { value: "var(--color-accent-tor-light)", name: "--link-color-tor-light" },
+ { value: "var(--color-accent-tor-dark)", name: "--link-color-tor-dark" },
+ {
+ value: {
+ light: "var(--link-color-tor-light)",
+ dark: "var(--link-color-tor-dark)",
+ prefersContrast: "var(--link-color)",
+ forcedColors: "var(--link-color)",
+ default:
+ "light-dark(var(--link-color-tor-light), var(--link-color-tor-dark))",
+ },
+ name: "--link-color-tor",
+ },
+ {
+ value: "var(--color-accent-tor-hover-light)",
+ name: "--link-color-tor-hover-light",
+ },
+ {
+ value: "var(--color-accent-tor-hover-dark)",
+ name: "--link-color-tor-hover-dark",
+ },
+ {
+ value: {
+ light: "var(--link-color-tor-hover-light)",
+ dark: "var(--link-color-tor-hover-dark)",
+ prefersContrast: "var(--link-color-hover)",
+ forcedColors: "var(--link-color-hover)",
+ default:
+ "light-dark(var(--link-color-tor-hover-light), var(--link-color-tor-hover-dark))",
+ },
+ name: "--link-color-tor-hover",
+ },
+ {
+ value: "var(--color-accent-tor-active-light)",
+ name: "--link-color-tor-active-light",
+ },
+ {
+ value: "var(--color-accent-tor-active-dark)",
+ name: "--link-color-tor-active-dark",
+ },
+ {
+ value: {
+ light: "var(--link-color-tor-active-light)",
+ dark: "var(--link-color-tor-active-dark)",
+ prefersContrast: "var(--link-color-active)",
+ forcedColors: "var(--link-color-active)",
+ default:
+ "light-dark(var(--link-color-tor-active-light), var(--link-color-tor-active-dark))",
+ },
+ name: "--link-color-tor-active",
+ },
{
value: {
prefersContrast: "CanvasText",
@@ -1047,6 +1269,19 @@ export const tokensTable = {
},
name: "--text-color-list-item-hover",
},
+ { value: "var(--color-purple-60)", name: "--text-color-tor-light" },
+ { value: "var(--color-purple-20)", name: "--text-color-tor-dark" },
+ {
+ value: {
+ light: "var(--text-color-tor-light)",
+ dark: "var(--text-color-tor-dark)",
+ prefersContrast: "inherit",
+ forcedColors: "inherit",
+ default:
+ "light-dark(var(--text-color-tor-light), var(--text-color-tor-dark))",
+ },
+ name: "--text-color-tor",
+ },
],
outline: [
{
@@ -1060,6 +1295,25 @@ export const tokensTable = {
},
name: "--focus-outline-color",
},
+ {
+ value: "var(--color-accent-tor-light)",
+ name: "--focus-outline-color-tor-light",
+ },
+ {
+ value: "var(--color-accent-tor-dark)",
+ name: "--focus-outline-color-tor-dark",
+ },
+ {
+ value: {
+ light: "var(--focus-outline-color-tor-light)",
+ dark: "var(--focus-outline-color-tor-dark)",
+ prefersContrast: "var(--focus-outline-color)",
+ forcedColors: "var(--focus-outline-color)",
+ default:
+ "light-dark(var(--focus-outline-color-tor-light), var(--focus-outline-color-tor-dark))",
+ },
+ name: "--focus-outline-color-tor",
+ },
{
value: "calc(-1 * var(--focus-outline-width))",
name: "--focus-outline-inset",
@@ -1341,6 +1595,40 @@ export const variableLookupTable = {
"button-background-color-ghost-selected":
"var(--button-background-color-ghost-active)",
"button-background-color-selected": "var(--button-background-color-active)",
+ "button-background-color-tor-light": "var(--color-accent-tor-light)",
+ "button-background-color-tor-dark": "var(--color-accent-tor-dark)",
+ "button-background-color-tor": {
+ light: "var(--button-background-color-tor-light)",
+ dark: "var(--button-background-color-tor-dark)",
+ prefersContrast: "var(--button-background-color-primary)",
+ forcedColors: "var(--button-background-color-primary)",
+ default:
+ "light-dark(var(--button-background-color-tor-light), var(--button-background-color-tor-dark))",
+ },
+ "button-background-color-tor-hover-light":
+ "var(--color-accent-tor-hover-light)",
+ "button-background-color-tor-hover-dark":
+ "var(--color-accent-tor-hover-dark)",
+ "button-background-color-tor-hover": {
+ light: "var(--button-background-color-tor-hover-light)",
+ dark: "var(--button-background-color-tor-hover-dark)",
+ prefersContrast: "var(--button-background-color-primary-hover)",
+ forcedColors: "var(--button-background-color-primary-hover)",
+ default:
+ "light-dark(var(--button-background-color-tor-hover-light), var(--button-background-color-tor-hover-dark))",
+ },
+ "button-background-color-tor-active-light":
+ "var(--color-accent-tor-active-light)",
+ "button-background-color-tor-active-dark":
+ "var(--color-accent-tor-active-dark)",
+ "button-background-color-tor-active": {
+ light: "var(--button-background-color-tor-active-light)",
+ dark: "var(--button-background-color-tor-active-dark)",
+ prefersContrast: "var(--button-background-color-primary-active)",
+ forcedColors: "var(--button-background-color-primary-active)",
+ default:
+ "light-dark(var(--button-background-color-tor-active-light), var(--button-background-color-tor-active-dark))",
+ },
"button-border": "var(--border-width) solid var(--button-border-color)",
"button-border-color": {
default: "transparent",
@@ -1502,6 +1790,36 @@ export const variableLookupTable = {
"button-text-color-primary-selected":
"var(--button-text-color-primary-active)",
"button-text-color-selected": "var(--button-text-color-active)",
+ "button-text-color-tor-light": "var(--color-gray-05)",
+ "button-text-color-tor-dark": "var(--color-gray-100)",
+ "button-text-color-tor": {
+ light: "var(--button-text-color-tor-light)",
+ dark: "var(--button-text-color-tor-dark)",
+ prefersContrast: "var(--button-text-color-primary)",
+ forcedColors: "var(--button-text-color-primary)",
+ default:
+ "light-dark(var(--button-text-color-tor-light), var(--button-text-color-tor-dark))",
+ },
+ "button-text-color-tor-hover-light": "var(--color-gray-05)",
+ "button-text-color-tor-hover-dark": "var(--color-gray-100)",
+ "button-text-color-tor-hover": {
+ light: "var(--button-text-color-tor-hover-light)",
+ dark: "var(--button-text-color-tor-hover-dark)",
+ prefersContrast: "var(--button-text-color-primary-hover)",
+ forcedColors: "var(--button-text-color-primary-hover)",
+ default:
+ "light-dark(var(--button-text-color-tor-hover-light), var(--button-text-color-tor-hover-dark))",
+ },
+ "button-text-color-tor-active-light": "var(--color-gray-05)",
+ "button-text-color-tor-active-dark": "var(--color-gray-100)",
+ "button-text-color-tor-active": {
+ light: "var(--button-text-color-tor-active-light)",
+ dark: "var(--button-text-color-tor-active-dark)",
+ prefersContrast: "var(--button-text-color-primary-active)",
+ forcedColors: "var(--button-text-color-primary-active)",
+ default:
+ "light-dark(var(--button-text-color-tor-active-light), var(--button-text-color-tor-active-dark))",
+ },
"checkbox-margin-inline": "var(--space-small)",
"checkbox-size": "var(--size-item-small)",
"color-gray-20": "#f0f0f4",
@@ -1681,12 +1999,52 @@ export const variableLookupTable = {
},
platform: { default: "SelectedItem" },
},
+ "color-accent-tor-light": "var(--color-purple-60)",
+ "color-accent-tor-dark": "var(--color-purple-30)",
+ "color-accent-tor": {
+ light: "var(--color-accent-tor-light)",
+ dark: "var(--color-accent-tor-dark)",
+ prefersContrast: "var(--color-accent-primary)",
+ forcedColors: "var(--color-accent-primary)",
+ default:
+ "light-dark(var(--color-accent-tor-light), var(--color-accent-tor-dark))",
+ },
+ "color-accent-tor-hover-light": "var(--color-purple-70)",
+ "color-accent-tor-hover-dark": "var(--color-purple-20)",
+ "color-accent-tor-hover": {
+ light: "var(--color-accent-tor-hover-light)",
+ dark: "var(--color-accent-tor-hover-dark)",
+ prefersContrast: "var(--color-accent-primary-hover)",
+ forcedColors: "var(--color-accent-primary-hover)",
+ default:
+ "light-dark(var(--color-accent-tor-hover-light), var(--color-accent-tor-hover-dark))",
+ },
+ "color-accent-tor-active-light": "var(--color-purple-80)",
+ "color-accent-tor-active-dark": "var(--color-purple-10)",
+ "color-accent-tor-active": {
+ light: "var(--color-accent-tor-active-light)",
+ dark: "var(--color-accent-tor-active-dark)",
+ prefersContrast: "var(--color-accent-primary-active)",
+ forcedColors: "var(--color-accent-primary-active)",
+ default:
+ "light-dark(var(--color-accent-tor-active-light), var(--color-accent-tor-active-dark))",
+ },
"focus-outline":
"var(--focus-outline-width) solid var(--focus-outline-color)",
"focus-outline-color": {
default: "var(--color-accent-primary)",
forcedColors: "var(--text-color)",
},
+ "focus-outline-color-tor-light": "var(--color-accent-tor-light)",
+ "focus-outline-color-tor-dark": "var(--color-accent-tor-dark)",
+ "focus-outline-color-tor": {
+ light: "var(--focus-outline-color-tor-light)",
+ dark: "var(--focus-outline-color-tor-dark)",
+ prefersContrast: "var(--focus-outline-color)",
+ forcedColors: "var(--focus-outline-color)",
+ default:
+ "light-dark(var(--focus-outline-color-tor-light), var(--focus-outline-color-tor-dark))",
+ },
"focus-outline-inset": "calc(-1 * var(--focus-outline-width))",
"focus-outline-offset": "2px",
"focus-outline-width": "2px",
@@ -1786,6 +2144,36 @@ export const variableLookupTable = {
brand: { default: "var(--link-color)" },
platform: { default: "var(--link-color)" },
},
+ "link-color-tor-light": "var(--color-accent-tor-light)",
+ "link-color-tor-dark": "var(--color-accent-tor-dark)",
+ "link-color-tor": {
+ light: "var(--link-color-tor-light)",
+ dark: "var(--link-color-tor-dark)",
+ prefersContrast: "var(--link-color)",
+ forcedColors: "var(--link-color)",
+ default:
+ "light-dark(var(--link-color-tor-light), var(--link-color-tor-dark))",
+ },
+ "link-color-tor-hover-light": "var(--color-accent-tor-hover-light)",
+ "link-color-tor-hover-dark": "var(--color-accent-tor-hover-dark)",
+ "link-color-tor-hover": {
+ light: "var(--link-color-tor-hover-light)",
+ dark: "var(--link-color-tor-hover-dark)",
+ prefersContrast: "var(--link-color-hover)",
+ forcedColors: "var(--link-color-hover)",
+ default:
+ "light-dark(var(--link-color-tor-hover-light), var(--link-color-tor-hover-dark))",
+ },
+ "link-color-tor-active-light": "var(--color-accent-tor-active-light)",
+ "link-color-tor-active-dark": "var(--color-accent-tor-active-dark)",
+ "link-color-tor-active": {
+ light: "var(--link-color-tor-active-light)",
+ dark: "var(--link-color-tor-active-dark)",
+ prefersContrast: "var(--link-color-active)",
+ forcedColors: "var(--link-color-active)",
+ default:
+ "light-dark(var(--link-color-tor-active-light), var(--link-color-tor-active-dark))",
+ },
"link-focus-outline-offset": "1px",
"outline-color-error": {
light: "var(--color-red-70)",
@@ -1889,4 +2277,14 @@ export const variableLookupTable = {
default: "var(--text-color)",
prefersContrast: "SelectedItemText",
},
+ "text-color-tor-light": "var(--color-purple-60)",
+ "text-color-tor-dark": "var(--color-purple-20)",
+ "text-color-tor": {
+ light: "var(--text-color-tor-light)",
+ dark: "var(--text-color-tor-dark)",
+ prefersContrast: "inherit",
+ forcedColors: "inherit",
+ default:
+ "light-dark(var(--text-color-tor-light), var(--text-color-tor-dark))",
+ },
};
=====================================
toolkit/themes/shared/design-system/src/design-tokens.json
=====================================
@@ -325,6 +325,42 @@
},
"selected": {
"value": "{button.background.color.active}"
+ },
+ "tor": {
+ "light": { "value": "{color.accent.tor.light}" },
+ "dark": { "value": "{color.accent.tor.dark}" },
+ "@base": {
+ "value": {
+ "light": "{button.background.color.tor.light}",
+ "dark": "{button.background.color.tor.dark}",
+ "prefersContrast": "{button.background.color.primary.@base}",
+ "forcedColors": "{button.background.color.primary.@base}"
+ }
+ },
+ "hover": {
+ "light": { "value": "{color.accent.tor.hover.light}" },
+ "dark": { "value": "{color.accent.tor.hover.dark}" },
+ "@base": {
+ "value": {
+ "light": "{button.background.color.tor.hover.light}",
+ "dark": "{button.background.color.tor.hover.dark}",
+ "prefersContrast": "{button.background.color.primary.hover}",
+ "forcedColors": "{button.background.color.primary.hover}"
+ }
+ }
+ },
+ "active": {
+ "light": { "value": "{color.accent.tor.active.light}" },
+ "dark": { "value": "{color.accent.tor.active.dark}" },
+ "@base": {
+ "value": {
+ "light": "{button.background.color.tor.active.light}",
+ "dark": "{button.background.color.tor.active.dark}",
+ "prefersContrast": "{button.background.color.primary.active}",
+ "forcedColors": "{button.background.color.primary.active}"
+ }
+ }
+ }
}
}
},
@@ -633,6 +669,42 @@
},
"selected": {
"value": "{button.text.color.active}"
+ },
+ "tor": {
+ "light": { "value": "{color.gray.05}" },
+ "dark": { "value": "{color.gray.100}" },
+ "@base": {
+ "value": {
+ "light": "{button.text.color.tor.light}",
+ "dark": "{button.text.color.tor.dark}",
+ "prefersContrast": "{button.text.color.primary.@base}",
+ "forcedColors": "{button.text.color.primary.@base}"
+ }
+ },
+ "hover": {
+ "light": { "value": "{color.gray.05}" },
+ "dark": { "value": "{color.gray.100}" },
+ "@base": {
+ "value": {
+ "light": "{button.text.color.tor.hover.light}",
+ "dark": "{button.text.color.tor.hover.dark}",
+ "prefersContrast": "{button.text.color.primary.hover}",
+ "forcedColors": "{button.text.color.primary.hover}"
+ }
+ }
+ },
+ "active": {
+ "light": { "value": "{color.gray.05}" },
+ "dark": { "value": "{color.gray.100}" },
+ "@base": {
+ "value": {
+ "light": "{button.text.color.tor.active.light}",
+ "dark": "{button.text.color.tor.active.dark}",
+ "prefersContrast": "{button.text.color.primary.active}",
+ "forcedColors": "{button.text.color.primary.active}"
+ }
+ }
+ }
}
}
}
@@ -1138,18 +1210,68 @@
}
}
}
+ },
+ "tor": {
+ "light": { "value": "{color.purple.60}" },
+ "dark": { "value": "{color.purple.30}" },
+ "@base": {
+ "value": {
+ "light": "{color.accent.tor.light}",
+ "dark": "{color.accent.tor.dark}",
+ "prefersContrast": "{color.accent.primary.@base}",
+ "forcedColors": "{color.accent.primary.@base}"
+ }
+ },
+ "hover": {
+ "light": { "value": "{color.purple.70}" },
+ "dark": { "value": "{color.purple.20}" },
+ "@base": {
+ "value": {
+ "light": "{color.accent.tor.hover.light}",
+ "dark": "{color.accent.tor.hover.dark}",
+ "prefersContrast": "{color.accent.primary.hover}",
+ "forcedColors": "{color.accent.primary.hover}"
+ }
+ }
+ },
+ "active": {
+ "light": { "value": "{color.purple.80}" },
+ "dark": { "value": "{color.purple.10}" },
+ "@base": {
+ "value": {
+ "light": "{color.accent.tor.active.light}",
+ "dark": "{color.accent.tor.active.dark}",
+ "prefersContrast": "{color.accent.primary.active}",
+ "forcedColors": "{color.accent.primary.active}"
+ }
+ }
+ }
}
}
},
"focus": {
"outline": {
"@base": {
- "value": "{focus.outline.width} solid {focus.outline.color}"
+ "value": "{focus.outline.width} solid {focus.outline.color.@base}"
},
"color": {
- "value": {
- "default": "{color.accent.primary.@base}",
- "forcedColors": "{text.color.@base}"
+ "@base": {
+ "value": {
+ "default": "{color.accent.primary.@base}",
+ "forcedColors": "{text.color.@base}"
+ }
+ },
+ "tor": {
+ "light": { "value": "{color.accent.tor.light}" },
+ "dark": { "value": "{color.accent.tor.dark}" },
+ "@base": {
+ "value": {
+ "light": "{focus.outline.color.tor.light}",
+ "dark": "{focus.outline.color.tor.dark}",
+ "prefersContrast": "{focus.outline.color.@base}",
+ "forcedColors": "{focus.outline.color.@base}"
+ }
+ }
}
},
"inset": {
@@ -1385,6 +1507,42 @@
"default": "{link.color.@base}"
}
}
+ },
+ "tor": {
+ "light": { "value": "{color.accent.tor.light}" },
+ "dark": { "value": "{color.accent.tor.dark}" },
+ "@base": {
+ "value": {
+ "light": "{link.color.tor.light}",
+ "dark": "{link.color.tor.dark}",
+ "prefersContrast": "{link.color.@base}",
+ "forcedColors": "{link.color.@base}"
+ }
+ },
+ "hover": {
+ "light": { "value": "{color.accent.tor.hover.light}" },
+ "dark": { "value": "{color.accent.tor.hover.dark}" },
+ "@base": {
+ "value": {
+ "light": "{link.color.tor.hover.light}",
+ "dark": "{link.color.tor.hover.dark}",
+ "prefersContrast": "{link.color.hover}",
+ "forcedColors": "{link.color.hover}"
+ }
+ }
+ },
+ "active": {
+ "light": { "value": "{color.accent.tor.active.light}" },
+ "dark": { "value": "{color.accent.tor.active.dark}" },
+ "@base": {
+ "value": {
+ "light": "{link.color.tor.active.light}",
+ "dark": "{link.color.tor.active.dark}",
+ "prefersContrast": "{link.color.active}",
+ "forcedColors": "{link.color.active}"
+ }
+ }
+ }
}
},
"focus": {
@@ -1619,6 +1777,18 @@
}
}
}
+ },
+ "tor": {
+ "light": { "value": "{color.purple.60}" },
+ "dark": { "value": "{color.purple.20}" },
+ "@base": {
+ "value": {
+ "light": "{text.color.tor.light}",
+ "dark": "{text.color.tor.dark}",
+ "prefersContrast": "inherit",
+ "forcedColors": "inherit"
+ }
+ }
}
}
}
=====================================
toolkit/themes/shared/desktop-jar.inc.mn
=====================================
@@ -49,7 +49,7 @@
skin/classic/global/tabbox.css (../../shared/tabbox.css)
skin/classic/global/toolbar.css (../../shared/toolbar.css)
skin/classic/global/toolbarbutton.css (../../shared/toolbarbutton.css)
- skin/classic/global/tor-colors.css (../../shared/tor-colors.css)
+ skin/classic/global/tor-common.css (../../shared/tor-common.css)
skin/classic/global/tree/tree.css (../../shared/tree/tree.css)
skin/classic/global/dirListing/dirListing.css (../../shared/dirListing/dirListing.css)
#ifdef XP_MACOSX
=====================================
toolkit/themes/shared/tor-colors.css deleted
=====================================
@@ -1,105 +0,0 @@
-@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-:root {
- /* On light backgrounds. */
- --tor-accent-color-light: var(--color-purple-60);
- --tor-accent-color-hover-light: var(--color-purple-70);
- --tor-accent-color-active-light: var(--color-purple-80);
- /* Color for text on --background-color-canvas. */
- --tor-text-color-light: var(--color-purple-60);
- /* Buttons. */
- --tor-button-text-color-light: var(--color-gray-05);
- --tor-button-text-color-hover-light: var(--color-gray-05);
- --tor-button-text-color-active-light: var(--color-gray-05);
- --tor-button-background-color-light: var(--tor-accent-color-light);
- --tor-button-background-color-hover-light: var(--tor-accent-color-hover-light);
- --tor-button-background-color-active-light: var(--tor-accent-color-active-light);
- --tor-focus-outline-color-light: var(--tor-accent-color-light);
- /* Links. */
- --tor-link-color-light: var(--tor-accent-color-light);
- --tor-link-color-hover-light: var(--tor-accent-color-hover-light);
- --tor-link-color-active-light: var(--tor-accent-color-active-light);
-
- /* On dark backgrounds. */
- --tor-accent-color-dark: var(--color-purple-30);
- --tor-accent-color-hover-dark: var(--color-purple-20);
- --tor-accent-color-active-dark: var(--color-purple-10);
- /* Color for text on --background-color-canvas. */
- --tor-text-color-dark: var(--color-purple-20);
- /* Buttons. */
- --tor-button-text-color-dark: var(--color-gray-100);
- --tor-button-text-color-hover-dark: var(--color-gray-100);
- --tor-button-text-color-active-dark: var(--color-gray-100);
- --tor-button-background-color-dark: var(--tor-accent-color-dark);
- --tor-button-background-color-hover-dark: var(--tor-accent-color-hover-dark);
- --tor-button-background-color-active-dark: var(--tor-accent-color-active-dark);
- --tor-focus-outline-color-dark: var(--tor-accent-color-dark);
- /* Links. */
- --tor-link-color-dark: var(--tor-accent-color-dark);
- --tor-link-color-hover-dark: var(--tor-accent-color-hover-dark);
- --tor-link-color-active-dark: var(--tor-accent-color-active-dark);
-
- /* Generic colors that adapt to theme. */
- --tor-accent-color: light-dark(var(--tor-accent-color-light), var(--tor-accent-color-dark));
- --tor-accent-color-hover: light-dark(var(--tor-accent-color-hover-light), var(--tor-accent-color-hover-dark));
- --tor-accent-color-active: light-dark(var(--tor-accent-color-active-light), var(--tor-accent-color-active-dark));
- --tor-text-color: light-dark(var(--tor-text-color-light), var(--tor-text-color-dark));
- --tor-button-text-color: light-dark(var(--tor-button-text-color-light), var(--tor-button-text-color-dark));
- --tor-button-text-color-hover: light-dark(var(--tor-button-text-color-hover-light), var(--tor-button-text-color-hover-dark));
- --tor-button-text-color-active: light-dark(var(--tor-button-text-color-active-light), var(--tor-button-text-color-active-dark));
- --tor-button-background-color: light-dark(var(--tor-button-background-color-light), var(--tor-button-background-color-dark));
- --tor-button-background-color-hover: light-dark(var(--tor-button-background-color-hover-light), var(--tor-button-background-color-hover-dark));
- --tor-button-background-color-active: light-dark(var(--tor-button-background-color-active-light), var(--tor-button-background-color-active-dark));
- --tor-focus-outline-color: light-dark(var(--tor-focus-outline-color-light), var(--tor-focus-outline-color-dark));
- --tor-link-color: light-dark(var(--tor-link-color-light), var(--tor-link-color-dark));
- --tor-link-color-hover: light-dark(var(--tor-link-color-hover-light), var(--tor-link-color-hover-dark));
- --tor-link-color-active: light-dark(var(--tor-link-color-active-light), var(--tor-link-color-active-dark));
-}
-
-@media ((prefers-contrast) or (forced-colors)) {
- :root {
- /* Use Firefox design system accent colors. */
- --tor-accent-color: var(--color-accent-primary);
- --tor-accent-color-hover: var(--color-accent-primary-hover);
- --tor-accent-color-active: var(--color-accent-primary-active);
-
- /* Match surrounding text. */
- --tor-text-color: currentColor;
-
- /* Use Firefox design system primary button colors. */
- --tor-button-text-color: var(--button-text-color-primary);
- --tor-button-text-color-hover: var(--button-text-color-primary-hover);
- --tor-button-text-color-active: var(--button-text-color-primary-active);
- --tor-button-background-color: var(--button-background-color-primary);
- --tor-button-background-color-hover: var(--button-background-color-primary-hover);
- --tor-button-background-color-active: var(--button-background-color-primary-active);
-
- /* Use Firefox design system default colors. */
- --tor-focus-outline-color: var(--focus-outline-color);
- --tor-link-color: var(--link-color);
- --tor-link-color-hover: var(--link-color-hover);
- --tor-link-color-active: var(--link-color-active);
- }
-}
-
-/* Has a higher specificity than `button` and `button.primary`. */
-button.tor-button:is(*, .primary),
-xul|button.tor-button:is(*, [default]),
-.tor-button {
- color: var(--tor-button-text-color);
- background-color: var(--tor-button-background-color);
-}
-
-:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):not([disabled]):hover {
- color: var(--tor-button-text-color-hover);
- background-color: var(--tor-button-background-color-hover);
-}
-
-:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):not([disabled]):hover:active {
- color: var(--tor-button-text-color-active);
- background-color: var(--tor-button-background-color-active);
-}
-
-:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):focus-visible {
- outline-color: var(--tor-focus-outline-color);
-}
=====================================
toolkit/themes/shared/tor-common.css
=====================================
@@ -0,0 +1,23 @@
+@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+
+/* Has a higher specificity than `button` and `button.primary`. */
+button.tor-button:is(*, .primary),
+xul|button.tor-button:is(*, [default]),
+.tor-button {
+ color: var(--button-text-color-tor);
+ background-color: var(--button-background-color-tor);
+}
+
+:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):not([disabled]):hover {
+ color: var(--button-text-color-tor-hover);
+ background-color: var(--button-background-color-tor-hover);
+}
+
+:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):not([disabled]):hover:active {
+ color: var(--button-text-color-tor-active);
+ background-color: var(--button-background-color-tor-active);
+}
+
+:is(button.tor-button:is(*, .primary), xul|button.tor-button:is(*, [default]), .tor-button):focus-visible {
+ outline-color: var(--focus-outline-color-tor);
+}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/456918…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/456918…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] 3 commits: fixup! TB 40933: Add tor-launcher functionality
by Pier Angelo Vendrame (@pierov) 05 Mar '26
by Pier Angelo Vendrame (@pierov) 05 Mar '26
05 Mar '26
Pier Angelo Vendrame pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
75088aeb by Pier Angelo Vendrame at 2026-03-05T18:16:38+01:00
fixup! TB 40933: Add tor-launcher functionality
TBB 40892: Move torrc-defaults and geoip files.
- - - - -
9f0b2da8 by Pier Angelo Vendrame at 2026-03-05T18:16:38+01:00
fixup! TB 43564: Modify ./mach bootstrap for Tor Browser
TBB 40892: Move torrc-defaults and geoip files.
Adapt bootstrap to the new paths.
- - - - -
45691865 by Pier Angelo Vendrame at 2026-03-05T18:16:38+01:00
fixup! TB 40933: Add tor-launcher functionality
TBB 40892: Move torrc-defaults and geoip files.
Add some compatibility code for users who set a pref for the
torrc-defaults.
In this case, we will take the new torappsdatadir as the parent of that
path.
- - - - -
3 changed files:
- python/mozbuild/mozbuild/backend/base.py
- toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs
- toolkit/components/tor-launcher/TorProcess.sys.mjs
Changes:
=====================================
python/mozbuild/mozbuild/backend/base.py
=====================================
@@ -305,9 +305,9 @@ class BuildBackend(LoggingMixin):
"docs": tbdir / "TorBrowser/Docs",
"exts": tbdir / "distribution/extensions",
"tor_bin": tbdir / "TorBrowser/Tor",
- "tor_config": tbdir / "TorBrowser/Data/Tor",
"fonts": tbdir / "fonts",
}
+ paths["tor_config"] = paths["tor_bin"]
fonts_location = config.substs.get("TOR_BROWSER_FONTS")
if fonts_location:
=====================================
toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs
=====================================
@@ -59,16 +59,29 @@ class TorFile {
}
getFromPref() {
- const prefName = `extensions.torlauncher.${this.fileType}_path`;
- const path = Services.prefs.getCharPref(prefName, "");
+ const getPath = type =>
+ Services.prefs.getCharPref(`extensions.torlauncher.${type}_path`, "");
+ let path = getPath(this.fileType);
+ let takeParent = false;
+ if (!path && this.fileType === "torappdatadir") {
+ // tor-browser-build#40892: for the tor app data dir, try to use also the
+ // previous behavior (detect it from the torrc-defaults).
+ path = getPath("torrc-defaults");
+ takeParent = true;
+ }
if (path) {
- const isUserData =
- this.fileType !== "tor" &&
- this.fileType !== "pt-startup-dir" &&
- this.fileType !== "torrc-defaults";
+ const isUserData = ![
+ "tor",
+ "pt-startup-dir",
+ "torrc-defaults",
+ "torappdatadir",
+ ].includes(this.fileType);
// always try to use path if provided in pref
this.checkIPCPathLen = false;
this.setFileFromPath(path, isUserData);
+ if (this.file && takeParent) {
+ this.file = this.file.parent;
+ }
}
}
@@ -143,17 +156,8 @@ class TorFile {
this.file.append(TorLauncherUtil.isWindows ? "tor.exe" : "tor");
break;
case "torrc-defaults":
- if (TorLauncherUtil.isMac) {
- this.file = TorFile.appDir;
- this.file.appendRelativePath(
- "Contents/Resources/TorBrowser/Tor/torrc-defaults"
- );
- } else {
- // FIXME: Should we move this file to the tor directory, in the other
- // platforms, since it is not user data?
- this.file = TorFile.torDataDir;
- this.file.append("torrc-defaults");
- }
+ this.file = TorFile.torAppDataDir;
+ this.file.append("torrc-defaults");
break;
case "torrc":
this.file = TorFile.torDataDir;
@@ -162,6 +166,9 @@ class TorFile {
case "tordatadir":
this.file = TorFile.torDataDir;
break;
+ case "torappdatadir":
+ this.file = TorFile.torAppDataDir;
+ break;
case "toronionauthdir":
this.file = TorFile.torDataDir;
this.file.append("onion-auth");
@@ -293,6 +300,16 @@ class TorFile {
return this._appDir.clone();
}
+ static get torAppDataDir() {
+ // No need to call clone on these objects, as they are already clones.
+ if (TorLauncherUtil.isMac) {
+ const dir = this.appDir;
+ dir.appendRelativePath("Contents/Resources/TorBrowser/Tor");
+ return dir;
+ }
+ return this.torDir;
+ }
+
// Returns an nsIFile that points to the data directory. This is usually
// TorBrowser/Data/ on Linux and Windows, and TorBrowser-Data/ on macOS.
// The parent directory of the default profile directory is taken.
=====================================
toolkit/components/tor-launcher/TorProcess.sys.mjs
=====================================
@@ -264,20 +264,40 @@ export class TorProcess {
);
if (torrcDefaultsFile) {
this.#args.push("--defaults-torrc", torrcDefaultsFile.path);
- // The geoip and geoip6 files are in the same directory as torrc-defaults.
- // TODO: Change TorFile to return the generic path to these files to make
- // them independent from the torrc-defaults.
- const geoipFile = torrcDefaultsFile.clone();
- geoipFile.leafName = "geoip";
- this.#args.push("GeoIPFile", geoipFile.path);
- const geoip6File = torrcDefaultsFile.clone();
- geoip6File.leafName = "geoip6";
- this.#args.push("GeoIPv6File", geoip6File.path);
} else {
logger.warn(
"torrc-defaults was not found, some functionalities will be disabled."
);
}
+
+ const torAppDataDir = lazy.TorLauncherUtil.getTorFile(
+ "torappdatadir",
+ false
+ );
+ if (torAppDataDir) {
+ const geoipFile = torAppDataDir.clone();
+ geoipFile.append("geoip");
+ if (geoipFile.exists()) {
+ this.#args.push("GeoIPFile", geoipFile.path);
+ } else {
+ logger.warn(
+ "GeoIP file not found, the circuit display will not show locations."
+ );
+ }
+ const geoip6File = torAppDataDir.clone();
+ geoip6File.append("geoip6");
+ if (geoip6File.exists()) {
+ this.#args.push("GeoIPv6File", geoip6File.path);
+ } else {
+ logger.warn(
+ "GeoIP6 file not found, the circuit display will not show locations for IPv6-only relays."
+ );
+ }
+ } else {
+ logger.warn(
+ "App data directory not found, the circuit display will not show locations."
+ );
+ }
}
/**
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5c3df0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5c3df0…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] Bug 40892: Move tor app data.
by Pier Angelo Vendrame (@pierov) 05 Mar '26
by Pier Angelo Vendrame (@pierov) 05 Mar '26
05 Mar '26
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
dc6d32b9 by Pier Angelo Vendrame at 2026-03-05T18:17:47+01:00
Bug 40892: Move tor app data.
We stored app data such as torrc-defaults and the geoip files in the
directory where we are storing also the user data, which might be
confusing.
In addition to that, with this change, we make Linux and Windows
coherent with macOS, where we were already storing this data in the app
bundle for signing/notarization purposes.
And in general, it is clearer if we move user data to live outside the
program directory, as the updater will stop touching that directory.
- - - - -
1 changed file:
- projects/browser/build
Changes:
=====================================
projects/browser/build
=====================================
@@ -44,7 +44,7 @@ touch "$GENERATEDPREFSPATH"
DOCSPATH=[% c('var/ProjectName') %]/Docs
EXTSPATH=distribution/extensions
TORBINPATH=TorBrowser/Tor
- TORCONFIGPATH=TorBrowser/Data/Tor
+ TORCONFIGPATH=$TORBINPATH
[% IF c("var/tor-browser") -%]
PROFILEPATH=[% c('var/ProjectName') %]/Data/Browser/profile.default/extensions
@@ -230,6 +230,8 @@ done
[% IF c("var/linux") && c("var/tor-browser") %]
chmod 700 "${TB_STAGE_DIR}/Browser/[% c('var/ProjectName') %]/Data/Browser"
+ # Pre-create the data directory to make sure it gets restrictive permissions.
+ mkdir -p "${TB_STAGE_DIR}/Browser/TorBrowser/Data/Tor"
chmod 700 "${TB_STAGE_DIR}/Browser/TorBrowser/Data/Tor"
[% END %]
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser-build][main] Bug 41742: Make the Mullvad Browser publishing script independent from the BB branch existence
by ma1 (@ma1) 05 Mar '26
by ma1 (@ma1) 05 Mar '26
05 Mar '26
ma1 pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
012f0dcd by hackademix at 2026-03-04T19:22:51+01:00
Bug 41742: Make the Mullvad Browser publishing script independent from the BB branch existence
- - - - -
1 changed file:
- tools/signing/publish-github.mullvadbrowser
Changes:
=====================================
tools/signing/publish-github.mullvadbrowser
=====================================
@@ -37,7 +37,7 @@ fi
pushd >/dev/null ../../git_clones/firefox
echo "Fetching $MB_BRANCH and tags..."
git fetch --tags "$GL_REMOTE_MULLVAD" "$MB_BRANCH"
-git fetch --tags "$GL_REMOTE_TOR" "$BB_BRANCH"
+git fetch --tags "$GL_REMOTE_TOR"
BB_TAG=$(git tag -l "$BB_BRANCH-build*" | tail -n1)
FX_TAG=$(git tag -l "FIREFOX_*${FX_VERSION//\./_}*" "FIREFOX_NIGHTLY_${FX_VERSION//\.0a[0-9]*/}*" | tail -n1)
echo "QA build version: $BASE_VERSION"
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] fixup! [android] Override settings
by clairehurst (@clairehurst) 04 Mar '26
by clairehurst (@clairehurst) 04 Mar '26
04 Mar '26
clairehurst pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
5c3df053 by clairehurst at 2026-03-04T17:07:35+00:00
fixup! [android] Override settings
TB 44226
This reverts commit f84cc6f017071e152f38239fc2e71cc180c2b049.
- - - - -
2 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
- mobile/android/fenix/app/src/main/res/xml/preferences.xml
Changes:
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
=====================================
@@ -1066,7 +1066,7 @@ class Settings(
var whatsappLinkSharingEnabled by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_link_sharing),
- default = { false },
+ default = { FxNimbus.features.sentFromFirefox.value().enabled },
)
var linkSharingSettingsSnackbarShown by booleanPreference(
=====================================
mobile/android/fenix/app/src/main/res/xml/preferences.xml
=====================================
@@ -228,7 +228,6 @@
<androidx.preference.Preference
android:key="@string/pref_key_link_sharing"
app:iconSpaceReserved="false"
- app:isPreferenceVisible="false"
android:title="@string/preferences_link_sharing" />
<!--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5c3df05…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5c3df05…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] fixup! TB 43107: Disable remoting by default
by Pier Angelo Vendrame (@pierov) 04 Mar '26
by Pier Angelo Vendrame (@pierov) 04 Mar '26
04 Mar '26
Pier Angelo Vendrame pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
04a2b859 by Pier Angelo Vendrame at 2026-03-04T15:10:53+01:00
fixup! TB 43107: Disable remoting by default
TB 44706: Fix a crash when creating new profiles.
Rework the patch to disable remoting at runtime to allow using some of
the service's functionalities, while still refusing to create any
remoting server/client.
- - - - -
3 changed files:
- toolkit/components/remote/nsRemoteService.cpp
- toolkit/components/remote/nsRemoteService.h
- toolkit/xre/nsAppRunner.cpp
Changes:
=====================================
toolkit/components/remote/nsRemoteService.cpp
=====================================
@@ -53,7 +53,8 @@ nsStartupLock::~nsStartupLock() {
NS_IMPL_ISUPPORTS(nsRemoteService, nsIObserver, nsIRemoteService)
-nsRemoteService::nsRemoteService() : mProgram("mozilla") {
+nsRemoteService::nsRemoteService(bool aRemotingEnabled)
+ : mRemotingEnabled(aRemotingEnabled), mProgram("mozilla") {
ToLowerCase(mProgram);
}
@@ -194,6 +195,10 @@ nsresult nsRemoteService::SendCommandLine(const nsACString& aProfile,
return NS_ERROR_FAILURE;
}
+ if (!mRemotingEnabled) {
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+
UniquePtr<nsRemoteClient> client;
#ifdef MOZ_WIDGET_GTK
# if defined(MOZ_ENABLE_DBUS)
@@ -249,7 +254,7 @@ nsresult nsRemoteService::StartClient() {
}
void nsRemoteService::StartupServer() {
- if (mRemoteServer) {
+ if (mRemoteServer || !mRemotingEnabled) {
return;
}
=====================================
toolkit/components/remote/nsRemoteService.h
=====================================
@@ -39,7 +39,7 @@ class nsRemoteService final : public nsIObserver, public nsIRemoteService {
NS_DECL_NSIOBSERVER
NS_DECL_NSIREMOTESERVICE
- nsRemoteService();
+ nsRemoteService(bool aRemotingEnabled);
void SetProgram(const char* aProgram);
void SetProfile(nsACString& aProfile);
#ifdef MOZ_WIDGET_GTK
@@ -91,6 +91,7 @@ class nsRemoteService final : public nsIObserver, public nsIRemoteService {
nsresult SendCommandLine(const nsACString& aProfile, size_t aArgc,
const char** aArgv, bool aRaise);
+ bool mRemotingEnabled;
mozilla::UniquePtr<nsRemoteServer> mRemoteServer;
nsCString mProgram;
nsCString mProfile;
=====================================
toolkit/xre/nsAppRunner.cpp
=====================================
@@ -314,7 +314,7 @@ static nsIProfileLock* gProfileLock;
constinit static RefPtr<nsRemoteService> gRemoteService;
constinit static RefPtr<nsStartupLock> gStartupLock;
// tor-browser#43107: Disable remoting by default.
-bool gDisableRemoting = true;
+bool gEnableRemoting = false;
#endif
int gRestartArgc;
@@ -2095,8 +2095,8 @@ nsresult ScopedXPCOMStartup::SetWindowCreator(nsINativeAppSupport* native) {
/* static */ already_AddRefed<nsIRemoteService> GetRemoteService() {
AssertIsOnMainThread();
- if (!gRemoteService && !gDisableRemoting) {
- gRemoteService = new nsRemoteService();
+ if (!gRemoteService) {
+ gRemoteService = new nsRemoteService(gEnableRemoting);
}
nsCOMPtr<nsIRemoteService> remoteService = gRemoteService.get();
return remoteService.forget();
@@ -4487,7 +4487,7 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
// The user can still enable remoting if they want to, by adding the
// allow-remote parameter to the command line.
if (CheckArg("allow-remote") == ARG_FOUND) {
- gDisableRemoting = false;
+ gEnableRemoting = true;
}
#else
// These arguments do nothing in platforms with no remoting support but we
@@ -4882,7 +4882,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
#ifdef MOZ_HAS_REMOTE
if (gfxPlatform::IsHeadless()) {
- gDisableRemoting = true;
+ gEnableRemoting = false;
}
#endif
@@ -5004,10 +5004,8 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
}
#endif
#if defined(MOZ_HAS_REMOTE)
- if (!gDisableRemoting) {
- // handle --remote now that xpcom is fired up
- gRemoteService = new nsRemoteService();
- }
+ // handle --remote now that xpcom is fired up
+ gRemoteService = new nsRemoteService(gEnableRemoting);
if (gRemoteService) {
gRemoteService->SetProgram(gAppData->remotingName);
gStartupLock = gRemoteService->LockStartup();
@@ -5092,7 +5090,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
if (NS_SUCCEEDED(rv)) {
gRemoteService->SetProfile(profilePath);
- if (!gDisableRemoting) {
+ if (gEnableRemoting) {
// Try to remote the entire command line. If this fails, start up
// normally.
# ifdef MOZ_WIDGET_GTK
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/04a2b85…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/04a2b85…
You're receiving this email because of your account on gitlab.torproject.org.
1
0
[Git][tpo/applications/tor-browser][tor-browser-148.0a1-16.0-2] fixup! BB 41459: WebRTC fails to build under mingw (Part 2)
by Pier Angelo Vendrame (@pierov) 04 Mar '26
by Pier Angelo Vendrame (@pierov) 04 Mar '26
04 Mar '26
Pier Angelo Vendrame pushed to branch tor-browser-148.0a1-16.0-2 at The Tor Project / Applications / Tor Browser
Commits:
eb89dfda by june wilde at 2026-03-04T10:11:37+01:00
fixup! BB 41459: WebRTC fails to build under mingw (Part 2)
- - - - -
1 changed file:
- third_party/libwebrtc/rtc_base/win/create_direct3d_device.h
Changes:
=====================================
third_party/libwebrtc/rtc_base/win/create_direct3d_device.h
=====================================
@@ -13,15 +13,6 @@
#include <windows.graphics.directx.direct3d11.h>
#include <windows.graphics.directx.direct3d11.interop.h>
-#ifdef __MINGW32__
-# include <dxgi.h>
-# include <inspectable.h>
-extern "C" {
-// This function is only used in decltype(..)
-HRESULT __stdcall CreateDirect3D11DeviceFromDXGIDevice(
- ::IDXGIDevice* dxgiDevice, ::IInspectable** graphicsDevice);
-}
-#endif
#include <winerror.h>
#include <wrl/client.h>
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/eb89dfd…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/eb89dfd…
You're receiving this email because of your account on gitlab.torproject.org.
1
0