Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r=paolo, a=ritu
authorDrew Willcoxon <adw@mozilla.com>
Fri, 26 Aug 2016 16:36:56 -0700
changeset 347949 d6db9615d16b36777f315e463ab487e81a0a04e3
parent 347948 1990fae00dfa8256bc6255be0c3e054635c3416b
child 347950 9f9819fd9c3046b729d76448fa67493372cd9bbf
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaolo, ritu
bugs1292345
milestone50.0a2
Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r=paolo, a=ritu MozReview-Commit-ID: AV0S8GM0ztj
browser/components/downloads/content/downloads.js
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -1485,16 +1485,20 @@ const DownloadsFooter = {
    */
   set showingSummary(aValue) {
     if (this._footerNode) {
       if (aValue) {
         this._footerNode.setAttribute("showingsummary", "true");
       } else {
         this._footerNode.removeAttribute("showingsummary");
       }
+      if (!aValue && this._showingSummary) {
+        // Make sure the panel's height shrinks when the summary is hidden.
+        DownloadsBlockedSubview.view.setHeightToFit();
+      }
       this._showingSummary = aValue;
     }
     return aValue;
   },
 
   /**
    * Element corresponding to the footer of the downloads panel.
    */