Backed out changeset a0d6e4d37273 (bug 575870) for possibly being the cause of the following performance regression:

Talos Regression: Txul increase 4.57% on Win7 Firefox
Other possible culprits:
bug 574454
This commit is contained in:
Shawn Wilsher 2010-08-10 13:03:32 -07:00
Родитель 6bc5e27901
Коммит 9441651b39
5 изменённых файлов: 41 добавлений и 109 удалений

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

@ -83,13 +83,9 @@ toolbar[printpreview="true"] {
} }
%ifdef MENUBAR_CAN_AUTOHIDE %ifdef MENUBAR_CAN_AUTOHIDE
#main-window[inFullscreen] > #titlebar { #main-window[inFullscreen] > #appmenu-button-container {
display: none; display: none;
} }
#titlebar {
-moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
}
%endif %endif
toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] { toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {

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

@ -1316,15 +1316,6 @@ function prepareForStartup() {
// setup simple gestures support // setup simple gestures support
gGestureSupport.init(true); gGestureSupport.init(true);
#ifdef MENUBAR_CAN_AUTOHIDE
// update the visibility of the titlebar buttons after the window is
// displayed. (required by theme code.)
window.addEventListener("MozAfterPaint", function () {
window.removeEventListener("MozAfterPaint", arguments.callee, false);
document.getElementById("titlebar-buttonbox").collapsed = false;
}, false);
#endif
} }
function delayedStartup(isLoadingBlank, mustLoadSidebar) { function delayedStartup(isLoadingBlank, mustLoadSidebar) {
@ -4765,20 +4756,13 @@ function updateAppButtonDisplay() {
window.menubar.visible && window.menubar.visible &&
document.getElementById("toolbar-menubar").getAttribute("autohide") == "true"; document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
document.getElementById("titlebar").hidden = !displayAppButton; document.getElementById("appmenu-button-container").hidden = !displayAppButton;
if (displayAppButton) if (displayAppButton)
document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1"); document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1");
else else
document.documentElement.removeAttribute("chromemargin"); document.documentElement.removeAttribute("chromemargin");
} }
function onTitlebarMaxClick() {
if (window.windowState == window.STATE_MAXIMIZED)
window.restore();
else
window.maximize();
}
#endif #endif
function displaySecurityInfo() function displaySecurityInfo()

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

@ -437,9 +437,7 @@
</popupset> </popupset>
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef MENUBAR_CAN_AUTOHIDE
<vbox id="titlebar"> <hbox id="appmenu-button-container">
<hbox id="titlebar-content">
<hbox id="appmenu-button-container" align="start">
<button id="appmenu-button" <button id="appmenu-button"
type="menu" type="menu"
label="&brandShortName;" label="&brandShortName;"
@ -579,15 +577,7 @@
command="cmd_quitApplication"/> command="cmd_quitApplication"/>
</menupopup> </menupopup>
</button> </button>
</hbox> </hbox>
<spacer id="titlebar-spacer" flex="1"/>
<hbox id="titlebar-buttonbox" collapsed="true">
<toolbarbutton id="titlebar-min" onclick="window.minimize();"/>
<toolbarbutton id="titlebar-max" onclick="onTitlebarMaxClick();"/>
<toolbarbutton id="titlebar-close" onclick="window.close();"/>
</hbox>
</hbox>
</vbox>
#endif #endif
<toolbox id="navigator-toolbox" <toolbox id="navigator-toolbox"

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

@ -21,6 +21,15 @@
background: transparent; background: transparent;
} }
/* the new titlebar requires this, or content will be clipped at the top of the screen. */
#main-window[sizemode="maximized"][chromemargin^="0,"] {
margin-top: 8px;
}
#main-window[sizemode="normal"][chromemargin^="0,"] {
margin-top: 2px;
}
#main-window:not(:-moz-lwtheme)[inFullscreen="true"] { #main-window:not(:-moz-lwtheme)[inFullscreen="true"] {
-moz-appearance: none; -moz-appearance: none;
background-color: #556; background-color: #556;

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

@ -26,7 +26,6 @@
* Blake Ross (blake@cs.stanford.edu) * Blake Ross (blake@cs.stanford.edu)
* Pamela Greene (pamg.bugs@gmail.com) * Pamela Greene (pamg.bugs@gmail.com)
* Dão Gottwald (dao@mozilla.com) * Dão Gottwald (dao@mozilla.com)
* Jim Mathies (jmathies@mozilla.com)
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -102,7 +101,21 @@ statusbarpanel#statusbar-display {
-moz-padding-start: 0; -moz-padding-start: 0;
} }
/* ::::: app menu button ::::: */ /* App menu button */
%ifndef WINSTRIPE_AERO
#appmenu-button-container {
background: ActiveCaption;
}
#appmenu-button-container:-moz-window-inactive {
background: InactiveCaption;
}
%endif
#appmenu-button-container {
-moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
}
#appmenu-button { #appmenu-button {
-moz-appearance: none; -moz-appearance: none;
@ -157,84 +170,24 @@ statusbarpanel#statusbar-display {
color: -moz-menuhovertext; color: -moz-menuhovertext;
} }
/* ::::: titlebar ::::: */ /* XXX: stop-gap until the button can be drawn in the title bar */
%ifdef WINSTRIPE_AERO
#titlebar { @media not all and (-moz-windows-compositor) {
-moz-appearance: -moz-window-titlebar;
/* we only need to the middle section, hide the edges of the
theme background beyond the window frame. */
margin-left: -15px;
margin-right: -15px;
}
#main-window[sizemode="maximized"] > #titlebar {
-moz-appearance: -moz-window-titlebar-maximized;
}
#titlebar-content {
margin-left: 15px;
margin-right: 15px;
}
/* aesthetic - push the fx button off the top window border */
@media not all and (-moz-windows-classic) {
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
%ifndef WINSTRIPE_AERO
margin-top: 1px;
%else
margin-top: 2px;
%endif %endif
#main-window[tabsontop="true"] > #appmenu-button-container > #appmenu-button {
position: relative !important;
margin-bottom: -1.6em !important;
} }
} #navigator-toolbox[tabsontop="true"] > #toolbar-menubar[autohide="true"] {
position: relative !important;
#titlebar-buttonbox { background-color: -moz-dialog !important;
-moz-appearance: -moz-window-button-box;
-moz-box-align: start;
}
#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox {
-moz-appearance: -moz-window-button-box-maximized;
}
/* titlebar command buttons */
#titlebar-min {
-moz-appearance: -moz-window-button-minimize;
}
#titlebar-max {
-moz-appearance: -moz-window-button-maximize;
}
#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox > #titlebar-max {
-moz-appearance: -moz-window-button-restore;
}
#titlebar-close {
-moz-appearance: -moz-window-button-close;
}
@media not all and (-moz-windows-classic) {
#titlebar-min {
-moz-margin-end: 1px;
} }
#navigator-toolbox[tabsontop="true"] > #toolbar-menubar[autohide="true"] ~ #TabsToolbar:not([inFullscreen]) {
#titlebar-max { -moz-padding-start: 10em !important;
-moz-margin-start: 1px;
-moz-margin-end: 1px;
}
#titlebar-close {
-moz-margin-start: 1px;
-moz-margin-end: 0;
}
}
@media all and (-moz-windows-classic) {
#titlebar-close {
-moz-margin-start: 2px !important;
} }
%ifdef WINSTRIPE_AERO
} }
%endif
/* ::::: bookmark buttons ::::: */ /* ::::: bookmark buttons ::::: */