Bug 1185482 - Remove gap between titlebar buttons and navigation toolbar
MozReview-Commit-ID: 9dblM2jTDEt
--- 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)