Bug 1384899 - Fix missing scrollbar in the main menu on Mac. r=Gijs, a=jcristau
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Thu, 27 Jul 2017 14:46:41 +0100
changeset 414474 59a80d6ba08d85cb0a9876e87e1e9ad4ff144394
parent 414473 9b0a6513d07edff2362a9cc677a5402966c6341e
child 414475 53381d5b4d72270cef138d050cc2f51c7a00426c
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, jcristau
bugs1384899
milestone55.0
Bug 1384899 - Fix missing scrollbar in the main menu on Mac. r=Gijs, a=jcristau MozReview-Commit-ID: 73myZ67Vhl9
browser/components/customizableui/PanelMultiView.jsm
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -834,20 +834,20 @@ this.PanelMultiView = class {
           let blockInBoxWorkaround = () => {
             let mainViewHeight =
                 this._dwu.getBoundsWithoutFlushing(this._mainView).height;
             if (mainViewHeight > maxHeight) {
               this._mainView.style.height = maxHeight + "px";
               this._mainView.setAttribute("exceeding", "true");
             }
           };
-          // On Windows, we cannot measure the full height of the main view
+          // On some platforms we cannot measure the full height of the main view
           // until it is visible. Unfortunately, this causes a visible jump when
           // the view needs to scroll, but there is no easy way around this.
-          if (AppConstants.platform == "win") {
+          if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
             // We register a "once" listener so we don't need to store the value
             // of maxHeight elsewhere on the object.
             this._panel.addEventListener("popupshown", blockInBoxWorkaround,
                                          { once: true });
           } else {
             blockInBoxWorkaround();
           }
         }