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

Keyboard Shortcuts

Thread View

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

tbb-commits

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

April 2024

  • 1 participants
  • 152 discussions
[Git][tpo/applications/tor-browser][base-browser-115.10.0esr-13.5-1] fixup! Bug 9173: Change the default Firefox profile directory to be relative.
by Pier Angelo Vendrame (@pierov) 22 Apr '24

22 Apr '24
Pier Angelo Vendrame pushed to branch base-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: fd04a394 by Pier Angelo Vendrame at 2024-04-22T16:36:35+02:00 fixup! Bug 9173: Change the default Firefox profile directory to be relative. Bug 42536: Fix !985 on macOS. - - - - - 1 changed file: - toolkit/xre/nsXREDirProvider.cpp Changes: ===================================== toolkit/xre/nsXREDirProvider.cpp ===================================== @@ -1323,6 +… [View More]1323,7 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile, # if defined(XP_MACOSX) // On macOS we try to create the directory immediately to switch to // system-install mode if needed (e.g., when running from the DMG). + bool exists = false; rv = localDir->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (!exists) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fd04a39… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fd04a39… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] fixup! Bug 9173: Change the default Firefox profile directory to be relative.
by Pier Angelo Vendrame (@pierov) 22 Apr '24

22 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 22873387 by Pier Angelo Vendrame at 2024-04-22T09:23:12+02:00 fixup! Bug 9173: Change the default Firefox profile directory to be relative. Bug 42536: Fix !985 on macOS. - - - - - 1 changed file: - toolkit/xre/nsXREDirProvider.cpp Changes: ===================================== toolkit/xre/nsXREDirProvider.cpp ===================================== @@ -1326,6 +… [View More]1326,7 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile, # if defined(XP_MACOSX) // On macOS we try to create the directory immediately to switch to // system-install mode if needed (e.g., when running from the DMG). + bool exists = false; rv = localDir->Exists(&exists); NS_ENSURE_SUCCESS(rv, rv); if (!exists) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2287338… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2287338… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] 2 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by Pier Angelo Vendrame (@pierov) 22 Apr '24

22 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: a9c02248 by Henry Wilkes at 2024-04-22T07:22:05+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 42533: Only update the internal loxId *after* the Lox.activeLoxId has changed. In particular, we want to ensure that the data associated with the new loxId (invites and event data) is set before we fetch … [View More]them. - - - - - 4006866f by Henry Wilkes at 2024-04-22T07:22:05+00:00 fixup! Lox integration Bug 42533: Add notification for when the activeLoxId changes. - - - - - 3 changed files: - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/loxInviteDialog.js - toolkit/components/lox/Lox.sys.mjs Changes: ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -1317,6 +1317,7 @@ const gLoxStatus = { }); Services.obs.addObserver(this, TorSettingsTopics.SettingsChanged); + Services.obs.addObserver(this, LoxTopics.UpdateActiveLoxId); Services.obs.addObserver(this, LoxTopics.UpdateEvents); Services.obs.addObserver(this, LoxTopics.UpdateNextUnlock); Services.obs.addObserver(this, LoxTopics.UpdateRemainingInvites); @@ -1333,6 +1334,7 @@ const gLoxStatus = { */ uninit() { Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged); + Services.obs.removeObserver(this, LoxTopics.UpdateActiveLoxId); Services.obs.removeObserver(this, LoxTopics.UpdateEvents); Services.obs.removeObserver(this, LoxTopics.UpdateNextUnlock); Services.obs.removeObserver(this, LoxTopics.UpdateRemainingInvites); @@ -1343,12 +1345,17 @@ const gLoxStatus = { switch (topic) { case TorSettingsTopics.SettingsChanged: const { changes } = subject.wrappedJSObject; - if ( - changes.includes("bridges.source") || - changes.includes("bridges.lox_id") - ) { + if (changes.includes("bridges.source")) { this._updateLoxId(); } + // NOTE: We do not call _updateLoxId when "bridges.lox_id" is in the + // changes. Instead we wait until LoxTopics.UpdateActiveLoxId to ensure + // that the Lox module has responded to the change in ID strictly + // *before* we do. In particular, we want to make sure the invites and + // event data has been cleared. + break; + case LoxTopics.UpdateActiveLoxId: + this._updateLoxId(); break; case LoxTopics.UpdateNextUnlock: this._updateNextUnlock(); @@ -1378,9 +1385,7 @@ const gLoxStatus = { */ async _updateLoxId() { let loxId = - TorSettings.bridges.source === TorBridgeSource.Lox - ? TorSettings.bridges.lox_id - : ""; + TorSettings.bridges.source === TorBridgeSource.Lox ? Lox.activeLoxId : ""; if (loxId === this._loxId) { return; } ===================================== browser/components/torpreferences/content/loxInviteDialog.js ===================================== @@ -104,6 +104,7 @@ const gLoxInvites = { // NOTE: TorSettings should already be initialized when this dialog is // opened. Services.obs.addObserver(this, TorSettingsTopics.SettingsChanged); + Services.obs.addObserver(this, LoxTopics.UpdateActiveLoxId); Services.obs.addObserver(this, LoxTopics.UpdateRemainingInvites); Services.obs.addObserver(this, LoxTopics.NewInvite); @@ -119,6 +120,7 @@ const gLoxInvites = { */ uninit() { Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged); + Services.obs.removeObserver(this, LoxTopics.UpdateActiveLoxId); Services.obs.removeObserver(this, LoxTopics.UpdateRemainingInvites); Services.obs.removeObserver(this, LoxTopics.NewInvite); }, @@ -127,13 +129,13 @@ const gLoxInvites = { switch (topic) { case TorSettingsTopics.SettingsChanged: const { changes } = subject.wrappedJSObject; - if ( - changes.includes("bridges.source") || - changes.includes("bridges.lox_id") - ) { + if (changes.includes("bridges.source")) { this._updateLoxId(); } break; + case LoxTopics.UpdateActiveLoxId: + this._updateLoxId(); + break; case LoxTopics.UpdateRemainingInvites: this._updateRemainingInvites(); break; @@ -155,9 +157,7 @@ const gLoxInvites = { */ _updateLoxId() { const loxId = - TorSettings.bridges.source === TorBridgeSource.Lox - ? TorSettings.bridges.lox_id - : ""; + TorSettings.bridges.source === TorBridgeSource.Lox ? Lox.activeLoxId : ""; if (!loxId || (this._loxId !== null && loxId !== this._loxId)) { // No lox id, or it changed. Close this dialog. this._dialog.cancelDialog(); ===================================== toolkit/components/lox/Lox.sys.mjs ===================================== @@ -55,6 +55,8 @@ XPCOMUtils.defineLazyModuleGetters(lazy, { }); export const LoxTopics = Object.freeze({ + // Whenever the activeLoxId value changes. + UpdateActiveLoxId: "lox:update-active-lox-id", // Whenever the bridges *might* have changed. // getBridges only uses #credentials, so this will only fire when it changes. UpdateBridges: "lox:update-bridges", @@ -141,6 +143,10 @@ class LoxImpl { */ #activeLoxId = null; + get activeLoxId() { + return this.#activeLoxId; + } + /** * Update the active lox id. */ @@ -164,6 +170,8 @@ class LoxImpl { this.#store(); } this.#activeLoxId = loxId; + + Services.obs.notifyObservers(null, LoxTopics.UpdateActiveLoxId); } observe(subject, topic, data) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/00e009… -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/00e009… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by richard (@richard) 18 Apr '24

18 Apr '24
richard pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 00e009df by Henry Wilkes at 2024-04-18T13:57:12+01:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 42457: Add a loading icon for Lox invites. Also reduce the amount of focus-jumping by keeping the focus on the disabled button. Also change the focus of the last provideBridgeDialog page to be the table of bridges. … [View More]NVDA did not announce the focus when it was set to the dialog itself. - - - - - 6 changed files: - browser/components/torpreferences/content/connectionPane.xhtml - browser/components/torpreferences/content/loxInviteDialog.js - browser/components/torpreferences/content/loxInviteDialog.xhtml - browser/components/torpreferences/content/provideBridgeDialog.js - browser/components/torpreferences/content/provideBridgeDialog.xhtml - browser/components/torpreferences/content/torPreferences.css Changes: ===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -48,7 +48,7 @@ class="network-status-label" data-l10n-id="tor-connection-internet-status-label" ></html:span> - <img alt="" class="network-status-loading-icon" /> + <img alt="" class="network-status-loading-icon tor-loading-icon" /> <html:span class="network-status-result"></html:span> </html:div> <html:button ===================================== browser/components/torpreferences/content/loxInviteDialog.js ===================================== @@ -62,12 +62,12 @@ const gLoxInvites = { this._remainingInvitesEl = document.getElementById( "lox-invite-dialog-remaining" ); + this._generateArea = document.getElementById( + "lox-invite-dialog-generate-area" + ); this._generateButton = document.getElementById( "lox-invite-dialog-generate-button" ); - this._connectingEl = document.getElementById( - "lox-invite-dialog-connecting" - ); this._errorEl = document.getElementById("lox-invite-dialog-error-message"); this._inviteListEl = document.getElementById("lox-invite-dialog-list"); @@ -237,20 +237,46 @@ const gLoxInvites = { _setGenerating(isGenerating) { this._generating = isGenerating; this._updateGenerateButtonState(); - this._connectingEl.classList.toggle("show-connecting", isGenerating); + this._generateArea.classList.toggle("show-connecting", isGenerating); }, + /** + * Whether the generate button is disabled. + * + * @type {boolean} + */ + _generateDisabled: false, /** * Update the state of the generate button. */ _updateGenerateButtonState() { - this._generateButton.disabled = this._generating || !this._remainingInvites; + const disabled = this._generating || !this._remainingInvites; + this._generateDisabled = disabled; + // When generating we use "aria-disabled" rather than the "disabled" + // attribute so that the button can remain focusable whilst we generate + // invites. + // NOTE: When we generate the invite the focus will move to the invite list, + // so it should be safe to make the button non-focusable in this case. + const spoofDisabled = this._generating; + this._generateButton.disabled = disabled && !spoofDisabled; + this._generateButton.classList.toggle( + "spoof-button-disabled", + spoofDisabled + ); + if (spoofDisabled) { + this._generateButton.setAttribute("aria-disabled", "true"); + } else { + this._generateButton.removeAttribute("aria-disabled"); + } }, /** * Start generating a new invite. */ _generateNewInvite() { + if (this._generateDisabled) { + return; + } if (this._generating) { console.error("Already generating an invite"); return; @@ -258,15 +284,13 @@ const gLoxInvites = { this._setGenerating(true); // Clear the previous error. this._updateGenerateError(null); - // Move focus from the button to the connecting element, since button is - // now disabled. - this._connectingEl.focus(); - let lostFocus = false; + let moveFocus = false; Lox.generateInvite(this._loxId) .finally(() => { - // Fetch whether the connecting label still has focus before we hide it. - lostFocus = this._connectingEl.contains(document.activeElement); + // Fetch whether the generate button has focus before we potentially + // disable it. + moveFocus = this._generateButton.contains(document.activeElement); this._setGenerating(false); }) .then( @@ -279,7 +303,7 @@ const gLoxInvites = { this._inviteListEl.selectedIndex = 0; } - if (lostFocus) { + if (moveFocus) { // Move focus to the new invite before we hide the "Connecting" // message. this._inviteListEl.focus(); @@ -295,12 +319,6 @@ const gLoxInvites = { this._updateGenerateError("generic"); break; } - - if (lostFocus) { - // Move focus back to the button before we hide the "Connecting" - // message. - this._generateButton.focus(); - } } ); }, @@ -315,7 +333,7 @@ const gLoxInvites = { // First clear the existing error. this._errorEl.removeAttribute("data-l10n-id"); this._errorEl.textContent = ""; - this._errorEl.classList.toggle("show-error", !!type); + this._generateArea.classList.toggle("show-error", !!type); if (!type) { return; ===================================== browser/components/torpreferences/content/loxInviteDialog.xhtml ===================================== @@ -40,10 +40,14 @@ id="lox-invite-dialog-error-message" role="alert" ></html:span> + <img + id="lox-invite-dialog-loading-icon" + class="tor-loading-icon" + alt="" + /> <html:span id="lox-invite-dialog-connecting" role="alert" - tabindex="0" data-l10n-id="lox-invite-dialog-connecting" ></html:span> </html:div> ===================================== browser/components/torpreferences/content/provideBridgeDialog.js ===================================== @@ -84,13 +84,19 @@ const gProvideBridgeDialog = { this._dialog = document.getElementById("user-provide-bridge-dialog"); this._acceptButton = this._dialog.getButton("accept"); + + // Inject our stylesheet into the shadow root so that the accept button can + // take the spoof-button-disabled styling. + const styleLink = document.createElement("link"); + styleLink.rel = "stylesheet"; + styleLink.href = + "chrome://browser/content/torpreferences/torPreferences.css"; + this._dialog.shadowRoot.append(styleLink); + this._textarea = document.getElementById("user-provide-bridge-textarea"); this._errorEl = document.getElementById( "user-provide-bridge-error-message" ); - this._connectingEl = document.getElementById( - "user-provide-bridge-connecting" - ); this._resultDescription = document.getElementById( "user-provide-result-description" ); @@ -152,13 +158,16 @@ const gProvideBridgeDialog = { * Reset focus position in the dialog. */ takeFocus() { - if (this._page === "entry") { - this._textarea.focus(); - } else { - // Move focus to the <xul:window> element. - // In particular, we do not want to keep the focus on the (same) accept - // button (with now different text). - document.documentElement.focus(); + switch (this._page) { + case "entry": + this._textarea.focus(); + break; + case "result": + // Move focus to the table. + // In particular, we do not want to keep the focus on the (same) accept + // button (with now different text). + this._bridgeGrid.focus(); + break; } }, @@ -193,12 +202,27 @@ const gProvideBridgeDialog = { } }, + /** + * Whether the dialog accept button is disabled. + * + * @type {boolean} + */ + _acceptDisabled: false, /** * Callback for whenever the accept button's might need to be disabled. */ updateAcceptDisabled() { - this._acceptButton.disabled = + const disabled = this._page === "entry" && (this.isEmpty() || this._loxLoading); + this._acceptDisabled = disabled; + // Spoof the button to look and act as if it is disabled, but still allow + // keyboard focus so the user can sit on this button whilst we are loading. + this._acceptButton.classList.toggle("spoof-button-disabled", disabled); + if (disabled) { + this._acceptButton.setAttribute("aria-disabled", "true"); + } else { + this._acceptButton.removeAttribute("aria-disabled"); + } }, /** @@ -217,16 +241,7 @@ const gProvideBridgeDialog = { setLoxLoading(isLoading) { this._loxLoading = isLoading; this._textarea.readOnly = isLoading; - this._connectingEl.classList.toggle("show-connecting", isLoading); - if ( - isLoading && - this._acceptButton.contains( - this._acceptButton.getRootNode().activeElement - ) - ) { - // Move focus to the alert before we disable the button. - this._connectingEl.focus(); - } + this._dialog.classList.toggle("show-connecting", isLoading); this.updateAcceptDisabled(); }, @@ -236,6 +251,12 @@ const gProvideBridgeDialog = { * @param {Event} event - The dialogaccept event. */ onDialogAccept(event) { + if (this._acceptDisabled) { + // Prevent closing. + event.preventDefault(); + return; + } + if (this._page === "result") { this._result.accepted = true; // Continue to close the dialog. @@ -313,14 +334,11 @@ const gProvideBridgeDialog = { this._errorEl.textContent = ""; if (error) { this._textarea.setAttribute("aria-invalid", "true"); - // Move focus back to the text area, likely away from the Next button or - // the "Connecting..." alert. - this._textarea.focus(); } else { this._textarea.removeAttribute("aria-invalid"); } this._textarea.classList.toggle("invalid-input", !!error); - this._errorEl.classList.toggle("show-error", !!error); + this._dialog.classList.toggle("show-error", !!error); if (!error) { return; ===================================== browser/components/torpreferences/content/provideBridgeDialog.xhtml ===================================== @@ -51,10 +51,14 @@ role="alert" aria-live="assertive" ></html:span> + <img + id="user-provide-bridge-loading-icon" + class="tor-loading-icon" + alt="" + /> <html:span id="user-provide-bridge-connecting" role="alert" - tabindex="0" data-l10n-id="user-provide-bridge-dialog-connecting" ></html:span> </html:div> @@ -70,6 +74,8 @@ id="user-provide-bridge-grid-display" class="tor-bridges-grid" role="table" + tabindex="0" + aria-labelledby="user-provide-result-description" ></html:div> <html:template id="user-provide-bridge-row-template"> <html:div class="tor-bridges-grid-row" role="row"> ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -14,6 +14,24 @@ button.spoof-button-disabled { pointer-events: none; } +.tor-loading-icon { + width: 16px; + height: 16px; + content: image-set( + url("chrome://global/skin/icons/tor-light-loading.png"), + url("chrome://global/skin/icons/tor-light-loading@2x.png") 2x + ); +} + +@media (prefers-color-scheme: dark) { + .tor-loading-icon { + content: image-set( + url("chrome://global/skin/icons/tor-dark-loading.png"), + url("chrome://global/skin/icons/tor-dark-loading@2x.png") 2x + ); + } +} + /* Status */ #network-status-internet-area { @@ -81,21 +99,6 @@ button.spoof-button-disabled { .network-status-loading-icon { margin-inline-end: 0.5em; - width: 16px; - height: 16px; - content: image-set( - url("chrome://global/skin/icons/tor-light-loading.png"), - url("chrome://global/skin/icons/tor-light-loading@2x.png") 2x - ); -} - -@media (prefers-color-scheme: dark) { - .network-status-loading-icon { - content: image-set( - url("chrome://global/skin/icons/tor-dark-loading.png"), - url("chrome://global/skin/icons/tor-dark-loading@2x.png") 2x - ); - } } #network-status-internet-area:not(.status-loading) .network-status-loading-icon { @@ -900,6 +903,8 @@ dialog#torPreferences-requestBridge-dialog > hbox { #lox-invite-dialog-message-area { grid-area: message; justify-self: end; + display: flex; + align-items: center; } #lox-invite-dialog-message-area::after { @@ -911,19 +916,29 @@ dialog#torPreferences-requestBridge-dialog > hbox { color: var(--in-content-error-text-color); } -#lox-invite-dialog-error-message:not(.show-error) { +#lox-invite-dialog-generate-area:not(.show-error) #lox-invite-dialog-error-message { display: none; } #lox-invite-dialog-connecting { color: var(--text-color-deemphasized); - /* TODO: Add spinner ::before */ + /* Gap with #user-provide-bridge-loading-icon. */ + margin-inline-start: 0.5em; } -#lox-invite-dialog-connecting:not(.show-connecting) { +#lox-invite-dialog-generate-area:not(.show-connecting) #lox-invite-dialog-connecting { display: none; } +#lox-invite-dialog-loading-icon { + flex: 0 0 auto; +} + +#lox-invite-dialog-generate-area:not(.show-connecting) #lox-invite-dialog-loading-icon { + /* Use width:0 to effectively hide, but still occupy vertical space. */ + width: 0; +} + #lox-invite-dialog-list-label { font-weight: 700; } @@ -1019,6 +1034,8 @@ groupbox#torPreferences-bridges-group textarea { flex: 0 0 auto; margin-block: 8px 12px; align-self: end; + display: flex; + align-items: center; } #user-provide-bridge-message-area::after { @@ -1035,19 +1052,29 @@ groupbox#torPreferences-bridges-group textarea { color: var(--in-content-error-text-color); } -#user-provide-bridge-error-message.not(.show-error) { +#user-provide-bridge-dialog:not(.show-error) #user-provide-bridge-error-message { display: none; } #user-provide-bridge-connecting { color: var(--text-color-deemphasized); - /* TODO: Add spinner ::before */ + /* Gap with #user-provide-bridge-loading-icon. */ + margin-inline-start: 0.5em; } -#user-provide-bridge-connecting:not(.show-connecting) { +#user-provide-bridge-dialog:not(.show-connecting) #user-provide-bridge-connecting { display: none; } +#user-provide-bridge-loading-icon { + flex: 0 0 auto; +} + +#user-provide-bridge-dialog:not(.show-connecting) #user-provide-bridge-loading-icon { + /* Use width:0 to effectively hide, but still occupy vertical space. */ + width: 0; +} + #user-provide-bridge-result-page { flex: 1 1 0; min-height: 0; @@ -1065,6 +1092,11 @@ groupbox#torPreferences-bridges-group textarea { margin-block: 8px; } +#user-provide-bridge-grid-display:focus-visible { + outline: var(--in-content-focus-outline); + outline-offset: var(--in-content-focus-outline-offset); +} + /* Connection settings dialog */ #torPreferences-connection-dialog label { /* Do not wrap the labels. */ View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00e009d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00e009d… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41127: Update default browser_release_date for nightly
by boklm (@boklm) 18 Apr '24

18 Apr '24
boklm pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: e47404c6 by Nicolas Vigier at 2024-04-17T21:17:49+02:00 Bug 41127: Update default browser_release_date for nightly In nightly builds, when a date cannot be extracted from `var/torbrowser_version` (for example when doing a testbuild), we set a default date. However `firefox-android` fails to build when the date from `MOZ_BUILD_DATE` (which is based on `var/browser_release_date`) is too old. So we change … [View More]the default date to something more recent. - - - - - 1 changed file: - rbm.conf Changes: ===================================== rbm.conf ===================================== @@ -256,7 +256,7 @@ targets: IF (matches = c("var/torbrowser_version").match('^tbb-nightly\.(\d\d\d\d)\.(\d\d)\.(\d\d)$')); GET matches.0 _ "/" _ matches.1 _ "/" _ matches.2 _ " 01:01:01"; ELSE; - GET "2000/01/01 01:01:01"; + GET "2024/01/01 01:01:01"; END -%] max_torbrowser_incremental_from: 2 View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI
by Dan Ballard (@dan) 17 Apr '24

17 Apr '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: f710da91 by clairehurst at 2024-04-17T22:07:23+00:00 fixup! Implement Android-native Connection Assist UI - - - - - 2 changed files: - fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt - fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt =======… [View More]============================== @@ -816,10 +816,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn final override fun onBackPressed() { supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.fragments?.forEach { - if (it is HomeFragment){ - finish() - return - } if (it is UserInteractionHandler && it.onBackPressed()) { return } ===================================== fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt ===================================== @@ -61,6 +61,7 @@ import mozilla.components.feature.top.sites.TopSitesProviderConfig import mozilla.components.lib.state.ext.consumeFlow import mozilla.components.lib.state.ext.consumeFrom import mozilla.components.service.glean.private.NoExtras +import mozilla.components.support.base.feature.UserInteractionHandler import mozilla.components.support.base.feature.ViewBoundFeatureWrapper import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged import org.mozilla.fenix.BuildConfig @@ -122,7 +123,7 @@ import java.lang.ref.WeakReference import kotlin.math.min @Suppress("TooManyFunctions", "LargeClass") -class HomeFragment : Fragment() { +class HomeFragment : Fragment(), UserInteractionHandler { private val args by navArgs<HomeFragmentArgs>() @VisibleForTesting @@ -1016,4 +1017,9 @@ class HomeFragment : Fragment() { // Elevation for undo toasts internal const val TOAST_ELEVATION = 80f } + + override fun onBackPressed(): Boolean { + requireActivity().finish() + return true + } } View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/f71… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/f71… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] fixup! Bug 2176: Rebrand Firefox to TorBrowser
by richard (@richard) 17 Apr '24

17 Apr '24
richard pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: b12ce2e6 by Dan Ballard at 2024-04-17T20:59:19+00:00 fixup! Bug 2176: Rebrand Firefox to TorBrowser bug 42504: Add tor project forums to bookmarks - - - - - 1 changed file: - browser/base/content/default-bookmarks.html Changes: ===================================== browser/base/content/default-bookmarks.html ===================================== @@ -19,6 +19,7 @@ … [View More] <DT><A HREF="http://rzuwtpc4wb3xdzrj3yeajsvm3fkq4vbeubm2tdxaqruzzzgs5dwemlad.onion/" ICON="@onion_icon@">Tor Support portal - Get help</A> <DT><A HREF="about:manual" ICON="@onion_icon@">Tor Browser Manual</A> <DT><A HREF="http://xmrhfasfg5suueegrnc4gsgyi2tyclcy5oz7f5drnrodmdtob6t2ioyd.onion/" ICON="@onion_icon@">Tor Community - Get Involved</A> + <DT><A HREF="http://v236xhqtyullodhf26szyjepvkbv6iitrhjgrqj4avaoukebkk6n6syd.onion/" ICON="@onion_icon@">Tor Project Forum</A></DT> <DT><A HREF="https://donate.torproject.org/" ICON="@onion_icon@">Donate - Keep Tor Strong</A> <DT><A HREF="http://yq5jjvr7drkjrelzhut7kgclfuro65jjlivyzfmxiq2kyv5lickrl4qd.onion/" ICON="@onion_icon@">Circumvent Censorship, Get Bridges</A> </DL><p> View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b12ce2e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b12ce2e… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI
by Dan Ballard (@dan) 17 Apr '24

17 Apr '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: ef43762d by clairehurst at 2024-04-17T21:46:35+00:00 fixup! Implement Android-native Connection Assist UI - - - - - 1 changed file: - fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml Changes: ===================================== fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml ===================================== @@ -81,7 +81,7 @@ … [View More] android:layout_marginTop="24dp" android:paddingHorizontal="24dp" android:text="@string/connection_assist_tor_connect_title" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" android:textSize="22sp" app:layout_constraintTop_toBottomOf="@id/tor_connect_image" /> @@ -93,7 +93,7 @@ android:paddingHorizontal="24dp" android:paddingVertical="16dp" android:text="@string/preferences_tor_network_settings_explanation" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" android:textSize="14sp" app:layout_constraintTop_toBottomOf="@id/title_large_text_view" /> @@ -104,7 +104,7 @@ android:paddingHorizontal="24dp" android:paddingVertical="8dp" android:text="@string/connection_assist_always_connect_automatically_toggle_description" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" app:layout_constraintTop_toBottomOf="@id/title_description" /> <TextView @@ -114,7 +114,7 @@ android:paddingHorizontal="24dp" android:layout_marginTop="24dp" android:text="@string/connection_assist_unblock_the_internet_in_country_or_region" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" android:visibility="gone" app:layout_constraintTop_toBottomOf="@id/title_description" /> @@ -126,7 +126,7 @@ android:layout_marginStart="24dp" android:layout_marginTop="8dp" android:layout_marginEnd="24dp" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" android:tooltipText="@string/connection_assist_share_my_location_country_or_region" android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" @@ -158,7 +158,7 @@ android:minWidth="360dp" android:text="@string/tor_bootstrap_connect" android:textAllCaps="false" - android:textColor="#FBFBFE" + android:textColor="@color/photonLightGrey05" android:textSize="14sp" android:textStyle="bold" app:layout_constraintBottom_toTopOf="@id/tor_bootstrap_button_2" @@ -177,7 +177,7 @@ android:minWidth="360dp" android:text="@string/connection_assist_configure_connection_button" android:textAllCaps="false" - android:textColor="#15141A" + android:textColor="@color/photonDarkGrey90" android:textSize="14sp" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/ef4… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/ef4… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by Dan Ballard (@dan) 17 Apr '24

17 Apr '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 8cc03c8e by Dan Ballard at 2024-04-17T14:08:42-07:00 fixup! Add Tor integration and UI Bug 42486: Fixing controller use of TorSettings so cleanupSettings doesn&#39;t reject partial states - - - - - 1 changed file: - fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt Changes: ===================================== fenix/app/src/main/java/org/mozilla/… [View More]fenix/tor/TorControllerGV.kt ===================================== @@ -88,15 +88,21 @@ class TorControllerGV( return getTorIntegration().getSettings() } + + // Bridges Enabled is a cache variable. The TorController interface we are locked into at the + // moment to support the TAS backend calls setting `bridgesEnabled = true` and setting + // the bridge type seperately so to support that, + // while at the same time it being invalid states to not submit them together to the TorSettings + // backend where TorSettings.sys.mjs's #cleanupSettings will remove a lone bridgeEnabled + // we thus have to hold it here to support the UI but not submit to the backend until + // bridgeTransport is also set (below) + private var _bridgesEnabled: Boolean? = null override var bridgesEnabled: Boolean get() { - return getTorSettings()?.bridgesEnabled ?: false + return _bridgesEnabled ?: getTorSettings()?.bridgesEnabled ?: false } set(value) { - getTorSettings()?.let { - it.bridgesEnabled = value - getTorIntegration().setSettings(it, true, true) - } + _bridgesEnabled = value } @@ -119,9 +125,13 @@ class TorControllerGV( } set(value) { getTorSettings()?.let { + it.bridgesEnabled = true if (value == TorBridgeTransportConfig.USER_PROVIDED) { - it.bridgesSource = BridgeSource.BuiltIn + // NOOP: all settings will be set in call to set userProvidedBridges and submited + // at the same time to clear TorSettings.sys.mjs #cleanupSettings + return } else { + it.bridgesSource = BridgeSource.BuiltIn val bbt: BridgeBuiltinType = when (value) { TorBridgeTransportConfig.BUILTIN_OBFS4 -> BridgeBuiltinType.Obfs4 TorBridgeTransportConfig.BUILTIN_MEEK_AZURE -> BridgeBuiltinType.MeekAzure @@ -135,12 +145,16 @@ class TorControllerGV( } + // Currently the UI takes a user provided string and sets this in one step so there is where we + // actually set it.bridgesSource = BridgeSource.UserProvided, not above, as TorSettings.sys.mjs #cleanupSettings + // could reject BridgeSource.UserProvided with no bridge strings override var userProvidedBridges: String? get() { return getTorSettings()?.bridgeBridgeStrings?.joinToString("\r\n") } set(value) { getTorSettings()?.let { + it.bridgesSource = BridgeSource.UserProvided it.bridgeBridgeStrings = value?.split("\r\n")?.toTypedArray() ?: arrayOf<String>() getTorIntegration().setSettings(it, true, true) } View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/8cc… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/8cc… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] 3 commits: Add purple tor version of the loading APNG.
by richard (@richard) 17 Apr '24

17 Apr '24
richard pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: e992fb9d by Henry Wilkes at 2024-04-17T20:39:07+00:00 Add purple tor version of the loading APNG. - - - - - 3cd48ad5 by Henry Wilkes at 2024-04-17T20:39:07+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection Bug 40843: Add a &quot;testing&quot; state to the internet status. Bug 41383: Improved accessibility of … [View More]the network status areas by managing focus and making the status an aria-live area so that changes are announced without requiring focus. Also re-arranged the markup to ensure the &quot;Connection&quot; overview and network status areas are not part of search results. Also moved the &quot;Tor network&quot; status onto a new line: 1. This improved navigation with a screen reader. 2. Ensures that the &quot;Tor network&quot; status does not jump horizontally during a test. 3. Ensures that each status area does not take up too much horizontal space so that the minimum page width can reduce. E.g. the &quot;Tor network&quot; area regularly took up more than 50% of the available width, and these may be wider depending on the locale. - - - - - d1c78659 by Henry Wilkes at 2024-04-17T20:39:07+00:00 fixup! Tor Browser strings Bug 42457: Add a &quot;testing&quot; state to the internet status area. - - - - - 10 changed files: - browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml - browser/components/torpreferences/content/torPreferences.css - browser/locales/en-US/browser/tor-browser.ftl - toolkit/themes/shared/desktop-jar.inc.mn - + toolkit/themes/shared/icons/tor-dark-loading.png - + toolkit/themes/shared/icons/tor-dark-loading(a)2x.png - + toolkit/themes/shared/icons/tor-light-loading.png - + toolkit/themes/shared/icons/tor-light-loading(a)2x.png - + tools/torbrowser/generate_tor_loading_png.py Changes: ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -5,7 +5,8 @@ "use strict"; -/* global Services, gSubDialog */ +/* import-globals-from /browser/components/preferences/preferences.js */ +/* import-globals-from /browser/components/preferences/search.js */ const { setTimeout, clearTimeout } = ChromeUtils.import( "resource://gre/modules/Timer.jsm" @@ -90,12 +91,6 @@ const Lox = { }; */ -const InternetStatus = Object.freeze({ - Unknown: 0, - Online: 1, - Offline: -1, -}); - /** * Make changes to TorSettings and save them. * @@ -2283,6 +2278,168 @@ const gBridgeSettings = { }, }; +/** + * Area to show the internet and tor network connection status. + */ +const gNetworkStatus = { + /** + * Initialize the area. + */ + init() { + this._internetAreaEl = document.getElementById( + "network-status-internet-area" + ); + this._internetResultEl = this._internetAreaEl.querySelector( + ".network-status-result" + ); + this._internetTestButton = document.getElementById( + "network-status-internet-test-button" + ); + this._internetTestButton.addEventListener("click", () => { + this._startInternetTest(); + }); + + this._torAreaEl = document.getElementById("network-status-tor-area"); + this._torResultEl = this._torAreaEl.querySelector(".network-status-result"); + this._torConnectButton = document.getElementById( + "network-status-tor-connect-button" + ); + this._torConnectButton.addEventListener("click", () => { + TorConnect.openTorConnect({ beginBootstrap: true }); + }); + + this._updateInternetStatus("unknown"); + this._updateTorConnectionStatus(); + + Services.obs.addObserver(this, TorConnectTopics.StateChange); + }, + + /** + * Un-initialize the area. + */ + deinint() { + Services.obs.removeObserver(this, TorConnectTopics.StateChange); + }, + + observe(subject, topic, data) { + switch (topic) { + // triggered when tor connect state changes and we may + // need to update the messagebox + case TorConnectTopics.StateChange: { + this._updateTorConnectionStatus(); + break; + } + } + }, + + /** + * Whether the test should be disabled. + * + * @type {boolean} + */ + _internetTestDisabled: false, + /** + * Start the internet test. + */ + async _startInternetTest() { + if (this._internetTestDisabled) { + return; + } + this._internetTestDisabled = true; + // We use "aria-disabled" rather than the "disabled" attribute so that the + // button can remain focusable during the test. + this._internetTestButton.setAttribute("aria-disabled", "true"); + this._internetTestButton.classList.add("spoof-button-disabled"); + try { + this._updateInternetStatus("testing"); + const mrpc = new MoatRPC(); + let status = null; + try { + await mrpc.init(); + status = await mrpc.testInternetConnection(); + } catch (err) { + console.log("Error while checking the Internet connection", err); + } finally { + mrpc.uninit(); + } + if (status) { + this._updateInternetStatus(status.successful ? "online" : "offline"); + } else { + this._updateInternetStatus("unknown"); + } + } finally { + this._internetTestButton.removeAttribute("aria-disabled"); + this._internetTestButton.classList.remove("spoof-button-disabled"); + this._internetTestDisabled = false; + } + }, + + /** + * Update the shown internet status. + * + * @param {string} stateName - The name of the state to show. + */ + _updateInternetStatus(stateName) { + let l10nId; + switch (stateName) { + case "testing": + l10nId = "tor-connection-internet-status-testing"; + break; + case "offline": + l10nId = "tor-connection-internet-status-offline"; + break; + case "online": + l10nId = "tor-connection-internet-status-online"; + break; + } + if (l10nId) { + this._internetResultEl.setAttribute("data-l10n-id", l10nId); + } else { + this._internetResultEl.removeAttribute("data-l10n-id"); + this._internetResultEl.textContent = ""; + } + + this._internetAreaEl.classList.toggle( + "status-loading", + stateName === "testing" + ); + this._internetAreaEl.classList.toggle( + "status-offline", + stateName === "offline" + ); + }, + + /** + * Update the shown Tor connection status. + */ + _updateTorConnectionStatus() { + const buttonHadFocus = this._torConnectButton.contains( + document.activeElement + ); + const isBootstrapped = TorConnect.state === TorConnectState.Bootstrapped; + const isBlocked = !isBootstrapped && TorConnect.potentiallyBlocked; + let l10nId; + if (isBootstrapped) { + l10nId = "tor-connection-network-status-connected"; + } else if (isBlocked) { + l10nId = "tor-connection-network-status-blocked"; + } else { + l10nId = "tor-connection-network-status-not-connected"; + } + + document.l10n.setAttributes(this._torResultEl, l10nId); + this._torAreaEl.classList.toggle("status-connected", isBootstrapped); + this._torAreaEl.classList.toggle("status-blocked", isBlocked); + if (isBootstrapped && buttonHadFocus) { + // Button has become hidden and will loose focus. Most likely this has + // happened because the user clicked the button to open about:torconnect. + // Since this is near the top of the page, we move focus to the search + // input (for when the user returns). + gSearchResultsPane.searchInput.focus(); + } + }, +}; + /* Connection Pane @@ -2304,8 +2461,6 @@ const gConnectionPane = (function () { // cached frequently accessed DOM elements _enableQuickstartCheckbox: null, - _internetStatus: InternetStatus.Unknown, - // populate xul with strings and cache the relevant elements _populateXUL() { // saves tor settings to disk when navigate away from about:preferences @@ -2321,80 +2476,6 @@ const gConnectionPane = (function () { } }); - // Internet and Tor status - const internetStatus = document.getElementById( - "torPreferences-status-internet" - ); - const internetResult = internetStatus.querySelector( - ".torPreferences-status-result" - ); - const internetTest = document.getElementById( - "torPreferences-status-internet-test" - ); - internetTest.addEventListener("click", () => { - this.onInternetTest(); - }); - - const torConnectStatus = document.getElementById( - "torPreferences-status-tor-connect" - ); - const torConnectResult = torConnectStatus.querySelector( - ".torPreferences-status-result" - ); - const torConnectButton = document.getElementById( - "torPreferences-status-tor-connect-button" - ); - torConnectButton.addEventListener("click", () => { - TorConnect.openTorConnect({ beginBootstrap: true }); - }); - - this._populateStatus = () => { - let internetId; - switch (this._internetStatus) { - case InternetStatus.Online: - internetStatus.classList.remove("offline"); - internetId = "tor-connection-internet-status-online"; - break; - case InternetStatus.Offline: - internetStatus.classList.add("offline"); - internetId = "tor-connection-internet-status-offline"; - break; - case InternetStatus.Unknown: - default: - internetStatus.classList.remove("offline"); - break; - } - if (internetId) { - document.l10n.setAttributes(internetResult, internetId); - internetResult.hidden = false; - } else { - internetResult.hidden = true; - } - - let connectId; - // FIXME: What about the TorConnectState.Disabled state? - if (TorConnect.state === TorConnectState.Bootstrapped) { - torConnectStatus.classList.add("connected"); - torConnectStatus.classList.remove("blocked"); - connectId = "tor-connection-network-status-connected"; - // 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 { - torConnectStatus.classList.remove("connected"); - torConnectStatus.classList.toggle( - "blocked", - TorConnect.potentiallyBlocked - ); - connectId = TorConnect.potentiallyBlocked - ? "tor-connection-network-status-blocked" - : "tor-connection-network-status-not-connected"; - torConnectButton.hidden = false; - } - document.l10n.setAttributes(torConnectResult, connectId); - }; - this._populateStatus(); - // Quickstart this._enableQuickstartCheckbox = document.getElementById( "torPreferences-quickstart-toggle" @@ -2514,6 +2595,7 @@ const gConnectionPane = (function () { init() { gBridgeSettings.init(); + gNetworkStatus.init(); TorSettings.initializedPromise.then(() => this._populateXUL()); @@ -2526,6 +2608,7 @@ const gConnectionPane = (function () { uninit() { gBridgeSettings.uninit(); + gNetworkStatus.uninit(); // unregister our observer topics Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged); @@ -2554,36 +2637,12 @@ const gConnectionPane = (function () { // triggered when tor connect state changes and we may // need to update the messagebox case TorConnectTopics.StateChange: { - this.onStateChange(); + this._showAutoconfiguration(); break; } } }, - async onInternetTest() { - const mrpc = new MoatRPC(); - let status = null; - try { - await mrpc.init(); - status = await mrpc.testInternetConnection(); - } catch (err) { - console.log("Error while checking the Internet connection", err); - } finally { - mrpc.uninit(); - } - if (status) { - this._internetStatus = status.successful - ? InternetStatus.Online - : InternetStatus.Offline; - this._populateStatus(); - } - }, - - onStateChange() { - this._populateStatus(); - this._showAutoconfiguration(); - }, - onAdvancedSettings() { gSubDialog.open( "chrome://browser/content/torpreferences/connectionSettingsDialog.xhtml", ===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -5,16 +5,13 @@ src="chrome://browser/content/torpreferences/connectionPane.js" /> <html:template id="template-paneConnection"> - <hbox + <vbox id="torPreferencesCategory" class="subcategory" data-category="paneConnection" hidden="true" > <html:h1 data-l10n-id="tor-connection-settings-heading"></html:h1> - </hbox> - - <groupbox data-category="paneConnection" hidden="true"> <description flex="1"> <html:span data-l10n-id="tor-connection-overview" @@ -28,46 +25,61 @@ data-l10n-id="tor-connection-browser-learn-more-link" /> </description> - </groupbox> - - <groupbox - id="torPreferences-status-group" - data-category="paneConnection" - hidden="true" - > - <hbox id="torPreferences-status-box"> - <hbox - id="torPreferences-status-internet" - class="torPreferences-status-grouping" + <!-- Keep within #torPreferencesCategory so this won't appear in search + - results. --> + <html:div + id="network-status-internet-area" + class="network-status-area" + role="group" + aria-labelledby="network-status-internet-area-label" + > + <html:img alt="" class="network-status-icon" /> + <!-- Use an aria-live area to announce "Internet: Online" or + - "Internet: Offline". We only expect this to change when triggered by + - the user clicking the "Test" button, so shouldn't occur unexpectedly. + --> + <html:div + class="network-status-live-area" + aria-live="polite" + aria-atomic="true" > - <image class="torPreferences-status-icon" /> <html:span - class="torPreferences-status-name" + id="network-status-internet-area-label" + class="network-status-label" data-l10n-id="tor-connection-internet-status-label" ></html:span> - <html:span class="torPreferences-status-result"></html:span> - <html:button - id="torPreferences-status-internet-test" - data-l10n-id="tor-connection-internet-status-test-button" - ></html:button> - </hbox> - <hbox - id="torPreferences-status-tor-connect" - class="torPreferences-status-grouping" - > - <image class="torPreferences-status-icon" /> - <html:span - class="torPreferences-status-name" - data-l10n-id="tor-connection-network-status-label" - ></html:span> - <html:span class="torPreferences-status-result"></html:span> - <html:button - id="torPreferences-status-tor-connect-button" - data-l10n-id="tor-connection-network-status-connect-button" - ></html:button> - </hbox> - </hbox> - </groupbox> + <img alt="" class="network-status-loading-icon" /> + <html:span class="network-status-result"></html:span> + </html:div> + <html:button + id="network-status-internet-test-button" + data-l10n-id="tor-connection-internet-status-test-button" + ></html:button> + </html:div> + <html:div + id="network-status-tor-area" + class="network-status-area" + role="group" + aria-labelledby="network-status-tor-area-label" + > + <html:img alt="" class="network-status-icon" /> + <!-- NOTE: Unlike #network-status-internet-area, we do not wrap the label + - and status ("Tor network: Not connected", etc) in an aria-live area. + - This is not likely to change whilst this page has focus. + - Moreover, the status is already present in the torconnect status bar + - in the window tab bar. --> + <html:span + id="network-status-tor-area-label" + class="network-status-label" + data-l10n-id="tor-connection-network-status-label" + ></html:span> + <html:span class="network-status-result"></html:span> + <html:button + id="network-status-tor-connect-button" + data-l10n-id="tor-connection-network-status-connect-button" + ></html:button> + </html:div> + </vbox> <!-- Quickstart --> <groupbox data-category="paneConnection" hidden="true"> ===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -5,25 +5,36 @@ list-style-image: url("chrome://global/content/torconnect/tor-connect.svg"); } +/* Make a button appear disabled, whilst still allowing it to keep keyboard + * focus. */ +button.spoof-button-disabled { + /* Borrow the :disabled rule from common-shared.css */ + opacity: 0.4; + /* Also ensure it does not get hover or active styling. */ + pointer-events: none; +} + /* Status */ -#torPreferences-status-box { - display: flex; - align-items: center; - gap: 32px; +#network-status-internet-area { + margin-block: 16px; +} + +#network-status-tor-area { + margin-block: 0 32px; } -.torPreferences-status-grouping { +.network-status-area { display: flex; align-items: center; white-space: nowrap; } -.torPreferences-status-grouping > * { +.network-status-area > * { flex: 0 0 auto; } -.torPreferences-status-icon { +.network-status-icon { width: 18px; height: 18px; margin-inline-end: 8px; @@ -32,42 +43,74 @@ stroke: currentColor; } -#torPreferences-status-internet .torPreferences-status-icon { - list-style-image: url("chrome://browser/content/torpreferences/network.svg"); +#network-status-internet-area .network-status-icon { + content: url("chrome://browser/content/torpreferences/network.svg"); } -#torPreferences-status-tor-connect .torPreferences-status-icon { - list-style-image: url("chrome://global/content/torconnect/tor-connect-broken.svg"); +#network-status-internet-area.status-offline .network-status-icon { + content: url("chrome://browser/content/torpreferences/network-broken.svg"); } -.torPreferences-status-name { - font-weight: bold; - margin-inline-end: 0.75em; +#network-status-tor-area .network-status-icon { + content: url("chrome://global/content/torconnect/tor-connect.svg"); } -.torPreferences-status-result { - margin-inline-end: 8px; +#network-status-tor-area:not(.status-connected) .network-status-icon { + content: url("chrome://global/content/torconnect/tor-connect-broken.svg"); } -#torPreferences-status-internet.offline .torPreferences-status-icon { - list-style-image: url("chrome://browser/content/torpreferences/network-broken.svg"); +#network-status-tor-area.status-blocked .network-status-icon { + /* Same as .tor-connect-status-potentially-blocked. */ + stroke: #c50042; } -#torPreferences-status-tor-connect.connected .torPreferences-status-icon { - list-style-image: url("chrome://global/content/torconnect/tor-connect.svg"); +@media (prefers-color-scheme: dark) { + #network-status-tor-area.status-blocked .network-status-icon { + stroke: #ff9aa2; + } } -#torPreferences-status-tor-connect.blocked .torPreferences-status-icon { - /* Same as .tor-connect-status-potentially-blocked. */ - stroke: #c50042; +.network-status-live-area { + display: contents; +} + +.network-status-label { + font-weight: bold; + margin-inline-end: 0.75em; +} + +.network-status-loading-icon { + margin-inline-end: 0.5em; + width: 16px; + height: 16px; + content: image-set( + url("chrome://global/skin/icons/tor-light-loading.png"), + url("chrome://global/skin/icons/tor-light-loading@2x.png") 2x + ); } @media (prefers-color-scheme: dark) { - #torPreferences-status-tor-connect.blocked .torPreferences-status-icon { - stroke: #ff9aa2; + .network-status-loading-icon { + content: image-set( + url("chrome://global/skin/icons/tor-dark-loading.png"), + url("chrome://global/skin/icons/tor-dark-loading@2x.png") 2x + ); } } +#network-status-internet-area:not(.status-loading) .network-status-loading-icon { + display: none; +} + +.network-status-result:not(:empty) { + margin-inline-end: 0.75em; +} + +#network-status-tor-area.status-connected #network-status-tor-connect-button { + /* Hide button when already connected. */ + display: none; +} + /* Bridge settings */ .tor-focusable-heading:focus-visible { ===================================== browser/locales/en-US/browser/tor-browser.ftl ===================================== @@ -65,6 +65,9 @@ tor-connection-internet-status-label = Internet: # Here "Test" is a verb, as in "test the internet connection". # Uses sentence case in English (US). tor-connection-internet-status-test-button = Test +# Shown when testing the internet status. +# Uses sentence case in English (US). +tor-connection-internet-status-testing = Testing… # Shown when the user is connected to the internet. # Uses sentence case in English (US). tor-connection-internet-status-online = Online ===================================== toolkit/themes/shared/desktop-jar.inc.mn ===================================== @@ -86,6 +86,10 @@ skin/classic/global/icons/link.svg (../../shared/icons/link.svg) skin/classic/global/icons/loading.png (../../shared/icons/loading.png) skin/classic/global/icons/loading(a)2x.png (../../shared/icons/loading(a)2x.png) + skin/classic/global/icons/tor-light-loading.png (../../shared/icons/tor-light-loading.png) + skin/classic/global/icons/tor-light-loading(a)2x.png (../../shared/icons/tor-light-loading(a)2x.png) + skin/classic/global/icons/tor-dark-loading.png (../../shared/icons/tor-dark-loading.png) + skin/classic/global/icons/tor-dark-loading(a)2x.png (../../shared/icons/tor-dark-loading(a)2x.png) skin/classic/global/icons/more.svg (../../shared/icons/more.svg) skin/classic/global/icons/open-in-new.svg (../../shared/icons/open-in-new.svg) skin/classic/global/icons/page-portrait.svg (../../shared/icons/page-portrait.svg) ===================================== toolkit/themes/shared/icons/tor-dark-loading.png ===================================== Binary files /dev/null and b/toolkit/themes/shared/icons/tor-dark-loading.png differ ===================================== toolkit/themes/shared/icons/tor-dark-loading(a)2x.png ===================================== Binary files /dev/null and b/toolkit/themes/shared/icons/tor-dark-loading(a)2x.png differ ===================================== toolkit/themes/shared/icons/tor-light-loading.png ===================================== Binary files /dev/null and b/toolkit/themes/shared/icons/tor-light-loading.png differ ===================================== toolkit/themes/shared/icons/tor-light-loading(a)2x.png ===================================== Binary files /dev/null and b/toolkit/themes/shared/icons/tor-light-loading(a)2x.png differ ===================================== tools/torbrowser/generate_tor_loading_png.py ===================================== @@ -0,0 +1,74 @@ +""" +Script to convert the loading.png and loading(a)2x.png blue spinners to purple +spinners for Tor Browser, for both the light and dark themes. +""" + +import argparse +import colorsys +import os + +from PIL import ExifTags, Image, ImageFilter + +parser = argparse.ArgumentParser(description="Convert the loading APNG to be purple.") +parser.add_argument("loading_png", help="The loading png to convert") +parser.add_argument( + "--light", required=True, help="The name of the light-theme purple output image" +) +parser.add_argument( + "--dark", required=True, help="The name of the dark-theme purple output image" +) + +parsed_args = parser.parse_args() + +orig_im = Image.open(parsed_args.loading_png) + + +def filter_to_light_theme(r, g, b): + h, s, v = colorsys.rgb_to_hsv(r, g, b) + # Convert from HSV 0.58, 1.0, 255 (start of the circle) + # to --purple-60 #8000d7 HSV 0.766, 1.0, 215 + h = 0.766 + v = v * 215 / 255 + return colorsys.hsv_to_rgb(h, s, v) + + +def filter_to_dark_theme(r, g, b): + h, s, v = colorsys.rgb_to_hsv(r, g, b) + # Convert from HSV 0.58, 1.0, 255 (start of the circle) + # to --purple-30 #c069ff HSV 0.766, 0.59, 255 + h = 0.766 + s = s * 0.59 / 1.0 + return colorsys.hsv_to_rgb(h, s, v) + + +filt_light = ImageFilter.Color3DLUT.generate(65, filter_to_light_theme) +filt_dark = ImageFilter.Color3DLUT.generate(65, filter_to_dark_theme) + +transformed_light = [] +transformed_dark = [] +duration = orig_im.info["duration"] + +# Transform each APNG frame individually. +for frame in range(orig_im.n_frames): + orig_im.seek(frame) + transformed_light.append(orig_im.filter(filt_light)) + transformed_dark.append(orig_im.filter(filt_dark)) + +exif = Image.Exif() +exif[ExifTags.Base.ImageDescription] = f"Generated by {os.path.basename(__file__)}" + +transformed_light[0].save( + parsed_args.light, + save_all=True, + append_images=transformed_light[1:], + duration=duration, + exif=exif, +) + +transformed_dark[0].save( + parsed_args.dark, + save_all=True, + append_images=transformed_dark[1:], + duration=duration, + exif=exif, +) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3cabcf… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3cabcf… You're receiving this email because of your account on gitlab.torproject.org. [View Less]
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • ...
  • 16
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.