Bug 1452629 - Part 5 - Remove the "downloadDetailsFull" description element. r=mak
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 28 Aug 2018 16:53:04 +0100
changeset 492152 1de95b7783f0cebe2f3c6ef58c9062dae40efa8c
parent 492151 48e3334d170d6f55f6a3be72f01acc981e6cafe7
child 492153 af72430d508a643fdb1589a506c100b2859a7c73
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1452629
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452629 - Part 5 - Remove the "downloadDetailsFull" description element. r=mak Differential Revision: https://phabricator.services.mozilla.com/D4461
browser/components/downloads/DownloadsViewUI.jsm
browser/components/downloads/content/download.xml
browser/themes/shared/downloads/allDownloadsView.inc.css
browser/themes/shared/downloads/downloads.inc.css
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -327,19 +327,23 @@ this.DownloadsViewUI.DownloadElementShel
     // Dispatch the ValueChange event for accessibility, if possible.
     if (this._progressElement) {
       let event = this.element.ownerDocument.createEvent("Events");
       event.initEvent("ValueChange", true, true);
       this._progressElement.dispatchEvent(event);
     }
 
     let labels = this.statusLabels;
-    this.element.setAttribute("status", labels.status);
-    this.element.setAttribute("hoverStatus", labels.hoverStatus);
-    this.element.setAttribute("fullStatus", labels.fullStatus);
+    if (this.isPanel) {
+      this.element.setAttribute("status", labels.status);
+      this.element.setAttribute("hoverStatus", labels.hoverStatus);
+    } else {
+      this.element.setAttribute("status", labels.fullStatus);
+      this.element.setAttribute("fullStatus", labels.fullStatus);
+    }
   },
 
   lastEstimatedSecondsLeft: Infinity,
 
   /**
    * Returns the labels for the status of normal, full, and hovering cases. These
    * are returned by a single property because they are computed together.
    */
--- a/browser/components/downloads/content/download.xml
+++ b/browser/components/downloads/content/download.xml
@@ -43,23 +43,20 @@
                            xbl:inherits="value=displayName,tooltiptext=displayName"/>
           <xul:progressmeter anonid="progressmeter"
                              class="downloadProgress"
                              min="0"
                              max="100"
                              xbl:inherits="mode=progressmode,value=progress,paused=progresspaused"/>
           <xul:description class="downloadDetails downloadDetailsNormal"
                            crop="end"
-                           xbl:inherits="value=status"/>
+                           xbl:inherits="value=status,tooltiptext=fullStatus"/>
           <xul:description class="downloadDetails downloadDetailsHover"
                            crop="end"
                            xbl:inherits="value=hoverStatus"/>
-          <xul:description class="downloadDetails downloadDetailsFull"
-                           crop="end"
-                           xbl:inherits="value=fullStatus,tooltiptext=fullStatus"/>
           <xul:description class="downloadDetails downloadDetailsButtonHover"
                            crop="end"
                            xbl:inherits="value=buttonHoverStatus"/>
         </xul:vbox>
       </xul:hbox>
       <xul:toolbarseparator />
       <xul:button class="downloadButton"
                   xbl:inherits="class=buttonclass,aria-label=buttonarialabel,tooltiptext=buttontooltiptext"
--- a/browser/themes/shared/downloads/allDownloadsView.inc.css
+++ b/browser/themes/shared/downloads/allDownloadsView.inc.css
@@ -55,17 +55,16 @@
 .downloadDetails {
   opacity: 0.7;
   font-size: 95%;
   /* Use calc() to keep the height consistent with .downloadTarget, so that the
      progress bar can be vertically centered. */
   margin: 4px 0 calc(1em / 0.95 - 1em);
 }
 
-.downloadDetailsNormal,
 .downloadDetailsHover,
 .downloadDetailsButtonHover {
   display: none;
 }
 
 .downloadButton {
   -moz-appearance: none;
   -moz-box-align: center;
--- a/browser/themes/shared/downloads/downloads.inc.css
+++ b/browser/themes/shared/downloads/downloads.inc.css
@@ -177,26 +177,16 @@
 #downloadsSummaryDetails,
 .downloadDetails {
   opacity: var(--downloads-item-details-opacity);
   /* Use calc() to keep the height consistent with .downloadTarget, so that the
      progress bar can be vertically centered. */
   margin: 4px 0 calc(1em / var(--downloads-item-font-size-factor) - 1em);
 }
 
-/* The following rules control which message is shown under the name of the
-   download, using a set of elements that share the class ".downloadDetails".
-   At any given time, only one of these elements is displayed. We use a set of
-   rules to hide the elements that shouldn't be displayed in each case. */
-
-/* The full status message is only displayed in the Downloads View. */
-.downloadDetailsFull {
-  display: none;
-}
-
 /* When hovering the mouse pointer over the item, instead of the normal message
    we display a more detailed one. */
 @item@:hover > .downloadMainArea > .downloadContainer > .downloadDetailsNormal,
 @item@:not(:hover) > .downloadMainArea > .downloadContainer > .downloadDetailsHover {
   display: none;
 }
 
 /* When hovering the action button in particular, instead of the usual hover