Bug 1411642 - Don't let window controls overlap the nav bar. r?johannh draft
authorDão Gottwald <dao@mozilla.com>
Thu, 26 Oct 2017 11:46:30 +0200
changeset 686781 4be19e04c813efc45ea682e19cff8dcaedd0f0ca
parent 686540 64bab5cbb9b63808d04babfbcfba3175fd99f69d
child 737457 81cea7b429f14321ef99a3d3665604a5a9d765f4
push id86277
push userdgottwald@mozilla.com
push dateThu, 26 Oct 2017 09:46:52 +0000
reviewersjohannh
bugs1411642
milestone58.0a1
Bug 1411642 - Don't let window controls overlap the nav bar. r?johannh MozReview-Commit-ID: HLZoEaktNau
browser/base/content/browser-tabsintitlebar.js
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -180,22 +180,20 @@ var TabsInTitlebar = {
 
       // And get the height of what's in the titlebar:
       let titlebarContentHeight = rect(titlebarContent).height;
 
       // Begin setting CSS properties which will cause a reflow
 
       // On Windows 10, adjust the window controls to span the entire
       // tab strip height if we're not showing a menu bar.
-      if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0")) {
-        if (!menuHeight) {
-          // Add a pixel to slightly overlap the navbar border.
-          titlebarContentHeight = fullTabsHeight + 1;
-          $("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
-        }
+      if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0") &&
+          !menuHeight) {
+        titlebarContentHeight = fullTabsHeight;
+        $("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
       }
 
       // 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;