[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] 5 commits: fixup! Bug 41916: Letterboxing preferences UI



Title: GitLab

ma1 pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • d018a7b3
    by Henry Wilkes at 2024-05-16T13:03:37+00:00
    fixup! Bug 41916: Letterboxing preferences UI
    
    Bug 42583: Use moz-support-link for the letterboxing preference.
    
    Also update the url.
    
  • db143d45
    by Henry Wilkes at 2024-05-16T13:03:37+00:00
    fixup! Bug 40925: Implemented the Security Level component
    
    Bug 42583: Use moz-support-link for the security level "Learn more"
    links. These take you to the tor project web link in base browser.
    
  • 7c7573c4
    by Henry Wilkes at 2024-05-16T13:03:37+00:00
    Bug 42583: Modify moz-support-link for Base Browser.
    
  • c6a32aa5
    by Henry Wilkes at 2024-05-16T13:03:37+00:00
    fixup! Bug 2176: Rebrand Firefox to TorBrowser
    
    Bug 42583: Move moz-support-link change out of the branding commit.
    
  • c5ee42b4
    by Henry Wilkes at 2024-05-16T13:03:37+00:00
    Bug 42583: Modify moz-support-link for Tor Browser.
    

5 changed files:

Changes:

  • browser/components/preferences/letterboxing.inc.xhtml
    ... ... @@ -11,13 +11,11 @@
    11 11
           data-l10n-id="letterboxing-overview"
    
    12 12
           class="tail-with-learn-more"
    
    13 13
         ></html:span>
    
    14
    -    <label
    
    14
    +    <html:a
    
    15
    +      is="moz-support-link"
    
    16
    +      tor-manual-page="anti-fingerprinting_letterboxing"
    
    15 17
           data-l10n-id="letterboxing-learn-more"
    
    16
    -      class="learnMore text-link"
    
    17
    -      is="text-link"
    
    18
    -      href="about:manual#letterboxing"
    
    19
    -      useoriginprincipal="true"
    
    20
    -    />
    
    18
    +    ></html:a>
    
    21 19
       </description>
    
    22 20
     </vbox>
    
    23 21
     <groupbox
    
    ... ... @@ -32,13 +30,11 @@
    32 30
           data-l10n-id="letterboxing-overview"
    
    33 31
           class="tail-with-learn-more"
    
    34 32
         ></html:span>
    
    35
    -    <label
    
    33
    +    <html:a
    
    34
    +      is="moz-support-link"
    
    35
    +      tor-manual-page="anti-fingerprinting_letterboxing"
    
    36 36
           data-l10n-id="letterboxing-learn-more"
    
    37
    -      class="learnMore text-link"
    
    38
    -      is="text-link"
    
    39
    -      href="about:manual#letterboxing"
    
    40
    -      useoriginprincipal="true"
    
    41
    -    />
    
    37
    +    ></html:a>
    
    42 38
       </description>
    
    43 39
       <checkbox
    
    44 40
         id="letterboxingRememberSize"
    
    ... ... @@ -59,13 +55,11 @@
    59 55
           data-l10n-id="letterboxing-overview"
    
    60 56
           class="tail-with-learn-more"
    
    61 57
         ></html:span>
    
    62
    -    <label
    
    58
    +    <html:a
    
    59
    +      is="moz-support-link"
    
    60
    +      tor-manual-page="anti-fingerprinting_letterboxing"
    
    63 61
           data-l10n-id="letterboxing-learn-more"
    
    64
    -      class="learnMore text-link"
    
    65
    -      is="text-link"
    
    66
    -      href="about:manual#letterboxing"
    
    67
    -      useoriginprincipal="true"
    
    68
    -    />
    
    62
    +    ></html:a>
    
    69 63
       </description>
    
    70 64
       <description
    
    71 65
         id="letterboxingAlignmentDesc"
    
    ... ... @@ -110,13 +104,11 @@
    110 104
           data-l10n-id="letterboxing-overview"
    
    111 105
           class="tail-with-learn-more"
    
    112 106
         ></html:span>
    
    113
    -    <label
    
    107
    +    <html:a
    
    108
    +      is="moz-support-link"
    
    109
    +      tor-manual-page="anti-fingerprinting_letterboxing"
    
    114 110
           data-l10n-id="letterboxing-learn-more"
    
    115
    -      class="learnMore text-link"
    
    116
    -      is="text-link"
    
    117
    -      href="about:manual#letterboxing"
    
    118
    -      useoriginprincipal="true"
    
    119
    -    />
    
    111
    +    ></html:a>
    
    120 112
       </description>
    
    121 113
       <hbox align="center">
    
    122 114
         <label
    

  • browser/components/securitylevel/content/securityLevel.js
    ... ... @@ -157,6 +157,9 @@ var SecurityLevelPanel = {
    157 157
       _populated: false,
    
    158 158
     
    
    159 159
       _populateXUL() {
    
    160
    +    // TODO: Used for #securityLevel-learnMore. Remove with esr 128.
    
    161
    +    window.ensureCustomElements("moz-support-link");
    
    162
    +
    
    160 163
         this._elements = {
    
    161 164
           panel: document.getElementById("securityLevel-panel"),
    
    162 165
           background: document.getElementById("securityLevel-background"),
    
    ... ... @@ -171,9 +174,7 @@ var SecurityLevelPanel = {
    171 174
     
    
    172 175
         const learnMoreEl = document.getElementById("securityLevel-learnMore");
    
    173 176
         learnMoreEl.addEventListener("click", event => {
    
    174
    -      window.openTrustedLinkIn(learnMoreEl.href, "tab");
    
    175 177
           this.hide();
    
    176
    -      event.preventDefault();
    
    177 178
         });
    
    178 179
     
    
    179 180
         this._elements.restoreDefaultsButton.addEventListener("command", () => {
    

  • browser/components/securitylevel/content/securityLevelPanel.inc.xhtml
    ... ... @@ -23,9 +23,10 @@
    23 23
         </html:p>
    
    24 24
         <html:p id="securityLevel-summary"></html:p>
    
    25 25
         <html:a
    
    26
    +      is="moz-support-link"
    
    26 27
           id="securityLevel-learnMore"
    
    28
    +      tor-manual-page="security-settings"
    
    27 29
           data-l10n-id="security-level-panel-learn-more-link"
    
    28
    -      href="">"about:manual#security-settings"
    
    29 30
         ></html:a>
    
    30 31
       </vbox>
    
    31 32
       <hbox class="panel-footer">
    

  • browser/components/securitylevel/content/securityLevelPreferences.inc.xhtml
    ... ... @@ -12,14 +12,11 @@
    12 12
             class="tail-with-learn-more"
    
    13 13
             data-l10n-id="security-level-preferences-overview"
    
    14 14
           ></html:span>
    
    15
    -      <label
    
    16
    -        id="securityLevel-learnMore"
    
    17
    -        class="learnMore text-link"
    
    18
    -        is="text-link"
    
    15
    +      <html:a
    
    16
    +        is="moz-support-link"
    
    17
    +        tor-manual-page="security-settings"
    
    19 18
             data-l10n-id="security-level-preferences-learn-more-link"
    
    20
    -        href="">"about:manual#security-settings"
    
    21
    -        useoriginprincipal="true"
    
    22
    -      />
    
    19
    +      ></html:a>
    
    23 20
         </description>
    
    24 21
         <hbox
    
    25 22
           id="securityLevel-customNotification"
    

  • toolkit/content/widgets/moz-support-link/moz-support-link.mjs
    ... ... @@ -17,7 +17,9 @@ MozXULElement.insertFTLIfNeeded("browser/components/mozSupportLink.ftl");
    17 17
     export default class MozSupportLink extends HTMLAnchorElement {
    
    18 18
       static SUPPORT_URL = "https://www.mozilla.org/";
    
    19 19
       static get observedAttributes() {
    
    20
    -    return ["support-page", "utm-content"];
    
    20
    +    // We add tor-manual-page for pages hosted at tor project. Also shared with
    
    21
    +    // base-browser/mullvad-browser. See tor-browser#42583.
    
    22
    +    return ["support-page", "utm-content", "tor-manual-page"];
    
    21 23
       }
    
    22 24
     
    
    23 25
       /**
    
    ... ... @@ -96,12 +98,21 @@ export default class MozSupportLink extends HTMLAnchorElement {
    96 98
       }
    
    97 99
     
    
    98 100
       attributeChangedCallback(attrName, oldVal, newVal) {
    
    99
    -    if (attrName === "support-page" || attrName === "utm-content") {
    
    101
    +    if (
    
    102
    +      attrName === "support-page" ||
    
    103
    +      attrName === "utm-content" ||
    
    104
    +      attrName === "tor-manual-page"
    
    105
    +    ) {
    
    100 106
           this.#setHref();
    
    101 107
         }
    
    102 108
       }
    
    103 109
     
    
    104 110
       #setHref() {
    
    111
    +    let torManualPage = this.getAttribute("tor-manual-page");
    
    112
    +    if (torManualPage) {
    
    113
    +      this.href = `about:manual#${torManualPage}`;
    
    114
    +      return;
    
    115
    +    }
    
    105 116
         let supportPage = this.getAttribute("support-page") ?? "";
    
    106 117
         // For tor-browser we sometimes want to override firefox support links with
    
    107 118
         // our own.
    
    ... ... @@ -112,7 +123,7 @@ export default class MozSupportLink extends HTMLAnchorElement {
    112 123
             // Instead of directing to support for preferences, we link to general
    
    113 124
             // tor browser support.
    
    114 125
             // See tor-browser#32092.
    
    115
    -        this.href = "https://support.torproject.org/tbb"
    
    126
    +        this.href = "https://support.torproject.org/tbb";
    
    116 127
             return;
    
    117 128
           // Fall through to support.mozilla.org
    
    118 129
         }
    
    ... ... @@ -135,21 +146,7 @@ customElements.define("moz-support-link", MozSupportLink, { extends: "a" });
    135 146
      *          Otherwise the url in unmodified form.
    
    136 147
      */
    
    137 148
     export function formatUTMParams(contentAttribute, url) {
    
    138
    -  if (!contentAttribute) {
    
    139
    -    return url;
    
    140
    -  }
    
    141
    -  let parsedUrl = new URL(url);
    
    142
    -  let domain = `.${parsedUrl.hostname}`;
    
    143
    -  if (
    
    144
    -    !domain.endsWith(".mozilla.org") &&
    
    145
    -    // For testing: addons-dev.allizom.org and addons.allizom.org
    
    146
    -    !domain.endsWith(".allizom.org")
    
    147
    -  ) {
    
    148
    -    return url;
    
    149
    -  }
    
    150
    -
    
    151
    -  parsedUrl.searchParams.set("utm_source", "firefox-browser");
    
    152
    -  parsedUrl.searchParams.set("utm_medium", "firefox-browser");
    
    153
    -  parsedUrl.searchParams.set("utm_content", contentAttribute);
    
    154
    -  return parsedUrl.href;
    
    149
    +  // Do not add utm parameters. See tor-browser#42583.
    
    150
    +  // NOTE: This method is also present in about:addons.
    
    151
    +  return url;
    
    155 152
     }

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits