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

Keyboard Shortcuts

Thread View

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

tbb-commits

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

  • 1 participants
  • 18632 discussions
[Git][tpo/applications/tor-browser] Pushed new tag tor-browser-102.12.0esr-12.5-1-build2
by richard (@richard) 08 Jun '23

08 Jun '23
richard pushed new tag tor-browser-102.12.0esr-12.5-1-build2 at The Tor Project / Applications / Tor Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/tor-brows… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser] Pushed new tag base-browser-102.12.0esr-12.5-1-build2
by richard (@richard) 08 Jun '23

08 Jun '23
richard pushed new tag base-browser-102.12.0esr-12.5-1-build2 at The Tor Project / Applications / Tor Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/base-brow… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-13.0-1] 24 commits: fixup! Bug 40597: Implement TorSettings module
by Pier Angelo Vendrame (@pierov) 08 Jun '23

08 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-13.0-1 at The Tor Project / Applications / Tor Browser Commits: 014f6414 by Pier Angelo Vendrame at 2023-06-01T22:03:04+02:00 fixup! Bug 40597: Implement TorSettings module Bug 41801: Fix handleProcessReady in TorSettings.init - - - - - f8d0eb2d by Pier Angelo Vendrame at 2023-06-05T18:52:53+02:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 40552: Improve the description of the modal to provide a bridge manually. - - - - - fc0557ed by Pier Angelo Vendrame at 2023-06-05T18:52:54+02:00 fixup! Add TorStrings module for localization Bug 40552: New texts for the add a bridge manually modal - - - - - 423f239c by cypherpunks1 at 2023-06-05T11:07:29-08:00 fixup! Bug 8324: Prevent DNS proxy bypasses caused by Drag&Drop Bug 41792: Allow dragging downloads from about:downloads and the download panel - - - - - e6cc145a by Pier Angelo Vendrame at 2023-06-05T19:46:15+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41802: Improve the regex on parseBridgeLine The previous version of the regex took for granted the bridge fingerprint was always available, but it is actually optional. So, parsing some bridge lines (e.g., Conjure) failed, and vanilla bridge was displayed instead of the actual transport. - - - - - ae4c538d by Henry Wilkes at 2023-06-05T19:47:48+00:00 Bug 41803 - Add some developer tools for working on tor-browser. - - - - - 7ece5b1d by John Lin at 2023-06-06T16:11:52+00:00 Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D178564 - - - - - 968655c2 by Richard Pospesel at 2023-06-06T18:18:14+00:00 fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc - MOZ_GUARDED_BY is just GUARDED_BY in esr 102 - - - - - 787ac906 by Dan Ballard at 2023-06-06T20:52:51+00:00 amend! Bug 40701: Add in pane security warning when downloading a file Bug 40701: Add security warning when downloading a file Shown in the downloads panel, about:downloads and places.xhtml. - - - - - 8b558745 by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41623: Update connection assist's iconography - - - - - 975fe2aa by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41623: Update connection assist's iconography - - - - - c2d6837d by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41623: Update connection assist's iconography - - - - - db0a953f by Henry Wilkes at 2023-06-07T14:09:59+01:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41734 - Add a connected label to the built-in bridge dialog. - - - - - e86c7eaf by Henry Wilkes at 2023-06-07T14:09:59+01:00 fixup! Add TorStrings module for localization Bug 41734 - Add a connected label to the built-in bridge dialog. - - - - - f4d9efee by Pier Angelo Vendrame at 2023-06-07T16:39:10+02:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41815: Wrong connect icons Swapped a couple of icons in about:torconnect, and split the offline CSS class from the connection assist/final error, since they now need a different icon. Also, removed the stroke property, since the new icons do not need it. - - - - - 6ed4a3c6 by Pier Angelo Vendrame at 2023-06-07T17:02:21+02:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41816: Workaround to fix the top navigation Using the top navigation does not always work as expected, because we pass a null connection state, instead of the actual state. We could start storing the state as a member, however further refactors are planned (see tor-browser#41710), so also directly asking the parent for the current state works as a quick&dirty workaround. - - - - - 66f647aa by Henry Wilkes at 2023-06-07T19:02:40+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41618 - Remove connect bar, and swap internet and connection icons in tor connection preferences. - - - - - 02ddc74a by Henry Wilkes at 2023-06-07T19:02:40+00:00 fixup! Add TorStrings module for localization Bug 41618 - Remove connect bar, and swap internet and connection icons in tor connection preferences. - - - - - 01f3492c by Henry Wilkes at 2023-06-07T20:39:37+01:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41726 - Animate the connection icon. - - - - - 338b3317 by Henry Wilkes at 2023-06-07T19:58:06+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41810 - Add "Connect" button instead of the "Submit" and "OK" button in the bridge request dialog and the manual bridge dialog, respectively. - - - - - e5dc109a by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! fixup! Bug 2176: Rebrand Firefox to TorBrowser Bug 41809: restore onion glyph in locations outside location bar - - - - - 082bb93a by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! Bug 23247: Communicating security expectations for .onion Bug 41809: restore onion glyph in locations outside location bar - - - - - 1dd00f22 by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41809: restore onion glyph in locations outside location bar - - - - - 2165eb00 by Pier Angelo Vendrame at 2023-06-08T10:47:48+02:00 fixup! Add TorStrings module for localization Bug 41818: Remove YEC 2022 strings - - - - - 30 changed files: - browser/base/content/navigator-toolbox.inc.xhtml - browser/components/downloads/content/allDownloadsView.js - browser/components/downloads/content/contentAreaDownloadsView.js - browser/components/downloads/content/contentAreaDownloadsView.xhtml - browser/components/downloads/content/downloads.css - browser/components/downloads/content/downloads.js - browser/components/downloads/content/downloadsPanel.inc.xhtml - browser/components/places/content/places.css - browser/components/places/content/places.js - browser/components/places/content/places.xhtml - browser/components/torconnect/content/aboutTorConnect.css - browser/components/torconnect/content/aboutTorConnect.js - browser/components/torconnect/content/connection-failure.svg - browser/components/torconnect/content/connection-location.svg - − browser/components/torconnect/content/onion-slash-fillable.svg - + browser/components/torconnect/content/tor-connect-broken.svg - + browser/components/torconnect/content/tor-connect.svg - + browser/components/torconnect/content/tor-not-connected-to-connected-animated.svg - browser/components/torconnect/content/torConnectTitlebarStatus.css - browser/components/torconnect/content/torConnectTitlebarStatus.js - browser/components/torconnect/jar.mn - browser/components/torconnect/content/onion.svg → browser/components/torpreferences/content/bridge-qr-onion-mask.svg - browser/components/torpreferences/content/builtinBridgeDialog.jsm - browser/components/torpreferences/content/builtinBridgeDialog.xhtml - − browser/components/torpreferences/content/check.svg - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml - + browser/components/torpreferences/content/network-broken.svg - browser/components/torpreferences/content/network.svg - browser/components/torpreferences/content/provideBridgeDialog.jsm The diff was not included because it is too large. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/282e5c… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/282e5c… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Add TorStrings module for localization
by ma1 (@ma1) 08 Jun '23

08 Jun '23
ma1 pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 2165eb00 by Pier Angelo Vendrame at 2023-06-08T10:47:48+02:00 fixup! Add TorStrings module for localization Bug 41818: Remove YEC 2022 strings - - - - - 1 changed file: - toolkit/torbutton/chrome/locale/en-US/aboutTor.dtd Changes: ===================================== toolkit/torbutton/chrome/locale/en-US/aboutTor.dtd ===================================== @@ -38,22 +38,3 @@ <!ENTITY aboutTor.nightly.ready2.label "You’re ready to test the world’s most private browsing experience."> <!ENTITY aboutTor.nightly.bannerDescription "Tor Browser Nightly is an unstable version of Tor Browser you can use to preview new features, test their performance and provide feedback before release."> <!ENTITY aboutTor.nightly.bannerLink "Report a bug on the Tor Forum"> - -<!-- YEC 2022 campaign https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41303 --> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.powered_by_privacy): a header for a list of things which are powered by/enabled by/possible due to privacy (each item should have positive connotations/associations in the translated languages) --> -<!ENTITY aboutTor.yec2022.powered_by_privacy "POWERED BY PRIVACY:"> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.resistance): resistance as in social/political resistance to opression, injustice, etc --> -<!ENTITY aboutTor.yec2022.resistance "RESISTANCE"> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.change): change as in the process of social/political progress toward a better/more equitable society --> -<!ENTITY aboutTor.yec2022.change "CHANGE"> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.freedom): freedom as in liberty, protection against exploition, imprisonment, etc --> -<!ENTITY aboutTor.yec2022.freedom "FREEDOM"> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.donate_now): Label for a button directing user to donation page--> -<!ENTITY aboutTor.yec2022.donate_now "DONATE NOW"> -<!-- LOCALIZATION NOTE (aboutTor.yec2022.donation_matching): Please translate the 'Friends of Tor' phrase, but -also format it like the name of an organization in whichever way that is appropriate for your locale. - -Please keep the currency in USD. -Thank you! ---> -<!ENTITY aboutTor.yec2022.donation_matching "Your donation will be matched by Friends of Tor, up to $100,000."> View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2165eb0… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2165eb0… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-update-responses][main] release: new version, 12.0.7
by boklm (@boklm) 08 Jun '23

08 Jun '23
boklm pushed to branch main at The Tor Project / Applications / Tor Browser update responses Commits: 99cc7315 by Nicolas Vigier at 2023-06-08T13:49:15+02:00 release: new version, 12.0.7 - - - - - 30 changed files: - update_3/release/.htaccess - − update_3/release/12.0.4-12.0.6-linux32-ALL.xml - − update_3/release/12.0.4-12.0.6-linux64-ALL.xml - − update_3/release/12.0.4-12.0.6-macos-ALL.xml - − update_3/release/12.0.4-12.0.6-win32-ALL.xml - − update_3/release/12.0.4-12.0.6-win64-ALL.xml - + update_3/release/12.0.4-12.0.7-linux32-ALL.xml - + update_3/release/12.0.4-12.0.7-linux64-ALL.xml - + update_3/release/12.0.4-12.0.7-macos-ALL.xml - + update_3/release/12.0.4-12.0.7-win32-ALL.xml - + update_3/release/12.0.4-12.0.7-win64-ALL.xml - − update_3/release/12.0.5-12.0.6-linux32-ALL.xml - − update_3/release/12.0.5-12.0.6-linux64-ALL.xml - − update_3/release/12.0.5-12.0.6-macos-ALL.xml - − update_3/release/12.0.5-12.0.6-win32-ALL.xml - − update_3/release/12.0.5-12.0.6-win64-ALL.xml - + update_3/release/12.0.5-12.0.7-linux32-ALL.xml - + update_3/release/12.0.5-12.0.7-linux64-ALL.xml - + update_3/release/12.0.5-12.0.7-macos-ALL.xml - + update_3/release/12.0.5-12.0.7-win32-ALL.xml - + update_3/release/12.0.5-12.0.7-win64-ALL.xml - + update_3/release/12.0.6-12.0.7-linux32-ALL.xml - + update_3/release/12.0.6-12.0.7-linux64-ALL.xml - + update_3/release/12.0.6-12.0.7-macos-ALL.xml - + update_3/release/12.0.6-12.0.7-win32-ALL.xml - + update_3/release/12.0.6-12.0.7-win64-ALL.xml - − update_3/release/12.0.6-linux32-ALL.xml - − update_3/release/12.0.6-linux64-ALL.xml - − update_3/release/12.0.6-macos-ALL.xml - − update_3/release/12.0.6-win32-ALL.xml The diff was not included because it is too large. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 40874: Include the commit information in GeckoView
by ma1 (@ma1) 08 Jun '23

08 Jun '23
ma1 pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: f4227713 by Pier Angelo Vendrame at 2023-06-07T19:10:03+02:00 Bug 40874: Include the commit information in GeckoView Add the commit hash and GitLab URL to the mozconfig to make them appear in about:buildconfig on Android, too. - - - - - 2 changed files: - projects/geckoview/build - projects/geckoview/config Changes: ===================================== projects/geckoview/build ===================================== @@ -41,7 +41,13 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz cd /var/tmp/build/[% project %]-[% c("version") %] -ln -s mozconfig-[% c("var/osname") %] .mozconfig +cat > .mozconfig << 'MOZCONFIG_EOF' +. $topsrcdir/mozconfig-[% c("var/osname") %] + +export MOZ_INCLUDE_SOURCE_INFO=1 +export MOZ_SOURCE_REPO="[% c('var/gitlab_project') %]" +export MOZ_SOURCE_CHANGESET=[% c("var/git_commit") %] +MOZCONFIG_EOF eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %]) if [ -z $MOZ_BUILD_DATE ] ===================================== projects/geckoview/config ===================================== @@ -15,6 +15,8 @@ var: browser_branch: 12.5-1 browser_build: 3 copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]' + gitlab_project: https://gitlab.torproject.org/tpo/applications/tor-browser + git_commit: '[% exec("git rev-parse HEAD") %]' deps: - build-essential - unzip View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] 3 commits: fixup! fixup! Bug 2176: Rebrand Firefox to TorBrowser
by richard (@richard) 07 Jun '23

07 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: e5dc109a by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! fixup! Bug 2176: Rebrand Firefox to TorBrowser Bug 41809: restore onion glyph in locations outside location bar - - - - - 082bb93a by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! Bug 23247: Communicating security expectations for .onion Bug 41809: restore onion glyph in locations outside location bar - - - - - 1dd00f22 by Dan Ballard at 2023-06-07T20:49:28+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41809: restore onion glyph in locations outside location bar - - - - - 6 changed files: - + browser/components/torpreferences/content/bridge-qr-onion-mask.svg - browser/components/torpreferences/content/torPreferences.css - browser/components/torpreferences/jar.mn - browser/themes/shared/identity-block/identity-block.css - browser/themes/shared/identity-block/onion.svg → browser/themes/shared/identity-block/onion-site.svg - browser/themes/shared/jar.inc.mn Changes: ===================================== browser/components/torpreferences/content/bridge-qr-onion-mask.svg ===================================== @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg"> + <path d="M 8 0.5 C 3.85786 0.5 0.5 3.85786 0.5 8 C 0.5 12.1421 3.85786 15.5 8 15.5 C 12.1421 15.5 15.5 12.1421 15.5 8 C 15.5 3.85786 12.1421 0.5 8 0.5 z M 8 1.671875 C 11.4949 1.671875 14.328125 4.50507 14.328125 8 C 14.328125 11.4949 11.4949 14.328125 8 14.328125 L 8 13.25 C 10.89951 13.25 13.25 10.89951 13.25 8 C 13.25 5.10051 10.89951 2.75 8 2.75 L 8 1.671875 z M 8 3.921875 C 10.25231 3.921875 12.078125 5.74772 12.078125 8 C 12.078125 10.25231 10.25231 12.078125 8 12.078125 L 8 11 C 9.65686 11 11 9.65686 11 8 C 11 6.34315 9.65686 5 8 5 L 8 3.921875 z M 8 6.171875 C 9.00965 6.171875 9.828125 6.99036 9.828125 8 C 9.828125 9.00965 9.00965 9.828125 8 9.828125 L 8 6.171875 z " clip-rule="evenodd" fill-rule="evenodd" fill="#000000"/> +</svg> ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -291,7 +291,7 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { top: calc(50% - 8px); inset-inline-start: calc(50% - 8px); - mask: url("chrome://browser/skin/onion.svg"); + mask: url("chrome://browser/content/torpreferences/bridge-qr-onion-mask.svg"); mask-repeat: no-repeat; mask-size: 16px; background: var(--qr-one); @@ -436,7 +436,7 @@ dialog#torPreferences-requestBridge-dialog > hbox { height: 38px; top: calc(50% - 19px); left: calc(50% - 19px); - mask: url("chrome://browser/skin/onion.svg"); + mask: url("chrome://browser/content/torpreferences/bridge-qr-onion-mask.svg"); mask-repeat: no-repeat; mask-size: 38px; background: var(--qr-one); ===================================== browser/components/torpreferences/jar.mn ===================================== @@ -17,6 +17,7 @@ browser.jar: content/browser/torpreferences/connectionPane.js (content/connectionPane.js) content/browser/torpreferences/connectionPane.xhtml (content/connectionPane.xhtml) content/browser/torpreferences/torPreferences.css (content/torPreferences.css) + content/browser/torpreferences/bridge-qr-onion-mask.svg (content/bridge-qr-onion-mask.svg) content/browser/torpreferences/bridgemoji/bridge-emojis.json (content/bridgemoji/bridge-emojis.json) content/browser/torpreferences/bridgemoji/annotations.json (content/bridgemoji/annotations.json) content/browser/torpreferences/bridgemoji/svgs/ (content/bridgemoji/svgs/*.svg) ===================================== browser/themes/shared/identity-block/identity-block.css ===================================== @@ -196,7 +196,7 @@ #identity-box[pageproxystate="valid"].onionUnknownIdentity #identity-icon, #identity-box[pageproxystate="valid"].onionVerifiedDomain #identity-icon, #identity-box[pageproxystate="valid"].onionMixedActiveBlocked #identity-icon { - list-style-image: url(chrome://browser/skin/onion.svg); + list-style-image: url(chrome://browser/skin/onion-site.svg); visibility: visible; } ===================================== browser/themes/shared/identity-block/onion.svg → browser/themes/shared/identity-block/onion-site.svg ===================================== ===================================== browser/themes/shared/jar.inc.mn ===================================== @@ -71,7 +71,7 @@ skin/classic/browser/downloads/progressmeter.css (../shared/downloads/progressmeter.css) skin/classic/browser/drm-icon.svg (../shared/drm-icon.svg) skin/classic/browser/identity-block/identity-block.css (../shared/identity-block/identity-block.css) - skin/classic/browser/onion.svg (../shared/identity-block/onion.svg) + skin/classic/browser/onion-site.svg (../shared/identity-block/onion-site.svg) skin/classic/browser/onion-slash.svg (../shared/identity-block/onion-slash.svg) skin/classic/browser/onion-warning.svg (../shared/identity-block/onion-warning.svg) skin/classic/browser/permissions.svg (../shared/identity-block/permissions.svg) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/338b33… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/338b33… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by ma1 (@ma1) 07 Jun '23

07 Jun '23
ma1 pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 338b3317 by Henry Wilkes at 2023-06-07T19:58:06+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41810 - Add &quot;Connect&quot; button instead of the &quot;Submit&quot; and &quot;OK&quot; button in the bridge request dialog and the manual bridge dialog, respectively. - - - - - 4 changed files: - browser/components/torpreferences/content/builtinBridgeDialog.jsm - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/provideBridgeDialog.jsm - browser/components/torpreferences/content/requestBridgeDialog.jsm Changes: ===================================== browser/components/torpreferences/content/builtinBridgeDialog.jsm ===================================== @@ -36,9 +36,6 @@ class BuiltinBridgeDialog { "#torPreferences-builtinBridge-description" ).textContent = TorStrings.settings.builtinBridgeDescription2; - this._acceptButton = dialog.getButton("accept"); - this.onTorStateChange(); - const radioGroup = dialog.querySelector( "#torPreferences-builtinBridge-typeSelection" ); @@ -102,20 +99,26 @@ class BuiltinBridgeDialog { dialog.style.minWidth = "0"; dialog.style.minHeight = "0"; + this._acceptButton = dialog.getButton("accept"); + Services.obs.addObserver(this, TorConnectTopics.StateChange); + this.onAcceptStateChange(); } - onTorStateChange() { - if (TorConnect.canBeginBootstrap) { - this._acceptButton.setAttribute( - "label", - TorStrings.settings.bridgeButtonConnect - ); - } else { - this._acceptButton.setAttribute( - "label", - TorStrings.settings.bridgeButtonAccept - ); + onAcceptStateChange() { + this._acceptButton.setAttribute( + "label", + TorConnect.canBeginBootstrap + ? TorStrings.settings.bridgeButtonConnect + : TorStrings.settings.bridgeButtonAccept + ); + } + + observe(subject, topic, data) { + switch (topic) { + case TorConnectTopics.StateChange: + this.onAcceptStateChange(); + break; } } @@ -126,16 +129,8 @@ class BuiltinBridgeDialog { }, 0); } - observe(subject, topic, data) { - switch (topic) { - case TorConnectTopics.StateChange: - this.onTorStateChange(); - break; - } - } - close() { - // unregister our observer topics + // Unregister our observer topics. Services.obs.removeObserver(this, TorConnectTopics.StateChange); } ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -1047,9 +1047,47 @@ const gConnectionPane = (function() { }); }, + /** + * Save and apply settings, then optionally open about:torconnect and start + * bootstrapping. + * + * @param {boolean} connect - Whether to open about:torconnect and start + * bootstrapping if possible. + */ + async saveBridgeSettings(connect) { + TorSettings.saveToPrefs(); + // FIXME: This can throw if the user adds a bridge manually with invalid + // content. Should be addressed by tor-browser#40552. + await TorSettings.applySettings(); + + this._populateBridgeCards(); + + if (!connect) { + return; + } + + // The bridge dialog button is "connect" when Tor is not bootstrapped, + // so do the connect. + + // Start Bootstrapping, which should use the configured bridges. + // NOTE: We do this regardless of any previous TorConnect Error. + if (TorConnect.canBeginBootstrap) { + TorConnect.beginBootstrap(); + } + // Open "about:torconnect". + // FIXME: If there has been a previous bootstrapping error then + // "about:torconnect" will be trying to get the user to use + // AutoBootstrapping. It is not set up to handle a forced direct + // entry to plain Bootstrapping from this dialog so the UI will not + // be aligned. In particular the + // AboutTorConnect.uiState.bootstrapCause will be aligned to + // whatever was shown previously in "about:torconnect" instead. + TorConnect.openTorConnect(); + }, + onAddBuiltinBridge() { const builtinBridgeDialog = new BuiltinBridgeDialog( - async (bridgeType, connect) => { + (bridgeType, connect) => { if (!bridgeType) { TorSettings.bridges.enabled = false; TorSettings.bridges.builtin_type = ""; @@ -1058,29 +1096,8 @@ const gConnectionPane = (function() { TorSettings.bridges.source = TorBridgeSource.BuiltIn; TorSettings.bridges.builtin_type = bridgeType; } - TorSettings.saveToPrefs(); - await TorSettings.applySettings(); - - this._populateBridgeCards(); - // The bridge dialog button is "connect" when Tor is not bootstrapped, - // so do the connect. - if (connect) { - // Start Bootstrapping, which should use the configured bridges. - // NOTE: We do this regardless of any previous TorConnect Error. - if (TorConnect.canBeginBootstrap) { - TorConnect.beginBootstrap(); - } - // Open "about:torconnect". - // FIXME: If there has been a previous bootstrapping error then - // "about:torconnect" will be trying to get the user to use - // AutoBootstrapping. It is not set up to handle a forced direct - // entry to plain Bootstrapping from this dialog so the UI will not - // be aligned. In particular the - // AboutTorConnect.uiState.bootstrapCause will be aligned to - // whatever was shown previously in "about:torconnect" instead. - TorConnect.openTorConnect(); - } + this.saveBridgeSettings(connect); } ); builtinBridgeDialog.openDialog(gSubDialog); @@ -1088,37 +1105,38 @@ const gConnectionPane = (function() { // called when the request bridge button is activated onRequestBridge() { - const requestBridgeDialog = new RequestBridgeDialog(aBridges => { - if (aBridges.length) { + const requestBridgeDialog = new RequestBridgeDialog( + (aBridges, connect) => { + if (!aBridges.length) { + return; + } const bridgeStrings = aBridges.join("\n"); TorSettings.bridges.enabled = true; TorSettings.bridges.source = TorBridgeSource.BridgeDB; TorSettings.bridges.bridge_strings = bridgeStrings; - TorSettings.saveToPrefs(); - TorSettings.applySettings().then(result => { - this._populateBridgeCards(); - }); + + this.saveBridgeSettings(connect); } - }); + ); requestBridgeDialog.openDialog(gSubDialog); }, onAddBridgeManually() { - const provideBridgeDialog = new ProvideBridgeDialog(aBridgeString => { - if (aBridgeString.length) { - TorSettings.bridges.enabled = true; - TorSettings.bridges.source = TorBridgeSource.UserProvided; - TorSettings.bridges.bridge_strings = aBridgeString; - } else { - TorSettings.bridges.enabled = false; - TorSettings.bridges.source = TorBridgeSource.Invalid; - TorSettings.bridges.bridge_strings = ""; + const provideBridgeDialog = new ProvideBridgeDialog( + (aBridgeString, connect) => { + if (aBridgeString) { + TorSettings.bridges.enabled = true; + TorSettings.bridges.source = TorBridgeSource.UserProvided; + TorSettings.bridges.bridge_strings = aBridgeString; + } else { + TorSettings.bridges.enabled = false; + TorSettings.bridges.source = TorBridgeSource.Invalid; + TorSettings.bridges.bridge_strings = ""; + } + + this.saveBridgeSettings(connect); } - TorSettings.saveToPrefs(); - TorSettings.applySettings().then(result => { - this._populateBridgeCards(); - }); - }); + ); provideBridgeDialog.openDialog(gSubDialog); }, ===================================== browser/components/torpreferences/content/provideBridgeDialog.jsm ===================================== @@ -2,17 +2,24 @@ var EXPORTED_SYMBOLS = ["ProvideBridgeDialog"]; +const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); + const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm"); const { TorSettings, TorBridgeSource } = ChromeUtils.import( "resource:///modules/TorSettings.jsm" ); +const { TorConnect, TorConnectTopics } = ChromeUtils.import( + "resource:///modules/TorConnect.jsm" +); + class ProvideBridgeDialog { constructor(onSubmit) { this.onSubmit = onSubmit; this._dialog = null; this._textarea = null; + this._acceptButton = null; } static get selectors() { @@ -49,14 +56,43 @@ class ProvideBridgeDialog { "placeholder", TorStrings.settings.provideBridgePlaceholder ); + this._textarea.addEventListener("input", () => { + this.onAcceptStateChange(); + }); if (TorSettings.bridges.source == TorBridgeSource.UserProvided) { this._textarea.value = TorSettings.bridges.bridge_strings.join("\n"); } this._dialog.addEventListener("dialogaccept", e => { - this.onSubmit(this._textarea.value); + let value = this._textarea.value; + if (!value.trim()) { + value = null; + } + this.onSubmit(value, value && TorConnect.canBeginBootstrap); }); this._dialog.addEventListener("dialoghelp", openHelp); + + this._acceptButton = this._dialog.getButton("accept"); + + Services.obs.addObserver(this, TorConnectTopics.StateChange); + this.onAcceptStateChange(); + } + + onAcceptStateChange() { + this._acceptButton.setAttribute( + "label", + this._textarea.value.trim() && TorConnect.canBeginBootstrap + ? TorStrings.settings.bridgeButtonConnect + : TorStrings.settings.bridgeButtonAccept + ); + } + + observe(subject, topic, data) { + switch (topic) { + case TorConnectTopics.StateChange: + this.onAcceptStateChange(); + break; + } } init(window, aDialog) { @@ -66,10 +102,20 @@ class ProvideBridgeDialog { }, 0); } + close() { + // Unregister our observer topics. + Services.obs.removeObserver(this, TorConnectTopics.StateChange); + } + openDialog(gSubDialog) { gSubDialog.open( "chrome://browser/content/torpreferences/provideBridgeDialog.xhtml", - { features: "resizable=yes" }, + { + features: "resizable=yes", + closingCallback: () => { + this.close(); + }, + }, this ); } ===================================== browser/components/torpreferences/content/requestBridgeDialog.jsm ===================================== @@ -2,9 +2,15 @@ var EXPORTED_SYMBOLS = ["RequestBridgeDialog"]; +const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); + const { BridgeDB } = ChromeUtils.import("resource:///modules/BridgeDB.jsm"); const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm"); +const { TorConnect, TorConnectTopics } = ChromeUtils.import( + "resource:///modules/TorConnect.jsm" +); + class RequestBridgeDialog { constructor(onSubmit) { this.onSubmit = onSubmit; @@ -20,8 +26,6 @@ class RequestBridgeDialog { static get selectors() { return { - submitButton: - "accept" /* not really a selector but a key for dialog's getButton */, dialogHeader: "h3#torPreferences-requestBridge-header", captchaImage: "image#torPreferences-requestBridge-captchaImage", captchaEntryTextbox: "input#torPreferences-requestBridge-captchaTextbox", @@ -57,8 +61,7 @@ class RequestBridgeDialog { } }); - this._submitButton = this._dialog.getButton(selectors.submitButton); - this._submitButton.setAttribute("label", TorStrings.settings.submitCaptcha); + this._submitButton = this._dialog.getButton("accept"); this._submitButton.disabled = true; this._dialog.addEventListener("dialogaccept", e => { e.preventDefault(); @@ -110,7 +113,25 @@ class RequestBridgeDialog { TorStrings.settings.incorrectCaptcha ); - return true; + Services.obs.addObserver(this, TorConnectTopics.StateChange); + this.onAcceptStateChange(); + } + + onAcceptStateChange() { + this._submitButton.setAttribute( + "label", + TorConnect.canBeginBootstrap + ? TorStrings.settings.bridgeButtonConnect + : TorStrings.settings.submitCaptcha + ); + } + + observe(subject, topic, data) { + switch (topic) { + case TorConnectTopics.StateChange: + this.onAcceptStateChange(); + break; + } } _setcaptchaImage(uri) { @@ -142,6 +163,8 @@ class RequestBridgeDialog { close() { BridgeDB.close(); + // Unregister our observer topics. + Services.obs.removeObserver(this, TorConnectTopics.StateChange); } /* @@ -161,7 +184,7 @@ class RequestBridgeDialog { BridgeDB.submitCaptchaGuess(captchaText) .then(aBridges => { if (aBridges) { - this.onSubmit(aBridges); + this.onSubmit(aBridges, TorConnect.canBeginBootstrap); this._submitButton.disabled = false; // This was successful, but use cancelDialog() to close, since // we intercept the `dialogaccept` event. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/338b331… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/338b331… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by richard (@richard) 07 Jun '23

07 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 01f3492c by Henry Wilkes at 2023-06-07T20:39:37+01:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41726 - Animate the connection icon. - - - - - 5 changed files: - browser/base/content/navigator-toolbox.inc.xhtml - + browser/components/torconnect/content/tor-not-connected-to-connected-animated.svg - browser/components/torconnect/content/torConnectTitlebarStatus.css - browser/components/torconnect/content/torConnectTitlebarStatus.js - browser/components/torconnect/jar.mn Changes: ===================================== browser/base/content/navigator-toolbox.inc.xhtml ===================================== @@ -94,7 +94,9 @@ <hbox class="private-browsing-indicator"/> <html:div id="tor-connect-titlebar-status" role="status"> - <html:img alt="" id="tor-connect-titlebar-status-icon" /> + <html:img id="tor-connect-titlebar-status-icon" + alt="" + src="chrome://browser/content/torconnect/tor-not-connected-to-connected-animated.svg" /> <html:span id="tor-connect-titlebar-status-label"></html:span> </html:div> ===================================== browser/components/torconnect/content/tor-not-connected-to-connected-animated.svg ===================================== @@ -0,0 +1,27 @@ +<svg width="176" height="16" viewBox="0 0 176 16" xmlns="http://www.w3.org/2000/svg"> + <path d="M 3.32745,2.13475 C 4.60904,1.11241 6.23317,0.50133 8,0.50133 c 4.1414,0 7.4987,3.35732 7.4987,7.49867 0,1.7671 -0.6111,3.3911 -1.6335,4.6725 L 13.0315,11.8388 C 13.8448,10.7747 14.328,9.4444 14.328,8 14.328,4.504 11.496,1.67199 8,1.67199 c -1.4438,0 -2.77436,0.48303 -3.83895,1.29636 z" fill="context-fill" /> + <path d="M 6.56042,5.36771 7.44805,6.25534 C 7.6222,6.20033 7.80763,6.17067 8,6.17067 c 1.0107,0 1.8294,0.81867 1.8294,1.82933 0,0.1924 -0.0297,0.3779 -0.0847,0.552 l 0.8877,0.8877 C 10.8667,9.0122 11,8.5216 11,8 11,6.34399 9.656,5 8,5 7.47846,5 6.98784,5.13332 6.56042,5.36771 Z" fill="context-fill" /> + <path d="M 12.2609,11.0682 C 12.8837,10.2055 13.2507,9.1457 13.2507,8 c 0,-2.89867 -2.352,-5.25067 -5.25073,-5.25067 -1.14511,0 -2.20491,0.36706 -3.06809,0.98988 l 0.84285,0.84286 c 0.6397,-0.41709 1.40395,-0.6594 2.22524,-0.6594 2.25333,0 4.07733,1.82399 4.07733,4.07733 0,0.8206 -0.2425,1.585 -0.6598,2.2248 z" fill="context-fill" /> + <path fill-rule="evenodd" d="M 14.0906,14.7921 1.15536,1.85684 c -0.26058,-0.26058 -0.68307,-0.26058 -0.94365,0 -0.26059,0.26059 -0.26059,0.68308 -1e-5,0.94366 L 1.56286,4.15166 C 0.88882,5.2767 0.50135,6.59311 0.50135,8 c 0,3.5867 2.51734,6.584 5.88267,7.3227 0.352,0.0773 0.70932,0.1306 1.07733,0.1546 v -5.4272 l 1.07735,1.0774 v 4.3498 C 8.9067,15.4533 9.264,15.4 9.616,15.3227 c 0.7992,-0.1755 1.5506,-0.4783 2.2318,-0.8861 l 1.2991,1.2991 c 0.2606,0.2606 0.6831,0.2606 0.9437,0 0.2606,-0.2606 0.2606,-0.683 0,-0.9436 z m -3.1017,-1.2144 -0.804,-0.804 c -0.1841,0.0843 -0.374,0.1582 -0.5689,0.221 v -0.7899 1.9125 c 0.4826,-0.1267 0.9427,-0.309 1.3729,-0.5396 z M 5.02472,7.6135 4.12828,6.71707 C 3.99487,7.1204 3.92268,7.5517 3.92268,8 c 0,1.6773 1.01333,3.12 2.46133,3.744 v 1.2507 C 4.27468,12.3147 2.74934,10.336 2.74934,8 c 0,-0.78002 0.17031,-1.52045 0.47575,-2.18611 L 2.42112,5.00992 C 1.94312,5.90024 1.67202,6.91834 1.67202,8 c 0,2.9387 2,5.4053 4.712,6.1173 V 10.528 C 5.55202,9.9947 5.00002,9.0613 5.00002,8 c 0,-0.1309 0.0084,-0.2599 0.0247,-0.3865 z" fill="context-fill" /> + <path d="m 26.5604,5.36771 0.8877,0.88763 C 27.6222,6.20033 27.8076,6.17067 28,6.17067 c 1.0107,0 1.8294,0.81867 1.8294,1.82933 0,0.1924 -0.0297,0.3779 -0.0847,0.552 l 0.8877,0.8877 C 30.8667,9.0122 31,8.5216 31,8 31,6.34399 29.656,5 28,5 27.4785,5 26.9878,5.13332 26.5604,5.36771 Z" fill="context-fill" /> + <path d="M 32.2609,11.0682 C 32.8837,10.2055 33.2507,9.1457 33.2507,8 33.2507,5.10133 30.8987,2.74933 28,2.74933 c -1.1451,0 -2.2049,0.36706 -3.0681,0.98988 l 0.8428,0.84286 c 0.6397,-0.41709 1.404,-0.6594 2.2253,-0.6594 2.2533,0 4.0773,1.82399 4.0773,4.07733 0,0.8206 -0.2425,1.585 -0.6598,2.2248 z" fill="context-fill" /> + <path fill-rule="evenodd" d="M 25.1667,1.05506 C 26.0409,0.69808 26.9975,0.50133 28,0.50133 c 4.1414,0 7.4987,3.35732 7.4987,7.49867 0,1.7671 -0.6111,3.3911 -1.6335,4.6725 L 33.0315,11.8388 C 33.8448,10.7747 34.328,9.4444 34.328,8 34.328,4.504 31.496,1.67199 28,1.67199 c -1.4438,0 -2.7744,0.48303 -3.8389,1.29636 L 24.1597,2.96703 c -0.3568,0.27263 -0.6838,0.58239 -0.9752,0.9235 l 0.0014,0.00134 C 22.2419,4.99718 21.672,6.43179 21.672,8 c 0,1.7592 0.7167,3.3492 1.8739,4.4949 0.473,0.4681 1.0196,0.862 1.6208,1.1628 0.385,0.1928 0.7924,0.3481 1.2173,0.4596 V 10.528 C 25.552,9.9947 25,9.0613 25,8 25,7.8685 25.0085,7.7389 25.0249,7.6118 L 24.1287,6.71563 C 23.995,7.11937 23.9227,7.5512 23.9227,8 c 0,1.6773 1.0133,3.12 2.4613,3.744 v 1.2507 C 24.2747,12.3147 22.7493,10.336 22.7493,8 c 0,-0.78053 0.1706,-1.52142 0.4764,-2.18742 L 22.8632,5.45009 c -0.2597,-0.2597 -0.2597,-0.68075 0,-0.94045 0.2597,-0.2597 0.6808,-0.2597 0.9405,0 L 34.0943,14.8002 c 0.2597,0.2597 0.2597,0.6808 0,0.9405 -0.2597,0.2597 -0.6808,0.2597 -0.9405,0 L 31.849,14.4359 c -0.6815,0.4082 -1.4333,0.7112 -2.233,0.8868 -0.352,0.0773 -0.7093,0.1306 -1.0773,0.1546 v -4.3518 l -1.0774,-1.0773 v 5.4291 C 27.0933,15.4533 26.736,15.4 26.384,15.3227 24.9758,15.0136 23.7161,14.309 22.7272,13.3313 21.3519,11.9723 20.5,10.0852 20.5,7.9987 20.5,4.85935 22.4292,2.17055 25.1667,1.05319 Z M 29.616,14.1173 v -1.9144 0.7918 c 0.1953,-0.063 0.3857,-0.1371 0.5702,-0.2216 l 0.804,0.804 c -0.4306,0.2309 -0.8911,0.4134 -1.3742,0.5402 z" fill="context-fill" /> + <path d="m 46.5604,5.36771 0.8877,0.88763 C 47.6222,6.20033 47.8076,6.17067 48,6.17067 c 1.0107,0 1.8294,0.81867 1.8294,1.82933 0,0.1924 -0.0297,0.3779 -0.0847,0.552 l 0.8877,0.8877 C 50.8667,9.0122 51,8.5216 51,8 51,6.34399 49.656,5 48,5 47.4785,5 46.9878,5.13332 46.5604,5.36771 Z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 48,0.50133 c -1.0025,0 -1.9591,0.19675 -2.8333,0.55373 V 1.05319 C 42.4292,2.17055 40.5,4.85935 40.5,7.9987 c 0,2.0865 0.8519,3.9736 2.2272,5.3326 0.9889,0.9777 2.2486,1.6823 3.6568,1.9914 0.352,0.0773 0.7093,0.1306 1.0773,0.1546 v -5.4291 l 1.0774,1.0773 v 4.3518 c 0.368,-0.024 0.7253,-0.0773 1.0773,-0.1546 0.7997,-0.1756 1.5515,-0.4786 2.233,-0.8868 l 1.3048,1.3048 c 0.2597,0.2597 0.6808,0.2597 0.9405,0 0.2597,-0.2597 0.2597,-0.6808 0,-0.9405 L 45.5277,6.23361 c -0.2597,-0.2597 -0.6808,-0.2597 -0.9405,0 -0.2597,0.2597 -0.2597,0.68075 0,0.94045 L 45.0249,7.6118 C 45.0085,7.7389 45,7.8684 45,8 c 0,1.0613 0.552,1.9947 1.384,2.528 v 1.2164 c -1.4476,-0.6242 -2.4607,-2.0667 -2.4607,-3.7437 0,-2.25337 1.824,-4.07736 4.0774,-4.07736 0.0919,0 0.1832,0.00304 0.2736,0.00902 2.1252,0.1409 3.803,1.90649 3.803,4.06764 0,0.8206 -0.2425,1.585 -0.6598,2.2248 l 0.8434,0.8434 C 52.8837,10.2055 53.2507,9.1457 53.2507,8 53.2507,5.10133 50.8987,2.74933 48,2.74933 c -1.1451,0 -2.2049,0.36706 -3.0681,0.98988 C 43.6101,4.69295 42.75,6.24712 42.75,8.0007 c 0,2.3357 1.525,4.3143 3.634,4.9945 v 1.1221 C 45.9591,14.0058 45.5517,13.8511 45.1667,13.6584 44.5655,13.3575 44.0189,12.963 43.5459,12.4949 42.3887,11.3492 41.672,9.7592 41.672,8 c 0,-1.56821 0.5699,-3.00282 1.5139,-4.10813 L 43.1845,3.89053 c 0.2914,-0.34111 0.6184,-0.65087 0.9752,-0.9235 l 0.0014,0.00132 C 45.2256,2.15502 46.5562,1.67199 48,1.67199 c 3.496,0 6.328,2.83201 6.328,6.32801 0,1.4444 -0.4832,2.7747 -1.2965,3.8388 l 0.8337,0.8337 C 54.8876,11.3911 55.4987,9.7671 55.4987,8 55.4987,3.85865 52.1414,0.50133 48,0.50133 Z m 1.616,11.70147 v 1.9145 c 0.4831,-0.1268 0.9436,-0.3093 1.3742,-0.5402 l -0.8039,-0.804 c -0.1846,0.0845 -0.375,0.1586 -0.5703,0.2216 z" fill="context-fill" /> + <path d="m 48,8.21 c 0.116,0 0.21,-0.094 0.21,-0.21 0,-0.116 -0.094,-0.21 -0.21,-0.21 -0.116,0 -0.21,0.094 -0.21,0.21 0,0.116 0.094,0.21 0.21,0.21 z" fill="context-fill" /> + <path fill-rule="evenodd" d="M 67.9987,0.5 H 68 v 0.00133 c 4.1414,0 7.4987,3.35732 7.4987,7.49867 0,1.7671 -0.6111,3.3911 -1.6335,4.6725 L 73.0315,11.8388 C 73.8448,10.7747 74.328,9.4444 74.328,8 74.328,4.504 71.496,1.67199 68,1.67199 c -1.4438,0 -2.7744,0.48303 -3.8389,1.29636 L 64.1597,2.96703 c -1.5132,1.15605 -2.489,2.97944 -2.489,5.03167 0,2.204 1.125,4.1425 2.8316,5.2743 0.5689,0.3773 1.2024,0.665 1.8804,0.843 V 12.9947 C 64.2744,12.3141 62.75,10.3359 62.75,8.0007 62.75,6.24712 63.6107,4.69363 64.9326,3.73989 65.7957,3.11707 66.8549,2.74933 68,2.74933 c 2.8987,0 5.2507,2.352 5.2507,5.25067 0,1.1457 -0.367,2.2055 -0.9898,3.0682 L 71.4175,10.2248 C 71.8348,9.585 72.0773,8.8206 72.0773,8 c 0,-2.16115 -1.6778,-3.92736 -3.803,-4.06827 -0.0904,-0.00598 -0.1817,-0.00839 -0.2736,-0.00839 -2.2534,0 -4.0774,1.82399 -4.0774,4.07736 0,1.6765 1.0124,3.1186 2.4594,3.7431 v -1.2171 c -0.832,-0.5334 -1.384,-1.4667 -1.384,-2.528 0,-1.65603 1.344,-3.00003 3,-3.00003 H 68 V 5 c 1.656,0 3,1.34399 3,3 0,0.5216 -0.1333,1.0122 -0.3676,1.4397 L 69.7447,8.552 C 69.7997,8.3778 69.8294,8.1924 69.8294,8 69.8294,6.98934 69.0107,6.17067 68,6.17067 c -0.1924,0 -0.3778,0.02966 -0.5519,0.08467 L 67.4467,6.254 c -0.7407,0.23396 -1.2774,0.92639 -1.2774,1.7447 0,0.3258 0.0851,0.6317 0.2342,0.8966 -0.0799,-0.2328 -0.027,-0.501 0.1587,-0.6867 0.2597,-0.2597 0.6807,-0.2597 0.9404,0 l 6.5917,6.5916 c 0.2597,0.2597 0.2597,0.6808 0,0.9405 -0.2597,0.2597 -0.6808,0.2597 -0.9405,0 L 71.849,14.4359 c -0.6815,0.4082 -1.4333,0.7112 -2.233,0.8868 -0.352,0.0773 -0.7093,0.1306 -1.0773,0.1546 V 11.1255 L 67.46,10.0469 V 15.476 C 67.092,15.452 66.7347,15.3987 66.3827,15.3214 65.9631,15.2293 65.5567,15.1021 65.1667,14.943 62.4288,13.8261 60.5,11.1382 60.5,7.9987 60.5,4.89266 62.3885,2.22766 65.0799,1.08929 65.977,0.70983 66.9633,0.5 67.9987,0.5 Z m 1.6173,11.7028 v 1.9145 c 0.4831,-0.1268 0.9436,-0.3093 1.3742,-0.5402 l -0.804,-0.804 c -0.1845,0.0845 -0.3749,0.1586 -0.5702,0.2216 z" fill="context-fill" /> + <path d="m 68,8.42 c 0.2319,0 0.42,-0.188 0.42,-0.42 0,-0.232 -0.1881,-0.42 -0.42,-0.42 -0.232,0 -0.42,0.188 -0.42,0.42 0,0.232 0.188,0.42 0.42,0.42 z" fill="context-fill" /> + <path d="M 87.9987,0.5 H 88 v 0.00133 c 4.1414,0 7.4987,3.35732 7.4987,7.49867 0,1.7671 -0.6111,3.3911 -1.6335,4.6725 L 93.0315,11.8388 C 93.8448,10.7747 94.328,9.4444 94.328,8 94.328,4.504 91.496,1.67199 88,1.67199 c -1.4438,0 -2.7744,0.48303 -3.8389,1.29636 L 84.1597,2.96703 c -1.5132,1.15605 -2.489,2.97944 -2.489,5.03167 0,2.204 1.125,4.1425 2.8316,5.2743 0.5689,0.3773 1.2024,0.665 1.8804,0.843 V 12.9947 C 84.2744,12.3141 82.75,10.3359 82.75,8.0007 82.75,6.24712 83.6107,4.69363 84.9326,3.73989 85.7957,3.11707 86.8549,2.74933 88,2.74933 c 2.8987,0 5.2507,2.352 5.2507,5.25067 0,1.1457 -0.367,2.2055 -0.9898,3.0682 L 91.4175,10.2248 C 91.8348,9.585 92.0773,8.8206 92.0773,8 c 0,-2.16115 -1.6778,-3.92736 -3.803,-4.06827 -0.0904,-0.00598 -0.1817,-0.00839 -0.2736,-0.00839 -2.2534,0 -4.0774,1.82399 -4.0774,4.07736 0,1.6765 1.0124,3.1186 2.4594,3.7431 v -1.2171 c -0.832,-0.5334 -1.384,-1.4667 -1.384,-2.528 0,-1.65603 1.344,-3.00003 3,-3.00003 H 88 V 5 c 1.656,0 3,1.34399 3,3 0,0.5216 -0.1333,1.0122 -0.3676,1.4397 L 89.7447,8.552 C 89.7997,8.3778 89.8294,8.1924 89.8294,8 89.8294,6.98934 89.0107,6.17067 88,6.17067 c -0.1924,0 -0.3778,0.02966 -0.5519,0.08467 L 87.4467,6.254 c -0.7407,0.23396 -1.2774,0.92639 -1.2774,1.7447 0,0.824 0.544,1.52 1.2907,1.7493 v 5.728 C 87.092,15.452 86.7347,15.3987 86.3827,15.3214 85.9631,15.2293 85.5567,15.1021 85.1667,14.943 82.4288,13.8261 80.5,11.1382 80.5,7.9987 80.5,4.89266 82.3885,2.22766 85.0799,1.08929 85.977,0.70983 86.9633,0.5 87.9987,0.5 Z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 88.5387,11.1255 -0.7798,-0.7798 c -0.2597,-0.2597 -0.2597,-0.6807 0,-0.9404 0.2597,-0.2597 0.6807,-0.2597 0.9404,0 l 5.395,5.3949 c 0.2597,0.2597 0.2597,0.6808 0,0.9405 -0.2597,0.2597 -0.6808,0.2597 -0.9405,0 L 91.849,14.4359 c -0.6815,0.4082 -1.4333,0.7112 -2.233,0.8868 -0.352,0.0773 -0.7093,0.1306 -1.0773,0.1546 z m 1.0773,1.0774 v 1.9144 c 0.4831,-0.1268 0.9436,-0.3093 1.3742,-0.5402 l -0.804,-0.804 c -0.1845,0.0845 -0.3749,0.1586 -0.5702,0.2216 z" fill="context-fill" /> + <path d="m 88,8.63 c 0.3479,0 0.63,-0.2821 0.63,-0.63 0,-0.3479 -0.2821,-0.63 -0.63,-0.63 -0.3479,0 -0.63,0.2821 -0.63,0.63 0,0.3479 0.2821,0.63 0.63,0.63 z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 100.5,7.9987 c 0,-4.14137 3.357,-7.4987 7.499,-7.4987 2.061,0 3.927,0.83143 5.283,2.17715 1.369,1.35859 2.217,3.24172 2.217,5.32285 0,1.7671 -0.611,3.3911 -1.634,4.6725 l -0.834,-0.8337 c 0.413,-0.5403 0.741,-1.1493 0.964,-1.807 h -0.002 c 0.216,-0.6379 0.334,-1.3217 0.334,-2.0331 0,-1.75964 -0.718,-3.35103 -1.876,-4.49778 -1.143,-1.13084 -2.715,-1.82893 -4.451,-1.82893 -1.444,0 -2.774,0.48303 -3.839,1.29636 L 104.16,2.96702 c -1.513,1.15606 -2.489,2.97945 -2.489,5.03168 0,2.9387 2,5.4053 4.712,6.1173 v -1.1213 c -2.109,-0.6806 -3.633,-2.6588 -3.633,-4.994 0,-1.75358 0.861,-3.30707 2.183,-4.26081 0.863,-0.62282 1.922,-0.99056 3.067,-0.99056 2.899,0 5.251,2.352 5.251,5.25067 0,1.1457 -0.367,2.2055 -0.99,3.0682 l -0.844,-0.8434 c 0.418,-0.6398 0.66,-1.4042 0.66,-2.2248 0,-2.16115 -1.678,-3.92736 -3.803,-4.06827 -0.09,-0.00598 -0.181,-0.00839 -0.273,-0.00839 -2.254,0 -4.078,1.82399 -4.078,4.07736 0,1.6765 1.013,3.1186 2.46,3.7431 v -1.2171 c -0.832,-0.5334 -1.384,-1.4667 -1.384,-2.528 0,-1.65603 1.344,-3.00003 3,-3.00003 1.656,0 3,1.344 3,3.00003 0,1.0081 -0.498,1.9008 -1.261,2.4449 l 0.001,0.0013 c -0.04,0.0287 -0.081,0.0564 -0.123,0.0831 v 0.1942 c 0.206,-0.036 0.426,0.0257 0.585,0.1848 l 3.893,3.8932 c 0.26,0.2597 0.26,0.6808 0,0.9405 -0.259,0.2597 -0.68,0.2597 -0.94,0 l -1.305,-1.3048 c -0.682,0.4082 -1.433,0.7112 -2.233,0.8868 -0.352,0.0773 -0.709,0.1306 -1.077,0.1546 v -0.0014 l -0.002,1e-4 V 9.748 c 0.747,-0.2293 1.291,-0.9253 1.291,-1.7493 0,-1.01069 -0.819,-1.82936 -1.829,-1.82936 -1.011,0 -1.83,0.81867 -1.83,1.82936 0,0.824 0.544,1.52 1.291,1.7493 v 5.728 c -0.368,-0.024 -0.725,-0.0773 -1.077,-0.1546 -3.366,-0.7387 -5.883,-3.736 -5.883,-7.3227 z m 9.116,6.1169 v -1.9127 0.7918 c 0.195,-0.063 0.386,-0.1371 0.57,-0.2216 l 0.804,0.804 c -0.179,0.0963 -0.364,0.1842 -0.554,0.2631 v -0.0019 c -0.265,0.1104 -0.538,0.2033 -0.82,0.2773 z" fill="context-fill" /> + <path d="m 108,8.84 c 0.464,0 0.84,-0.3761 0.84,-0.84 0,-0.4639 -0.376,-0.84 -0.84,-0.84 -0.464,0 -0.84,0.3761 -0.84,0.84 0,0.4639 0.376,0.84 0.84,0.84 z" fill="context-fill" /> + <path d="m 127.999,0.5 c -4.142,0 -7.499,3.35733 -7.499,7.4987 0,3.5867 2.517,6.584 5.883,7.3227 0.352,0.0773 0.709,0.1306 1.077,0.1546 V 9.748 c -0.747,-0.2293 -1.291,-0.9253 -1.291,-1.7493 0,-1.01069 0.819,-1.82936 1.83,-1.82936 1.01,0 1.829,0.81867 1.829,1.82936 0,0.824 -0.544,1.52 -1.291,1.7493 v 5.728 l 0.002,-1e-4 v 0.0014 c 0.368,-0.024 0.725,-0.0773 1.077,-0.1546 0.8,-0.1756 1.551,-0.4786 2.233,-0.8868 l 1.305,1.3048 c 0.26,0.2597 0.681,0.2597 0.94,0 0.26,-0.2597 0.26,-0.6808 0,-0.9405 l -2.132,-2.1327 c -0.26,-0.2597 -0.681,-0.2597 -0.941,0 -0.249,0.2494 -0.259,0.6477 -0.03,0.9089 -0.18,0.0966 -0.365,0.1847 -0.555,0.2638 v -0.0019 c -0.265,0.1104 -0.538,0.2033 -0.82,0.2773 V 10.528 c 0.042,-0.0267 0.083,-0.0544 0.123,-0.0831 l -0.001,-0.0013 c 0.763,-0.5441 1.261,-1.4368 1.261,-2.4449 0,-1.65603 -1.344,-3.00003 -3,-3.00003 -1.656,0 -3,1.344 -3,3.00003 0,1.0613 0.552,1.9946 1.384,2.528 v 1.2171 c -1.447,-0.6245 -2.46,-2.0666 -2.46,-3.7431 0,-2.25337 1.824,-4.07736 4.078,-4.07736 2.253,0 4.077,1.82399 4.077,4.07736 0,1.3054 -0.614,2.4688 -1.569,3.2146 -0.272,0.2125 -0.572,0.3904 -0.893,0.5287 v 1.2507 c 0,-10e-5 0,10e-5 0,0 2.109,-0.68 3.635,-2.658 3.635,-4.994 0,-2.8987 -2.352,-5.2507 -5.25,-5.2507 -2.899,0 -5.251,2.35201 -5.251,5.2507 0,2.3352 1.524,4.3134 3.633,4.994 v 1.1213 c -2.712,-0.712 -4.712,-3.1786 -4.712,-6.1173 0,-2.05223 0.976,-3.87562 2.489,-5.03168 l 0.001,0.00133 c 1.065,-0.81333 2.395,-1.29636 3.839,-1.29636 1.736,0 3.308,0.69809 4.451,1.82893 1.158,1.14675 1.876,2.73814 1.876,4.49778 0,0.7114 -0.118,1.3952 -0.334,2.0331 h 0.002 c -0.223,0.6577 -0.551,1.2667 -0.964,1.807 l 0.834,0.8337 c 1.023,-1.2814 1.634,-2.9054 1.634,-4.6725 0,-2.08113 -0.848,-3.96426 -2.217,-5.32285 C 131.926,1.33143 130.06,0.5 127.999,0.5 Z" fill="context-fill" /> + <path d="m 128,8.84 c 0.464,0 0.84,-0.3761 0.84,-0.84 0,-0.4639 -0.376,-0.84 -0.84,-0.84 -0.464,0 -0.84,0.3761 -0.84,0.84 0,0.4639 0.376,0.84 0.84,0.84 z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 152.493,14.139 c 0.259,-0.2597 0.68,-0.2597 0.94,0 l 0.661,0.6612 c 0.26,0.2597 0.26,0.6808 0,0.9405 -0.259,0.2597 -0.68,0.2597 -0.94,0 l -0.661,-0.6612 c -0.26,-0.2597 -0.26,-0.6808 0,-0.9405 z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 140.5,7.9987 c 0,-4.14137 3.357,-7.4987 7.499,-7.4987 4.141,0 7.498,3.35733 7.498,7.4987 0,3.5867 -2.517,6.584 -5.882,7.3227 -0.352,0.0773 -0.71,0.1306 -1.078,0.1546 V 9.748 c 0.747,-0.2293 1.291,-0.9253 1.291,-1.7493 0,-1.01069 -0.819,-1.82936 -1.829,-1.82936 -1.011,0 -1.83,0.81867 -1.83,1.82936 0,0.824 0.544,1.52 1.291,1.7493 v 5.728 c -0.368,-0.024 -0.725,-0.0773 -1.077,-0.1546 -3.366,-0.7387 -5.883,-3.736 -5.883,-7.3227 z m 9.115,2.528 v 3.5893 c 2.712,-0.712 4.712,-3.1786 4.712,-6.1173 0,-3.49602 -2.832,-6.32802 -6.328,-6.32802 -3.496,0 -6.328,2.83199 -6.328,6.32802 0,2.9387 2,5.4053 4.712,6.1173 v -1.1213 c -2.109,-0.6806 -3.633,-2.6588 -3.633,-4.994 0,-2.89869 2.352,-5.2507 5.251,-5.2507 2.898,0 5.25,2.352 5.25,5.2507 0,2.336 -1.525,4.3147 -3.634,4.9947 v -1.2507 c 1.448,-0.624 2.461,-2.0667 2.461,-3.744 0,-2.25337 -1.824,-4.07736 -4.077,-4.07736 -2.254,0 -4.078,1.82399 -4.078,4.07736 0,1.6765 1.013,3.1186 2.46,3.7431 v -1.2171 c -0.832,-0.5334 -1.384,-1.4667 -1.384,-2.528 0,-1.65603 1.344,-3.00003 3,-3.00003 1.656,0 3,1.344 3,3.00003 0,1.0613 -0.552,1.9946 -1.384,2.528 z" fill="context-fill" /> + <path d="m 148,8.84 c 0.464,0 0.84,-0.3761 0.84,-0.84 0,-0.4639 -0.376,-0.84 -0.84,-0.84 -0.464,0 -0.84,0.3761 -0.84,0.84 0,0.4639 0.376,0.84 0.84,0.84 z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 168.001,2.75 c -2.899,0 -5.251,2.35201 -5.251,5.2507 0,2.336 1.525,4.3147 3.635,4.9947 v -1.2507 c -1.448,-0.624 -2.462,-2.0667 -2.462,-3.744 0,-2.25337 1.824,-4.07736 4.078,-4.07736 2.253,0 4.077,1.82399 4.077,4.07736 0,1.6773 -1.013,3.12 -2.461,3.744 v 1.2507 c 2.109,-0.68 3.634,-2.6587 3.634,-4.9947 0,-2.8987 -2.352,-5.2507 -5.25,-5.2507 z" fill="context-fill" /> + <path fill-rule="evenodd" d="m 167.999,0.5 c -4.142,0 -7.499,3.35733 -7.499,7.4987 0,3.5867 2.517,6.584 5.883,7.3227 0.352,0.0773 0.709,0.1306 1.077,0.1546 V 9.748 c -0.747,-0.2293 -1.291,-0.9253 -1.291,-1.7493 0,-1.01069 0.819,-1.82936 1.83,-1.82936 1.01,0 1.829,0.81867 1.829,1.82936 0,0.824 -0.544,1.52 -1.291,1.7493 v 5.728 c 0.368,-0.024 0.726,-0.0773 1.078,-0.1546 3.365,-0.7387 5.882,-3.736 5.882,-7.3227 0,-4.14137 -3.357,-7.4987 -7.498,-7.4987 z m 1.616,13.616 v -3.5893 c 0.832,-0.5334 1.384,-1.4667 1.384,-2.528 0,-1.65603 -1.344,-3.00003 -3,-3.00003 -1.656,0 -3,1.344 -3,3.00003 0,1.0613 0.552,1.9946 1.384,2.528 v 3.5893 c -2.712,-0.712 -4.712,-3.1786 -4.712,-6.1173 0,-3.49603 2.832,-6.32802 6.328,-6.32802 3.496,0 6.328,2.832 6.328,6.32802 0,2.9387 -2,5.4053 -4.712,6.1173 z" fill="context-fill" /> + <path d="m 168,8.84 c 0.464,0 0.84,-0.3761 0.84,-0.84 0,-0.4639 -0.376,-0.84 -0.84,-0.84 -0.464,0 -0.84,0.3761 -0.84,0.84 0,0.4639 0.376,0.84 0.84,0.84 z" fill="context-fill" /> +</svg> ===================================== browser/components/torconnect/content/torConnectTitlebarStatus.css ===================================== @@ -15,10 +15,32 @@ fill: currentColor; width: 16px; height: 16px; + object-fit: none; + --num-animation-steps: 8; + /* First frame has no offset. */ + --tor-not-connected-offset: 0; + /* Each frame/step is offset by 20px from the previous. */ + --tor-connected-offset: calc(-20px * var(--num-animation-steps)); + object-position: var(--tor-not-connected-offset); +} + +#tor-connect-titlebar-status-icon.tor-connect-status-potentially-blocked:not( + .tor-connect-status-connected +) { + fill: #c50042; +} + +@media (prefers-color-scheme: dark) { + #tor-connect-titlebar-status-icon.tor-connect-status-potentially-blocked:not( + .tor-connect-status-connected + ){ + fill: #ff9aa2; + } } #tor-connect-titlebar-status-icon.tor-connect-status-connected { fill: var(--purple-60); + object-position: var(--tor-connected-offset); } @media (prefers-color-scheme: dark) { @@ -27,12 +49,24 @@ } } -#tor-connect-titlebar-status-icon.tor-connect-status-potentially-blocked { - fill: #c50042; +@keyframes onion-not-connected-to-connected { + from { + object-position: var(--tor-not-connected-offset); + } + + to { + object-position: var(--tor-connected-offset); + } } -@media (prefers-color-scheme: dark) { - #tor-connect-titlebar-status-icon.tor-connect-status-potentially-blocked { - fill: #ff9aa2; +@media (prefers-reduced-motion: no-preference) { + #tor-connect-titlebar-status-icon.tor-connect-status-connected { + transition: fill 1000ms; + animation-name: onion-not-connected-to-connected; + animation-delay: 200ms; + animation-fill-mode: both; + /* Run animation at 60 frames-per-second. */ + animation-duration: calc(var(--num-animation-steps) * 1000ms / 60); + animation-timing-function: steps(var(--num-animation-steps)); } } ===================================== browser/components/torconnect/content/torConnectTitlebarStatus.js ===================================== @@ -91,12 +91,6 @@ var gTorConnectTitlebarStatus = { break; } this.label.textContent = this._strings[textId]; - this.icon.setAttribute( - "src", - connected - ? "chrome://browser/content/torconnect/tor-connect.svg" - : "chrome://browser/content/torconnect/tor-connect-broken.svg" - ); this.icon.classList.toggle("tor-connect-status-connected", connected); this.icon.classList.toggle( "tor-connect-status-potentially-blocked", ===================================== browser/components/torconnect/jar.mn ===================================== @@ -1,13 +1,14 @@ browser.jar: - content/browser/torconnect/torConnectUrlbarButton.js (content/torConnectUrlbarButton.js) - content/browser/torconnect/torConnectTitlebarStatus.js (content/torConnectTitlebarStatus.js) - content/browser/torconnect/torConnectTitlebarStatus.css (content/torConnectTitlebarStatus.css) - content/browser/torconnect/aboutTorConnect.css (content/aboutTorConnect.css) -* content/browser/torconnect/aboutTorConnect.xhtml (content/aboutTorConnect.xhtml) - content/browser/torconnect/aboutTorConnect.js (content/aboutTorConnect.js) - content/browser/torconnect/arrow-right.svg (content/arrow-right.svg) - content/browser/torconnect/bridge.svg (content/bridge.svg) - content/browser/torconnect/connection-failure.svg (content/connection-failure.svg) - content/browser/torconnect/connection-location.svg (content/connection-location.svg) - content/browser/torconnect/tor-connect.svg (content/tor-connect.svg) - content/browser/torconnect/tor-connect-broken.svg (content/tor-connect-broken.svg) + content/browser/torconnect/torConnectUrlbarButton.js (content/torConnectUrlbarButton.js) + content/browser/torconnect/torConnectTitlebarStatus.js (content/torConnectTitlebarStatus.js) + content/browser/torconnect/torConnectTitlebarStatus.css (content/torConnectTitlebarStatus.css) + content/browser/torconnect/aboutTorConnect.css (content/aboutTorConnect.css) +* content/browser/torconnect/aboutTorConnect.xhtml (content/aboutTorConnect.xhtml) + content/browser/torconnect/aboutTorConnect.js (content/aboutTorConnect.js) + content/browser/torconnect/arrow-right.svg (content/arrow-right.svg) + content/browser/torconnect/bridge.svg (content/bridge.svg) + content/browser/torconnect/connection-failure.svg (content/connection-failure.svg) + content/browser/torconnect/connection-location.svg (content/connection-location.svg) + content/browser/torconnect/tor-connect.svg (content/tor-connect.svg) + content/browser/torconnect/tor-not-connected-to-connected-animated.svg (content/tor-not-connected-to-connected-animated.svg) + content/browser/torconnect/tor-connect-broken.svg (content/tor-connect-broken.svg) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/01f3492… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/01f3492… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] 2 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by richard (@richard) 07 Jun '23

07 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 66f647aa by Henry Wilkes at 2023-06-07T19:02:40+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41618 - Remove connect bar, and swap internet and connection icons in tor connection preferences. - - - - - 02ddc74a by Henry Wilkes at 2023-06-07T19:02:40+00:00 fixup! Add TorStrings module for localization Bug 41618 - Remove connect bar, and swap internet and connection icons in tor connection preferences. - - - - - 9 changed files: - − browser/components/torpreferences/content/check.svg - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml - + browser/components/torpreferences/content/network-broken.svg - browser/components/torpreferences/content/network.svg - browser/components/torpreferences/content/torPreferences.css - browser/components/torpreferences/jar.mn - browser/modules/TorStrings.jsm - toolkit/torbutton/chrome/locale/en-US/torConnect.properties Changes: ===================================== browser/components/torpreferences/content/check.svg deleted ===================================== @@ -1,3 +0,0 @@ -<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M6.02301 13L1.18301 8.16099C1.07063 8.04262 1.00892 7.88505 1.01104 7.72185C1.01316 7.55865 1.07893 7.40273 1.19434 7.28732C1.30975 7.17191 1.46567 7.10613 1.62887 7.10402C1.79207 7.1019 1.94964 7.16361 2.06801 7.27599L6.37501 11.584L13.934 4.02299C14.0517 3.90617 14.2107 3.84061 14.3765 3.84061C14.5423 3.84061 14.7014 3.90617 14.819 4.02299C14.9358 4.14063 15.0014 4.29969 15.0014 4.46549C15.0014 4.63128 14.9358 4.79034 14.819 4.90799L6.72901 12.998L6.02301 13Z" fill="context-fill"/> -</svg> ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -80,25 +80,11 @@ const gConnectionPane = (function() { category: { title: "label#torPreferences-labelCategory", }, - messageBox: { - box: "div#torPreferences-connectMessageBox", - message: "td#torPreferences-connectMessageBox-message", - button: "button#torPreferences-connectMessageBox-button", - }, torPreferences: { header: "h1#torPreferences-header", description: "span#torPreferences-description", learnMore: "label#torPreferences-learnMore", }, - status: { - internetLabel: "#torPreferences-status-internet-label", - internetTest: "#torPreferences-status-internet-test", - internetIcon: "#torPreferences-status-internet-statusIcon", - internetStatus: "#torPreferences-status-internet-status", - torLabel: "#torPreferences-status-tor-label", - torIcon: "#torPreferences-status-tor-statusIcon", - torStatus: "#torPreferences-status-tor-status", - }, quickstart: { header: "h2#torPreferences-quickstart-header", description: "span#torPreferences-quickstart-description", @@ -183,47 +169,6 @@ const gConnectionPane = (function() { const prefpane = document.getElementById("mainPrefPane"); - // 'Connect to Tor' Message Bar - - const messageBox = prefpane.querySelector(selectors.messageBox.box); - const messageBoxMessage = prefpane.querySelector( - selectors.messageBox.message - ); - const messageBoxButton = prefpane.querySelector( - selectors.messageBox.button - ); - // wire up connect button - messageBoxButton.addEventListener("click", () => { - TorConnect.openTorConnect({ beginBootstrap: true }); - }); - - this._populateMessagebox = () => { - if (TorConnect.canBeginBootstrap) { - // set messagebox style and text - if (TorConnect.hasEverFailed) { - messageBox.parentNode.style.display = null; - messageBox.className = "error"; - messageBoxMessage.innerText = TorStrings.torConnect.tryAgainMessage; - messageBoxButton.innerText = TorStrings.torConnect.tryAgain; - } else { - messageBox.parentNode.style.display = null; - messageBox.className = "warning"; - messageBoxMessage.innerText = TorStrings.torConnect.connectMessage; - messageBoxButton.innerText = TorStrings.torConnect.torConnectButton; - } - } else { - // we need to explicitly hide the groupbox, as switching between - // the tor pane and other panes will 'unhide' (via the 'hidden' - // attribute) the groupbox, offsetting all of the content down - // by the groupbox's margin (even if content is 0 height) - messageBox.parentNode.style.display = "none"; - messageBox.className = "hidden"; - messageBoxMessage.innerText = ""; - messageBoxButton.innerText = ""; - } - }; - this._populateMessagebox(); - // Heading prefpane.querySelector(selectors.torPreferences.header).innerText = TorStrings.settings.categoryTitle; @@ -244,12 +189,16 @@ const gConnectionPane = (function() { } // Internet and Tor status - prefpane.querySelector(selectors.status.internetLabel).textContent = + const internetStatus = document.getElementById( + "torPreferences-status-internet" + ); + internetStatus.querySelector(".torPreferences-status-name").textContent = TorStrings.settings.statusInternetLabel; - prefpane.querySelector(selectors.status.torLabel).textContent = - TorStrings.settings.statusTorLabel; - const internetTest = prefpane.querySelector( - selectors.status.internetTest + const internetResult = internetStatus.querySelector( + ".torPreferences-status-result" + ); + const internetTest = document.getElementById( + "torPreferences-status-internet-test" ); internetTest.setAttribute( "label", @@ -258,42 +207,65 @@ const gConnectionPane = (function() { internetTest.addEventListener("command", () => { this.onInternetTest(); }); - const internetIcon = prefpane.querySelector( - selectors.status.internetIcon + + const torConnectStatus = document.getElementById( + "torPreferences-status-tor-connect" + ); + torConnectStatus.querySelector( + ".torPreferences-status-name" + ).textContent = TorStrings.settings.statusTorLabel; + const torConnectResult = torConnectStatus.querySelector( + ".torPreferences-status-result" ); - const internetStatus = prefpane.querySelector( - selectors.status.internetStatus + const torConnectButton = document.getElementById( + "torPreferences-status-tor-connect-button" ); - const torIcon = prefpane.querySelector(selectors.status.torIcon); - const torStatus = prefpane.querySelector(selectors.status.torStatus); + torConnectButton.setAttribute( + "label", + TorStrings.torConnect.torConnectButton + ); + torConnectButton.addEventListener("command", () => { + TorConnect.openTorConnect({ beginBootstrap: true }); + }); + this._populateStatus = () => { switch (this._internetStatus) { - case InternetStatus.Unknown: - internetTest.removeAttribute("hidden"); - break; case InternetStatus.Online: - internetTest.setAttribute("hidden", "true"); - internetIcon.className = "online"; - internetStatus.textContent = + internetStatus.classList.remove("offline"); + internetResult.textContent = TorStrings.settings.statusInternetOnline; + internetResult.hidden = false; break; case InternetStatus.Offline: - internetTest.setAttribute("hidden", "true"); - internetIcon.className = "offline"; - internetStatus.textContent = + internetStatus.classList.add("offline"); + internetResult.textContent = TorStrings.settings.statusInternetOffline; + internetResult.hidden = false; + break; + case InternetStatus.Unknown: + default: + internetStatus.classList.remove("offline"); + internetResult.hidden = true; break; } // FIXME: What about the TorConnectState.Disabled state? if (TorConnect.state === TorConnectState.Bootstrapped) { - torIcon.className = "connected"; - torStatus.textContent = TorStrings.settings.statusTorConnected; - } else if (TorConnect.potentiallyBlocked) { - torIcon.className = "blocked"; - torStatus.textContent = TorStrings.settings.statusTorBlocked; + torConnectStatus.classList.add("connected"); + torConnectStatus.classList.remove("blocked"); + torConnectResult.textContent = TorStrings.settings.statusTorConnected; + // NOTE: If the button is focused when we hide it, the focus may be + // lost. But we don't have an obvious place to put the focus instead. + torConnectButton.hidden = true; } else { - torIcon.className = ""; - torStatus.textContent = TorStrings.settings.statusTorNotConnected; + torConnectStatus.classList.remove("connected"); + torConnectStatus.classList.toggle( + "blocked", + TorConnect.potentiallyBlocked + ); + torConnectResult.textContent = TorConnect.potentiallyBlocked + ? TorStrings.settings.statusTorBlocked + : TorStrings.settings.statusTorNotConnected; + torConnectButton.hidden = false; } }; this._populateStatus(); @@ -1046,7 +1018,6 @@ const gConnectionPane = (function() { }, onStateChange() { - this._populateMessagebox(); this._populateStatus(); this._showAutoconfiguration(); this._populateBridgeCards(); ===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -4,28 +4,6 @@ src="chrome://browser/content/torpreferences/connectionPane.js"/> <html:template id="template-paneConnection"> -<!-- Tor Connect Message Box --> -<groupbox data-category="paneConnection" hidden="true"> - <html:div id="torPreferences-connectMessageBox" - class="subcategory" - data-category="paneConnection" - hidden="true"> - <html:table> - <html:tr> - <html:td> - <html:div id="torPreferences-connectMessageBox-icon"/> - </html:td> - <html:td id="torPreferences-connectMessageBox-message"> - </html:td> - <html:td> - <html:button id="torPreferences-connectMessageBox-button"> - </html:button> - </html:td> - </html:tr> - </html:table> - </html:div> -</groupbox> - <hbox id="torPreferencesCategory" class="subcategory" data-category="paneConnection" @@ -45,15 +23,20 @@ data-category="paneConnection" hidden="true"> <hbox id="torPreferences-status-box"> - <image id="torPreferences-status-internet-icon"/> - <html:span id="torPreferences-status-internet-label"/> - <button id="torPreferences-status-internet-test"/> - <image id="torPreferences-status-internet-statusIcon"/> - <html:span id="torPreferences-status-internet-status"/> - <image id="torPreferences-status-tor-icon"/> - <html:span id="torPreferences-status-tor-label"/> - <image id="torPreferences-status-tor-statusIcon"/> - <html:span id="torPreferences-status-tor-status"/> + <hbox id="torPreferences-status-internet" + class="torPreferences-status-grouping"> + <image class="torPreferences-status-icon"/> + <html:span class="torPreferences-status-name"></html:span> + <html:span class="torPreferences-status-result"></html:span> + <button id="torPreferences-status-internet-test"/> + </hbox> + <hbox id="torPreferences-status-tor-connect" + class="torPreferences-status-grouping"> + <image class="torPreferences-status-icon"/> + <html:span class="torPreferences-status-name"></html:span> + <html:span class="torPreferences-status-result"></html:span> + <button id="torPreferences-status-tor-connect-button"/> + </hbox> </hbox> </groupbox> ===================================== browser/components/torpreferences/content/network-broken.svg ===================================== @@ -0,0 +1,5 @@ +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect width="18.6565" height="1.22295" rx="0.611475" transform="matrix(-0.707107 -0.707107 -0.707107 0.707107 14.9464 14.1921)" fill="context-fill"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M3.9498 1.68761C5.14904 0.918177 6.55296 0.5 8 0.5C9.98912 0.5 11.8968 1.29018 13.3033 2.6967C14.7098 4.10322 15.5 6.01088 15.5 8C15.5 9.44704 15.0818 10.851 14.3124 12.0502L13.3945 11.1323C13.8373 10.3656 14.1137 9.51118 14.202 8.625H11.973C11.9515 8.95148 11.9131 9.27556 11.8582 9.596L9.63719 7.375H10.719C10.573 5.44665 9.75105 3.63171 8.398 2.25H7.602C7.08087 2.78217 6.63852 3.37861 6.28323 4.02104L5.37173 3.10954C5.55124 2.81339 5.74752 2.52639 5.96 2.25H5.552C5.31395 2.35224 5.08325 2.46884 4.86107 2.59888L3.9498 1.68761ZM13.0242 4.30006C12.3637 3.39877 11.4738 2.69088 10.447 2.25H10.04C11.1778 3.72922 11.8509 5.51288 11.974 7.375H14.203C14.0918 6.26313 13.6848 5.20135 13.0242 4.30006Z" fill="context-fill"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M3.08673 2.33343C2.9529 2.44948 2.82278 2.57061 2.6967 2.6967C1.29018 4.10322 0.5 6.01088 0.5 8C0.5 9.98912 1.29018 11.8968 2.6967 13.3033C4.10322 14.7098 6.01088 15.5 8 15.5C9.98912 15.5 11.8968 14.7098 13.3033 13.3033C13.4294 13.1772 13.5505 13.0471 13.6666 12.9133L12.7733 12.02C12.1456 12.7694 11.3496 13.3627 10.448 13.75H10.039C10.7209 12.8639 11.2359 11.8685 11.5656 10.8123L10.5448 9.79147C10.2135 11.2778 9.47326 12.6509 8.397 13.75H7.602C6.24895 12.3683 5.427 10.5534 5.281 8.625H9.37831L8.12831 7.375H5.281C5.34173 6.57283 5.51944 5.79028 5.80369 5.05038L4.8504 4.09709C4.38292 5.12591 4.10162 6.23576 4.026 7.375H1.797C1.90802 6.2632 2.31487 5.20145 2.97523 4.30016C3.26721 3.90165 3.60404 3.54094 3.97771 3.22441L3.08673 2.33343ZM2.97497 11.7C3.63536 12.6014 4.52524 13.3092 5.552 13.75H5.96C4.82222 12.2708 4.14912 10.4871 4.026 8.625H1.797C1.90781 9.73686 2.31458 10.7987 2.97497 11.7Z" fill="context-fill"/> +</svg> ===================================== browser/components/torpreferences/content/network.svg ===================================== @@ -1,6 +1,3 @@ -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity"> - <path d="M8.5 1a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15zm2.447 1.75a6.255 6.255 0 0 1 3.756 5.125l-2.229 0A9.426 9.426 0 0 0 10.54 2.75l.407 0zm-2.049 0a8.211 8.211 0 0 1 2.321 5.125l-5.438 0A8.211 8.211 0 0 1 8.102 2.75l.796 0zm-2.846 0 .408 0a9.434 9.434 0 0 0-1.934 5.125l-2.229 0A6.254 6.254 0 0 1 6.052 2.75zm0 11.5a6.252 6.252 0 0 1-3.755-5.125l2.229 0A9.426 9.426 0 0 0 6.46 14.25l-.408 0zm2.05 0a8.211 8.211 0 0 1-2.321-5.125l5.437 0a8.211 8.211 0 0 1-2.321 5.125l-.795 0zm2.846 0-.409 0a9.418 9.418 0 0 0 1.934-5.125l2.229 0a6.253 6.253 0 0 1-3.754 5.125z"/> +<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg"> + <path d="m 8,0.5 a 7.5,7.5 0 1 0 0,15 7.5,7.5 0 0 0 0,-15 z m 2.447,1.75 a 6.255,6.255 0 0 1 3.756,5.125 H 11.974 A 9.426,9.426 0 0 0 10.04,2.25 Z m -2.049,0 a 8.211,8.211 0 0 1 2.321,5.125 H 5.281 A 8.211,8.211 0 0 1 7.602,2.25 Z m -2.846,0 H 5.96 A 9.434,9.434 0 0 0 4.026,7.375 H 1.797 A 6.254,6.254 0 0 1 5.552,2.25 Z m 0,11.5 A 6.252,6.252 0 0 1 1.797,8.625 H 4.026 A 9.426,9.426 0 0 0 5.96,13.75 Z m 2.05,0 A 8.211,8.211 0 0 1 5.281,8.625 h 5.437 A 8.211,8.211 0 0 1 8.397,13.75 Z m 2.846,0 h -0.409 a 9.418,9.418 0 0 0 1.934,-5.125 h 2.229 a 6.253,6.253 0 0 1 -3.754,5.125 z" fill="context-fill" /> </svg> ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -10,120 +10,25 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { scale: -1; } -/* Connect Message Box */ - -#torPreferences-connectMessageBox { - display: block; - position: relative; - - width: auto; - min-height: 32px; - border-radius: 4px; - padding: 8px; -} - -#torPreferences-connectMessageBox.hidden { - display: none; -} - -#torPreferences-connectMessageBox.error { - background-color: var(--purple-50); - color: white; -} - -#torPreferences-connectMessageBox.warning { - background-color: var(--purple-50); - color: white; -} - -#torPreferences-connectMessageBox table { - border-collapse: collapse; -} - -#torPreferences-connectMessageBox td { - vertical-align: middle; -} - -#torPreferences-connectMessageBox td:first-child { - width: 16px; -} - -#torPreferences-connectMessageBox-icon { - width: 16px; - height: 16px; - - mask-repeat: no-repeat !important; - mask-size: 16px !important; -} - -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-icon -{ - mask: url("chrome://browser/content/torconnect/tor-connect-broken.svg"); - background-color: white; -} - -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-icon -{ - mask: url("chrome://browser/skin/onion.svg"); - background-color: white; -} +/* Status */ -#torPreferences-connectMessageBox-message { - line-height: 16px; - padding-inline-start: 8px; +#torPreferences-status-box { + display: flex; + align-items: center; + gap: 32px; } -#torPreferences-connectMessageBox-button { - display: block; - width: auto; - - border-radius: 4px; - border: 0; - - padding-inline: 18px; - padding-block: 8px; - margin-block: 0px; - margin-inline-start: 8px; - margin-inline-end: 0px; - - font-size: 1.0em; - font-weight: 600; +.torPreferences-status-grouping { + display: flex; + align-items: center; white-space: nowrap; - - color: white; -} - -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button { - background-color: var(--purple-70); -} - -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button:hover { - background-color: var(--purple-80); -} - -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button:active { - background-color: var(--purple-90); -} - -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button { - background-color: var(--purple-70); -} - -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button:hover { - background-color: var(--purple-80); } -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button:active { - background-color: var(--purple-90); -} - -/* Status */ -#torPreferences-status-box { - display: flex; - align-items: center; +.torPreferences-status-grouping > * { + flex: 0 0 auto; } -#torPreferences-status-internet-icon, #torPreferences-status-tor-icon { +.torPreferences-status-icon { width: 18px; height: 18px; margin-inline-end: 8px; @@ -131,51 +36,47 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { fill: var(--in-content-text-color); } -#torPreferences-status-internet-icon { +#torPreferences-status-internet .torPreferences-status-icon { list-style-image: url("chrome://browser/content/torpreferences/network.svg"); } -#torPreferences-status-tor-icon { - list-style-image: url("chrome://browser/skin/onion.svg"); +#torPreferences-status-tor-connect .torPreferences-status-icon { + list-style-image: url("chrome://browser/content/torconnect/tor-connect-broken.svg"); } -#torPreferences-status-internet-label, #torPreferences-status-tor-label { +.torPreferences-status-name { font-weight: bold; + margin-inline-end: 0.75em; } -#torPreferences-status-internet-status { - margin-inline-end: 32px; -} - -#torPreferences-status-internet-statusIcon.online, -#torPreferences-status-internet-statusIcon.offline, -#torPreferences-status-tor-statusIcon { - margin-inline-start: 12px; - margin-inline-end: 9px; +.torPreferences-status-result { + margin-inline-end: 8px; } -#torPreferences-status-internet-statusIcon, #torPreferences-status-tor-statusIcon { - -moz-context-properties: fill; +#torPreferences-status-internet.offline .torPreferences-status-icon { + list-style-image: url("chrome://browser/content/torpreferences/network-broken.svg"); } -#torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected { - list-style-image: url("chrome://browser/content/torpreferences/check.svg"); +#torPreferences-status-tor-connect.connected .torPreferences-status-icon { + list-style-image: url("chrome://browser/content/torconnect/tor-connect.svg"); fill: var(--purple-60); } @media (prefers-color-scheme: dark) { - #torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected { + #torPreferences-status-tor-connect.connected .torPreferences-status-icon { fill: var(--purple-30); } } -#torPreferences-status-internet-statusIcon.offline, #torPreferences-status-tor-statusIcon:not(.connected) { - list-style-image: url("chrome://global/skin/icons/warning.svg"); - fill: var(--warning-color); +#torPreferences-status-tor-connect.blocked .torPreferences-status-icon { + /* Same as .tor-connect-status-potentially-blocked. */ + fill: #c50042; } -#torPreferences-status-tor-statusIcon.blocked { - fill: var(--in-content-danger-button-background); +@media (prefers-color-scheme: dark) { + #torPreferences-status-tor-connect.blocked .torPreferences-status-icon { + fill: #ff9aa2; + } } /* Bridge settings */ ===================================== browser/components/torpreferences/jar.mn ===================================== @@ -3,10 +3,10 @@ browser.jar: content/browser/torpreferences/bridgeQrDialog.jsm (content/bridgeQrDialog.jsm) content/browser/torpreferences/builtinBridgeDialog.xhtml (content/builtinBridgeDialog.xhtml) content/browser/torpreferences/builtinBridgeDialog.jsm (content/builtinBridgeDialog.jsm) - content/browser/torpreferences/check.svg (content/check.svg) content/browser/torpreferences/connectionSettingsDialog.xhtml (content/connectionSettingsDialog.xhtml) content/browser/torpreferences/connectionSettingsDialog.jsm (content/connectionSettingsDialog.jsm) content/browser/torpreferences/network.svg (content/network.svg) + content/browser/torpreferences/network-broken.svg (content/network-broken.svg) content/browser/torpreferences/provideBridgeDialog.xhtml (content/provideBridgeDialog.xhtml) content/browser/torpreferences/provideBridgeDialog.jsm (content/provideBridgeDialog.jsm) content/browser/torpreferences/requestBridgeDialog.xhtml (content/requestBridgeDialog.xhtml) ===================================== browser/modules/TorStrings.jsm ===================================== @@ -251,11 +251,6 @@ const Loader = { tryAgain: "Try Again", - // tor connect strings for message box in about:preferences#connection - connectMessage: - "Changes to Tor Settings will not take effect until you connect", - tryAgainMessage: - "Tor Browser has failed to establish a connection to the Tor Network", yourLocation: "Your Location", unblockInternetIn: "Unblock the Internet in", ===================================== toolkit/torbutton/chrome/locale/en-US/torConnect.properties ===================================== @@ -40,8 +40,6 @@ torConnect.torConnectButton=Connect torConnect.cancel=Cancel torConnect.torConnected=Connected to the Tor network! torConnect.tryAgain=Try Again -torConnect.connectMessage=Changes to Tor Settings will not take effect until you connect -torConnect.tryAgainMessage=Tor Browser has failed to establish a connection to the Tor Network torConnect.yourLocation=Your Location torConnect.unblockInternetIn=Unblock the Internet in torConnect.tryBridge=Try a Bridge @@ -59,3 +57,7 @@ torConnect.noSettingsForCountry=No settings available for your location torConnect.torNotConnectedConcise=Not Connected torConnect.torConnectingConcise=Connecting… torConnect.torConnectedConcise=Connected + +# connectMessage strings used up to 12.0 - TODO: remove when 12.5 becomes stable: +torConnect.tryAgainMessage=Tor Browser has failed to establish a connection to the Tor Network +torConnect.connectMessage=Changes to Tor Settings will not take effect until you connect View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/6ed4a3… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/6ed4a3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build] Pushed new tag tbb-12.0.7-build2
by richard (@richard) 07 Jun '23

07 Jun '23
richard pushed new tag tbb-12.0.7-build2 at The Tor Project / Applications / tor-browser-build -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/tree/tbb… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-12.0] fixup! Bug 40859: Prepare stable release 12.0.7
by richard (@richard) 07 Jun '23

07 Jun '23
richard pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build Commits: 96f42c6f by Richard Pospesel at 2023-06-07T18:49:50+00:00 fixup! Bug 40859: Prepare stable release 12.0.7 updated build tag to build2 for Android security backports - - - - - 3 changed files: - projects/firefox/config - projects/geckoview/config - rbm.conf Changes: ===================================== projects/firefox/config ===================================== @@ -15,7 +15,7 @@ var: firefox_platform_version: 102.12.0 firefox_version: '[% c("var/firefox_platform_version") %]esr' browser_branch: '12.0-1' - browser_build: 1 + browser_build: 2 branding_directory: 'browser/branding/alpha' copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]' nightly_updates_osname: '[% c("var/osname") %]' ===================================== projects/geckoview/config ===================================== @@ -14,7 +14,7 @@ container: var: geckoview_version: 102.12.0esr torbrowser_branch: 12.0-1 - browser_build: 1 + browser_build: 2 copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]' deps: - build-essential ===================================== rbm.conf ===================================== @@ -72,7 +72,7 @@ buildconf: var: torbrowser_version: '12.0.7' - torbrowser_build: 'build1' + torbrowser_build: 'build2' torbrowser_incremental_from: # Build incrementals also from 12.0.4 until we have a new certificate for # Windows installers. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 40847: Do not rely on du to compute the HFS size
by Pier Angelo Vendrame (@pierov) 07 Jun '23

07 Jun '23
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 2579da7c by Pier Angelo Vendrame at 2023-06-07T18:30:37+02:00 Bug 40847: Do not rely on du to compute the HFS size HFS has the disadvantage that we cannot grow the filesystem while adding files. We have to estimate an initial size, instead, and we relied on du for this. However, du depends on the underlying filesystem, and this could lead to reproducibility issues (because the HFS headers tell different sizes). So, with this change, we compute a rough number of needed blocks by taking the actual size of the files. Overshooting is not a problem, because DMG is compressed with bzip2, so unused space will be trimmed, eventually. - - - - - 2 changed files: - projects/browser/ddmg.sh - tools/signing/ddmg.sh Changes: ===================================== projects/browser/ddmg.sh ===================================== @@ -14,9 +14,13 @@ hfsfile="\$dmg_tmpdir/tbb-uncompressed.dmg" export LD_PRELOAD=[% c("var/faketime_path") %] export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" -# Use a similar strategy to Mozilla (they have 1.02, we have 1.1) -size=\$(du -ms [% src %] | awk '{ print int( \$1 * 1.1 ) }') -dd if=/dev/zero of="\$hfsfile" bs=1M count=\$size +src_dir=[% src %] +# 1 for ceiling and 1 for the inode +fileblocks=\$(find "\$src_dir" -type f -printf '%s\n' | awk '{s += int(\$1 / 4096) + 2} END {print s}') +directories=\$(find "\$src_dir" -type d | wc -l) +# Give some room to breathe +size=\$(echo \$((\$fileblocks + \$directories)) | awk '{print int(\$1 * 1.1)}') +dd if=/dev/zero of="\$hfsfile" bs=4096 count=\$size newfs_hfs -v "[% c("var/Project_Name") %]" "\$hfsfile" pushd [% src %] ===================================== tools/signing/ddmg.sh ===================================== @@ -30,9 +30,12 @@ export FAKETIME="2000-01-01 01:01:01" echo "Starting: " $(basename $dest_file) -# Use a similar strategy to Mozilla (they have 1.02, we have 1.1) -size=$(du -ms "$src_dir" | awk '{ print int( $1 * 1.1 ) }') -dd if=/dev/zero of="$hfsfile" bs=1M count=$size +# 1 for ceiling and 1 for the inode +fileblocks=$(find "$src_dir" -type f -printf '%s\n' | awk '{s += int($1 / 4096) + 2} END {print s}') +directories=$(find "$src_dir" -type d | wc -l) +# Give some room to breathe +size=$(echo $(($fileblocks + $directories)) | awk '{print int($1 * 1.1)}') +dd if=/dev/zero of="$hfsfile" bs=4096 count=$size newfs_hfs -v "$volume_label" "$hfsfile" cd $src_dir View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by Pier Angelo Vendrame (@pierov) 07 Jun '23

07 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 6ed4a3c6 by Pier Angelo Vendrame at 2023-06-07T17:02:21+02:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41816: Workaround to fix the top navigation Using the top navigation does not always work as expected, because we pass a null connection state, instead of the actual state. We could start storing the state as a member, however further refactors are planned (see tor-browser#41710), so also directly asking the parent for the current state works as a quick&amp;dirty workaround. - - - - - 1 changed file: - browser/components/torconnect/content/aboutTorConnect.js Changes: ===================================== browser/components/torconnect/content/aboutTorConnect.js ===================================== @@ -450,7 +450,7 @@ class AboutTorConnect { if (state?.StateChanged) { this.elements.connectButton.focus(); } - if (state.HasEverFailed) { + if (state?.HasEverFailed) { this.setBreadcrumbsStatus( BreadcrumbStatus.Active, BreadcrumbStatus.Default, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6ed4a3c… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6ed4a3c… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by Pier Angelo Vendrame (@pierov) 07 Jun '23

07 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: f4d9efee by Pier Angelo Vendrame at 2023-06-07T16:39:10+02:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41815: Wrong connect icons Swapped a couple of icons in about:torconnect, and split the offline CSS class from the connection assist/final error, since they now need a different icon. Also, removed the stroke property, since the new icons do not need it. - - - - - 4 changed files: - browser/components/torconnect/content/aboutTorConnect.css - browser/components/torconnect/content/connection-failure.svg - browser/components/torconnect/content/connection-location.svg - browser/components/torconnect/content/tor-connect-broken.svg Changes: ===================================== browser/components/torconnect/content/aboutTorConnect.css ===================================== @@ -317,9 +317,12 @@ body { fill: var(--onion-color); } -.title.offline, .title.assist, .title.final { +.title.offline { background-image: url("chrome://browser/content/torconnect/connection-failure.svg"); - stroke: var(--in-content-danger-button-background); +} + +.title.assist, .title.final { + background-image: url("chrome://browser/content/torconnect/tor-connect-broken.svg"); } .title.location { ===================================== browser/components/torconnect/content/connection-failure.svg ===================================== @@ -1,18 +1,7 @@ -<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g clip-path="url(#clip0_2970_12650)"> -<path d="M3.32745 2.13476C4.60904 1.11242 6.23317 0.501331 8 0.501331C12.1414 0.501331 15.4987 3.85866 15.4987 8C15.4987 9.76709 14.8876 11.3911 13.8652 12.6725L13.0315 11.8388C13.8448 10.7747 14.328 9.44438 14.328 8C14.328 4.50401 11.496 1.672 8 1.672C6.5562 1.672 5.22564 2.15503 4.16105 2.96836L3.32745 2.13476Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M2.35636 3.06235C1.20135 4.38144 0.501343 6.10899 0.501343 8C0.501343 11.5867 3.01868 14.584 6.38401 15.3227C6.73601 15.4 7.09333 15.4533 7.46134 15.4773V9.74933C6.71467 9.52 6.17068 8.82401 6.17068 8C6.17068 7.67615 6.25474 7.37202 6.40223 7.10822L5.55539 6.26138C5.20574 6.75196 5.00001 7.3521 5.00001 8C5.00001 9.06133 5.55201 9.99466 6.38401 10.528V14.1173C3.67201 13.4053 1.67201 10.9387 1.67201 8C1.67201 6.43179 2.24187 4.99718 3.18588 3.89187L2.35636 3.06235Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M6.56041 5.36771L7.44804 6.25534C7.62219 6.20033 7.80762 6.17067 8.00001 6.17067C9.01067 6.17067 9.82934 6.98934 9.82934 8C9.82934 8.19242 9.79968 8.37785 9.7447 8.552L10.6324 9.43967C10.8667 9.01221 11 8.52156 11 8C11 6.34399 9.65601 5 8.00001 5C7.47845 5 6.98783 5.13332 6.56041 5.36771Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M9.73889 10.4449L8.89214 9.59813C8.78095 9.66036 8.6626 9.71127 8.53868 9.74933V15.4773C8.90668 15.4533 9.26401 15.4 9.61601 15.3227C10.8695 15.0475 12.0054 14.459 12.9374 13.6434L12.1076 12.8136C11.396 13.4207 10.5481 13.8726 9.61601 14.1173V10.528C9.65768 10.5013 9.69865 10.4736 9.73889 10.4449Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M12.2609 11.0682C12.8837 10.2055 13.2507 9.14573 13.2507 8C13.2507 5.10133 10.8987 2.74933 7.99999 2.74933C6.85488 2.74933 5.79508 3.11639 4.9319 3.73921L5.77475 4.58207C6.41445 4.16498 7.1787 3.92267 7.99999 3.92267C10.2533 3.92267 12.0773 5.74666 12.0773 8C12.0773 8.82056 11.8348 9.58497 11.4175 10.2248L12.2609 11.0682Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M10.5086 11.2146L11.3423 12.0483C10.8375 12.4651 10.2534 12.7892 9.616 12.9947V11.744C9.93702 11.6057 10.2367 11.4271 10.5086 11.2146Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M4.78492 5.49092L3.95137 4.65737C3.20058 5.56555 2.74933 6.73033 2.74933 8C2.74933 10.336 4.27467 12.3147 6.384 12.9947V11.744C4.936 11.12 3.92267 9.67733 3.92267 8C3.92267 7.05341 4.24455 6.18259 4.78492 5.49092Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M7.16918 7.8752L8.12478 8.83079C8.08406 8.83686 8.04238 8.84 7.99997 8.84C7.53605 8.84 7.15997 8.46392 7.15997 8C7.15997 7.95759 7.16312 7.91592 7.16918 7.8752Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -<path d="M1.15533 1.85684L14.0906 14.7921C14.3511 15.0527 14.3511 15.4751 14.0906 15.7357L14.0906 15.7357C13.83 15.9963 13.4075 15.9963 13.1469 15.7357L0.211679 2.8005C-0.048903 2.53992 -0.0489032 2.11743 0.211682 1.85684C0.472265 1.59626 0.894753 1.59626 1.15533 1.85684Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -</g> -<defs> -<clipPath id="clip0_2970_12650"> -<rect width="16" height="16" fill="white"/> -</clipPath> -</defs> +<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"> + <rect height="1.22295" rx=".611475" transform="matrix(-.707107 -.707107 -.707107 .707107 14.9464 14.1921)" width="18.6565" fill="context-fill" /> + <g fill="context-fill" fill-rule="evenodd"> + <path d="m3.9498 1.68761c1.19924-.769433 2.60316-1.18761 4.0502-1.18761 1.98912 0 3.8968.79018 5.3033 2.1967s2.1967 3.31418 2.1967 5.3033c0 1.44704-.4182 2.851-1.1876 4.0502l-.9179-.9179c.4428-.7667.7192-1.62112.8075-2.5073h-2.229c-.0215.32648-.0599.65056-.1148.971l-2.22101-2.221h1.08181c-.146-1.92835-.96795-3.74329-2.321-5.125h-.796c-.52113.53217-.96348 1.12861-1.31877 1.77104l-.9115-.9115c.17951-.29615.37579-.58315.58827-.85954h-.408c-.23805.10224-.46875.21884-.69093.34888zm9.0744 2.61245c-.6605-.90129-1.5504-1.60918-2.5772-2.05006h-.407c1.1378 1.47922 1.8109 3.26288 1.934 5.125h2.229c-.1112-1.11187-.5182-2.17365-1.1788-3.07494z" /> + <path d="m3.08673 2.33343c-.13383.11605-.26395.23718-.39003.36327-1.40652 1.40652-2.1967 3.31418-2.1967 5.3033s.79018 3.8968 2.1967 5.3033 3.31418 2.1967 5.3033 2.1967 3.8968-.7902 5.3033-2.1967c.1261-.1261.2472-.2562.3633-.39l-.8933-.8933c-.6277.7494-1.4237 1.3427-2.3253 1.73h-.409c.6819-.8861 1.1969-1.8815 1.5266-2.9377l-1.0208-1.02083c-.3313 1.48633-1.07154 2.85943-2.1478 3.95853h-.795c-1.35305-1.3817-2.175-3.1966-2.321-5.125h4.09731l-1.25-1.25h-2.84731c.06073-.80217.23844-1.58472.52269-2.32462l-.95329-.95329c-.46748 1.02882-.74878 2.13867-.8244 3.27791h-2.229c.11102-1.1118.51787-2.17355 1.17823-3.07484.29198-.39851.62881-.75922 1.00248-1.07575zm-.11176 9.36657c.66039.9014 1.55027 1.6092 2.57703 2.05h.408c-1.13778-1.4792-1.81088-3.2629-1.934-5.125h-2.229c.11081 1.11186.51758 2.1737 1.17797 3.075z" /> + </g> </svg> ===================================== browser/components/torconnect/content/connection-location.svg ===================================== @@ -1,11 +1,4 @@ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g clip-path="url(#clip0_1827_6570)"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M7.73334 11.442C7.73334 9.541 9.34511 8.00001 11.3333 8.00001C13.3216 8.00001 14.9333 9.541 14.9333 11.442C14.9333 12.801 13.0948 14.729 12.0456 15.7185C11.855 15.899 11.5994 16 11.3333 16C11.0672 16 10.8117 15.899 10.6211 15.7185C9.57191 14.729 7.73334 12.8005 7.73334 11.442ZM10.7466 9.98339C10.9326 9.90634 11.132 9.86667 11.3333 9.86667C11.74 9.86667 12.13 10.0282 12.4176 10.3158C12.7051 10.6033 12.8667 10.9933 12.8667 11.4C12.8667 11.8067 12.7051 12.1967 12.4176 12.4842C12.13 12.7718 11.74 12.9333 11.3333 12.9333C11.132 12.9333 10.9326 12.8937 10.7466 12.8166C10.5605 12.7396 10.3915 12.6266 10.2491 12.4842C10.1067 12.3419 9.99378 12.1728 9.91672 11.9868C9.83966 11.8008 9.8 11.6014 9.8 11.4C9.8 11.1986 9.83966 10.9993 9.91672 10.8132C9.99378 10.6272 10.1067 10.4582 10.2491 10.3158C10.3915 10.1734 10.5605 10.0604 10.7466 9.98339Z" fill="#FFA436"/> -<path d="M15.4042 9.15991C15.489 8.70846 15.5333 8.24275 15.5333 7.76667C15.5333 3.62454 12.1755 0.26667 8.03332 0.26667C3.89119 0.26667 0.533325 3.62454 0.533325 7.76667C0.533325 11.9088 3.89119 15.2667 8.03332 15.2667C8.33067 15.2667 8.62398 15.2494 8.91229 15.2157C7.77562 13.9767 6.66666 12.467 6.66666 11.2932C6.66666 10.0893 7.18892 8.99941 8.03333 8.21045V5.93855C8.83962 5.93855 9.52399 6.46053 9.76697 7.185C10.1327 7.06327 10.5195 6.98297 10.9209 6.95013C10.5653 5.69011 9.40713 4.76667 8.03333 4.76667L8.03332 3.68854C10.0174 3.68854 11.6705 5.10537 12.0361 6.98245C12.4679 7.04338 12.8804 7.1596 13.2649 7.32314C13.0397 4.63121 10.7834 2.51667 8.03332 2.51666V1.43855C11.5283 1.43855 14.3615 4.27174 14.3615 7.76667C14.3615 7.83574 14.3604 7.90454 14.3582 7.97308C14.7773 8.30672 15.1325 8.70843 15.4042 9.15991Z" fill="context-fill" fill-opacity="context-fill-opacity"/> -</g> -<defs> -<clipPath id="clip0_1827_6570"> -<rect width="16" height="16" fill="white"/> -</clipPath> -</defs> + <path fill-rule="evenodd" d="M7.73334 11.442C7.73334 9.541 9.34511 8.00001 11.3333 8.00001C13.3216 8.00001 14.9333 9.541 14.9333 11.442C14.9333 12.801 13.0948 14.729 12.0456 15.7185C11.855 15.899 11.5994 16 11.3333 16C11.0672 16 10.8117 15.899 10.6211 15.7185C9.57191 14.729 7.73334 12.8005 7.73334 11.442ZM10.7466 9.98339C10.9326 9.90634 11.132 9.86667 11.3333 9.86667C11.74 9.86667 12.13 10.0282 12.4176 10.3158C12.7051 10.6033 12.8667 10.9933 12.8667 11.4C12.8667 11.8067 12.7051 12.1967 12.4176 12.4842C12.13 12.7718 11.74 12.9333 11.3333 12.9333C11.132 12.9333 10.9326 12.8937 10.7466 12.8166C10.5605 12.7396 10.3915 12.6266 10.2491 12.4842C10.1067 12.3419 9.99378 12.1728 9.91672 11.9868C9.83966 11.8008 9.8 11.6014 9.8 11.4C9.8 11.1986 9.83966 10.9993 9.91672 10.8132C9.99378 10.6272 10.1067 10.4582 10.2491 10.3158C10.3915 10.1734 10.5605 10.0604 10.7466 9.98339Z" fill="context-stroke"/> + <path d="M15.4042 9.15991C15.489 8.70846 15.5333 8.24275 15.5333 7.76667C15.5333 3.62454 12.1755 0.26667 8.03332 0.26667C3.89119 0.26667 0.533325 3.62454 0.533325 7.76667C0.533325 11.9088 3.89119 15.2667 8.03332 15.2667C8.33067 15.2667 8.62398 15.2494 8.91229 15.2157C7.77562 13.9767 6.66666 12.467 6.66666 11.2932C6.66666 10.0893 7.18892 8.99941 8.03333 8.21045V5.93855C8.83962 5.93855 9.52399 6.46053 9.76697 7.185C10.1327 7.06327 10.5195 6.98297 10.9209 6.95013C10.5653 5.69011 9.40713 4.76667 8.03333 4.76667L8.03332 3.68854C10.0174 3.68854 11.6705 5.10537 12.0361 6.98245C12.4679 7.04338 12.8804 7.1596 13.2649 7.32314C13.0397 4.63121 10.7834 2.51667 8.03332 2.51666V1.43855C11.5283 1.43855 14.3615 4.27174 14.3615 7.76667C14.3615 7.83574 14.3604 7.90454 14.3582 7.97308C14.7773 8.30672 15.1325 8.70843 15.4042 9.15991Z" fill="context-fill"/> </svg> ===================================== browser/components/torconnect/content/tor-connect-broken.svg ===================================== @@ -1 +1,11 @@ -<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h16v16h-16z"/></clipPath><g clip-path="url(#a)" fill-opacity="context-fill-opacity" fill="context-fill"><rect height="1.22295" rx=".611475" transform="matrix(-.707107 -.707107 -.707107 .707107 14.9464 14.1921)" width="18.6565"/><g clip-rule="evenodd" fill-rule="evenodd"><path d="m3.9498 1.68761c1.19924-.769433 2.60316-1.18761 4.0502-1.18761 1.98912 0 3.8968.79018 5.3033 2.1967s2.1967 3.31418 2.1967 5.3033c0 1.44704-.4182 2.851-1.1876 4.0502l-.9179-.9179c.4428-.7667.7192-1.62112.8075-2.5073h-2.229c-.0215.32648-.0599.65056-.1148.971l-2.22101-2.221h1.08181c-.146-1.92835-.96795-3.74329-2.321-5.125h-.796c-.52113.53217-.96348 1.12861-1.31877 1.77104l-.9115-.9115c.17951-.29615.37579-.58315.58827-.85954h-.408c-.23805.10224-.46875.21884-.69093.34888zm9.0744 2.61245c-.6605-.90129-1.5504-1.60918-2.5772-2.05006h-.407c1.1378 1.47922 1.8109 3.26288 1.934 5.125h2.229c-.1112-1.11187-.5182-2.17365-1.1788-3.07494z"/><path d="m3.08673 2.33343c-.13383.11605-.26395.23718-.39003.36327-1.40652 1.40652-2.1967 3.31418-2.1967 5.3033s.79018 3.8968 2.1967 5.3033 3.31418 2.1967 5.3033 2.1967 3.8968-.7902 5.3033-2.1967c.1261-.1261.2472-.2562.3633-.39l-.8933-.8933c-.6277.7494-1.4237 1.3427-2.3253 1.73h-.409c.6819-.8861 1.1969-1.8815 1.5266-2.9377l-1.0208-1.02083c-.3313 1.48633-1.07154 2.85943-2.1478 3.95853h-.795c-1.35305-1.3817-2.175-3.1966-2.321-5.125h4.09731l-1.25-1.25h-2.84731c.06073-.80217.23844-1.58472.52269-2.32462l-.95329-.95329c-.46748 1.02882-.74878 2.13867-.8244 3.27791h-2.229c.11102-1.1118.51787-2.17355 1.17823-3.07484.29198-.39851.62881-.75922 1.00248-1.07575zm-.11176 9.36657c.66039.9014 1.55027 1.6092 2.57703 2.05h.408c-1.13778-1.4792-1.81088-3.2629-1.934-5.125h-2.229c.11081 1.11186.51758 2.1737 1.17797 3.075z"/></g></g></svg> +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path d="M3.32745 2.13476C4.60904 1.11242 6.23317 0.501331 8 0.501331C12.1414 0.501331 15.4987 3.85866 15.4987 8C15.4987 9.76709 14.8876 11.3911 13.8652 12.6725L13.0315 11.8388C13.8448 10.7747 14.328 9.44438 14.328 8C14.328 4.50401 11.496 1.672 8 1.672C6.5562 1.672 5.22564 2.15503 4.16105 2.96836L3.32745 2.13476Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M2.35636 3.06235C1.20135 4.38144 0.501343 6.10899 0.501343 8C0.501343 11.5867 3.01868 14.584 6.38401 15.3227C6.73601 15.4 7.09333 15.4533 7.46134 15.4773V9.74933C6.71467 9.52 6.17068 8.82401 6.17068 8C6.17068 7.67615 6.25474 7.37202 6.40223 7.10822L5.55539 6.26138C5.20574 6.75196 5.00001 7.3521 5.00001 8C5.00001 9.06133 5.55201 9.99466 6.38401 10.528V14.1173C3.67201 13.4053 1.67201 10.9387 1.67201 8C1.67201 6.43179 2.24187 4.99718 3.18588 3.89187L2.35636 3.06235Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M6.56041 5.36771L7.44804 6.25534C7.62219 6.20033 7.80762 6.17067 8.00001 6.17067C9.01067 6.17067 9.82934 6.98934 9.82934 8C9.82934 8.19242 9.79968 8.37785 9.7447 8.552L10.6324 9.43967C10.8667 9.01221 11 8.52156 11 8C11 6.34399 9.65601 5 8.00001 5C7.47845 5 6.98783 5.13332 6.56041 5.36771Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M9.73889 10.4449L8.89214 9.59813C8.78095 9.66036 8.6626 9.71127 8.53868 9.74933V15.4773C8.90668 15.4533 9.26401 15.4 9.61601 15.3227C10.8695 15.0475 12.0054 14.459 12.9374 13.6434L12.1076 12.8136C11.396 13.4207 10.5481 13.8726 9.61601 14.1173V10.528C9.65768 10.5013 9.69865 10.4736 9.73889 10.4449Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M12.2609 11.0682C12.8837 10.2055 13.2507 9.14573 13.2507 8C13.2507 5.10133 10.8987 2.74933 7.99999 2.74933C6.85488 2.74933 5.79508 3.11639 4.9319 3.73921L5.77475 4.58207C6.41445 4.16498 7.1787 3.92267 7.99999 3.92267C10.2533 3.92267 12.0773 5.74666 12.0773 8C12.0773 8.82056 11.8348 9.58497 11.4175 10.2248L12.2609 11.0682Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M10.5086 11.2146L11.3423 12.0483C10.8375 12.4651 10.2534 12.7892 9.616 12.9947V11.744C9.93702 11.6057 10.2367 11.4271 10.5086 11.2146Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M4.78492 5.49092L3.95137 4.65737C3.20058 5.56555 2.74933 6.73033 2.74933 8C2.74933 10.336 4.27467 12.3147 6.384 12.9947V11.744C4.936 11.12 3.92267 9.67733 3.92267 8C3.92267 7.05341 4.24455 6.18259 4.78492 5.49092Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M7.16918 7.8752L8.12478 8.83079C8.08406 8.83686 8.04238 8.84 7.99997 8.84C7.53605 8.84 7.15997 8.46392 7.15997 8C7.15997 7.95759 7.16312 7.91592 7.16918 7.8752Z" fill="context-fill" fill-opacity="context-fill-opacity" /> + <path d="M1.15533 1.85684L14.0906 14.7921C14.3511 15.0527 14.3511 15.4751 14.0906 15.7357L14.0906 15.7357C13.83 15.9963 13.4075 15.9963 13.1469 15.7357L0.211679 2.8005C-0.048903 2.53992 -0.0489032 2.11743 0.211682 1.85684C0.472265 1.59626 0.894753 1.59626 1.15533 1.85684Z" fill="context-fill" fill-opacity="context-fill-opacity" /> +</svg> View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f4d9efe… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/f4d9efe… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] 2 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by Pier Angelo Vendrame (@pierov) 07 Jun '23

07 Jun '23
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: db0a953f by Henry Wilkes at 2023-06-07T14:09:59+01:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41734 - Add a connected label to the built-in bridge dialog. - - - - - e86c7eaf by Henry Wilkes at 2023-06-07T14:09:59+01:00 fixup! Add TorStrings module for localization Bug 41734 - Add a connected label to the built-in bridge dialog. - - - - - 7 changed files: - browser/components/torpreferences/content/builtinBridgeDialog.jsm - browser/components/torpreferences/content/builtinBridgeDialog.xhtml - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml - browser/components/torpreferences/content/torPreferences.css - browser/modules/TorStrings.jsm - toolkit/torbutton/chrome/locale/en-US/settings.properties Changes: ===================================== browser/components/torpreferences/content/builtinBridgeDialog.jsm ===================================== @@ -17,82 +17,81 @@ const { TorConnect, TorConnectTopics } = ChromeUtils.import( ); class BuiltinBridgeDialog { + /** + * Create a new instance. + * + * @param {Function} onSubmit - A callback for when the user accepts the + * dialog selection. + */ constructor(onSubmit) { this.onSubmit = onSubmit; - this._dialog = null; this._acceptButton = null; } - static get selectors() { - return { - description: "#torPreferences-builtinBridge-description", - radiogroup: "#torPreferences-builtinBridge-typeSelection", - obfsRadio: "#torPreferences-builtinBridges-radioObfs", - obfsDescr: "#torPreferences-builtinBridges-descrObfs", - snowflakeRadio: "#torPreferences-builtinBridges-radioSnowflake", - snowflakeDescr: "#torPreferences-builtinBridges-descrSnowflake", - meekAzureRadio: "#torPreferences-builtinBridges-radioMeekAzure", - meekAzureDescr: "#torPreferences-builtinBridges-descrMeekAzure", - }; - } - - _populateXUL(window, aDialog) { - const selectors = BuiltinBridgeDialog.selectors; - - this._dialog = aDialog; - const dialogWin = this._dialog.parentElement; + _populateXUL(window, dialog) { + const dialogWin = dialog.parentElement; dialogWin.setAttribute("title", TorStrings.settings.builtinBridgeHeader); - this._dialog.querySelector(selectors.description).textContent = - TorStrings.settings.builtinBridgeDescription2; + dialog.querySelector( + "#torPreferences-builtinBridge-description" + ).textContent = TorStrings.settings.builtinBridgeDescription2; - this._acceptButton = this._dialog.getButton("accept"); + this._acceptButton = dialog.getButton("accept"); this.onTorStateChange(); - let radioGroup = this._dialog.querySelector(selectors.radiogroup); + const radioGroup = dialog.querySelector( + "#torPreferences-builtinBridge-typeSelection" + ); - let types = { + const typeStrings = { obfs4: { - elemRadio: this._dialog.querySelector(selectors.obfsRadio), - elemDescr: this._dialog.querySelector(selectors.obfsDescr), label: TorStrings.settings.builtinBridgeObfs4Title, descr: TorStrings.settings.builtinBridgeObfs4Description2, }, snowflake: { - elemRadio: this._dialog.querySelector(selectors.snowflakeRadio), - elemDescr: this._dialog.querySelector(selectors.snowflakeDescr), label: TorStrings.settings.builtinBridgeSnowflake, descr: TorStrings.settings.builtinBridgeSnowflakeDescription2, }, "meek-azure": { - elemRadio: this._dialog.querySelector(selectors.meekAzureRadio), - elemDescr: this._dialog.querySelector(selectors.meekAzureDescr), label: TorStrings.settings.builtinBridgeMeekAzure, descr: TorStrings.settings.builtinBridgeMeekAzureDescription2, }, }; - TorBuiltinBridgeTypes.forEach(type => { - types[type].elemRadio.setAttribute("label", types[type].label); - types[type].elemRadio.setAttribute("hidden", "false"); - types[type].elemDescr.textContent = types[type].descr; - types[type].elemDescr.removeAttribute("hidden"); - }); - - if ( + const currentBuiltinType = TorSettings.bridges.enabled && TorSettings.bridges.source == TorBridgeSource.BuiltIn - ) { - radioGroup.selectedItem = - types[TorSettings.bridges.builtin_type]?.elemRadio; + ? TorSettings.bridges.builtin_type + : null; + if (currentBuiltinType) { + radioGroup.value = currentBuiltinType; } else { radioGroup.selectedItem = null; } - this._dialog.addEventListener("dialogaccept", () => { + for (const optionEl of radioGroup.querySelectorAll( + ".builtin-bridges-option" + )) { + const radio = optionEl.querySelector("radio"); + const type = radio.value; + optionEl.hidden = !TorBuiltinBridgeTypes.includes(type); + radio.label = typeStrings[type].label; + optionEl.querySelector( + ".builtin-bridges-option-description" + ).textContent = typeStrings[type].descr; + optionEl.querySelector( + ".torPreferences-current-bridge-label" + ).textContent = TorStrings.settings.currentBridge; + optionEl.classList.toggle( + "current-builtin-bridge-type", + type === currentBuiltinType + ); + } + + dialog.addEventListener("dialogaccept", () => { this.onSubmit(radioGroup.value, TorConnect.canBeginBootstrap); }); - this._dialog.addEventListener("dialoghelp", e => { + dialog.addEventListener("dialoghelp", e => { window.top.openTrustedLinkIn( TorStrings.settings.learnMoreCircumventionURL, "tab" @@ -100,8 +99,8 @@ class BuiltinBridgeDialog { }); // Hack: see the CSS - this._dialog.style.minWidth = "0"; - this._dialog.style.minHeight = "0"; + dialog.style.minWidth = "0"; + dialog.style.minHeight = "0"; Services.obs.addObserver(this, TorConnectTopics.StateChange); } ===================================== browser/components/torpreferences/content/builtinBridgeDialog.xhtml ===================================== @@ -8,16 +8,57 @@ xmlns:html="http://www.w3.org/1999/xhtml"> <dialog id="torPreferences-builtinBridge-dialog" buttons="help,accept,cancel"> - <description> - <html:div id="torPreferences-builtinBridge-description">&#8203;<br/>&#8203;</html:div> + <description id="torPreferences-builtinBridge-description"> </description> <radiogroup id="torPreferences-builtinBridge-typeSelection"> - <radio id="torPreferences-builtinBridges-radioObfs" value="obfs4" hidden="true"/> - <html:div id="torPreferences-builtinBridges-descrObfs" class="indent" hidden="true">&#8203;</html:div> - <radio id="torPreferences-builtinBridges-radioSnowflake" value="snowflake" hidden="true"/> - <html:div id="torPreferences-builtinBridges-descrSnowflake" class="indent" hidden="true">&#8203;</html:div> - <radio id="torPreferences-builtinBridges-radioMeekAzure" value="meek-azure" hidden="true"/> - <html:div id="torPreferences-builtinBridges-descrMeekAzure" class="indent" hidden="true">&#8203;</html:div> + <vbox class="builtin-bridges-option"> + <hbox> + <!-- The radio option is described by both the "Current bridge" label + - and the full description. If the "Connected" label is hidden, then + - only the latter description should contribute. --> + <radio aria-describedby="obfs-bridges-current obfs-bridges-description" + value="obfs4"/> + <html:span class="torPreferences-current-bridge-badge"> + <image class="torPreferences-current-bridge-icon"/> + <html:span id="obfs-bridges-current" + class="torPreferences-current-bridge-label"> + </html:span> + </html:span> + </hbox> + <html:div id="obfs-bridges-description" + class="indent builtin-bridges-option-description"> + </html:div> + </vbox> + <vbox class="builtin-bridges-option"> + <hbox> + <radio aria-describedby="snowflake-bridges-current snowflake-bridges-description" + value="snowflake"/> + <html:span class="torPreferences-current-bridge-badge"> + <image class="torPreferences-current-bridge-icon"/> + <html:span id="snowflake-bridges-current" + class="torPreferences-current-bridge-label"> + </html:span> + </html:span> + </hbox> + <html:div id="snowflake-bridges-description" + class="indent builtin-bridges-option-description"> + </html:div> + </vbox> + <vbox class="builtin-bridges-option"> + <hbox> + <radio aria-describedby="meek-bridges-current meek-bridges-description" + value="meek-azure"/> + <html:span class="torPreferences-current-bridge-badge"> + <image class="torPreferences-current-bridge-icon"/> + <html:span id="meek-bridges-current" + class="torPreferences-current-bridge-label"> + </html:span> + </html:span> + </hbox> + <html:div id="meek-bridges-description" + class="indent builtin-bridges-option-description"> + </html:div> + </vbox> </radiogroup> <script type="application/javascript"><![CDATA[ "use strict"; ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -124,7 +124,7 @@ const gConnectionPane = (function() { cardId: ".torPreferences-bridgeCard-id", cardHeadingManualLink: ".torPreferences-bridgeCard-manualLink", cardHeadingAddr: ".torPreferences-bridgeCard-headingAddr", - cardConnectedLabel: ".torPreferences-bridgeCard-connectedLabel", + cardConnectedLabel: ".torPreferences-current-bridge-label", cardOptions: ".torPreferences-bridgeCard-options", cardMenu: "#torPreferences-bridgeCard-menu", cardQrGrid: ".torPreferences-bridgeCard-grid", @@ -168,7 +168,7 @@ const gConnectionPane = (function() { _controller: null, - _currentBridge: "", + _currentBridgeId: null, // populate xul with strings and cache the relevant elements _populateXUL() { @@ -471,7 +471,7 @@ const gConnectionPane = (function() { } bridgeTemplate.querySelector( selectors.bridges.cardConnectedLabel - ).textContent = TorStrings.settings.statusTorConnected; + ).textContent = TorStrings.settings.connectedBridge; bridgeTemplate .querySelector(selectors.bridges.cardCopy) .setAttribute("label", TorStrings.settings.bridgeCopy); @@ -607,7 +607,7 @@ const gConnectionPane = (function() { restoreTimeout = null; }, RESTORE_TIME); }); - if (details && details.id === this._currentBridge) { + if (details?.id && details.id === this._currentBridgeId) { card.classList.add("currently-connected"); bridgeCards.prepend(card); } else { @@ -714,9 +714,9 @@ const gConnectionPane = (function() { // Add only the new strings that remained in the set for (const bridge of newStrings) { if (shownCards >= toShow) { - if (this._currentBridge === "") { + if (!this._currentBridgeId) { break; - } else if (!bridge.includes(this._currentBridge)) { + } else if (!bridge.includes(this._currentBridgeId)) { continue; } } @@ -787,7 +787,7 @@ const gConnectionPane = (function() { )) { card.classList.remove("currently-connected"); } - if (this._currentBridge === "") { + if (!this._currentBridgeId) { return; } // Make sure we have the connected bridge in the list @@ -796,7 +796,7 @@ const gConnectionPane = (function() { // case also with built-in bridges!). E.g., one line for the IPv4 // address and one for the IPv6 address, so use querySelectorAll const cards = bridgeCards.querySelectorAll( - `[data-bridge-id="${this._currentBridge}"]` + `[data-bridge-id="${this._currentBridgeId}"]` ); for (const card of cards) { card.classList.add("currently-connected"); @@ -823,6 +823,12 @@ const gConnectionPane = (function() { // this circuit to check if the bridge can be used. We do this by // checking if the stream has SOCKS username, which actually contains // the destination of the stream. + // FIXME: We only know the currentBridge *after* a circuit event, but + // if the circuit event is sent *before* about:torpreferences is + // opened we will miss it. Therefore this approach only works if a + // circuit is created after opening about:torconnect. A dedicated + // backend outside of about:preferences would help, and could be + // shared with gTorCircuitPanel. See tor-browser#41700. this._controller.watchEvent( "STREAM", event => @@ -836,10 +842,22 @@ const gConnectionPane = (function() { } for (const status of circuitStatuses) { if (status.id === event.CircuitID && status.circuit.length) { - // The id in the circuit begins with a $ sign - const bridgeId = status.circuit[0][0].substring(1); - if (bridgeId !== this._currentBridge) { - this._currentBridge = bridgeId; + // The id in the circuit begins with a $ sign. + const id = status.circuit[0][0].replace(/^\$/, ""); + if (id !== this._currentBridgeId) { + const bridge = ( + await this._controller.getConf("bridge") + )?.find( + foundBridge => + foundBridge.ID?.toUpperCase() === id.toUpperCase() + ); + if (!bridge) { + // Either there is no bridge, or bridge with no + // fingerprint. + this._currentBridgeId = null; + } else { + this._currentBridgeId = id; + } this._updateConnectedBridges(); } break; ===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -109,9 +109,9 @@ <label class="torPreferences-bridgeCard-manualLink learnMore text-link stop-click" is="text-link"/> <html:div class="torPreferences-bridgeCard-headingAddr"/> <html:div class="torPreferences-bridgeCard-buttons"> - <html:span class="torPreferences-bridgeCard-connectedBadge"> - <image class="torPreferences-bridgeCard-connectedIcon"/> - <html:span class="torPreferences-bridgeCard-connectedLabel"/> + <html:span class="torPreferences-current-bridge-badge"> + <image class="torPreferences-current-bridge-icon"/> + <html:span class="torPreferences-current-bridge-label"></html:span> </html:span> <html:button class="torPreferences-bridgeCard-options stop-click"/> </html:div> ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -298,28 +298,38 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { align-self: center; } -.torPreferences-bridgeCard-connectedBadge { +.torPreferences-current-bridge-badge { + /* Hidden by default, otherwise display is "flex". */ display: none; - margin-inline-end: 12px; - color: var(--purple-60); -} - -@media (prefers-color-scheme: dark) { - .torPreferences-bridgeCard-connectedBadge { - color: var(--purple-30); - } + align-items: center; + font-size: 0.85em; } -.currently-connected .torPreferences-bridgeCard-connectedBadge { +:is( + .builtin-bridges-option.current-builtin-bridge-type, + .torPreferences-bridgeCard.currently-connected +) .torPreferences-current-bridge-badge { display: flex; } -.torPreferences-bridgeCard-connectedIcon { +.torPreferences-current-bridge-icon { margin-inline-start: 1px; margin-inline-end: 7px; list-style-image: url("chrome://browser/content/torpreferences/check.svg"); -moz-context-properties: fill; fill: currentColor; + flex: 0 0 auto; +} + +.torPreferences-bridgeCard .torPreferences-current-bridge-badge { + color: var(--purple-60); + margin-inline-end: 12px; +} + +@media (prefers-color-scheme: dark) { + .torPreferences-bridgeCard .torPreferences-current-bridge-badge { + color: var(--purple-30); + } } .torPreferences-bridgeCard-options { @@ -564,6 +574,10 @@ dialog#torPreferences-requestBridge-dialog > hbox { font-weight: 700; } +.builtin-bridges-option .torPreferences-current-bridge-badge { + color: var(--in-content-accent-color); +} + /* Request bridge dialog */ /* This hbox is hidden by css here by default so that the ===================================== browser/modules/TorStrings.jsm ===================================== @@ -105,6 +105,8 @@ const Loader = { bridgeCurrentDescription: "You can keep one or more bridges saved, and Tor will choose which one to use when you connect. Tor will automatically switch to use another bridge when needed.", bridgeId: "%1$S bridge: %2$S", + currentBridge: "Current bridge", + connectedBridge: "Connected", remove: "Remove", bridgeDisableBuiltIn: "Disable built-in bridges", bridgeShare: ===================================== toolkit/torbutton/chrome/locale/en-US/settings.properties ===================================== @@ -39,6 +39,8 @@ settings.bridgeCurrentDescription=You can keep one or more bridges saved, and To # Translation note: %1$S = bridge type; %2$S = bridge emoji id settings.bridgeId=%1$S bridge: %2$S +settings.connectedBridge=Connected +settings.currentBridge=Current bridge settings.remove=Remove settings.bridgeDisableBuiltIn=Disable built-in bridges settings.bridgeShare=Share this bridge using the QR code or by copying its address: View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c2d683… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c2d683… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] 3 commits: fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 8b558745 by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41623: Update connection assist&#39;s iconography - - - - - 975fe2aa by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 41623: Update connection assist&#39;s iconography - - - - - c2d6837d by Dan Ballard at 2023-06-06T21:52:27+00:00 fixup! fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser Bug 41623: Update connection assist&#39;s iconography - - - - - 12 changed files: - browser/components/torconnect/content/aboutTorConnect.css - browser/components/torconnect/content/connection-failure.svg - browser/components/torconnect/content/connection-location.svg - − browser/components/torconnect/content/onion-slash-fillable.svg - − browser/components/torconnect/content/onion.svg - + browser/components/torconnect/content/tor-connect-broken.svg - + browser/components/torconnect/content/tor-connect.svg - browser/components/torconnect/content/torConnectTitlebarStatus.js - browser/components/torconnect/jar.mn - browser/components/torpreferences/content/torPreferences.css - − browser/components/torpreferences/content/torPreferencesIcon.svg - browser/components/torpreferences/jar.mn Changes: ===================================== browser/components/torconnect/content/aboutTorConnect.css ===================================== @@ -105,11 +105,11 @@ input[type="checkbox"]:focus, select:focus { } #connect-to-tor-icon { - list-style-image: url("chrome://browser/content/torconnect/onion.svg"); + list-style-image: url("chrome://browser/content/torconnect/tor-connect.svg"); } #connection-assist-icon { - list-style-image: url("chrome://browser/content/torconnect/onion-slash-fillable.svg"); + list-style-image: url("chrome://browser/content/torconnect/tor-connect-broken.svg"); } #location-settings-icon { @@ -311,7 +311,7 @@ body { } .title { - background-image: url("chrome://browser/content/torconnect/onion.svg"); + background-image: url("chrome://browser/content/torconnect/tor-connect.svg"); -moz-context-properties: stroke, fill, fill-opacity; fill-opacity: var(--onion-opacity); fill: var(--onion-color); ===================================== browser/components/torconnect/content/connection-failure.svg ===================================== @@ -1,5 +1,18 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg fill="none" height="60" viewBox="0 0 60 60" width="60" xmlns="http://www.w3.org/2000/svg"> - <path fill="context-fill" d="M 30,1.875 C 14.467,1.875 1.875,14.467 1.875,30 c 0,6.725546 2.3647525,12.894963 6.3027344,17.734375 l -4.7636719,4.763672 c -0.7834743,0.783474 -0.7834743,2.044651 0,2.828125 0.7834743,0.783474 2.0446507,0.783474 2.828125,0 C 21.046044,40.52782 34.415343,27.146014 47.546875,14.023438 v -0.002 l 6.779297,-6.7792965 c 0.783474,-0.7834743 0.783474,-2.0446507 0,-2.828125 -0.783474,-0.7834743 -2.044651,-0.7834743 -2.828125,0 L 47.734375,8.1777344 C 42.894963,4.2397525 36.725546,1.875 30,1.875 Z m 0,4.3945312 c 5.511128,0 10.579364,1.8833224 14.607422,5.0351568 l -2.88086,2.880859 C 38.450945,11.752724 34.393751,10.3125 30,10.3125 Z m 23.171875,7.7851568 -3.169922,3.169921 c 2.3606,3.688 3.728516,8.071691 3.728516,12.775391 0,1.1686 -0.08495,2.318106 -0.248047,3.441406 L 56.625,39.085938 c 0.9722,-2.8501 1.5,-5.906738 1.5,-9.085938 0,-5.9206 -1.828625,-11.413713 -4.953125,-15.945312 z M 30,14.707031 c 3.177831,0 6.128683,0.969877 8.574219,2.628907 l -2.931641,2.933593 C 33.98338,19.305214 32.05732,18.75 30,18.75 Z m 17.058594,5.458985 -3.25,3.251953 c 0.6734,1.4099 1.135809,2.938675 1.349609,4.546875 1.5363,-0.1698 3.117694,0.126925 4.496094,0.890625 -0.1807,-3.1525 -1.103403,-6.106153 -2.595703,-8.689453 z M 30,23.144531 c 0.826564,0 1.617815,0.147937 2.351562,0.416016 L 30,25.912109 Z m 10.703125,3.378907 -3.857422,3.857421 c -0.1905,3.4833 -2.981544,6.274344 -6.464844,6.464844 L 30,37.224609 v 0.002 c -5.415919,5.416107 -11.224329,11.222894 -15.945312,15.945313 1.319718,0.909937 2.719791,1.709665 4.189453,2.386719 3.233255,1.489519 6.798228,2.383028 10.552734,2.541015 -1.196895,-2.322912 -1.228443,-4.952483 0.02739,-7.248052 1.05453,-1.896289 2.110388,-3.79184 3.165973,-5.687542 C 31.338834,45.248762 30.6744,45.292969 30,45.292969 V 41.25 c 1.6992,0 3.309606,-0.376281 4.753906,-1.050781 l 4.69336,-8.429688 c 0.4837,-0.8688 1.097775,-1.589162 1.796875,-2.164062 -0.037,-1.0721 -0.224316,-2.106431 -0.541016,-3.082031 z" /> - <path fill="context-stroke" d="m59.5328 52.4973-10.261-18.5715c-.7112-1.2833-1.9917-1.9258-3.2722-1.9258-1.2806 0-2.5611.6425-3.2704 1.9258l-10.261 18.5715c-1.3701 2.4755.4312 5.5027 3.2704 5.5027h20.5238c2.8373 0 4.6387-3.0272 3.2704-5.5027zm-12.3666-.533-.4666.4642h-1.4l-.4667-.4642v-1.3929l.4667-.4643h1.4l.4666.4643zm0-4.992c0 .3078-.1229.603-.3417.8207s-.5155.34-.8249.34-.6062-.1223-.825-.34-.3417-.5129-.3417-.8207v-6.383c0-.3079.1229-.6031.3417-.8208s.5156-.34.825-.34.6061.1223.8249.34.3417.5129.3417.8208z" /> +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g clip-path="url(#clip0_2970_12650)"> +<path d="M3.32745 2.13476C4.60904 1.11242 6.23317 0.501331 8 0.501331C12.1414 0.501331 15.4987 3.85866 15.4987 8C15.4987 9.76709 14.8876 11.3911 13.8652 12.6725L13.0315 11.8388C13.8448 10.7747 14.328 9.44438 14.328 8C14.328 4.50401 11.496 1.672 8 1.672C6.5562 1.672 5.22564 2.15503 4.16105 2.96836L3.32745 2.13476Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M2.35636 3.06235C1.20135 4.38144 0.501343 6.10899 0.501343 8C0.501343 11.5867 3.01868 14.584 6.38401 15.3227C6.73601 15.4 7.09333 15.4533 7.46134 15.4773V9.74933C6.71467 9.52 6.17068 8.82401 6.17068 8C6.17068 7.67615 6.25474 7.37202 6.40223 7.10822L5.55539 6.26138C5.20574 6.75196 5.00001 7.3521 5.00001 8C5.00001 9.06133 5.55201 9.99466 6.38401 10.528V14.1173C3.67201 13.4053 1.67201 10.9387 1.67201 8C1.67201 6.43179 2.24187 4.99718 3.18588 3.89187L2.35636 3.06235Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M6.56041 5.36771L7.44804 6.25534C7.62219 6.20033 7.80762 6.17067 8.00001 6.17067C9.01067 6.17067 9.82934 6.98934 9.82934 8C9.82934 8.19242 9.79968 8.37785 9.7447 8.552L10.6324 9.43967C10.8667 9.01221 11 8.52156 11 8C11 6.34399 9.65601 5 8.00001 5C7.47845 5 6.98783 5.13332 6.56041 5.36771Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M9.73889 10.4449L8.89214 9.59813C8.78095 9.66036 8.6626 9.71127 8.53868 9.74933V15.4773C8.90668 15.4533 9.26401 15.4 9.61601 15.3227C10.8695 15.0475 12.0054 14.459 12.9374 13.6434L12.1076 12.8136C11.396 13.4207 10.5481 13.8726 9.61601 14.1173V10.528C9.65768 10.5013 9.69865 10.4736 9.73889 10.4449Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M12.2609 11.0682C12.8837 10.2055 13.2507 9.14573 13.2507 8C13.2507 5.10133 10.8987 2.74933 7.99999 2.74933C6.85488 2.74933 5.79508 3.11639 4.9319 3.73921L5.77475 4.58207C6.41445 4.16498 7.1787 3.92267 7.99999 3.92267C10.2533 3.92267 12.0773 5.74666 12.0773 8C12.0773 8.82056 11.8348 9.58497 11.4175 10.2248L12.2609 11.0682Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M10.5086 11.2146L11.3423 12.0483C10.8375 12.4651 10.2534 12.7892 9.616 12.9947V11.744C9.93702 11.6057 10.2367 11.4271 10.5086 11.2146Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M4.78492 5.49092L3.95137 4.65737C3.20058 5.56555 2.74933 6.73033 2.74933 8C2.74933 10.336 4.27467 12.3147 6.384 12.9947V11.744C4.936 11.12 3.92267 9.67733 3.92267 8C3.92267 7.05341 4.24455 6.18259 4.78492 5.49092Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M7.16918 7.8752L8.12478 8.83079C8.08406 8.83686 8.04238 8.84 7.99997 8.84C7.53605 8.84 7.15997 8.46392 7.15997 8C7.15997 7.95759 7.16312 7.91592 7.16918 7.8752Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M1.15533 1.85684L14.0906 14.7921C14.3511 15.0527 14.3511 15.4751 14.0906 15.7357L14.0906 15.7357C13.83 15.9963 13.4075 15.9963 13.1469 15.7357L0.211679 2.8005C-0.048903 2.53992 -0.0489032 2.11743 0.211682 1.85684C0.472265 1.59626 0.894753 1.59626 1.15533 1.85684Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +</g> +<defs> +<clipPath id="clip0_2970_12650"> +<rect width="16" height="16" fill="white"/> +</clipPath> +</defs> </svg> ===================================== browser/components/torconnect/content/connection-location.svg ===================================== @@ -1,5 +1,11 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg fill="none" height="60" viewBox="0 0 60 60" width="60" xmlns="http://www.w3.org/2000/svg"> - <path fill="context-fill" d="M 30,1.875 C 14.467,1.875 1.875,14.467 1.875,30 c 0,6.725546 2.3647429,12.894963 6.3027344,17.734375 l -4.7636719,4.763672 c -0.7834743,0.783474 -0.7834743,2.044651 0,2.828125 0.7834743,0.783474 2.0446507,0.783474 2.828125,0 C 21.049647,40.524244 34.416498,27.144859 47.546875,14.023438 v -0.002 l 6.779297,-6.7792965 c 0.783474,-0.7834743 0.783474,-2.0446507 0,-2.828125 -0.783474,-0.7834743 -2.044651,-0.7834743 -2.828125,0 L 47.734375,8.1777344 C 42.894963,4.2397429 36.725546,1.875 30,1.875 Z m 0,4.3945312 c 5.511049,0 10.579367,1.8833675 14.607422,5.0351568 l -2.88086,2.880859 C 38.450922,11.752724 34.393676,10.3125 30,10.3125 Z m 23.171875,7.7851568 -3.169922,3.169921 c 2.0599,3.2183 3.363209,6.965941 3.662109,10.994141 1.6451,0.9052 3.133663,2.060563 4.414063,3.414062 C 58.109025,31.092612 58.125,30.5479 58.125,30 c 0,-5.9207 -1.828725,-11.413612 -4.953125,-15.945312 z M 30,14.707031 c 3.177763,0 6.128689,0.96991 8.574219,2.628907 l -2.931641,2.933593 C 33.983382,19.305242 32.057261,18.75 30,18.75 Z m 17.058594,5.458985 -3.25,3.251953 c 0.3932,0.8233 0.714831,1.687384 0.957031,2.583984 C 44.843925,26.000953 44.9215,26 45,26 c 1.5121,0 2.981466,0.186009 4.384766,0.537109 -0.4052,-2.2842 -1.205872,-4.431893 -2.326172,-6.371093 z M 30,23.144531 c 0.826528,0 1.61783,0.147942 2.351562,0.416016 L 30,25.912109 Z M 27.513672,39.710938 C 22.924606,44.301329 18.153439,49.072905 14.054688,53.171875 18.586388,56.296275 24.0793,58.125 30,58.125 c 1.2074,0 2.397153,-0.07701 3.564453,-0.224609 -1.405046,-1.157246 -2.630299,-2.523304 -3.630859,-4.050782 -1.074704,-1.73735 -1.733781,-3.296 -2.273434,-5.009765 C 27.215587,47.179488 27.041393,45.619 27,44 c 0,-1.105 0.100333,-2.186283 0.291016,-3.236328 5.91e-4,-0.0033 0.0014,-0.0065 0.002,-0.0098 0.06395,-0.351034 0.136703,-0.699344 0.220703,-1.042968 z" /> - <path fill="context-stroke" d="m45 30c-3.713 0-7.274 1.475-9.8995 4.1005s-4.1005 6.1865-4.1005 9.8995 1.475 7.274 4.1005 9.8995 6.1865 4.1005 9.8995 4.1005 7.274-1.475 9.8995-4.1005 4.1005-6.1865 4.1005-9.8995-1.475-7.274-4.1005-9.8995-6.1865-4.1005-9.8995-4.1005zm4.5677 3.2667c1.9167.8229 3.5778 2.1443 4.8108 3.8267 1.233 1.6825 1.9928 3.6644 2.2004 5.7399h-4.1608c-.2298-3.4759-1.4862-6.8054-3.6101-9.5666zm-3.8248 0c2.5257 2.5792 4.06 5.967 4.3326 9.5666h-10.151c.2726-3.5996 1.8069-6.9874 4.3326-9.5666zm-5.3125 0h.7616c-2.1231 2.7616-3.3794 6.0909-3.6101 9.5666h-4.1608c.2072-2.0753.9667-4.0573 2.1993-5.7397 1.2327-1.6824 2.8936-3.0039 4.81-3.8269zm0 21.4666c-1.9166-.8227-3.5777-2.1441-4.8105-3.8266-1.2327-1.6825-1.992-3.6646-2.1988-5.74h4.1608c.2298 3.4759 1.4862 6.8054 3.6101 9.5666zm3.8267 0c-2.5257-2.5792-4.06-5.967-4.3326-9.5666h10.1491c-.2725 3.5996-1.8068 6.9874-4.3325 9.5666zm5.3125 0h-.7635c2.1247-2.7607 3.3812-6.0905 3.6102-9.5666h4.1608c-.2069 2.0752-.966 4.0571-2.1984 5.7395-1.2323 1.6824-2.8929 3.004-4.8091 3.8271z" /> +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g clip-path="url(#clip0_1827_6570)"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M7.73334 11.442C7.73334 9.541 9.34511 8.00001 11.3333 8.00001C13.3216 8.00001 14.9333 9.541 14.9333 11.442C14.9333 12.801 13.0948 14.729 12.0456 15.7185C11.855 15.899 11.5994 16 11.3333 16C11.0672 16 10.8117 15.899 10.6211 15.7185C9.57191 14.729 7.73334 12.8005 7.73334 11.442ZM10.7466 9.98339C10.9326 9.90634 11.132 9.86667 11.3333 9.86667C11.74 9.86667 12.13 10.0282 12.4176 10.3158C12.7051 10.6033 12.8667 10.9933 12.8667 11.4C12.8667 11.8067 12.7051 12.1967 12.4176 12.4842C12.13 12.7718 11.74 12.9333 11.3333 12.9333C11.132 12.9333 10.9326 12.8937 10.7466 12.8166C10.5605 12.7396 10.3915 12.6266 10.2491 12.4842C10.1067 12.3419 9.99378 12.1728 9.91672 11.9868C9.83966 11.8008 9.8 11.6014 9.8 11.4C9.8 11.1986 9.83966 10.9993 9.91672 10.8132C9.99378 10.6272 10.1067 10.4582 10.2491 10.3158C10.3915 10.1734 10.5605 10.0604 10.7466 9.98339Z" fill="#FFA436"/> +<path d="M15.4042 9.15991C15.489 8.70846 15.5333 8.24275 15.5333 7.76667C15.5333 3.62454 12.1755 0.26667 8.03332 0.26667C3.89119 0.26667 0.533325 3.62454 0.533325 7.76667C0.533325 11.9088 3.89119 15.2667 8.03332 15.2667C8.33067 15.2667 8.62398 15.2494 8.91229 15.2157C7.77562 13.9767 6.66666 12.467 6.66666 11.2932C6.66666 10.0893 7.18892 8.99941 8.03333 8.21045V5.93855C8.83962 5.93855 9.52399 6.46053 9.76697 7.185C10.1327 7.06327 10.5195 6.98297 10.9209 6.95013C10.5653 5.69011 9.40713 4.76667 8.03333 4.76667L8.03332 3.68854C10.0174 3.68854 11.6705 5.10537 12.0361 6.98245C12.4679 7.04338 12.8804 7.1596 13.2649 7.32314C13.0397 4.63121 10.7834 2.51667 8.03332 2.51666V1.43855C11.5283 1.43855 14.3615 4.27174 14.3615 7.76667C14.3615 7.83574 14.3604 7.90454 14.3582 7.97308C14.7773 8.30672 15.1325 8.70843 15.4042 9.15991Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +</g> +<defs> +<clipPath id="clip0_1827_6570"> +<rect width="16" height="16" fill="white"/> +</clipPath> +</defs> </svg> ===================================== browser/components/torconnect/content/onion-slash-fillable.svg deleted ===================================== @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg"> - <path d="m14.1161 15.6245c-.0821.0001-.1634-.016-.2393-.0474-.0758-.0314-.1447-.0775-.2027-.1356l-12.749984-12.749c-.109266-.11882-.168406-.27526-.165071-.43666.003335-.16139.068886-.31525.182967-.42946.114078-.11421.267868-.17994.429258-.18345.16139-.00352.3179.05544.43685.16457l12.74998 12.75c.1168.1176.1824.2767.1824.4425s-.0656.3249-.1824.4425c-.058.058-.1269.1039-.2028.1352-.0759.0312-.1571.0471-.2392.0468z" fill-opacity="context-fill-opacity" fill="context-fill" /> - <path d="m 8,0.5000002 c -1.61963,0 -3.1197431,0.5137987 -4.3457031,1.3867188 l 0.84375,0.8417968 0.7792969,0.78125 0.8613281,0.8613282 0.8164062,0.8164062 0.9863281,0.984375 h 0.058594 c 1.00965,0 1.828125,0.818485 1.828125,1.828125 0,0.01968 6.2e-4,0.039074 0,0.058594 L 10.8125,9.0449221 C 10.9334,8.7195921 11,8.3674002 11,8.0000002 c 0,-1.65685 -1.34314,-3 -3,-3 v -1.078125 c 2.25231,0 4.078125,1.825845 4.078125,4.078125 0,0.67051 -0.162519,1.3033281 -0.449219,1.8613281 l 0.861328,0.8613277 C 12.972434,9.9290067 13.25,8.9965102 13.25,8.0000002 c 0,-2.89949 -2.35049,-5.25 -5.25,-5.25 v -1.078125 c 3.4949,0 6.328125,2.833195 6.328125,6.328125 0,1.29533 -0.388841,2.4990528 -1.056641,3.5019528 l 0.841797,0.84375 C 14.986181,11.119703 15.5,9.6196302 15.5,8.0000002 c 0,-4.14214 -3.3579,-7.5 -7.5,-7.5 z m -6.1113281,3.15625 C 1.0154872,4.8821451 0.5,6.3803304 0.5,8.0000002 0.5,12.1421 3.85786,15.5 8,15.5 c 1.6198027,0 3.117896,-0.515441 4.34375,-1.388672 L 11.501953,13.269531 C 10.498787,13.937828 9.295838,14.328125 8,14.328125 V 13.25 c 0.9967306,0 1.9287093,-0.277621 2.722656,-0.759766 L 9.859375,11.626953 C 9.3016226,11.913918 8.6705338,12.078125 8,12.078125 V 11 C 8.3664751,11 8.716425,10.93088 9.0410156,10.810547 6.6639891,8.4300416 4.2743195,6.0418993 1.8886719,3.6562502 Z" fill-opacity="context-fill-opacity" fill="context-fill"/> -</svg> ===================================== browser/components/torconnect/content/onion.svg deleted ===================================== @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg"> - <path d="M 8 0.5 C 3.85786 0.5 0.5 3.85786 0.5 8 C 0.5 12.1421 3.85786 15.5 8 15.5 C 12.1421 15.5 15.5 12.1421 15.5 8 C 15.5 3.85786 12.1421 0.5 8 0.5 z M 8 1.671875 C 11.4949 1.671875 14.328125 4.50507 14.328125 8 C 14.328125 11.4949 11.4949 14.328125 8 14.328125 L 8 13.25 C 10.89951 13.25 13.25 10.89951 13.25 8 C 13.25 5.10051 10.89951 2.75 8 2.75 L 8 1.671875 z M 8 3.921875 C 10.25231 3.921875 12.078125 5.74772 12.078125 8 C 12.078125 10.25231 10.25231 12.078125 8 12.078125 L 8 11 C 9.65686 11 11 9.65686 11 8 C 11 6.34315 9.65686 5 8 5 L 8 3.921875 z M 8 6.171875 C 9.00965 6.171875 9.828125 6.99036 9.828125 8 C 9.828125 9.00965 9.00965 9.828125 8 9.828125 L 8 6.171875 z " clip-rule="evenodd" fill-rule="evenodd" fill="context-fill" fill-opacity="context-fill-opacity"/> -</svg> ===================================== browser/components/torconnect/content/tor-connect-broken.svg ===================================== @@ -0,0 +1 @@ +<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h16v16h-16z"/></clipPath><g clip-path="url(#a)" fill-opacity="context-fill-opacity" fill="context-fill"><rect height="1.22295" rx=".611475" transform="matrix(-.707107 -.707107 -.707107 .707107 14.9464 14.1921)" width="18.6565"/><g clip-rule="evenodd" fill-rule="evenodd"><path d="m3.9498 1.68761c1.19924-.769433 2.60316-1.18761 4.0502-1.18761 1.98912 0 3.8968.79018 5.3033 2.1967s2.1967 3.31418 2.1967 5.3033c0 1.44704-.4182 2.851-1.1876 4.0502l-.9179-.9179c.4428-.7667.7192-1.62112.8075-2.5073h-2.229c-.0215.32648-.0599.65056-.1148.971l-2.22101-2.221h1.08181c-.146-1.92835-.96795-3.74329-2.321-5.125h-.796c-.52113.53217-.96348 1.12861-1.31877 1.77104l-.9115-.9115c.17951-.29615.37579-.58315.58827-.85954h-.408c-.23805.10224-.46875.21884-.69093.34888zm9.0744 2.61245c-.6605-.90129-1.5504-1.60918-2.5772-2.05006h-.407c1.1378 1.47922 1.8109 3.26288 1.934 5.125h2.229c-.1112-1.11187-.5182-2.17365-1.1788-3.07494z"/><path d="m3.08673 2.33343c-.13383.11605-.26395.23718-.39003.36327-1.40652 1.40652-2.1967 3.31418-2.1967 5.3033s.79018 3.8968 2.1967 5.3033 3.31418 2.1967 5.3033 2.1967 3.8968-.7902 5.3033-2.1967c.1261-.1261.2472-.2562.3633-.39l-.8933-.8933c-.6277.7494-1.4237 1.3427-2.3253 1.73h-.409c.6819-.8861 1.1969-1.8815 1.5266-2.9377l-1.0208-1.02083c-.3313 1.48633-1.07154 2.85943-2.1478 3.95853h-.795c-1.35305-1.3817-2.175-3.1966-2.321-5.125h4.09731l-1.25-1.25h-2.84731c.06073-.80217.23844-1.58472.52269-2.32462l-.95329-.95329c-.46748 1.02882-.74878 2.13867-.8244 3.27791h-2.229c.11102-1.1118.51787-2.17355 1.17823-3.07484.29198-.39851.62881-.75922 1.00248-1.07575zm-.11176 9.36657c.66039.9014 1.55027 1.6092 2.57703 2.05h.408c-1.13778-1.4792-1.81088-3.2629-1.934-5.125h-2.229c.11081 1.11186.51758 2.1737 1.17797 3.075z"/></g></g></svg> ===================================== browser/components/torconnect/content/tor-connect.svg ===================================== @@ -0,0 +1,7 @@ +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 0.501331C3.85867 0.501331 0.501343 3.85866 0.501343 8C0.501343 11.5867 3.01868 14.584 6.38401 15.3227C6.73601 15.4 7.09333 15.4533 7.46134 15.4773V9.74933C6.71467 9.52 6.17068 8.82401 6.17068 8C6.17068 6.98934 6.98935 6.17067 8.00001 6.17067C9.01067 6.17067 9.82934 6.98934 9.82934 8C9.82934 8.82401 9.28534 9.52 8.53868 9.74933V15.4773C8.90668 15.4533 9.26401 15.4 9.61601 15.3227C12.9813 14.584 15.4987 11.5867 15.4987 8C15.4987 3.85866 12.1414 0.501331 8.00001 0.501331ZM9.61601 14.1173V10.528C10.448 9.99466 11 9.06133 11 8C11 6.344 9.65601 5 8.00001 5C6.344 5 5.00001 6.344 5.00001 8C5.00001 9.06133 5.55201 9.99466 6.38401 10.528V14.1173C3.67201 13.4053 1.67201 10.9387 1.67201 8C1.67201 4.504 4.50401 1.67201 8.00001 1.67201C11.496 1.67201 14.328 4.50401 14.328 8C14.328 10.9387 12.328 13.4053 9.61601 14.1173Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99999 2.74933C5.10133 2.74933 2.74933 5.10134 2.74933 8C2.74933 10.336 4.27467 12.3147 6.384 12.9947V11.744C4.936 11.12 3.92267 9.67733 3.92267 8C3.92267 5.74666 5.74666 3.92267 7.99999 3.92267C10.2533 3.92267 12.0773 5.74666 12.0773 8C12.0773 9.67733 11.064 11.12 9.61599 11.744V12.9947C11.7253 12.3147 13.2507 10.336 13.2507 8C13.2507 5.10133 10.8987 2.74933 7.99999 2.74933Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +<path d="M7.99997 8.84C8.46389 8.84 8.83997 8.46392 8.83997 8C8.83997 7.53608 8.46389 7.16 7.99997 7.16C7.53605 7.16 7.15997 7.53608 7.15997 8C7.15997 8.46392 7.53605 8.84 7.99997 8.84Z" fill="context-fill" fill-opacity="context-fill-opacity"/> +</g> +</svg> ===================================== browser/components/torconnect/content/torConnectTitlebarStatus.js ===================================== @@ -94,8 +94,8 @@ var gTorConnectTitlebarStatus = { this.icon.setAttribute( "src", connected - ? "chrome://browser/content/torconnect/onion.svg" - : "chrome://browser/content/torconnect/onion-slash-fillable.svg" + ? "chrome://browser/content/torconnect/tor-connect.svg" + : "chrome://browser/content/torconnect/tor-connect-broken.svg" ); this.icon.classList.toggle("tor-connect-status-connected", connected); this.icon.classList.toggle( ===================================== browser/components/torconnect/jar.mn ===================================== @@ -9,5 +9,5 @@ browser.jar: content/browser/torconnect/bridge.svg (content/bridge.svg) content/browser/torconnect/connection-failure.svg (content/connection-failure.svg) content/browser/torconnect/connection-location.svg (content/connection-location.svg) - content/browser/torconnect/onion.svg (content/onion.svg) - content/browser/torconnect/onion-slash-fillable.svg (content/onion-slash-fillable.svg) + content/browser/torconnect/tor-connect.svg (content/tor-connect.svg) + content/browser/torconnect/tor-connect-broken.svg (content/tor-connect-broken.svg) ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -2,7 +2,7 @@ #category-connection > .category-icon { - list-style-image: url("chrome://browser/content/torpreferences/torPreferencesIcon.svg"); + list-style-image: url("chrome://browser/content/torconnect/tor-connect.svg"); } html:dir(rtl) input[type="checkbox"].toggle-button::before { @@ -58,7 +58,7 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { #torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-icon { - mask: url("chrome://browser/content/torconnect/onion-slash-fillable.svg"); + mask: url("chrome://browser/content/torconnect/tor-connect-broken.svg"); background-color: white; } ===================================== browser/components/torpreferences/content/torPreferencesIcon.svg deleted ===================================== @@ -1,8 +0,0 @@ -<svg fill="context-fill" fill-opacity="context-fill-opacity" viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg"> - <g clip-rule="evenodd" fill-rule="evenodd"> - <path d="m11 8c0 1.65686-1.34314 3-3 3-1.65685 0-3-1.34314-3-3 0-1.65685 1.34315-3 3-3 1.65686 0 3 1.34315 3 3zm-1.17187 0c0 1.00965-.81848 1.82813-1.82813 1.82813-1.00964 0-1.82812-.81848-1.82812-1.82813 0-1.00964.81848-1.82812 1.82812-1.82812 1.00965 0 1.82813.81848 1.82813 1.82812z"/> - <path d="m7.99999 13.25c2.89951 0 5.25001-2.3505 5.25001-5.25001 0-2.89949-2.3505-5.25-5.25001-5.25-2.89949 0-5.25 2.35051-5.25 5.25 0 2.89951 2.35051 5.25001 5.25 5.25001zm0-1.1719c2.25231 0 4.07811-1.8258 4.07811-4.07811 0-2.25228-1.8258-4.07812-4.07811-4.07812-2.25228 0-4.07812 1.82584-4.07812 4.07812 0 2.25231 1.82584 4.07811 4.07812 4.07811z"/> - <path d="m8 15.5c4.1421 0 7.5-3.3579 7.5-7.5 0-4.14214-3.3579-7.5-7.5-7.5-4.14214 0-7.5 3.35786-7.5 7.5 0 4.1421 3.35786 7.5 7.5 7.5zm0-1.1719c3.4949 0 6.3281-2.8332 6.3281-6.3281 0-3.49493-2.8332-6.32812-6.3281-6.32812-3.49493 0-6.32812 2.83319-6.32812 6.32812 0 3.4949 2.83319 6.3281 6.32812 6.3281z"/> - </g> - <path d="m.5 8c0 4.1421 3.35786 7.5 7.5 7.5v-15c-4.14214 0-7.5 3.35786-7.5 7.5z"/> -</svg> \ No newline at end of file ===================================== browser/components/torpreferences/jar.mn ===================================== @@ -17,7 +17,6 @@ browser.jar: content/browser/torpreferences/connectionPane.js (content/connectionPane.js) content/browser/torpreferences/connectionPane.xhtml (content/connectionPane.xhtml) content/browser/torpreferences/torPreferences.css (content/torPreferences.css) - content/browser/torpreferences/torPreferencesIcon.svg (content/torPreferencesIcon.svg) content/browser/torpreferences/bridgemoji/bridge-emojis.json (content/bridgemoji/bridge-emojis.json) content/browser/torpreferences/bridgemoji/annotations.json (content/bridgemoji/annotations.json) content/browser/torpreferences/bridgemoji/svgs/ (content/bridgemoji/svgs/*.svg) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/787ac9… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/787ac9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] amend! Bug 40701: Add in pane security warning when downloading a file
by ma1 (@ma1) 06 Jun '23

06 Jun '23
ma1 pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 787ac906 by Dan Ballard at 2023-06-06T20:52:51+00:00 amend! Bug 40701: Add in pane security warning when downloading a file Bug 40701: Add security warning when downloading a file Shown in the downloads panel, about:downloads and places.xhtml. - - - - - 11 changed files: - browser/components/downloads/content/allDownloadsView.js - browser/components/downloads/content/contentAreaDownloadsView.js - browser/components/downloads/content/contentAreaDownloadsView.xhtml - browser/components/downloads/content/downloads.css - browser/components/downloads/content/downloads.js - browser/components/downloads/content/downloadsPanel.inc.xhtml - browser/components/places/content/places.css - browser/components/places/content/places.js - browser/components/places/content/places.xhtml - browser/themes/shared/customizableui/panelUI-shared.css - browser/themes/shared/downloads/contentAreaDownloadsView.css Changes: ===================================== browser/components/downloads/content/allDownloadsView.js ===================================== @@ -212,6 +212,7 @@ var DownloadsView = { */ function DownloadsPlacesView( aRichListBox, + torWarningMessageBar, aActive = true, aSuppressionFlag = DownloadsCommon.SUPPRESS_ALL_DOWNLOADS_OPEN ) { @@ -241,6 +242,46 @@ function DownloadsPlacesView( ).attentionSuppressed |= aSuppressionFlag; } + // Tor browser warning message/alert shown above the list. + + const PREF_SHOW_DOWNLOAD_WARNING = "browser.download.showTorWarning"; + // Observe changes to the tor warning pref. + const torWarningPrefObserver = () => { + if (Services.prefs.getBoolPref(PREF_SHOW_DOWNLOAD_WARNING)) { + torWarningMessageBar.hidden = false; + } else { + // Re-assign focus if it is about to be lost. + if (torWarningMessageBar.contains(document.activeElement)) { + // Try and focus the downloads list. + // NOTE: If #downloadsListBox is still hidden, this will do nothing. + // But in this case there are no other focusable targets within the + // view, so we just leave it up to the focus handler. + this._richlistbox.focus({ preventFocusRing: true }); + } + torWarningMessageBar.hidden = true; + } + }; + + Services.prefs.addObserver( + PREF_SHOW_DOWNLOAD_WARNING, + torWarningPrefObserver + ); + // Initialize. + torWarningPrefObserver(); + + window.addEventListener("unload", () => { + Services.prefs.removeObserver( + PREF_SHOW_DOWNLOAD_WARNING, + torWarningPrefObserver + ); + }); + + torWarningMessageBar + .querySelector(".downloads-tor-warning-dismiss-button") + .addEventListener("click", event => { + Services.prefs.setBoolPref(PREF_SHOW_DOWNLOAD_WARNING, false); + }); + // Make sure to unregister the view if the window is closed. window.addEventListener( "unload", ===================================== browser/components/downloads/content/contentAreaDownloadsView.js ===================================== @@ -10,6 +10,9 @@ const { PrivateBrowsingUtils } = ChromeUtils.import( var ContentAreaDownloadsView = { init() { + const torWarningMessage = document.getElementById( + "aboutDownloadsTorWarning" + ); let box = document.getElementById("downloadsListBox"); let suppressionFlag = DownloadsCommon.SUPPRESS_CONTENT_AREA_DOWNLOADS_OPEN; box.addEventListener( @@ -17,9 +20,22 @@ var ContentAreaDownloadsView = { () => { // Set focus to Downloads list once it is created // And prevent it from showing the focus ring around the richlistbox (Bug 1702694) - document - .getElementById("downloadsListBox") - .focus({ preventFocusRing: true }); + // Prevent focusing the list whilst the tor browser warning is shown. + // Some screen readers (tested with Orca and NVDA) will not read out + // alerts if they are already present on page load. In that case, a + // screen reader user may not be aware of the warning before they + // interact with the downloads list, which we do not want. + // Some hacky workarounds were tested with Orca to get it to read back + // the alert before the focus is read, but this was inconsistent and the + // experience was bad. + // Without auto-focusing the downloads list, a screen reader should not + // skip beyond the alert's content. + if (torWarningMessage.hidden) { + document + .getElementById("downloadsListBox") + .focus({ preventFocusRing: true }); + } + // Pause the indicator if the browser is active. if (document.visibilityState === "visible") { DownloadsCommon.getIndicatorData( @@ -29,7 +45,12 @@ var ContentAreaDownloadsView = { }, { once: true } ); - let view = new DownloadsPlacesView(box, true, suppressionFlag); + let view = new DownloadsPlacesView( + box, + torWarningMessage, + true, + suppressionFlag + ); document.addEventListener("visibilitychange", aEvent => { let indicator = DownloadsCommon.getIndicatorData(window); if (document.visibilityState === "visible") { @@ -42,6 +63,53 @@ var ContentAreaDownloadsView = { if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) { view.place = "place:transition=7&sort=4"; } + + torWarningMessage.querySelector( + ".downloads-tor-warning-title" + ).textContent = this._getTorString("torbutton.download.warning.title"); + + const tailsLink = document.createElement("a"); + tailsLink.href = "https://tails.boum.org/"; + tailsLink.target = "_blank"; + tailsLink.textContent = this._getTorString( + "torbutton.download.warning.tails_brand_name" + ); + + const [beforeLink, afterLink] = this._getTorString( + "torbutton.download.warning.description" + ).split("%S"); + + torWarningMessage + .querySelector(".downloads-tor-warning-description") + .append(beforeLink, tailsLink, afterLink); + + torWarningMessage.querySelector( + ".downloads-tor-warning-dismiss-button" + ).textContent = this._getTorString("torbutton.download.warning.dismiss"); + }, + + /** + * Get a string from the properties bundle. + * + * @param {string} name - The string name. + * + * @return {string} The string. + */ + _getTorString(name) { + if (!this._stringBundle) { + this._stringBundle = Services.strings.createBundle( + "chrome://torbutton/locale/torbutton.properties" + ); + } + try { + return this._stringBundle.GetStringFromName(name); + } catch {} + if (!this._fallbackStringBundle) { + this._fallbackStringBundle = Services.strings.createBundle( + "resource://torbutton/locale/en-US/torbutton.properties" + ); + } + return this._fallbackStringBundle.GetStringFromName(name); }, }; ===================================== browser/components/downloads/content/contentAreaDownloadsView.xhtml ===================================== @@ -39,6 +39,23 @@ </keyset> #endif + <html:message-bar id="aboutDownloadsTorWarning" + class="downloads-tor-warning-message-bar" + role="alert" + aria-labelledby="aboutDownloadsTorWarningTitle" + aria-describedby="aboutDownloadsTorWarningDescription"> + <html:div class="downloads-tor-warning-grid"> + <html:p id="aboutDownloadsTorWarningTitle" + class="downloads-tor-warning-title"> + </html:p> + <html:p id="aboutDownloadsTorWarningDescription" + class="downloads-tor-warning-description"> + </html:p> + <html:button class="downloads-tor-warning-dismiss-button"> + </html:button> + </html:div> + </html:message-bar> + <richlistbox flex="1" seltype="multiple" id="downloadsListBox" ===================================== browser/components/downloads/content/downloads.css ===================================== @@ -104,18 +104,52 @@ flex-direction: column; } -#downloadsWarning p { - padding-inline: 8px; - margin-block-start: 8px; - margin-block-end: 0; +.downloads-tor-warning-grid { + display: grid; + grid-template: + "title button" min-content + "description button" auto + / 1fr max-content; + gap: 8px; + margin-block: 8px; + /* Some extra space between the text and the icon. */ + margin-inline-start: 8px; +} + +.downloads-tor-warning-grid .downloads-tor-warning-title { + grid-area: title; + margin: 0; +} + +.downloads-tor-warning-grid .downloads-tor-warning-description { + grid-area: description; + margin: 0; +} + +.downloads-tor-warning-grid .downloads-tor-warning-dismiss-button { + grid-area: button; + align-self: center; +} + +.downloads-tor-warning-description, +.downloads-tor-warning-title { line-height: 1.4; } -#downloadsWarningHeaderTitle { +.downloads-tor-warning-title { font-weight: bold; } -#downloadsWarningDescription { +#downloadsPanelTorWarning :is( + .downloads-tor-warning-description, + .downloads-tor-warning-title +) { + padding-inline: 8px; + margin-block-start: 8px; + margin-block-end: 0; +} + +#downloadsPanelTorWarningDescription { /* Make sure we wrap the text rather than request the default max-content * width from the parent XUL -moz-box. */ width: 0; ===================================== browser/components/downloads/content/downloads.js ===================================== @@ -33,8 +33,6 @@ const PREF_SHOW_DOWNLOAD_WARNING = "browser.download.showTorWarning"; -const TAILS_URI = "https://tails.boum.org/"; - var { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); @@ -143,13 +141,28 @@ var DownloadsPanel = { ); } - let showDownloadWarning = Services.prefs.getBoolPref( - PREF_SHOW_DOWNLOAD_WARNING + const torWarningMessage = document.getElementById( + "downloadsPanelTorWarning" ); - if (!showDownloadWarning) { - document.getElementById("downloadsWarning").hidden = true; - } else { - document.getElementById("downloadsWarning").hidden = false; + if (!this._torWarningPrefObserver) { + // Observe changes to the tor warning pref. + this._torWarningPrefObserver = () => { + if (Services.prefs.getBoolPref(PREF_SHOW_DOWNLOAD_WARNING)) { + torWarningMessage.hidden = false; + } else { + // Re-assign focus if it is about to be lost. + if (torWarningMessage.contains(document.activeElement)) { + this._focusPanel(true); + } + torWarningMessage.hidden = true; + } + }; + Services.prefs.addObserver( + PREF_SHOW_DOWNLOAD_WARNING, + this._torWarningPrefObserver + ); + // Initialize + this._torWarningPrefObserver(); } if (this._state != this.kStateUninitialized) { @@ -175,42 +188,40 @@ var DownloadsPanel = { DownloadsSummary ); - if (this._torWarningInitialized == 0) { - document.getElementById( - "downloadsWarningHeaderTitle" - ).textContent = this._getString("torbutton.download.warning.title"); - let tailsBrandName = this._getString( - "torbutton.download.warning.tails_brand_name" - ); + if (!this._torWarningInitialized) { + torWarningMessage.querySelector( + ".downloads-tor-warning-title" + ).textContent = this._getTorString("torbutton.download.warning.title"); - let warningDescriptionText = this._getString( - "torbutton.download.warning.description" - ); - let [head, rest] = warningDescriptionText.split("%S"); const tailsLink = document.createElement("a"); - tailsLink.setAttribute("href", TAILS_URI); - tailsLink.textContent = tailsBrandName.trim(); + tailsLink.href = "https://tails.boum.org/"; + tailsLink.textContent = this._getTorString( + "torbutton.download.warning.tails_brand_name" + ); tailsLink.addEventListener("click", event => { event.preventDefault(); this.hidePanel(); - openWebLinkIn(TAILS_URI, "tab"); + openWebLinkIn(tailsLink.href, "tab"); }); - let downloadsWarningDescription = document.getElementById( - "downloadsWarningDescription" - ); - downloadsWarningDescription.append(head, tailsLink, rest); + const [beforeLink, afterLink] = this._getTorString( + "torbutton.download.warning.description" + ).split("%S"); + + torWarningMessage + .querySelector(".downloads-tor-warning-description") + .append(beforeLink, tailsLink, afterLink); - let dismissBtn = document.getElementById( - "downloadWarningDismiss" + let dismissButton = torWarningMessage.querySelector( + ".downloads-tor-warning-dismiss-button" ); - dismissBtn.textContent = this._getString("torbutton.download.warning.dismiss"); - dismissBtn.addEventListener("click", event => { + dismissButton.textContent = this._getTorString( + "torbutton.download.warning.dismiss" + ); + dismissButton.addEventListener("click", event => { Services.prefs.setBoolPref(PREF_SHOW_DOWNLOAD_WARNING, false); - document.getElementById("downloadsWarning").hidden = true; - this._focusPanel(true); }); - this._torWarningInitialized = 1; + this._torWarningInitialized = true; } DownloadsCommon.log( @@ -254,6 +265,14 @@ var DownloadsPanel = { ); } + if (this._torWarningPrefObserver) { + Services.prefs.removeObserver( + PREF_SHOW_DOWNLOAD_WARNING, + this._torWarningPrefObserver + ); + delete this._torWarningPrefObserver; + } + this._state = this.kStateUninitialized; DownloadsSummary.active = false; @@ -591,14 +610,17 @@ var DownloadsPanel = { * * @param {bool} [forceFocus=false] - Whether to force move the focus. */ - _focusPanel(forceFocus=false) { + _focusPanel(forceFocus = false) { if (!forceFocus) { // We may be invoked while the panel is still waiting to be shown. if (this._state != this.kStateShown) { return; } - if (document.activeElement && this.panel.contains(document.activeElement)) { + if ( + document.activeElement && + this.panel.contains(document.activeElement) + ) { return; } } @@ -729,7 +751,7 @@ var DownloadsPanel = { * * @return {string} The string. */ - _getString(name) { + _getTorString(name) { if (!this._stringBundle) { this._stringBundle = Services.strings.createBundle( "chrome://torbutton/locale/torbutton.properties" ===================================== browser/components/downloads/content/downloadsPanel.inc.xhtml ===================================== @@ -124,16 +124,19 @@ disablekeynav="true"> <panelview id="downloadsPanel-mainView"> - <vbox id="downloadsWarning"> + <vbox id="downloadsPanelTorWarning"> <vbox role="alert" - aria-labelledby="downloadsWarningHeaderTitle" - aria-describedby="downloadsWarningDescription"> - <html:p id="downloadsWarningHeaderTitle"></html:p> - <html:p id="downloadsWarningDescription"> + aria-labelledby="downloadsPanelTorWarningTitle" + aria-describedby="downloadsPanelTorWarningDescription"> + <html:p id="downloadsPanelTorWarningTitle" + class="downloads-tor-warning-title"> + </html:p> + <html:p id="downloadsPanelTorWarningDescription" + class="downloads-tor-warning-description"> </html:p> <html:div class="panel-footer"> - <html:button id="downloadWarningDismiss"> + <html:button class="downloads-tor-warning-dismiss-button"> </html:button> </html:div> </vbox> ===================================== browser/components/places/content/places.css ===================================== @@ -126,3 +126,7 @@ tree[is="places-tree"] > treechildren::-moz-tree-cell { margin: 2px 4px; color: currentColor; } + +#placesDownloadsTorWarning:not(.downloads-visible) { + display: none; +} ===================================== browser/components/places/content/places.js ===================================== @@ -6,6 +6,7 @@ /* import-globals-from instantEditBookmark.js */ /* import-globals-from /toolkit/content/contentAreaUtils.js */ /* import-globals-from /browser/components/downloads/content/allDownloadsView.js */ +/* import-globals-from /browser/base/content/utilityOverlay.js */ /* Shared Places Import - change other consumers if you change this: */ var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -164,11 +165,15 @@ var PlacesOrganizer = { "&sort=" + Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING; + const torWarningMessage = document.getElementById( + "placesDownloadsTorWarning" + ); ContentArea.setContentViewForQueryString( DOWNLOADS_QUERY, () => new DownloadsPlacesView( document.getElementById("downloadsListBox"), + torWarningMessage, false ), { @@ -178,6 +183,33 @@ var PlacesOrganizer = { } ); + // Initialize tor warning text content. + torWarningMessage.querySelector( + ".downloads-tor-warning-title" + ).textContent = this._getTorString("torbutton.download.warning.title"); + + const tailsLink = document.createElement("a"); + tailsLink.href = "https://tails.boum.org/"; + tailsLink.textContent = this._getTorString( + "torbutton.download.warning.tails_brand_name" + ); + tailsLink.addEventListener("click", event => { + event.preventDefault(); + openWebLinkIn(tailsLink.href, "tab"); + }); + + const [beforeLink, afterLink] = this._getTorString( + "torbutton.download.warning.description" + ).split("%S"); + + torWarningMessage + .querySelector(".downloads-tor-warning-description") + .append(beforeLink, tailsLink, afterLink); + + torWarningMessage.querySelector( + ".downloads-tor-warning-dismiss-button" + ).textContent = this._getTorString("torbutton.download.warning.dismiss"); + ContentArea.init(); this._places = document.getElementById("placesList"); @@ -246,6 +278,30 @@ var PlacesOrganizer = { ContentArea.focus(); }, + /** + * Get a string from the properties bundle. + * + * @param {string} name - The string name. + * + * @returns {string} The string. + */ + _getTorString(name) { + if (!this._stringBundle) { + this._stringBundle = Services.strings.createBundle( + "chrome://torbutton/locale/torbutton.properties" + ); + } + try { + return this._stringBundle.GetStringFromName(name); + } catch {} + if (!this._fallbackStringBundle) { + this._fallbackStringBundle = Services.strings.createBundle( + "resource://torbutton/locale/en-US/torbutton.properties" + ); + } + return this._fallbackStringBundle.GetStringFromName(name); + }, + QueryInterface: ChromeUtils.generateQI([]), handleEvent: function PO_handleEvent(aEvent) { @@ -1386,9 +1442,20 @@ var ContentArea = { oldView.associatedElement.hidden = true; aNewView.associatedElement.hidden = false; + const isDownloads = aNewView.associatedElement.id === "downloadsListBox"; + const torWarningMessage = document.getElementById( + "placesDownloadsTorWarning" + ); + const torWarningLoosingFocus = + torWarningMessage.contains(document.activeElement) && !isDownloads; + torWarningMessage.classList.toggle("downloads-visible", isDownloads); + // If the content area inactivated view was focused, move focus // to the new view. - if (document.activeElement == oldView.associatedElement) { + if ( + document.activeElement == oldView.associatedElement || + torWarningLoosingFocus + ) { aNewView.associatedElement.focus(); } } ===================================== browser/components/places/content/places.xhtml ===================================== @@ -345,6 +345,21 @@ </tree> <splitter collapse="none" persist="state"></splitter> <vbox id="contentView" flex="4"> + <html:message-bar id="placesDownloadsTorWarning" + role="alert" + aria-labelledby="placesDownloadsTorWarningTitle" + aria-describedby="placesDownloadsTorWarningDescription"> + <html:div class="downloads-tor-warning-grid"> + <html:p id="placesDownloadsTorWarningTitle" + class="downloads-tor-warning-title"> + </html:p> + <html:p id="placesDownloadsTorWarningDescription" + class="downloads-tor-warning-description"> + </html:p> + <html:button class="downloads-tor-warning-dismiss-button"> + </html:button> + </html:div> + </html:message-bar> <vbox id="placesViewsBox" flex="1"> <tree id="placeContent" class="plain placesTree" ===================================== browser/themes/shared/customizableui/panelUI-shared.css ===================================== @@ -1324,7 +1324,7 @@ panelview .toolbarbutton-1 { #downloadsFooterButtons > toolbarseparator, .cui-widget-panelview menuseparator, .cui-widget-panel toolbarseparator, -#downloadsWarning toolbarseparator, +#downloadsPanelTorWarning toolbarseparator, #securityLevel-panel toolbarseparator { appearance: none; min-height: 0; ===================================== browser/themes/shared/downloads/contentAreaDownloadsView.css ===================================== @@ -25,3 +25,7 @@ text-align: center; color: var(--in-content-deemphasized-text); } + +#aboutDownloadsTorWarning { + margin-block-end: 8px; +} View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/787ac90… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/787ac90… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 1832832 - protect encoder accesses in Java callbacks....
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 968655c2 by Richard Pospesel at 2023-06-06T18:18:14+00:00 fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc - MOZ_GUARDED_BY is just GUARDED_BY in esr 102 - - - - - 1 changed file: - dom/media/platforms/android/AndroidDataEncoder.h Changes: ===================================== dom/media/platforms/android/AndroidDataEncoder.h ===================================== @@ -56,7 +56,7 @@ class AndroidDataEncoder final : public MediaDataEncoder { private: Mutex mMutex; - AndroidDataEncoder* mEncoder MOZ_GUARDED_BY(mMutex); + AndroidDataEncoder* mEncoder GUARDED_BY(mMutex); }; friend class CallbacksSupport; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/968655c… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/968655c… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-102.12.0esr-12.5-1] fixup! Bug 1832832 - protect encoder accesses in Java callbacks....
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed to branch base-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser Commits: 86cbc351 by Richard Pospesel at 2023-06-06T18:18:34+00:00 fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc - MOZ_GUARDED_BY is just GUARDED_BY in esr 102 - - - - - 1 changed file: - dom/media/platforms/android/AndroidDataEncoder.h Changes: ===================================== dom/media/platforms/android/AndroidDataEncoder.h ===================================== @@ -56,7 +56,7 @@ class AndroidDataEncoder final : public MediaDataEncoder { private: Mutex mMutex; - AndroidDataEncoder* mEncoder MOZ_GUARDED_BY(mMutex); + AndroidDataEncoder* mEncoder GUARDED_BY(mMutex); }; friend class CallbacksSupport; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/86cbc35… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/86cbc35… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser] Pushed new tag tor-browser-102.12.0esr-12.0-1-build2
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed new tag tor-browser-102.12.0esr-12.0-1-build2 at The Tor Project / Applications / Tor Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/tor-brows… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser] Pushed new tag base-browser-102.12.0esr-12.0-1-build2
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed new tag base-browser-102.12.0esr-12.0-1-build2 at The Tor Project / Applications / Tor Browser -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/base-brow… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-102.12.0esr-12.0-1] fixup! Bug 1832832 - protect encoder accesses in Java callbacks....
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed to branch base-browser-102.12.0esr-12.0-1 at The Tor Project / Applications / Tor Browser Commits: 47e54b06 by Richard Pospesel at 2023-06-06T18:17:53+00:00 fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc - MOZ_GUARDED_BY is just GUARDED_BY in esr 102 - - - - - 1 changed file: - dom/media/platforms/android/AndroidDataEncoder.h Changes: ===================================== dom/media/platforms/android/AndroidDataEncoder.h ===================================== @@ -56,7 +56,7 @@ class AndroidDataEncoder final : public MediaDataEncoder { private: Mutex mMutex; - AndroidDataEncoder* mEncoder MOZ_GUARDED_BY(mMutex); + AndroidDataEncoder* mEncoder GUARDED_BY(mMutex); }; friend class CallbacksSupport; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/47e54b0… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/47e54b0… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.0-1] fixup! Bug 1832832 - protect encoder accesses in Java callbacks....
by richard (@richard) 06 Jun '23

06 Jun '23
richard pushed to branch tor-browser-102.12.0esr-12.0-1 at The Tor Project / Applications / Tor Browser Commits: cc1bd3d6 by Richard Pospesel at 2023-06-06T17:51:08+00:00 fixup! Bug 1832832 - protect encoder accesses in Java callbacks. r=media-playback-reviewers,alwu a=pascalc - MOZ_GUARDED_BY is just GUARDED_BY in esr 102 - - - - - 1 changed file: - dom/media/platforms/android/AndroidDataEncoder.h Changes: ===================================== dom/media/platforms/android/AndroidDataEncoder.h ===================================== @@ -56,7 +56,7 @@ class AndroidDataEncoder final : public MediaDataEncoder { private: Mutex mMutex; - AndroidDataEncoder* mEncoder MOZ_GUARDED_BY(mMutex); + AndroidDataEncoder* mEncoder GUARDED_BY(mMutex); }; friend class CallbacksSupport; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/cc1bd3d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/cc1bd3d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser] Deleted tag base-browser-102.12.0esr-12.5-1-build2
by richard (@richard) 06 Jun '23

06 Jun '23
richard deleted tag base-browser-102.12.0esr-12.5-1-build2 at The Tor Project / Applications / Tor Browser -- You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • ...
  • 746
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.