Bug 1398346 - Hide the 'Open File' status label for failed downloads and/ or downloads where the file went missing for items in the Downloads subview in the Library panel. r=Paolo, a=sledru
authorMike de Boer <mdeboer@mozilla.com>
Fri, 29 Sep 2017 14:18:10 +0200
changeset 673670 d932d07adaf09fb853d302cfe2adb4aa5287a009
parent 673669 a438ffa660b724ef79eb06e12f07bfbc28f74d8e
child 673671 8e780926710a7e4c8c5e966f62e8c51c29cba488
push id82597
push userbmo:edilee@mozilla.com
push dateMon, 02 Oct 2017 17:24:38 +0000
reviewersPaolo, sledru
bugs1398346
milestone57.0
Bug 1398346 - Hide the 'Open File' status label for failed downloads and/ or downloads where the file went missing for items in the Downloads subview in the Library panel. r=Paolo, a=sledru MozReview-Commit-ID: 1j9tkqydyVZ
browser/components/downloads/content/downloads.css
--- a/browser/components/downloads/content/downloads.css
+++ b/browser/components/downloads/content/downloads.css
@@ -209,31 +209,37 @@ richlistitem.download button {
 }
 
 /* DownloadsSubview styles: */
 
 .subviewbutton.download {
   -moz-binding: url("chrome://browser/content/downloads/download.xml#download-subview-toolbarbutton");
 }
 
-/* When a Download is hovered that has an [openLabel] attribute set, which means
-   that the file exists and can be opened, hide the status label.
-   When a Download is hovered - specifically on the secondary action button - that
-   has a [retryLabel] attribute set, which means that the file does not exist and
-   the download failed earlier, hide the status label. */
-.subviewbutton.download:hover:-moz-any([openLabel],[retryLabel][buttonover]) > .toolbarbutton-text > .status-full,
-/* When a Download is not hovered at all or the secondary action button is hovered,
-   hide the 'Open File' status label. */
-.subviewbutton.download:-moz-any(:not(:hover),[buttonover]) > .toolbarbutton-text > .status-open,
-/* When a Download is not hovered at all, or when it's hovered but specifically
-   not the secondary action button or when the [retryLabel] is not set, hide the
-   'Retry Downloads' label. */
-.subviewbutton.download:-moz-any(:not(:hover),:hover:not([buttonover]),:not([retryLabel])) > .toolbarbutton-text > .status-retry,
-/* When a Download is not hovered at all, or when it's hovered but specifically
-   not the secondary action button or when the file does not exist, hide the
-   'Open Containing Folder' label. */
-.subviewbutton.download:-moz-any(:not(:hover),:hover:not([buttonover]),:not([exists])) > .toolbarbutton-text > .status-show,
+/* Hide all status labels by default and selectively display one at a time,
+   depending on the state of the Download. */
+.subviewbutton.download > .toolbarbutton-text > .status-text,
 /* When a Download is not hovered at all, hide the secondary action button. */
 .subviewbutton.download:not(:hover) > .action-button,
 /* Always hide the label of the secondary action button. */
 .subviewbutton.download > .action-button > .toolbarbutton-text {
   display: none;
 }
+
+/* When a Download is _not_ hovered, display the full status message. */
+.subviewbutton.download:not(:hover) > .toolbarbutton-text > .status-full,
+/* When a Download is hovered when the file doesn't exist and cannot be retried,
+   keep showing the full status message. */
+.subviewbutton.download:hover:not([openLabel]):not([exists]):not([retryLabel]) > .toolbarbutton-text > .status-full,
+/* When a Download is hovered and the it can be retried, but the action button
+   is _not_ hovered, keep showing the full status message. */
+.subviewbutton.download:hover[retryLabel]:not([buttonover]) > .toolbarbutton-text > .status-full,
+/* When a Download is hovered and the file can be opened, but the action button
+   is _not_ hovered, show the 'Open File' status label. */
+.subviewbutton.download:hover[openLabel][exists]:not([buttonover]) > .toolbarbutton-text > .status-open,
+/* When a Download is hovered - its action button explicitly - and it can be
+   retried, show the 'Retry Download' label. */
+.subviewbutton.download:hover[retryLabel][buttonover] > .toolbarbutton-text > .status-retry,
+/* When a Download is hovered - its action button explicitly - and the file can
+   be shown in the OS's shell, show the 'Open Containing Folder' label. */
+.subviewbutton.download:hover[openLabel][exists][buttonover] > .toolbarbutton-text > .status-show {
+  display: inline;
+}