tbb-commits
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
June 2023
- 1 participants
- 138 discussions

[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
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

[Git][tpo/applications/tor-browser-build] Pushed new tag tbb-12.0.7-build2
by richard (@richard) 07 Jun '23
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

[Git][tpo/applications/tor-browser-build][maint-12.0] fixup! Bug 40859: Prepare stable release 12.0.7
by richard (@richard) 07 Jun '23
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

[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
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

[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
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&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

[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
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

[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
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">​<br/>​</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">​</html:div>
- <radio id="torPreferences-builtinBridges-radioSnowflake" value="snowflake" hidden="true"/>
- <html:div id="torPreferences-builtinBridges-descrSnowflake" class="indent" hidden="true">​</html:div>
- <radio id="torPreferences-builtinBridges-radioMeekAzure" value="meek-azure" hidden="true"/>
- <html:div id="torPreferences-builtinBridges-descrMeekAzure" class="indent" hidden="true">​</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

[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
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'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
- - - - -
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

[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
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

[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
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