Bug 1185482 - Remove gap between titlebar buttons and navigation toolbar draft
authorUK992 <urbankrajnc92@gmail.com>
Fri, 09 Jun 2017 01:21:27 +0200
changeset 592121 3a2b3ceae5a95ebae284328a66d6210b5d0f260d
parent 591094 e61060be36424240058f8bef4c5597f401bc8b7e
child 632721 e1c3dee8ab2439f8d025e5d6c2ec839ba2a10ea8
push id63280
push userbmo:urbankrajnc92@gmail.com
push dateSat, 10 Jun 2017 14:42:51 +0000
bugs1185482
milestone55.0a1
Bug 1185482 - Remove gap between titlebar buttons and navigation toolbar MozReview-Commit-ID: 9dblM2jTDEt
browser/base/content/browser-tabsintitlebar.js
browser/base/jar.mn
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -171,16 +171,27 @@ var TabsInTitlebar = {
         fullMenuHeight = verticalMargins(menuStyles) + menuHeight;
       }
 
       // And get the height of what's in the titlebar:
       let titlebarContentHeight = rect(titlebarContent).height;
 
       // Begin setting CSS properties which will cause a reflow
 
+#ifdef MOZ_PHOTON_THEME
+      if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0")) {
+        if (!menuHeight) {
+          titlebarContentHeight = Math.max(titlebarContentHeight, fullTabsHeight);
+          $("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
+        } else {
+          $("titlebar-buttonbox").style.removeProperty("height");
+        }
+      }
+#endif
+
       // If the menubar is around (menuHeight is non-zero), try to adjust
       // its full height (i.e. including margins) to match the titlebar,
       // by changing the menubar's bottom padding
       if (menuHeight) {
         // Calculate the difference between the titlebar's height and that of the menubar
         let menuTitlebarDelta = titlebarContentHeight - fullMenuHeight;
         let paddingBottom;
         // The titlebar is bigger:
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -78,17 +78,17 @@ browser.jar:
         content/browser/browser-plugins.js            (content/browser-plugins.js)
         content/browser/browser-refreshblocker.js     (content/browser-refreshblocker.js)
         content/browser/browser-safebrowsing.js       (content/browser-safebrowsing.js)
         content/browser/browser-sidebar.js            (content/browser-sidebar.js)
         content/browser/browser-social.js             (content/browser-social.js)
         content/browser/browser-sync.js               (content/browser-sync.js)
 *       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
 #ifdef CAN_DRAW_IN_TITLEBAR
-        content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar.js)
+*       content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar.js)
 #else
         content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar-stub.js)
 #endif
         content/browser/browser-thumbnails.js         (content/browser-thumbnails.js)
         content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
         content/browser/tab-content.js                (content/tab-content.js)
         content/browser/content.js                    (content/content.js)
         content/browser/social-content.js             (content/social-content.js)