Backed out changeset d670f361bbb6

This commit is contained in:
Dão Gottwald 2014-05-23 20:39:46 +02:00
Родитель 203aa359ec
Коммит c963498105
4 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -4428,8 +4428,7 @@ var TabsInTitlebar = {
// Get the full height of the tabs toolbar:
let tabsToolbar = $("TabsToolbar");
let tabsStyles = window.getComputedStyle(tabsToolbar);
let fullTabsHeight = rect(tabsToolbar).height + verticalMargins(tabsStyles);
let fullTabsHeight = rect(tabsToolbar).height;
// Buttons first:
let captionButtonsBoxWidth = rect($("titlebar-buttonbox-container")).width;
@ -4438,11 +4437,15 @@ var TabsInTitlebar = {
// No need to look up the menubar stuff on OS X:
let menuHeight = 0;
let fullMenuHeight = 0;
// Instead, look up the titlebar padding:
let titlebarPadding = parseInt(window.getComputedStyle(titlebar).paddingTop, 10);
#else
// Otherwise, get the height and margins separately for the menubar
let menuHeight = rect(menubar).height;
let menuStyles = window.getComputedStyle(menubar);
let fullMenuHeight = verticalMargins(menuStyles) + menuHeight;
let tabsStyles = window.getComputedStyle(tabsToolbar);
fullTabsHeight += verticalMargins(tabsStyles);
#endif
// And get the height of what's in the titlebar:
@ -4485,6 +4488,7 @@ var TabsInTitlebar = {
// We need to increase the titlebar content's outer height (ie including margins)
// to match the tab and menu height:
let extraMargin = tabAndMenuHeight - titlebarContentHeight;
// On non-OSX, we can just use bottom margin:
#ifndef XP_MACOSX
titlebarContent.style.marginBottom = extraMargin + "px";
#endif

Просмотреть файл

@ -31,7 +31,7 @@ add_task(function() {
setToolbarVisibility(bookmarksToolbar, true);
setToolbarVisibility(navbar, false);
isnot(bookmarksToolbar.getBoundingClientRect().height, 0, "bookmarksToolbar should be visible now");
is(navbar.getBoundingClientRect().height, 0, "navbar should have height=0");
is(navbar.getBoundingClientRect().height, 1, "navbar should have a height=1 (due to border)");
is(CustomizableUI.inDefaultState, false, "Should no longer be in default state");
yield startCustomizing();

Просмотреть файл

@ -52,6 +52,7 @@
}
#TabsToolbar:not([collapsed="true"]) + #nav-bar {
margin-top: -@tabToolbarNavbarOverlap@; /* Move up into the TabsToolbar */
/* Position the toolbar above the bottom of background tabs */
position: relative;
z-index: 1;
@ -1767,7 +1768,6 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
min-height: 0;
padding: 0;
position: relative;
margin-bottom: -@tabToolbarNavbarOverlap@;
}
/*

Просмотреть файл

@ -110,6 +110,7 @@ toolbarseparator {
}
#TabsToolbar:not([collapsed="true"]) + #nav-bar {
margin-top: -@tabToolbarNavbarOverlap@; /* Move up into the TabsToolbar */
/* Position the toolbar above the bottom of background tabs */
position: relative;
z-index: 1;
@ -2796,7 +2797,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
position: relative;
-moz-appearance: none;
background-repeat: repeat-x;
margin-bottom: -@tabToolbarNavbarOverlap@;
}
#TabsToolbar:not(:-moz-lwtheme) {