Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r?paolo draft
authorDrew Willcoxon <adw@mozilla.com>
Fri, 26 Aug 2016 16:36:56 -0700
changeset 406343 09fb9fabcb5ab933a2a8a055cbbace4e87510022
parent 399976 6f2ba7787816fd01f77c30e3bdb68400db74bf0c
child 529627 16d6de888dfc61ab8cd02a36085ba5afb3ff57e8
push id27691
push userdwillcoxon@mozilla.com
push dateFri, 26 Aug 2016 23:37:11 +0000
reviewerspaolo
bugs1292345
milestone51.0a1
Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r?paolo 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.
    */