Bug 1452629 - Part 4 - Remove the "downloadShowMoreInfo" description element. r=mak
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 28 Aug 2018 15:41:36 +0100
changeset 492151 48e3334d170d6f55f6a3be72f01acc981e6cafe7
parent 492150 4aca3cccf16f9989d2f153797e6df77edcb0ce88
child 492152 1de95b7783f0cebe2f3c6ef58c9062dae40efa8c
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 4 - Remove the "downloadShowMoreInfo" description element. r=mak Differential Revision: https://phabricator.services.mozilla.com/D4460
browser/components/downloads/DownloadsViewUI.jsm
browser/components/downloads/content/download.xml
browser/components/downloads/content/downloadsStrings.inc.xul
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
@@ -42,16 +42,17 @@ var gDownloadElementButtons = {
     commandName: "downloadsCmd_show",
     l10nId: "download-show",
     descriptionL10nId: "download-show-description",
     iconClass: "downloadIconShow",
   },
   subviewOpenOrRemoveFile: {
     commandName: "downloadsCmd_showBlockedInfo",
     l10nId: "download-open-or-remove-file",
+    descriptionL10nId: "download-show-more-information-description",
     iconClass: "downloadIconSubviewArrow",
   },
   askOpenOrRemoveFile: {
     commandName: "downloadsCmd_chooseOpen",
     l10nId: "download-open-or-remove-file",
     iconClass: "downloadIconShow",
   },
   askRemoveFileOrAllow: {
@@ -387,16 +388,20 @@ this.DownloadsViewUI.DownloadElementShel
         status = sizeStrings.status;
         hoverStatus = this.string("download-open-file-description");
       } else if (this.download.canceled) {
         stateLabel = s.stateCanceled;
       } else if (this.download.error.becauseBlockedByParentalControls) {
         stateLabel = s.stateBlockedParentalControls;
       } else if (this.download.error.becauseBlockedByReputationCheck) {
         stateLabel = this.rawBlockedTitleAndDetails[0];
+        if (this.download.hasBlockedData) {
+          hoverStatus = this.string(
+            "download-show-more-information-description");
+        }
       } else {
         stateLabel = s.stateFailed;
       }
 
       let referrer = this.download.source.referrer || this.download.source.url;
       let [displayHost /* ,fullHost */] = DownloadUtils.getURIHost(referrer);
 
       let date = new Date(this.download.endTime);
--- a/browser/components/downloads/content/download.xml
+++ b/browser/components/downloads/content/download.xml
@@ -50,19 +50,16 @@
                            crop="end"
                            xbl:inherits="value=status"/>
           <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 downloadShowMoreInfo"
-                           crop="end"
-                           value="&showMoreInformation.label;"/>
           <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/components/downloads/content/downloadsStrings.inc.xul
+++ b/browser/components/downloads/content/downloadsStrings.inc.xul
@@ -12,9 +12,10 @@
   string-download-retry-description="&retryDownload.label;"
 #ifdef XP_MACOSX
   string-download-show="&cmd.showMac.label;"
   string-download-show-description="&cmd.showMac.label;"
 #else
   string-download-show="&cmd.show.label;"
   string-download-show-description="&cmd.show.label;"
 #endif
+  string-download-show-more-information-description="&showMoreInformation.label;"
 />
--- a/browser/themes/shared/downloads/allDownloadsView.inc.css
+++ b/browser/themes/shared/downloads/allDownloadsView.inc.css
@@ -57,17 +57,16 @@
   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,
-.downloadShowMoreInfo,
 .downloadDetailsButtonHover {
   display: none;
 }
 
 .downloadButton {
   -moz-appearance: none;
   -moz-box-align: center;
   background: transparent;
--- a/browser/themes/shared/downloads/downloads.inc.css
+++ b/browser/themes/shared/downloads/downloads.inc.css
@@ -201,25 +201,16 @@
 
 /* When hovering the action button in particular, instead of the usual hover
    message we display the command associated with the button. */
 @item@.downloadHoveringButton > .downloadMainArea > .downloadContainer > .downloadDetailsHover,
 @item@:not(.downloadHoveringButton) > .downloadMainArea > .downloadContainer > .downloadDetailsButtonHover {
   display: none;
 }
 
-/* When hovering items blocked by Application Reputation, instead of the other
-   hover messages we display the "Show more information" label. */
-@item@[verdict] > .downloadMainArea > .downloadContainer > .downloadDetailsHover,
-@item@[verdict] > .downloadMainArea > .downloadContainer > .downloadDetailsButtonHover,
-@item@:not([verdict]) > .downloadMainArea > .downloadContainer > .downloadShowMoreInfo,
-@item@:not(:hover) > .downloadMainArea > .downloadContainer > .downloadShowMoreInfo {
-  display: none;
-}
-
 @item@[verdict] > toolbarseparator {
   visibility: hidden;
 }
 
 .downloadButton {
   -moz-appearance: none;
   min-width: 58px;
   margin: 0;