Backed out changeset 1504917ed42e due to 4% twinopen regression. a=backout.

This commit is contained in:
Chris Pearce 2010-08-20 21:42:59 +12:00
parent 5849d334f1
commit c0336e97f2
7 changed files with 136 additions and 428 deletions

View File

@ -3,8 +3,6 @@
%brandDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
%browserDTD;
<!ENTITY % baseMenuDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd" >
%baseMenuDTD;
<!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
%globalRegionDTD;
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >

View File

@ -3585,9 +3585,6 @@ function updateEditUIVisibility()
let editMenuPopupState = document.getElementById("menu_EditPopup").state;
let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
let placesContextMenuPopupState = document.getElementById("placesContext").state;
#ifdef MENUBAR_CAN_AUTOHIDE
let appMenuPopupState = document.getElementById("appmenu-popup").state;
#endif
// The UI is visible if the Edit menu is opening or open, if the context menu
// is open, or if the toolbar has been customized to include the Cut, Copy,
@ -3598,10 +3595,6 @@ function updateEditUIVisibility()
contextMenuPopupState == "open" ||
placesContextMenuPopupState == "showing" ||
placesContextMenuPopupState == "open" ||
#ifdef MENUBAR_CAN_AUTOHIDE
appMenuPopupState == "showing" ||
appMenuPopupState == "open" ||
#endif
document.getElementById("cut-button") ||
document.getElementById("copy-button") ||
document.getElementById("paste-button") ? true : false;
@ -4703,7 +4696,7 @@ nsBrowserAccess.prototype = {
}
}
function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
function onViewToolbarsPopupShowing(aEvent) {
var popup = aEvent.target;
if (popup != aEvent.currentTarget)
return;
@ -4717,7 +4710,7 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
popup.removeChild(deadItem);
}
var firstMenuItem = aInsertPoint || popup.firstChild;
var firstMenuItem = popup.firstChild;
for (i = 0; i < gNavToolbox.childNodes.length; ++i) {
var toolbar = gNavToolbox.childNodes[i];
@ -7479,10 +7472,6 @@ let gPrivateBrowsingUI = {
// Disable the menu item in auto-start mode
document.getElementById("privateBrowsingItem")
.setAttribute("disabled", "true");
#ifdef MENUBAR_CAN_AUTOHIDE
document.getElementById("appmenu_privateBrowsing")
.setAttribute("disabled", "true");
#endif
document.getElementById("Tools:PrivateBrowsing")
.setAttribute("disabled", "true");
}
@ -7550,10 +7539,6 @@ let gPrivateBrowsingUI = {
// Enable the menu item in after exiting the auto-start mode
document.getElementById("privateBrowsingItem")
.removeAttribute("disabled");
#ifdef MENUBAR_CAN_AUTOHIDE
document.getElementById("appmenu_privateBrowsing")
.removeAttribute("disabled");
#endif
document.getElementById("Tools:PrivateBrowsing")
.removeAttribute("disabled");
@ -7572,11 +7557,6 @@ let gPrivateBrowsingUI = {
let pbMenuItem = document.getElementById("privateBrowsingItem");
pbMenuItem.setAttribute("label", pbMenuItem.getAttribute(aMode + "label"));
pbMenuItem.setAttribute("accesskey", pbMenuItem.getAttribute(aMode + "accesskey"));
#ifdef MENUBAR_CAN_AUTOHIDE
let appmenupbMenuItem = document.getElementById("appmenu_privateBrowsing");
appmenupbMenuItem.setAttribute("label", appmenupbMenuItem.getAttribute(aMode + "label"));
appmenupbMenuItem.setAttribute("accesskey", appmenupbMenuItem.getAttribute(aMode + "accesskey"));
#endif
},
toggleMode: function PBUI_toggleMode() {

View File

@ -449,300 +449,148 @@
</popupset>
#ifdef MENUBAR_CAN_AUTOHIDE
<hbox id="appmenu-button-container">
<button id="appmenu-button"
type="menu"
label="&brandShortName;"
style="-moz-user-focus: ignore;">
<menupopup id="appmenu-popup"
onpopupshowing="updateEditUIVisibility();">
<hbox>
<vbox id="appmenuPrimaryPane">
<hbox flex="1"
class="split-menuitem">
<menuitem id="appmenu_newTab"
class="split-menuitem-item"
flex="1"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"/>
<menu class="split-menuitem-menu">
<menupopup>
<menuitem id="appmenu_newTab_popup"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"/>
<menuitem id="appmenu_newNavigator"
label="&newNavigatorCmd.label;"
command="cmd_newNavigator"/>
<menuseparator/>
<menuitem id="appmenu_openFile"
label="&openFileCmd.label;"
command="Browser:OpenFile"/>
</menupopup>
</menu>
</hbox>
<menuitem id="appmenu_privateBrowsing"
class="menuitem-iconic"
label="&privateBrowsingCmd.start.label;"
accesskey="&privateBrowsingCmd.start.accesskey;"
startlabel="&privateBrowsingCmd.start.label;"
stoplabel="&privateBrowsingCmd.stop.label;"
command="Tools:PrivateBrowsing"/>
<menuseparator class="menu-seperator"/>
<hbox class="split-menuitem">
<menuitem id="appmenu-edit-menuitem"
label="&editMenu.label;"
disabled="true"/>
<toolbarbutton id="appmenu-cut"
class="appmenu-edit-button"
command="cmd_cut"
onclick="if (!this.disabled) hidePopup();"
tooltiptext="&cutButton.tooltip;"/>
<toolbarbutton id="appmenu-copy"
class="appmenu-edit-button"
command="cmd_copy"
onclick="if (!this.disabled) hidePopup();"
tooltiptext="&copyButton.tooltip;"/>
<toolbarbutton id="appmenu-paste"
class="appmenu-edit-button"
command="cmd_paste"
onclick="if (!this.disabled) hidePopup();"
tooltiptext="&pasteButton.tooltip;"/>
</hbox>
<menuitem id="appmenu_find"
label="&appMenuFind.label;"
command="cmd_find"/>
<menuseparator/>
<menuitem id="appmenu_savePage"
label="&savePageCmd.label;"
command="Browser:SavePage"/>
<menuitem id="appmenu_sendLink"
label="&sendPageCmd.label;"
command="Browser:SendLink"/>
<hbox flex="1"
class="split-menuitem">
<menuitem id="appmenu_print"
class="menuitem-iconic"
flex="1"
label="&printCmd.label;"
command="cmd_print"/>
<menu class="split-menuitem-menu">
<menupopup>
<menuitem id="appmenu_print_popup"
class="menuitem-iconic"
label="&printCmd.label;"
command="cmd_print"/>
<menuitem id="appmenu_printPreview"
label="&printPreviewCmd.label;"
command="cmd_printPreview"/>
<menuitem id="appmenu_printSetup"
label="&printSetupCmd.label;"
command="cmd_pageSetup"/>
</menupopup>
</menu>
</hbox>
<menuseparator/>
<menu id="appmenu_developer"
label="&developerMenu.label;">
<menupopup id="appmenu_developer_popup">
<menuitem id="appmenu_webConsole"
label="&webConsoleCmd.label;"
type="checkbox"
oncommand="HUDConsoleUI.toggleHUD();"/>
<menuitem id="appmenu_pageInspect"
label="&inspectMenu.label;"
type="checkbox"
command="Tools:Inspect"/>
<menuseparator/>
<menuitem id="appmenu_pageSource"
label="&viewPageSourceCmd.label;"
command="View:PageSource"/>
<menuseparator/>
<menuitem label="&goOfflineCmd.label;"
accesskey="&goOfflineCmd.accesskey;"
type="checkbox"
oncommand="BrowserOffline.toggleOfflineStatus();"/>
<hbox id="appmenu-button-container">
<button id="appmenu-button"
type="menu"
label="&brandShortName;"
style="-moz-user-focus: ignore;">
<menupopup id="appmenu-popup">
<hbox flex="1" class="split-menuitem">
<menuitem id="appmenu_newTab"
class="split-menuitem-item"
flex="1"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"/>
<menu class="split-menuitem-menu">
<menupopup>
<menuitem id="appmenu_newTab_sub"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"/>
<menuitem id="appmenu_newNavigator"
label="&newNavigatorCmd.label;"
command="cmd_newNavigator"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="appmenu_fullScreen"
label="&fullScreenCmd.label;"
type="checkbox"
observes="View:FullScreen"/>
<menuitem id="appmenu-quit"
class="menuitem-iconic"
#ifdef XP_WIN
label="&quitApplicationCmdWin.label;"
#else
label="&quitApplicationCmd.label;"
#endif
command="cmd_quitApplication"/>
</vbox>
<vbox id="appmenuSecondaryPane">
<hbox class="split-menuitem">
<menuitem id="appmenu_BookmarkItem"
class="menuitem-iconic"
flex="1"
label="&bookmarksMenu.label;"
command="Browser:ShowAllBookmarks"/>
<menu id="appmenuBookmarkMenu"
class="split-menuitem-menu">
<menupopup id="appmenuBookmarkMenu_popup"
placespopup="true"
context="placesContext"
openInTabs="children"
oncommand="BookmarksEventHandler.onCommand(event);"
onclick="BookmarksEventHandler.onClick(event);"
onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
if (!this.parentNode._placesView)new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');
this.appendChild(document.getElementById('appmenuBookmarkMenu_unsorted_seperator'));
this.appendChild(document.getElementById('appmenuBookmarkMenu_unsorted-menuitem'));"
tooltip="bhTooltip"
popupsinherittooltip="true">
<menuseparator id="appmenuBookmarkMenu_unsorted_seperator"/>
<menuitem id="appmenuBookmarkMenu_unsorted-menuitem"
label="&appMenuUnsorted.label;"
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
class="menuitem-iconic"/>
<menuitem id="appmenuBookmarkMenu_organize_bookmarks"
label="&organizeBookmarks.label;"
key="manBookmarkKb"
command="Browser:ShowAllBookmarks"
context=""/>
<menuseparator/>
<menuitem id="appmenuBookmarkThisPage"
class="menuitem-iconic"
label="&bookmarkThisPageCmd.label;"
command="Browser:AddBookmarkAs"
key="addBookmarkAsKb"/>
<menuitem id="subscribeToPageMenuitem"
class="menuitem-iconic"
label="&subscribeToPageMenuitem.label;"
oncommand="return FeedHandler.subscribeToFeed(null, event);"
onclick="checkForMiddleClick(this, event);"
disabled="true"/>
<menu id="subscribeToPageMenupopup"
class="menu-iconic"
label="&subscribeToPageMenupopup.label;"
hidden="true">
<menupopup id="subscribeToPageSubmenuMenupopup"
onpopupshowing="return FeedHandler.buildFeedList(event.target);"
oncommand="return FeedHandler.subscribeToFeed(null, event);"
onclick="checkForMiddleClick(this, event);"/>
</menu>
<menuseparator/>
</menupopup>
</menu>
</hbox>
<hbox class="split-menuitem">
<menuitem id="appmenu_HistoryItem"
class="menuitem-iconic"
flex="1"
label="&historyMenu.label;"
</hbox>
<menuseparator/>
<menuitem id="appmenu_savePage"
label="&savePageCmd.label;"
command="Browser:SavePage"/>
<menuitem id="appmenu_sendLink"
label="&sendPageCmd.label;"
command="Browser:SendLink"/>
<hbox flex="1" class="split-menuitem">
<menuitem id="appmenu_print"
class="split-menuitem-item"
flex="1"
label="&appMenuPrintCmd.label;"
command="cmd_print"/>
<menu class="split-menuitem-menu">
<menupopup>
<menuitem id="menu_printSetup"
label="&printSetupCmd.label;"
command="cmd_pageSetup"/>
<menuitem id="menu_printPreview"
label="&printPreviewCmd.label;"
command="cmd_printPreview"/>
</menupopup>
</menu>
</hbox>
<menuitem id="appmenu_find"
label="&findOnCmd.label;"
command="cmd_find"/>
<menuseparator/>
<menu id="appmenu_history"
label="&historyMenu.label;">
<menupopup id="appmenu_history_popup"
placespopup="true"
oncommand="this.parentNode._placesView._onCommand(event);"
onclick="checkForMiddleClick(this, event);"
onpopupshowing="if (!this.parentNode._placesView)
new HistoryMenu(event);"
tooltip="bhTooltip"
popupsinherittooltip="true">
<menuitem id="appmenu_sanitizeHistory"
label="&clearRecentHistory.label;"
key="key_sanitize"
command="Tools:Sanitize"/>
<menuseparator/>
<menuitem id="appmenu_showAllHistory"
label="&showAllHistoryCmd2.label;"
key="showAllHistoryKb"
command="Browser:ShowAllHistory"/>
<menu id="appmenu_history"
class="split-menuitem-menu">
<menupopup id="appmenu_history_popup"
placespopup="true"
oncommand="this.parentNode._placesView._onCommand(event);"
onclick="checkForMiddleClick(this, event);"
onpopupshowing="if (!this.parentNode._placesView) new HistoryMenu(event);"
tooltip="bhTooltip"
popupsinherittooltip="true">
<menuitem id="appmenu_showAllHistory"
label="&showAllHistoryCmd2.label;"
key="showAllHistoryKb"
command="Browser:ShowAllHistory"/>
<menuseparator/>
<menuitem id="appmenu_sanitizeHistory"
label="&clearRecentHistory.label;"
key="key_sanitize"
command="Tools:Sanitize"/>
<menuseparator class="hide-if-empty-places-result"/>
<menu id="historyUndoMenu"
label="&historyUndoMenu.label;"
disabled="true">
<menupopup id="historyUndoPopup"
onpopupshowing="_placesView.populateUndoSubmenu();"/>
</menu>
<menu id="historyUndoWindowMenu"
label="&historyUndoWindowMenu.label;"
disabled="true">
<menupopup id="historyUndoPopup"
onpopupshowing="_placesView.populateUndoWindowSubmenu();"/>
</menu>
<menuseparator/>
<menuseparator class="hide-if-empty-places-result"/>
</menupopup>
</menu>
<menuseparator/>
<menu id="appmenu_developer"
label="&developerMenu.label;">
<menupopup id="appmenu_developer_popup">
<menuitem id="appmenu_pageSource"
label="&pageSourceCmd.label;"
command="View:PageSource"/>
<menuseparator/>
<menuitem id="appmenu_pageInspect"
type="checkbox"
label="&inspectMenu.label;"
command="Tools:Inspect"/>
<menuitem id="appmenu_webConsole"
label="&webConsoleCmd.label;"
oncommand="HUDConsoleUI.toggleHUD();"/>
</menupopup>
</menu>
<menuseparator/>
<menu id="appmenu_customize"
label="&appMenuCustomize.label;">
<menupopup id="appmenu_customizeMenu"
onpopupshowing="onViewToolbarsPopupShowing(event);">
<menuseparator/>
<menuitem command="cmd_ToggleTabsOnTop"
type="checkbox"
label="&viewTabsOnTop.label;"/>
<menuitem id="appmenu_toolbarLayout"
label="&appMenuToolbarLayout.label;"
command="cmd_CustomizeToolbars"/>
<menu id="appmenu_sidebars"
label="&appMenuSidebars.label;">
<menupopup id="appmenu_sidebarMenu">
<menuitem id="appmenu_bookmarksSidebar"
key="viewBookmarksSidebarKb"
observes="viewBookmarksSidebar"/>
<menuitem id="appmenu_historySidebar"
key="key_gotoHistory"
observes="viewHistorySidebar"
label="&historyButton.label;"/>
</menupopup>
</menu>
</hbox>
<menuitem id="appmenu_downloads"
label="&downloads.label;"
command="Tools:Downloads"/>
<spacer id="appmenuSecondaryPane-spacer"/>
<menuitem id="appmenu_addons"
class="menuitem-iconic"
<menuseparator/>
<menuitem id="appmenu_openAddons"
label="&addons.label;"
command="Tools:Addons"/>
<hbox class="split-menuitem">
<menuitem id="appmenu_customize"
label="&preferencesCmd.label;"
class="split-menuitem-item"
flex="1"
oncommand="openPreferences();"/>
<menu class="split-menuitem-menu"
label="&preferencesCmd.label;">
<menupopup id="appmenu_customizeMenu"
onpopupshowing="onViewToolbarsPopupShowing(event, (document.getElementById('appmenuToggleStatusbar')));">
<menuitem id="appmenu_preferences"
</menupopup>
</menu>
<menuitem id="appmenu_preferences"
#ifdef XP_UNIX
label="&preferencesCmdUnix.label;"
label="&preferencesCmdUnix.label;"
#else
label="&preferencesCmd.label;"
label="&preferencesCmd.label;"
#endif
oncommand="openPreferences();"/>
<menuseparator/>
<menuitem id="appmenuToggleStatusbar"
type="checkbox"
command="cmd_toggleTaskbar"
observes="toggle_taskbar"/>
<menuseparator/>
<menuitem id="appmenuToggleTabs"
label="&viewTabsOnTop.label;"
type="checkbox"
command="cmd_ToggleTabsOnTop"/>
<menuitem id="appmenu_toolbarLayout"
label="&appMenuToolbarLayout.label;"
command="cmd_CustomizeToolbars"/>
</menupopup>
</menu>
</hbox>
<hbox class="split-menuitem">
<menuitem id="appmenu_helpItem"
flex="1"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')"/>
<menu id="appmenu_about_menu"
class="split-menuitem-menu">
<menupopup>
<menuitem id="appmenu_openHelp"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="appmenu_help_getting_started"
label="&appMenuGettingStarted.label;"
oncommand="gBrowser.selectedTab = gBrowser.addTab('http://www.mozilla.com/firefox/central/');"
onclick="checkForMiddleClick(this, event);"/>
<menuseparator/>
<menuitem id="appmenu_help_about"
label="&aboutProduct.label;"
oncommand="openAboutDialog();"/>
</menupopup>
</menu>
</hbox>
</vbox>
</hbox>
</menupopup>
</button>
</hbox>
oncommand="openPreferences();"/>
<menuitem id="appmenu_openHelp"
label="&appMenuHelp.label;"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"/>
<menuseparator/>
<menuitem id="appmenu_quit"
#ifdef XP_WIN
label="&quitApplicationCmdWin.label;"
#else
label="&quitApplicationCmd.label;"
#endif
command="cmd_quitApplication"/>
</menupopup>
</button>
</hbox>
#endif
<deck flex="1" id="tab-view-deck">

View File

@ -265,12 +265,11 @@
<!ENTITY showAllHistoryCmd2.label "Show All History">
<!ENTITY showAllHistoryCmd.commandkey "H">
<!ENTITY appMenuPrintCmd.label "Print">
<!ENTITY appMenuCustomize.label "Customize">
<!ENTITY appMenuToolbarLayout.label "Toolbar Layout…">
<!ENTITY appMenuSidebars.label "Sidebars">
<!ENTITY appMenuFind.label "Find…">
<!ENTITY appMenuUnsorted.label "Unsorted Bookmarks">
<!ENTITY appMenuGettingStarted.label "Getting Started">
<!ENTITY appMenuHelp.label "Help">
<!ENTITY developerMenu.label "Developer">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -171,121 +171,6 @@ statusbarpanel#statusbar-display {
color: -moz-menuhovertext;
}
/* Style Firefox App Menu popup */
.appmenu-edit-button {
-moz-appearance: none;
border: 1px solid transparent;
padding: 2px;
background: transparent;
-moz-border-radius: 3px;
}
.appmenu-edit-button[disabled="true"] {
opacity: .3;
}
@media all and (-moz-windows-default-theme) {
#appmenu-popup {
-moz-appearance: none;
background: white;
border: 1px solid rgba(0,0,0,.5);
}
#appmenuPrimaryPane {
margin-right: -1px;
background-color: rgba(255,255,255,0.5);
border-right: 1px solid #c4c4c5;
padding-left: 2px;
}
#appmenuSecondaryPane {
-moz-appearance: none;
background-color: #f1f5fb;
-moz-box-shadow: 1px 0 3px rgb(204,214,234) inset;
border: 0;
padding-top: 5px;
font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
}
.appmenu-edit-button:not([disabled]):hover {
border: 1px solid #b8d6fb;
-moz-box-shadow: inset 0 0 1px white;
background: -moz-linear-gradient(#fafbfd, #ebf3fd);
-moz-transition: .2s ease-in;
}
}
#appmenuSecondaryPane-spacer {
min-height: 1em;
}
#appmenu_print,
#appmenu_print_popup,
.appmenu-edit-button,
#appmenu-quit {
list-style-image: url("appmenu-icons.png");
}
#appmenu-cut {
-moz-image-region: rect(0 16px 16px 0);
}
#appmenu-copy {
-moz-image-region: rect(0 32px 16px 16px);
}
#appmenu-paste {
-moz-image-region: rect(0 48px 16px 32px);
}
#appmenu_print,
#appmenu_print_popup {
-moz-image-region: rect(0 64px 16px 48px);
}
#appmenu-quit {
-moz-image-region: rect(0 80px 16px 64px);
}
#appmenu-edit-menuitem {
-moz-appearance: none;
background: transparent;
font-style: italic;
}
#appmenu_BookmarkItem {
list-style-image: url("chrome://browser/skin/places/bookmark.png");
-moz-image-region: rect(0px 48px 16px 32px);
}
#appmenu_BookmarkItem > .menu-iconic-left,
#appmenu_addons > .menu-iconic-left {
-moz-margin-end: -5px;
-moz-margin-start: 5px;
padding: 0;
}
#appmenu_privateBrowsing {
list-style-image: url("chrome://browser/skin/Privacy-16.png");
}
#appmenuBookmarkMenu_unsorted-menuitem {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
}
#appmenu_addons {
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png");
}
#appmenu-button #subscribeToPageMenuitem:not([disabled]),
#appmenu-button #subscribeToPageMenupopup:not([hidden]) {
list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png");
-moz-image-region: rect(0px 16px 16px 0px);
}
#appmenuBookmarkThisPage {
list-style-image: url("chrome://browser/skin/places/bookmark.png");
-moz-image-region: rect(0 16px 16px 0);
}
/* XXX: stop-gap until the button can be drawn in the title bar */
%ifdef WINSTRIPE_AERO
@media not all and (-moz-windows-compositor) {

View File

@ -12,7 +12,6 @@ browser.jar:
skin/classic/browser/aboutSyncTabs.css
#endif
skin/classic/browser/actionicon-tab.png
skin/classic/browser/appmenu-icons.png
skin/classic/browser/appmenu-dropmarker.png
* skin/classic/browser/browser.css (browser.css)
* skin/classic/browser/engineManager.css (engineManager.css)
@ -128,7 +127,6 @@ browser.jar:
#endif
skin/classic/aero/browser/actionicon-tab.png (actionicon-tab.png)
skin/classic/aero/browser/appmenu-dropmarker.png
skin/classic/aero/browser/appmenu-icons.png
* skin/classic/aero/browser/browser.css (browser-aero.css)
* skin/classic/aero/browser/engineManager.css (engineManager.css)
skin/classic/aero/browser/fullscreen-video.css