This is an automated email from the git hooks/post-receive script.
pierov pushed a change to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
from b2ffba38205d1 Bug 11698: Incorporate Tor Browser Manual pages into Tor Browser new c4471d5950e6f fixup! Bug 40562: Added Tor-related preferences to 000-tor-browser.js new 35c90c8ee95ba fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection new 382f41ec168a3 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection new b8802512aad78 Bug 41050: HTTPS-Only Mode Alert's "Continue to HTTP Site" button doesn't work on IP addresses new 11dff59f1d32a fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection new 7e4d47b3a5cd2 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection new aefd06bdc8b69 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
The 7 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: browser/app/profile/000-tor-browser.js | 2 +- .../torpreferences/content/bridgeQrDialog.xhtml | 10 ++- .../components/torpreferences/content/check.svg | 3 + .../torpreferences/content/connectionPane.js | 33 +++++--- .../torpreferences/content/connectionPane.xhtml | 9 +- .../torpreferences/content/provideBridgeDialog.jsm | 5 +- .../torpreferences/content/torPreferences.css | 98 ++++++++++++++-------- browser/components/torpreferences/jar.mn | 1 + toolkit/actors/AboutHttpsOnlyErrorParent.jsm | 17 +++- 9 files changed, 117 insertions(+), 61 deletions(-) create mode 100644 browser/components/torpreferences/content/check.svg
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit c4471d5950e6f8aaa48aafb90791a99a40e21eb0 Author: Richard Pospesel richard@torproject.org AuthorDate: Fri Jul 15 19:23:29 2022 +0000
fixup! Bug 40562: Added Tor-related preferences to 000-tor-browser.js --- browser/app/profile/000-tor-browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js index effd852c546e0..146ad014fc5d9 100644 --- a/browser/app/profile/000-tor-browser.js +++ b/browser/app/profile/000-tor-browser.js @@ -27,7 +27,7 @@ pref("network.security.ports.banned", "9050,9051,9150,9151"); pref("network.dns.disabled", true); // This should cover the #5741 patch for DNS leaks pref("network.http.max-persistent-connections-per-proxy", 256);
-pref("browser.uiCustomization.state", "{"placements":{"widget-overflow-fixed-list":[],"PersonalToolbar":["personal-bookmarks"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","torbutton-button","security-level-button","downloads-button"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"toolbar-menubar":["menubar-items"],"PanelUI-contents":["home-button","edit-controls","zoom-controls","new- [...] +pref("browser.uiCustomization.state", "{"placements":{"widget-overflow-fixed-list":[],"PersonalToolbar":["personal-bookmarks"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","torbutton-button","security-level-button","downloads-button"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"toolbar-menubar":["menubar-items"],"PanelUI-contents":["home-button","edit-controls","zoom-controls","new- [...]
// Treat .onions as secure pref("dom.securecontext.whitelist_onions", true);
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit 35c90c8ee95ba33e38be42e6e26ddfe82f862faf Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Mon Jul 18 16:29:49 2022 +0200
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41059: Bridges are not shown in locales that have only the language code --- browser/components/torpreferences/content/connectionPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/browser/components/torpreferences/content/connectionPane.js b/browser/components/torpreferences/content/connectionPane.js index 644b13dc9cb8e..6162ca37e8faf 100644 --- a/browser/components/torpreferences/content/connectionPane.js +++ b/browser/components/torpreferences/content/connectionPane.js @@ -731,7 +731,7 @@ const gConnectionPane = (function() { const annotations = await res.json(); const bcp47 = Services.locale.appLocaleAsBCP47; const dash = bcp47.indexOf("-"); - const lang = dash !== -1 ? bcp47.substr(dash) : lang; + const lang = dash !== -1 ? bcp47.substr(dash) : bcp47; if (bcp47 in annotations) { emojiAnnotations = annotations[bcp47]; } else if (lang in annotations) {
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit 382f41ec168a350a02e8a41b36851e7e0e9485cd Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Mon Jul 18 17:51:44 2022 +0200
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41055: Icon fix from #40834 is missing in 11.5 stable --- browser/components/torpreferences/content/check.svg | 3 +++ browser/components/torpreferences/content/torPreferences.css | 4 ++-- browser/components/torpreferences/jar.mn | 1 + 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/browser/components/torpreferences/content/check.svg b/browser/components/torpreferences/content/check.svg new file mode 100644 index 0000000000000..34b90800c71b9 --- /dev/null +++ b/browser/components/torpreferences/content/check.svg @@ -0,0 +1,3 @@ +<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> diff --git a/browser/components/torpreferences/content/torPreferences.css b/browser/components/torpreferences/content/torPreferences.css index a39bd4b4767cb..964fca1590afc 100644 --- a/browser/components/torpreferences/content/torPreferences.css +++ b/browser/components/torpreferences/content/torPreferences.css @@ -133,7 +133,7 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { }
#torPreferences-status-internet-icon { - list-style-image: url("chrome://devtools/skin/images/globe.svg"); + list-style-image: url("chrome://browser/content/torpreferences/network.svg"); }
#torPreferences-status-internet-statusIcon.online, @@ -144,7 +144,7 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { }
#torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected { - list-style-image: url("chrome://devtools/skin/images/check.svg"); + list-style-image: url("chrome://browser/content/torpreferences/check.svg"); -moz-context-properties: fill; fill: var(--purple-60); } diff --git a/browser/components/torpreferences/jar.mn b/browser/components/torpreferences/jar.mn index 4d82268f3c8d6..b54373ae7bc23 100644 --- a/browser/components/torpreferences/jar.mn +++ b/browser/components/torpreferences/jar.mn @@ -3,6 +3,7 @@ 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)
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit b8802512aad78b5430cc0515ff7bbcdf86a00e00 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Mon Jul 18 18:56:13 2022 +0200
Bug 41050: HTTPS-Only Mode Alert's "Continue to HTTP Site" button doesn't work on IP addresses
This bug has already been fixed upstream, so we should drop this patch when we update to 102. See also https://bugzilla.mozilla.org/show_bug.cgi?id=1697866. --- toolkit/actors/AboutHttpsOnlyErrorParent.jsm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/toolkit/actors/AboutHttpsOnlyErrorParent.jsm b/toolkit/actors/AboutHttpsOnlyErrorParent.jsm index 407e014ff6574..5b6bc94ab88ff 100644 --- a/toolkit/actors/AboutHttpsOnlyErrorParent.jsm +++ b/toolkit/actors/AboutHttpsOnlyErrorParent.jsm @@ -87,6 +87,19 @@ class AboutHttpsOnlyErrorParent extends JSWindowActorParent { const oldOriginAttributes = aBrowser.contentPrincipal.originAttributes; const hasFpiAttribute = !!oldOriginAttributes.firstPartyDomain.length;
+ let firstPartyDomain = ""; + if (hasFpiAttribute) { + // This try-catch to check whether a host is an IP address is used also in + // other parts of Firefox + try { + firstPartyDomain = Services.eTLD.getBaseDomain(newURI); + } catch (e) { + if (e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS) { + firstPartyDomain = newURI.host; + } + } + } + // Create new content principal for the permission. If first-party isolation // is enabled, we have to replace the about-page first-party domain with the // one from the exempt website. @@ -94,9 +107,7 @@ class AboutHttpsOnlyErrorParent extends JSWindowActorParent { newURI, { ...oldOriginAttributes, - firstPartyDomain: hasFpiAttribute - ? Services.eTLD.getBaseDomain(newURI) - : "", + firstPartyDomain, } );
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit 11dff59f1d32a919d051acb976fd5914d71d1193 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Wed Jul 20 10:58:57 2022 +0200
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41054: Improve color contrast of purple elements in connection settings in dark theme Bug 41058: Hide `currentBridges` description when the section itself is hidden
Also, adjust the height of bridge cards when updating the connected status.
Changed substr with substring and removed some unnecessary async.
Updated the connected bridge check to the proton one.
Fixed the refresh icon in the BridgeDB modal.
Fixed the color of the trash icon in the dark mode. --- .../torpreferences/content/connectionPane.js | 33 +++++++++++++++------- .../torpreferences/content/connectionPane.xhtml | 4 +-- .../torpreferences/content/torPreferences.css | 30 ++++++++++++++++---- 3 files changed, 50 insertions(+), 17 deletions(-)
diff --git a/browser/components/torpreferences/content/connectionPane.js b/browser/components/torpreferences/content/connectionPane.js index 6162ca37e8faf..e3125c850708e 100644 --- a/browser/components/torpreferences/content/connectionPane.js +++ b/browser/components/torpreferences/content/connectionPane.js @@ -110,7 +110,8 @@ const gConnectionPane = (function() { chooseForMe: "#torPreferences-bridges-buttonChooseBridgeForMe", currentHeader: "#torPreferences-currentBridges-header", currentHeaderText: "#torPreferences-currentBridges-headerText", - currentDescriptionText: "#torPreferences-currentBridges-description", + currentDescription: "#torPreferences-currentBridges-description", + currentDescriptionText: "#torPreferences-currentBridges-descriptionText", switch: "#torPreferences-currentBridges-switch", cards: "#torPreferences-currentBridges-cards", cardTemplate: "#torPreferences-bridgeCard-template", @@ -259,7 +260,7 @@ const gConnectionPane = (function() { "label", TorStrings.settings.statusInternetTest ); - internetTest.addEventListener("command", async () => { + internetTest.addEventListener("command", () => { this.onInternetTest(); }); const internetIcon = prefpane.querySelector( @@ -435,7 +436,10 @@ const gConnectionPane = (function() { this._populateBridgeCards(); }); }); - prefpane.querySelector( + const bridgeDescription = prefpane.querySelector( + selectors.bridges.currentDescription + ); + bridgeDescription.querySelector( selectors.bridges.currentDescriptionText ).textContent = TorStrings.settings.bridgeCurrentDescription; const bridgeTemplate = prefpane.querySelector( @@ -596,8 +600,8 @@ const gConnectionPane = (function() { try { const container = card.querySelector(selectors.bridges.cardQr); const style = getComputedStyle(container); - const width = style.width.substr(0, style.width.length - 2); - const height = style.height.substr(0, style.height.length - 2); + const width = style.width.substring(0, style.width.length - 2); + const height = style.height.substring(0, style.height.length - 2); new QRCode(container, { text: bridgeString, width, @@ -621,7 +625,10 @@ const gConnectionPane = (function() { // Expanded cards have the height set manually to their details for // the CSS animation. However, when resizing the window, we may need // to adjust their height. - if (card.classList.contains("expanded")) { + if ( + card.classList.contains("expanded") || + card.classList.contains("currently-connected") + ) { const grid = card.querySelector(selectors.bridges.cardQrGrid); // Reset it first, to avoid having a height that is higher than // strictly needed. Also, remove the to-animate class, because the @@ -644,13 +651,14 @@ const gConnectionPane = (function() { removeAll.addEventListener("command", () => { this._confirmBridgeRemoval(); }); - this._populateBridgeCards = async () => { + this._populateBridgeCards = () => { const collapseThreshold = 4;
let newStrings = new Set(TorSettings.bridges.bridge_strings); const numBridges = newStrings.size; if (!newStrings.size) { bridgeHeader.setAttribute("hidden", "true"); + bridgeDescription.setAttribute("hidden", "true"); bridgeCards.setAttribute("hidden", "true"); showAll.setAttribute("hidden", "true"); removeAll.setAttribute("hidden", "true"); @@ -658,6 +666,7 @@ const gConnectionPane = (function() { return; } bridgeHeader.removeAttribute("hidden"); + bridgeDescription.removeAttribute("hidden"); bridgeCards.removeAttribute("hidden"); bridgeSwitch.checked = TorSettings.bridges.enabled; bridgeCards.classList.toggle("disabled", !TorSettings.bridges.enabled); @@ -731,7 +740,7 @@ const gConnectionPane = (function() { const annotations = await res.json(); const bcp47 = Services.locale.appLocaleAsBCP47; const dash = bcp47.indexOf("-"); - const lang = dash !== -1 ? bcp47.substr(dash) : bcp47; + const lang = dash !== -1 ? bcp47.substring(dash) : bcp47; if (bcp47 in annotations) { emojiAnnotations = annotations[bcp47]; } else if (lang in annotations) { @@ -765,6 +774,7 @@ const gConnectionPane = (function() { const placeholder = document.createElement("span"); bridgeCards.prepend(placeholder); placeholder.replaceWith(...cards); + this._checkBridgeCardsHeight(); }; try { const { controller } = ChromeUtils.import( @@ -798,7 +808,7 @@ 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].substr(1); + const bridgeId = status.circuit[0][0].substring(1); if (bridgeId !== this._currentBridge) { this._currentBridge = bridgeId; this._updateConnectedBridges(); @@ -916,7 +926,7 @@ const gConnectionPane = (function() { init() { this._populateXUL();
- let onUnload = () => { + const onUnload = () => { window.removeEventListener("unload", onUnload); gConnectionPane.uninit(); }; @@ -925,6 +935,9 @@ const gConnectionPane = (function() { window.addEventListener("resize", () => { this._checkBridgeCardsHeight(); }); + window.addEventListener("hashchange", () => { + this._checkBridgeCardsHeight(); + }) },
uninit() { diff --git a/browser/components/torpreferences/content/connectionPane.xhtml b/browser/components/torpreferences/content/connectionPane.xhtml index 860f3c233cb6c..10c2d0b60b66b 100644 --- a/browser/components/torpreferences/content/connectionPane.xhtml +++ b/browser/components/torpreferences/content/connectionPane.xhtml @@ -94,8 +94,8 @@ <html:span id="torPreferences-currentBridges-headerText"/> <html:input type="checkbox" id="torPreferences-currentBridges-switch" class="toggle-button"/> </html:h2> - <description flex="1"> - <html:span id="torPreferences-currentBridges-description"/> + <description flex="1" id="torPreferences-currentBridges-description"> + <html:span id="torPreferences-currentBridges-descriptionText"/> </description> <menupopup id="torPreferences-bridgeCard-menu"/> <vbox id="torPreferences-bridgeCard-template" class="torPreferences-bridgeCard"> diff --git a/browser/components/torpreferences/content/torPreferences.css b/browser/components/torpreferences/content/torPreferences.css index 964fca1590afc..20e93bedf2f84 100644 --- a/browser/components/torpreferences/content/torPreferences.css +++ b/browser/components/torpreferences/content/torPreferences.css @@ -149,6 +149,12 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { fill: var(--purple-60); }
+@media (-moz-toolbar-prefers-color-scheme: dark) { + #torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected { + fill: var(--purple-30); + } +} + #torPreferences-status-internet-status { margin-inline-end: 32px; } @@ -274,12 +280,16 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before {
.torPreferences-bridgeCard-connectedBadge { display: none; - padding: 8px 12px; - border-radius: 16px; - background: rgba(128, 0, 215, 0.1); + margin-inline-end: 12px; color: var(--purple-60); }
+@media (-moz-toolbar-prefers-color-scheme: dark) { + .torPreferences-bridgeCard-connectedBadge { + color: var(--purple-30); + } +} + .currently-connected .torPreferences-bridgeCard-connectedBadge { display: flex; } @@ -287,9 +297,9 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { .torPreferences-bridgeCard-connectedIcon { margin-inline-start: 1px; margin-inline-end: 7px; - list-style-image: url("chrome://devtools/skin/images/check.svg"); + list-style-image: url("chrome://browser/content/torpreferences/check.svg"); -moz-context-properties: fill; - fill: var(--purple-60); + fill: currentColor; }
.torPreferences-bridgeCard-options { @@ -306,6 +316,11 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { -moz-context-properties: fill; }
+#torPreferences-bridgeCard-menu menuitem { + fill: currentColor; + -moz-context-properties: fill; +} + .torPreferences-bridgeCard-qrWrapper { grid-area: bridge-qr; display: flex; @@ -445,6 +460,11 @@ button#torPreferences-requestBridge-refreshCaptchaButton { min-width: initial; }
+#torPreferences-requestBridge-refreshCaptchaButton image { + -moz-context-properties: fill; + fill: currentColor; +} + dialog#torPreferences-requestBridge-dialog > hbox { margin-bottom: 1em; }
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit 7e4d47b3a5cd23f1da961bc0eed48df691c4ef80 Author: WofWca wofwca@protonmail.com AuthorDate: Tue Jul 19 20:11:38 2022 +0300
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
fix: don't invert bridges' QRs' colors in dark theme Fixes https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41049 + a pinch of refactoring --- .../torpreferences/content/bridgeQrDialog.xhtml | 10 ++-- .../torpreferences/content/connectionPane.xhtml | 5 +- .../torpreferences/content/torPreferences.css | 64 +++++++++++++--------- 3 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/browser/components/torpreferences/content/bridgeQrDialog.xhtml b/browser/components/torpreferences/content/bridgeQrDialog.xhtml index 2a49e4c0e7d9e..5411c963ba490 100644 --- a/browser/components/torpreferences/content/bridgeQrDialog.xhtml +++ b/browser/components/torpreferences/content/bridgeQrDialog.xhtml @@ -7,10 +7,12 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml%22%3E <dialog id="bridgeQr-dialog" buttons="accept"> - <html:div id="bridgeQr-container"> - <html:div id="bridgeQr-target"/> - <html:div id="bridgeQr-onionBox"/> - <html:div id="bridgeQr-onion"/> + html:div + <html:div id="bridgeQr"> + <html:div id="bridgeQr-target"/> + <html:div id="bridgeQr-onionBox"/> + <html:div id="bridgeQr-onion"/> + </html:div> </html:div> <script type="application/javascript"><![CDATA[ "use strict"; diff --git a/browser/components/torpreferences/content/connectionPane.xhtml b/browser/components/torpreferences/content/connectionPane.xhtml index 10c2d0b60b66b..82738723ae21a 100644 --- a/browser/components/torpreferences/content/connectionPane.xhtml +++ b/browser/components/torpreferences/content/connectionPane.xhtml @@ -112,12 +112,11 @@ </hbox> <box class="torPreferences-bridgeCard-grid"> <box class="torPreferences-bridgeCard-qrWrapper"> - <box class="torPreferences-bridgeCard-qr stop-click"> + <html:div class="torPreferences-bridgeCard-qr stop-click"> <html:div class="torPreferences-bridgeCard-qrCode"/> <html:div class="torPreferences-bridgeCard-qrOnionBox"/> <html:div class="torPreferences-bridgeCard-qrOnion"/> - </box> - <html:div class="torPreferences-bridgeCard-filler"/> + </html:div> </box> <description class="torPreferences-bridgeCard-share"></description> <hbox class="torPreferences-bridgeCard-addrBox"> diff --git a/browser/components/torpreferences/content/torPreferences.css b/browser/components/torpreferences/content/torPreferences.css index 20e93bedf2f84..b13cbec1603be 100644 --- a/browser/components/torpreferences/content/torPreferences.css +++ b/browser/components/torpreferences/content/torPreferences.css @@ -323,56 +323,56 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before {
.torPreferences-bridgeCard-qrWrapper { grid-area: bridge-qr; - display: flex; - flex-direction: column; + display: block; /* So it doesn't stretch the child vertically. */ + margin-inline-end: 14px; }
.torPreferences-bridgeCard-qr { - width: 126px; + --qr-one: black; + --qr-zero: white; + background: var(--qr-zero); position: relative; + padding: 4px; + border-radius: 2px; }
.torPreferences-bridgeCard-qrCode { width: 112px; height: 112px; /* Define these colors, as they will be passed to the QR code library */ - background: var(--in-content-box-background); - color: var(--in-content-text-color); + background: var(--qr-zero); + color: var(--qr-one); }
.torPreferences-bridgeCard-qrOnionBox { width: 28px; height: 28px; position: absolute; - top: 42px; - inset-inline-start: 42px; - background: var(--in-content-box-background); + top: calc(50% - 14px); + inset-inline-start: calc(50% - 14px); + background: var(--qr-zero); }
.torPreferences-bridgeCard-qrOnion { width: 16px; height: 16px; position: absolute; - top: 48px; - inset-inline-start: 48px; + top: calc(50% - 8px); + inset-inline-start: calc(50% - 8px);
mask: url("chrome://browser/skin/onion.svg"); mask-repeat: no-repeat; mask-size: 16px; - background: var(--in-content-text-color); + background: var(--qr-one); }
.torPreferences-bridgeCard-qr:hover .torPreferences-bridgeCard-qrOnionBox { - background: var(--in-content-text-color); + background: var(--qr-one); }
.torPreferences-bridgeCard-qr:hover .torPreferences-bridgeCard-qrOnion { mask: url("chrome://global/skin/icons/search-glass.svg"); - background: var(--in-content-box-background); -} - -.torPreferences-bridgeCard-filler { - flex: 1; + background: var(--qr-zero); }
.torPreferences-bridgeCard-grid { @@ -478,39 +478,49 @@ dialog#torPreferences-requestBridge-dialog > hbox { }
/* Show bridge QR dialog */ -#bridgeQr-container { +#bridgeQr { + /* Some readers don't recognize QRs with inverted colors, so let's make + the ones are darker than zeroes. See + https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41049 */ + --qr-one: black; + --qr-zero: white; + background: var(--qr-zero); position: relative; - height: 300px; + /* Padding is needed in case the dark theme is used so the bits don't blend + with whatever the default background color is. */ + padding: 10px; + margin: auto; + margin-bottom: 20px; + max-width: max-content; + border-radius: 5px; }
#bridgeQr-target { - position: absolute; width: 300px; height: 300px; - left: calc(50% - 150px); - background: var(--in-content-box-background); - color: var(--in-content-text-color); + background: var(--qr-zero); + color: var(--qr-one); }
#bridgeQr-onionBox { position: absolute; width: 70px; height: 70px; - top: 115px; + top: calc(50% - 35px); left: calc(50% - 35px); - background-color: var(--in-content-box-background); + background-color: var(--qr-zero); }
#bridgeQr-onion { position: absolute; width: 38px; height: 38px; - top: 131px; + top: calc(50% - 19px); left: calc(50% - 19px); mask: url("chrome://browser/skin/onion.svg"); mask-repeat: no-repeat; mask-size: 38px; - background: var(--in-content-text-color); + background: var(--qr-one); }
/* Builtin bridge dialog */
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.11.0esr-11.5-1 in repository tor-browser.
commit aefd06bdc8b69b62a02b0f61d716403787a02aaf Author: WofWca wofwca@protonmail.com AuthorDate: Tue Jul 19 21:23:25 2022 +0300
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
improvement: "add a bridge manually": populate textarea with exising bridges even if bridges are disabled Otherwsie if there were some bridges already, they would get removed --- browser/components/torpreferences/content/provideBridgeDialog.jsm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/browser/components/torpreferences/content/provideBridgeDialog.jsm b/browser/components/torpreferences/content/provideBridgeDialog.jsm index f20cf9ddd925d..bc6a841138fb6 100644 --- a/browser/components/torpreferences/content/provideBridgeDialog.jsm +++ b/browser/components/torpreferences/content/provideBridgeDialog.jsm @@ -35,10 +35,7 @@ class ProvideBridgeDialog { "placeholder", TorStrings.settings.provideBridgePlaceholder ); - if ( - TorSettings.bridges.enabled && - TorSettings.bridges.source == TorBridgeSource.UserProvided - ) { + if (TorSettings.bridges.source == TorBridgeSource.UserProvided) { this._textarea.value = TorSettings.bridges.bridge_strings.join("\n"); }
tor-commits@lists.torproject.org