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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.5.0esr-14.5-1] fixup! Bug 40701: Add security warning when downloading a file



Title: GitLab

morgan pushed to branch tor-browser-128.5.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 00d7026f
    by Henry Wilkes at 2024-12-16T11:27:38+00:00
    fixup! Bug 40701: Add security warning when downloading a file
    
    Bug 43312: Ensure download panel warning uses the same width as the
    mozilla downloads list.
    
    We stop setting a `width` on the download panel because this can
    conflict with the default width set for the mozilla downloads list, set
    by localisers. Instead, we use the same width for our Tor Browser
    warning message using a wrapper element.
    
    We also ensure that the wrapper element has `min-width: 100%` for
    scenarios where the localiser width is less than the min-width of the
    ancestor panel.
    

2 changed files:

Changes:

  • browser/components/downloads/content/downloads.css
    ... ... @@ -92,15 +92,19 @@
    92 92
     #downloadsPanel-mainView {
    
    93 93
       min-width: 37em;
    
    94 94
       padding: 0.62em;
    
    95
    -  /* If we don't set a width, #downloadsPanelTorWarning will request
    
    96
    -   * its max-content width. */
    
    97
    -  width: 37em;
    
    98 95
     }
    
    99 96
     
    
    100 97
     #downloadsPanelTorWarning {
    
    101 98
       margin-block-end: var(--arrowpanel-menuitem-padding-block);
    
    102 99
     }
    
    103 100
     
    
    101
    +#downloadsPanelTorWarningWrapper {
    
    102
    + /* The wrapper element has its `width` attribute set by mozilla localisers.
    
    103
    +  * We want to ensure the element occupies the available width when the
    
    104
    +  * localiser width is smaller. See tor-browser#43312. */
    
    105
    +  min-width: 100%;
    
    106
    +}
    
    107
    +
    
    104 108
     #downloadsHistory,
    
    105 109
     #downloadsFooterButtons {
    
    106 110
       margin: 0;
    

  • browser/components/downloads/content/downloadsPanel.inc.xhtml
    ... ... @@ -104,8 +104,25 @@
    104 104
                       disablekeynav="true">
    
    105 105
     
    
    106 106
         <panelview id="downloadsPanel-mainView">
    
    107
    -      <html:moz-message-bar id="downloadsPanelTorWarning">
    
    108
    -      </html:moz-message-bar>
    
    107
    +      <!-- We add a wrapper around the #downloadsPanelTorWarning and give it the
    
    108
    +         - same Fluent ID as #downloadsListBox. This Fluent message allows
    
    109
    +         - Firefox localisers to set the width of the #downloadsListBox using
    
    110
    +         - the style attribute. We want the same width set for our downloads
    
    111
    +         - warning. Otherwise the warning will occupy its max-content width.
    
    112
    +         - NOTE: We require a wrapper element since #downloadsPanelTorWarning
    
    113
    +         - needs its own Fluent attributes.
    
    114
    +         - NOTE: This only works if #downloadsPanelTorWarningWrapper and
    
    115
    +         - #downloadsListBox share the same padding relative to their common
    
    116
    +         - ancestor.
    
    117
    +         - See tor-browser#43312. -->
    
    118
    +      <html:div
    
    119
    +        id="downloadsPanelTorWarningWrapper"
    
    120
    +        data-l10n-id="downloads-panel-items"
    
    121
    +        data-l10n-attrs="style"
    
    122
    +      >
    
    123
    +        <html:moz-message-bar id="downloadsPanelTorWarning">
    
    124
    +        </html:moz-message-bar>
    
    125
    +      </html:div>
    
    109 126
           <vbox class="panel-view-body-unscrollable">
    
    110 127
             <richlistbox id="downloadsListBox"
    
    111 128
                          data-l10n-id="downloads-panel-items"
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx