Automated merge with https://hg.mozilla.org/mozilla-central
|
@ -412,10 +412,10 @@ pref("browser.tabs.loadBookmarksInBackground", false);
|
|||
pref("browser.tabs.tabClipWidth", 140);
|
||||
pref("browser.tabs.animate", true);
|
||||
pref("browser.tabs.onTop", true);
|
||||
#ifdef XP_WIN
|
||||
pref("browser.tabs.drawInTitlebar", true);
|
||||
#else
|
||||
#ifdef UNIX_BUT_NOT_MAC
|
||||
pref("browser.tabs.drawInTitlebar", false);
|
||||
#else
|
||||
pref("browser.tabs.drawInTitlebar", true);
|
||||
#endif
|
||||
|
||||
// Where to show tab close buttons:
|
||||
|
|
|
@ -415,3 +415,58 @@ var LightWeightThemeWebInstaller = {
|
|||
node.baseURI);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
|
||||
*/
|
||||
let LightweightThemeListener = {
|
||||
_modifiedStyles: [],
|
||||
|
||||
init: function () {
|
||||
XPCOMUtils.defineLazyGetter(this, "styleSheet", function() {
|
||||
for (let i = document.styleSheets.length - 1; i >= 0; i--) {
|
||||
let sheet = document.styleSheets[i];
|
||||
if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css")
|
||||
return sheet;
|
||||
}
|
||||
});
|
||||
|
||||
Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
|
||||
if (document.documentElement.hasAttribute("lwtheme"))
|
||||
this.updateStyleSheet(document.documentElement.style.backgroundImage);
|
||||
},
|
||||
|
||||
uninit: function () {
|
||||
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||
},
|
||||
|
||||
/**
|
||||
* Append the headerImage to the background-image property of all rulesets in
|
||||
* browser-lightweightTheme.css.
|
||||
*
|
||||
* @param headerImage - a string containing a CSS image for the lightweight theme header.
|
||||
*/
|
||||
updateStyleSheet: function(headerImage) {
|
||||
if (!this.styleSheet)
|
||||
return;
|
||||
for (let i = 0; i < this.styleSheet.cssRules.length; i++) {
|
||||
let rule = this.styleSheet.cssRules[i];
|
||||
if (!rule.style.backgroundImage)
|
||||
continue;
|
||||
|
||||
if (!this._modifiedStyles[i])
|
||||
this._modifiedStyles[i] = { backgroundImage: rule.style.backgroundImage };
|
||||
|
||||
rule.style.backgroundImage = this._modifiedStyles[i].backgroundImage + ", " + headerImage;
|
||||
}
|
||||
},
|
||||
|
||||
// nsIObserver
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
if (aTopic != "lightweight-theme-styling-update" || !this.styleSheet)
|
||||
return;
|
||||
|
||||
let themeData = JSON.parse(aData);
|
||||
this.updateStyleSheet("url(" + themeData.headerURL + ")");
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,400 +0,0 @@
|
|||
# -*- Mode: HTML -*-
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<menupopup id="appmenu-popup"
|
||||
onpopupshowing="if (event.target == this) {
|
||||
updateEditUIVisibility();
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
gSyncUI.updateUI();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
updateCharacterEncodingMenuState();
|
||||
if (event.target.parentNode.parentNode.parentNode.parentNode == this)
|
||||
this._currentPopup = event.target;">
|
||||
<hbox>
|
||||
<vbox id="appmenuPrimaryPane">
|
||||
<splitmenu id="appmenu_newTab"
|
||||
label="&tabCmd.label;"
|
||||
command="cmd_newNavigatorTab">
|
||||
<menupopup>
|
||||
<menuitem id="appmenu_newTab_popup"
|
||||
label="&tabCmd.label;"
|
||||
command="cmd_newNavigatorTab"
|
||||
key="key_newNavigatorTab"/>
|
||||
<menuitem id="appmenu_newNavigator"
|
||||
label="&newNavigatorCmd.label;"
|
||||
command="cmd_newNavigator"
|
||||
key="key_newNavigator"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_openFile"
|
||||
label="&openFileCmd.label;"
|
||||
command="Browser:OpenFile"
|
||||
key="openFileKb"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<menuitem id="appmenu_newPrivateWindow"
|
||||
class="menuitem-iconic menuitem-iconic-tooltip"
|
||||
label="&newPrivateWindow.label;"
|
||||
command="Tools:PrivateBrowsing"
|
||||
key="key_privatebrowsing"/>
|
||||
<menuitem label="&goOfflineCmd.label;"
|
||||
id="appmenu_offlineModeRecovery"
|
||||
type="checkbox"
|
||||
observes="workOfflineMenuitemState"
|
||||
oncommand="BrowserOffline.toggleOfflineStatus();"/>
|
||||
<menuseparator class="appmenu-menuseparator"/>
|
||||
<hbox>
|
||||
<menuitem id="appmenu-edit-label"
|
||||
label="&appMenuEdit.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="©Button.tooltip;"/>
|
||||
<toolbarbutton id="appmenu-paste"
|
||||
class="appmenu-edit-button"
|
||||
command="cmd_paste"
|
||||
onclick="if (!this.disabled) hidePopup();"
|
||||
tooltiptext="&pasteButton.tooltip;"/>
|
||||
<spacer flex="1"/>
|
||||
<menu id="appmenu-editmenu">
|
||||
<menupopup id="appmenu-editmenu-menupopup">
|
||||
<menuitem id="appmenu-editmenu-cut"
|
||||
class="menuitem-iconic"
|
||||
label="&cutCmd.label;"
|
||||
key="key_cut"
|
||||
command="cmd_cut"/>
|
||||
<menuitem id="appmenu-editmenu-copy"
|
||||
class="menuitem-iconic"
|
||||
label="©Cmd.label;"
|
||||
key="key_copy"
|
||||
command="cmd_copy"/>
|
||||
<menuitem id="appmenu-editmenu-paste"
|
||||
class="menuitem-iconic"
|
||||
label="&pasteCmd.label;"
|
||||
key="key_paste"
|
||||
command="cmd_paste"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu-editmenu-undo"
|
||||
label="&undoCmd.label;"
|
||||
key="key_undo"
|
||||
command="cmd_undo"/>
|
||||
<menuitem id="appmenu-editmenu-redo"
|
||||
label="&redoCmd.label;"
|
||||
key="key_redo"
|
||||
command="cmd_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu-editmenu-selectAll"
|
||||
label="&selectAllCmd.label;"
|
||||
key="key_selectAll"
|
||||
command="cmd_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu-editmenu-delete"
|
||||
label="&deleteCmd.label;"
|
||||
key="key_delete"
|
||||
command="cmd_delete"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</hbox>
|
||||
<menuitem id="appmenu_find"
|
||||
class="menuitem-tooltip"
|
||||
label="&appMenuFind.label;"
|
||||
command="cmd_find"
|
||||
key="key_find"/>
|
||||
<menuseparator class="appmenu-menuseparator"/>
|
||||
<menuitem id="appmenu_savePage"
|
||||
class="menuitem-tooltip"
|
||||
label="&savePageCmd.label;"
|
||||
command="Browser:SavePage"
|
||||
key="key_savePage"/>
|
||||
<menuitem id="appmenu_sendLink"
|
||||
label="&emailPageCmd.label;"
|
||||
command="Browser:SendLink"/>
|
||||
<splitmenu id="appmenu_print"
|
||||
iconic="true"
|
||||
label="&printCmd.label;"
|
||||
command="cmd_print">
|
||||
<menupopup>
|
||||
<menuitem id="appmenu_print_popup"
|
||||
class="menuitem-iconic"
|
||||
label="&printCmd.label;"
|
||||
command="cmd_print"
|
||||
key="printKb"/>
|
||||
<menuitem id="appmenu_printPreview"
|
||||
label="&printPreviewCmd.label;"
|
||||
command="cmd_printPreview"/>
|
||||
<menuitem id="appmenu_printSetup"
|
||||
label="&printSetupCmd.label;"
|
||||
command="cmd_pageSetup"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<menuseparator class="appmenu-menuseparator"/>
|
||||
<splitmenu id="appmenu_webDeveloper"
|
||||
command="Tools:DevToolbox"
|
||||
label="&appMenuWebDeveloper.label;">
|
||||
<menupopup id="appmenu_webDeveloper_popup">
|
||||
<menuitem id="appmenu_devToolbox"
|
||||
observes="devtoolsMenuBroadcaster_DevToolbox"/>
|
||||
<menuseparator id="appmenu_devtools_separator"/>
|
||||
<menuitem id="appmenu_devToolbar"
|
||||
observes="devtoolsMenuBroadcaster_DevToolbar"/>
|
||||
<menuitem id="appmenu_chromeDebugger"
|
||||
observes="devtoolsMenuBroadcaster_ChromeDebugger"/>
|
||||
<menuitem id="appmenu_browserConsole"
|
||||
observes="devtoolsMenuBroadcaster_BrowserConsole"/>
|
||||
<menuitem id="appmenu_responsiveUI"
|
||||
observes="devtoolsMenuBroadcaster_ResponsiveUI"/>
|
||||
<menuitem id="appmenu_scratchpad"
|
||||
observes="devtoolsMenuBroadcaster_Scratchpad"/>
|
||||
<menuitem id="appmenu_pageSource"
|
||||
observes="devtoolsMenuBroadcaster_PageSource"/>
|
||||
<menuitem id="appmenu_errorConsole"
|
||||
observes="devtoolsMenuBroadcaster_ErrorConsole"/>
|
||||
<menuitem id="appmenu_devtools_connect"
|
||||
observes="devtoolsMenuBroadcaster_connect"/>
|
||||
<menuseparator id="appmenu_devToolsEndSeparator"/>
|
||||
<menuitem id="appmenu_getMoreDevtools"
|
||||
observes="devtoolsMenuBroadcaster_GetMoreTools"/>
|
||||
<menuseparator/>
|
||||
#define ID_PREFIX appmenu_developer_
|
||||
#define OMIT_ACCESSKEYS
|
||||
#include browser-charsetmenu.inc
|
||||
#undef ID_PREFIX
|
||||
#undef OMIT_ACCESSKEYS
|
||||
<menuitem label="&goOfflineCmd.label;"
|
||||
type="checkbox"
|
||||
observes="workOfflineMenuitemState"
|
||||
oncommand="BrowserOffline.toggleOfflineStatus();"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<menuseparator class="appmenu-menuseparator"/>
|
||||
#define ID_PREFIX appmenu_
|
||||
#define OMIT_ACCESSKEYS
|
||||
#include browser-charsetmenu.inc
|
||||
#undef ID_PREFIX
|
||||
#undef OMIT_ACCESSKEYS
|
||||
<menuitem id="appmenu_fullScreen"
|
||||
class="menuitem-tooltip"
|
||||
label="&fullScreenCmd.label;"
|
||||
type="checkbox"
|
||||
observes="View:FullScreen"
|
||||
key="key_fullScreen"/>
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
<!-- only one of sync-setup or sync-syncnow will be showing at once -->
|
||||
<menuitem id="sync-setup-appmenu"
|
||||
label="&syncSetup.label;"
|
||||
observes="sync-setup-state"
|
||||
oncommand="gSyncUI.openSetup()"/>
|
||||
<menuitem id="sync-syncnowitem-appmenu"
|
||||
label="&syncSyncNowItem.label;"
|
||||
observes="sync-syncnow-state"
|
||||
oncommand="gSyncUI.doSync(event);"/>
|
||||
#endif
|
||||
<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">
|
||||
<splitmenu id="appmenu_bookmarks"
|
||||
iconic="true"
|
||||
label="&bookmarksMenu.label;"
|
||||
command="Browser:ShowAllBookmarks">
|
||||
<menupopup id="appmenu_bookmarksPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
openInTabs="children"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
|
||||
onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
|
||||
onpopupshowing="BookmarkingUI.onPopupShowing(event);
|
||||
if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
|
||||
tooltip="bhTooltip"
|
||||
popupsinherittooltip="true">
|
||||
<menuitem id="appmenu_showAllBookmarks"
|
||||
label="&showAllBookmarks2.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
context=""
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_bookmarkThisPage"
|
||||
class="menuitem-iconic"
|
||||
label="&bookmarkThisPageCmd.label;"
|
||||
command="Browser:AddBookmarkAs"
|
||||
key="addBookmarkAsKb"/>
|
||||
<menuitem id="appmenu_subscribeToPage"
|
||||
class="menuitem-iconic"
|
||||
label="&subscribeToPageMenuitem.label;"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
observes="singleFeedMenuitemState"/>
|
||||
<menu id="appmenu_subscribeToPageMenu"
|
||||
class="menu-iconic"
|
||||
label="&subscribeToPageMenupopup.label;"
|
||||
observes="multipleFeedsMenuState">
|
||||
<menupopup id="appmenu_subscribeToPageMenupopup"
|
||||
onpopupshowing="return FeedHandler.buildFeedList(event.target);"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menu id="appmenu_bookmarksToolbar"
|
||||
placesanonid="toolbar-autohide"
|
||||
class="menu-iconic bookmark-item"
|
||||
label="&personalbarCmd.label;"
|
||||
container="true">
|
||||
<menupopup id="appmenu_bookmarksToolbarPopup"
|
||||
placespopup="true"
|
||||
context="placesContext"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<!-- Bookmarks menu items -->
|
||||
<menuseparator builder="end"
|
||||
class="hide-if-empty-places-result"/>
|
||||
<menuitem id="appmenu_unsortedBookmarks"
|
||||
label="&appMenuUnsorted.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
|
||||
class="menuitem-iconic"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<splitmenu id="appmenu_history"
|
||||
iconic="true"
|
||||
label="&historyMenu.label;"
|
||||
command="Browser:ShowAllHistory">
|
||||
<menupopup id="appmenu_historyMenupopup"
|
||||
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;"
|
||||
command="Browser:ShowAllHistory"
|
||||
key="showAllHistoryKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_sanitizeHistory"
|
||||
label="&clearRecentHistory.label;"
|
||||
key="key_sanitize"
|
||||
command="Tools:Sanitize"/>
|
||||
<menuseparator class="hide-if-empty-places-result"/>
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
<menuitem id="appmenu_sync-tabs"
|
||||
class="syncTabsMenuItem"
|
||||
label="&syncTabsMenu2.label;"
|
||||
oncommand="BrowserOpenSyncTabs();"
|
||||
disabled="true"/>
|
||||
#endif
|
||||
<menuitem id="appmenu_restoreLastSession"
|
||||
label="&historyRestoreLastSession.label;"
|
||||
command="Browser:RestoreLastSession"/>
|
||||
<menu id="appmenu_recentlyClosedTabsMenu"
|
||||
class="recentlyClosedTabsMenu"
|
||||
label="&historyUndoMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="appmenu_recentlyClosedTabsMenupopup"
|
||||
onpopupshowing="document.getElementById('appmenu_history')._placesView.populateUndoSubmenu();"/>
|
||||
</menu>
|
||||
<menu id="appmenu_recentlyClosedWindowsMenu"
|
||||
class="recentlyClosedWindowsMenu"
|
||||
label="&historyUndoWindowMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="appmenu_recentlyClosedWindowsMenupopup"
|
||||
onpopupshowing="document.getElementById('appmenu_history')._placesView.populateUndoWindowSubmenu();"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<menuitem id="appmenu_downloads"
|
||||
class="menuitem-tooltip"
|
||||
label="&downloads.label;"
|
||||
command="Tools:Downloads"
|
||||
key="key_openDownloads"/>
|
||||
<spacer id="appmenuSecondaryPane-spacer"/>
|
||||
<menuitem id="appmenu_addons"
|
||||
class="menuitem-iconic menuitem-iconic-tooltip"
|
||||
label="&addons.label;"
|
||||
command="Tools:Addons"
|
||||
key="key_openAddons"/>
|
||||
<splitmenu id="appmenu_customize"
|
||||
#ifdef XP_UNIX
|
||||
label="&preferencesCmdUnix.label;"
|
||||
#else
|
||||
label="&preferencesCmd2.label;"
|
||||
#endif
|
||||
oncommand="openPreferences();">
|
||||
<menupopup id="appmenu_customizeMenu"
|
||||
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('appmenu_toggleToolbarsSeparator'));">
|
||||
<menuitem id="appmenu_preferences"
|
||||
#ifdef XP_UNIX
|
||||
label="&preferencesCmdUnix.label;"
|
||||
#else
|
||||
label="&preferencesCmd2.label;"
|
||||
#endif
|
||||
oncommand="openPreferences();"/>
|
||||
<menuseparator/>
|
||||
<menuseparator id="appmenu_toggleToolbarsSeparator"/>
|
||||
<menuitem id="appmenu_toggleTabsOnTop"
|
||||
label="&viewTabsOnTop.label;"
|
||||
type="checkbox"
|
||||
command="cmd_ToggleTabsOnTop"/>
|
||||
<menuitem id="appmenu_toolbarLayout"
|
||||
label="&appMenuToolbarLayout.label;"
|
||||
command="cmd_CustomizeToolbars"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
<splitmenu id="appmenu_help"
|
||||
label="&helpMenu.label;"
|
||||
oncommand="openHelpLink('firefox-help')">
|
||||
<menupopup id="appmenu_helpMenupopup">
|
||||
<menuitem id="appmenu_openHelp"
|
||||
label="&helpMenu.label;"
|
||||
oncommand="openHelpLink('firefox-help')"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="appmenu_gettingStarted"
|
||||
label="&appMenuGettingStarted.label;"
|
||||
oncommand="gBrowser.loadOneTab('http://www.mozilla.com/firefox/central/', {inBackground: false});"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||
<menuitem id="appmenu_healthReport"
|
||||
label="&healthReport.label;"
|
||||
oncommand="openHealthReport()"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
#endif
|
||||
<menuitem id="appmenu_troubleshootingInfo"
|
||||
label="&helpTroubleshootingInfo.label;"
|
||||
oncommand="openTroubleshootingPage()"
|
||||
onclick="checkForMiddleClick(this,event);"/>
|
||||
<menuitem id="appmenu_feedbackPage"
|
||||
label="&helpFeedbackPage.label;"
|
||||
oncommand="openFeedbackPage()"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_safeMode"
|
||||
label="&appMenuSafeMode.label;"
|
||||
oncommand="safeModeRestart();"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_about"
|
||||
label="&aboutProduct.label;"
|
||||
oncommand="openAboutDialog();"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</menupopup>
|
|
@ -0,0 +1,102 @@
|
|||
# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
/**
|
||||
* Customization handler prepares this browser window for entering and exiting
|
||||
* customization mode by handling customizationstarting and customizationending
|
||||
* events.
|
||||
*/
|
||||
let CustomizationHandler = {
|
||||
handleEvent: function(aEvent) {
|
||||
switch(aEvent.type) {
|
||||
case "customizationstarting":
|
||||
this._customizationStarting();
|
||||
break;
|
||||
case "customizationending":
|
||||
this._customizationEnding(aEvent.detail);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_customizationStarting: function() {
|
||||
// Disable the toolbar context menu items
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", true);
|
||||
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
|
||||
let splitter = document.getElementById("urlbar-search-splitter");
|
||||
if (splitter) {
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
}
|
||||
|
||||
CombinedStopReload.uninit();
|
||||
PlacesToolbarHelper.customizeStart();
|
||||
BookmarkingUI.customizeStart();
|
||||
DownloadsButton.customizeStart();
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", false);
|
||||
},
|
||||
|
||||
_customizationEnding: function(aDetails) {
|
||||
// Update global UI elements that may have been added or removed
|
||||
if (aDetails.changed) {
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
||||
gHomeButton.updateTooltip();
|
||||
gIdentityHandler._cacheElements();
|
||||
XULBrowserWindow.init();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
#endif
|
||||
|
||||
// Hacky: update the PopupNotifications' object's reference to the iconBox,
|
||||
// if it already exists, since it may have changed if the URL bar was
|
||||
// added/removed.
|
||||
if (!window.__lookupGetter__("PopupNotifications")) {
|
||||
PopupNotifications.iconBox =
|
||||
document.getElementById("notification-popup-box");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PlacesToolbarHelper.customizeDone();
|
||||
BookmarkingUI.customizeDone();
|
||||
DownloadsButton.customizeDone();
|
||||
|
||||
// The url bar splitter state is dependent on whether stop/reload
|
||||
// and the location bar are combined, so we need this ordering
|
||||
CombinedStopReload.init();
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
setUrlAndSearchBarWidthForConditionalForwardButton();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
XULBrowserWindow.asyncUpdateUI();
|
||||
BookmarkingUI.updateStarState();
|
||||
SocialMark.updateMarkState();
|
||||
}
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", true);
|
||||
|
||||
// Re-enable parts of the UI we disabled during the dialog
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", false);
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.removeAttribute("disabled");
|
||||
|
||||
// make sure to re-enable click-and-hold
|
||||
if (!getBoolPref("ui.click_hold_context_menus", false)) {
|
||||
SetClickAndHoldHandlers();
|
||||
}
|
||||
|
||||
gBrowser.selectedBrowser.focus();
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@ var FullScreen = {
|
|||
enterFS = !enterFS;
|
||||
|
||||
// Toggle the View:FullScreen command, which controls elements like the
|
||||
// fullscreen menuitem, menubars, and the appmenu.
|
||||
// fullscreen menuitem, and menubars.
|
||||
document.getElementById("View:FullScreen").setAttribute("checked", enterFS);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
|
|
|
@ -382,6 +382,8 @@ var FullZoom = {
|
|||
* when done.
|
||||
*/
|
||||
_applySettingToPref: function FullZoom__applySettingToPref(suppressZoomChange, callback) {
|
||||
Services.obs.notifyObservers(null, "browser-fullZoom:zoomChange", "");
|
||||
|
||||
if (!this.siteSpecific ||
|
||||
gInPrintPreviewMode ||
|
||||
content.document.mozSyntheticDocument) {
|
||||
|
@ -410,6 +412,8 @@ var FullZoom = {
|
|||
* @param callback Optional. If given, it's asynchronously called when done.
|
||||
*/
|
||||
_removePref: function FullZoom__removePref(callback) {
|
||||
Services.obs.notifyObservers(null, "browser-fullZoom:zoomReset", "");
|
||||
|
||||
if (content.document.mozSyntheticDocument) {
|
||||
this._executeSoon(callback);
|
||||
return;
|
||||
|
|
|
@ -13,6 +13,20 @@ browser[remote="true"] {
|
|||
-moz-binding: url("chrome://global/content/bindings/remote-browser.xml#remote-browser");
|
||||
}
|
||||
|
||||
toolbar[customizable="true"] {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar");
|
||||
}
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
toolbar[customizable="true"]:not([nowindowdrag="true"]) {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
%endif
|
||||
|
||||
#toolbar-menubar[autohide="true"] {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-autohide");
|
||||
}
|
||||
|
||||
tabbrowser {
|
||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
|
||||
}
|
||||
|
@ -39,11 +53,11 @@ tabbrowser {
|
|||
|
||||
.tabbrowser-tab:not([pinned]) {
|
||||
-moz-box-flex: 100;
|
||||
max-width: 250px;
|
||||
max-width: 180px;
|
||||
min-width: 100px;
|
||||
width: 0;
|
||||
transition: min-width 200ms ease-out,
|
||||
max-width 250ms ease-out,
|
||||
max-width 230ms ease-out,
|
||||
opacity 50ms ease-out 20ms /* hide the tab for the first 20ms of the max-width transition */;
|
||||
}
|
||||
|
||||
|
@ -52,8 +66,8 @@ tabbrowser {
|
|||
min-width: 0.1px;
|
||||
opacity: 0 !important;
|
||||
transition: min-width 200ms ease-out,
|
||||
max-width 250ms ease-out,
|
||||
opacity 50ms ease-out 180ms /* hide the tab for the last 20ms of the max-width transition */;
|
||||
max-width 230ms ease-out,
|
||||
opacity 50ms ease-out 160ms /* hide the tab for the last 20ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tab-throbber:not([fadein]):not([pinned]),
|
||||
|
@ -117,10 +131,26 @@ toolbar[printpreview="true"] {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar] #appmenu-button-container,
|
||||
#main-window[tabsintitlebar] #titlebar-buttonbox {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box;
|
||||
}
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
#titlebar-fullscreen-button {
|
||||
-moz-appearance: -moz-mac-fullscreen-button;
|
||||
}
|
||||
%endif
|
||||
|
||||
%ifdef XP_WIN
|
||||
#main-window[sizemode="maximized"] #titlebar-buttonbox {
|
||||
-moz-appearance: -moz-window-button-box-maximized;
|
||||
}
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
.bookmarks-toolbar-customize,
|
||||
|
@ -132,19 +162,14 @@ toolbar[printpreview="true"] {
|
|||
display: -moz-box;
|
||||
}
|
||||
|
||||
#main-window[disablechrome] #navigator-toolbox[tabsontop="true"] > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#wrapper-urlbar-container #urlbar-container > #urlbar > toolbarbutton,
|
||||
#urlbar-container:not([combined]) > #urlbar > toolbarbutton,
|
||||
#urlbar-container[combined] + #reload-button + #stop-button,
|
||||
#urlbar-container[combined] + #reload-button,
|
||||
toolbar:not([mode="icons"]) > #urlbar-container > #urlbar > toolbarbutton,
|
||||
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button[displaystop],
|
||||
toolbar[mode="icons"] > #reload-button:not([displaystop]) + #stop-button,
|
||||
toolbar[mode="icons"] > #reload-button[displaystop] {
|
||||
#urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||
#urlbar-reload-button[displaystop],
|
||||
#reload-button:not([displaystop]) + #stop-button,
|
||||
#reload-button[displaystop] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
|
@ -156,6 +181,14 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
|
|||
direction: rtl;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
min-width: 50ch;
|
||||
}
|
||||
|
||||
#search-container {
|
||||
min-width: 25ch;
|
||||
}
|
||||
|
||||
#main-window:-moz-lwtheme {
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
|
@ -172,27 +205,6 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
|
|||
background-position: bottom left;
|
||||
}
|
||||
|
||||
splitmenu {
|
||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#splitmenu");
|
||||
}
|
||||
|
||||
.splitmenu-menuitem {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem");
|
||||
list-style-image: inherit;
|
||||
-moz-image-region: inherit;
|
||||
}
|
||||
|
||||
.splitmenu-menuitem[iconic="true"] {
|
||||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
}
|
||||
|
||||
.splitmenu-menu > .menu-text,
|
||||
:-moz-any(.splitmenu-menu, .splitmenu-menuitem) > .menu-accel-container,
|
||||
#appmenu-editmenu > .menu-text,
|
||||
#appmenu-editmenu > .menu-accel-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menuitem-tooltip {
|
||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-tooltip");
|
||||
}
|
||||
|
@ -203,18 +215,6 @@ splitmenu {
|
|||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-iconic-tooltip");
|
||||
}
|
||||
|
||||
%ifdef MENUBAR_CAN_AUTOHIDE
|
||||
%ifndef CAN_DRAW_IN_TITLEBAR
|
||||
#appmenu-toolbar-button > .toolbarbutton-text {
|
||||
display: -moz-box;
|
||||
}
|
||||
%endif
|
||||
|
||||
#appmenu_offlineModeRecovery:not([checked=true]) {
|
||||
display: none;
|
||||
}
|
||||
%endif
|
||||
|
||||
/* Hide menu elements intended for keyboard access support */
|
||||
#main-menubar[openedwithkey=false] .show-only-for-keyboard {
|
||||
display: none;
|
||||
|
@ -437,14 +437,6 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
|
|||
min-width: 1px;
|
||||
}
|
||||
|
||||
#nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
#nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ::::: Ctrl-Tab Panel ::::: */
|
||||
|
||||
.ctrlTab-preview > html|img,
|
||||
|
|
|
@ -91,6 +91,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
|
||||
"resource:///modules/AboutHomeUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizeMode.jsm", scope);
|
||||
return new scope.CustomizeMode(window);
|
||||
});
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Weave",
|
||||
"resource://services-sync/main.js");
|
||||
|
@ -147,6 +153,7 @@ let gInitialPages = [
|
|||
];
|
||||
|
||||
#include browser-addons.js
|
||||
#include browser-customization.js
|
||||
#include browser-feeds.js
|
||||
#include browser-fullScreen.js
|
||||
#include browser-fullZoom.js
|
||||
|
@ -936,8 +943,8 @@ var gBrowserInit = {
|
|||
goSetCommandEnabled("cmd_newNavigatorTab", false);
|
||||
}
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
updateAppButtonDisplay();
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
updateTitlebarDisplay();
|
||||
#endif
|
||||
|
||||
// Misc. inits.
|
||||
|
@ -1031,7 +1038,13 @@ var gBrowserInit = {
|
|||
OfflineApps.init();
|
||||
IndexedDBPromptHelper.init();
|
||||
gFormSubmitObserver.init();
|
||||
// Initialize the full zoom setting.
|
||||
// We do this before the session restore service gets initialized so we can
|
||||
// apply full zoom settings to tabs restored by the session restore service.
|
||||
FullZoom.init();
|
||||
PanelUI.init();
|
||||
SocialUI.init();
|
||||
LightweightThemeListener.init();
|
||||
AddonManager.addAddonListener(AddonsMgrListener);
|
||||
WebrtcIndicator.init();
|
||||
|
||||
|
@ -1078,11 +1091,6 @@ var gBrowserInit = {
|
|||
if (!getBoolPref("ui.click_hold_context_menus", false))
|
||||
SetClickAndHoldHandlers();
|
||||
|
||||
// Initialize the full zoom setting.
|
||||
// We do this before the session restore service gets initialized so we can
|
||||
// apply full zoom settings to tabs restored by the session restore service.
|
||||
FullZoom.init();
|
||||
|
||||
// Bug 666804 - NetworkPrioritizer support for e10s
|
||||
if (!gMultiProcessBrowser) {
|
||||
let NP = {};
|
||||
|
@ -1226,15 +1234,6 @@ var gBrowserInit = {
|
|||
cmd.removeAttribute("hidden");
|
||||
}
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
// If the user (or the locale) hasn't enabled the top-level "Character
|
||||
// Encoding" menu via the "browser.menu.showCharacterEncoding" preference,
|
||||
// hide it.
|
||||
if ("true" != gPrefService.getComplexValue("browser.menu.showCharacterEncoding",
|
||||
Ci.nsIPrefLocalizedString).data)
|
||||
document.getElementById("appmenu_charsetMenu").hidden = true;
|
||||
#endif
|
||||
|
||||
// Enable Responsive UI?
|
||||
let responsiveUIEnabled = gPrefService.getBoolPref("devtools.responsiveUI.enabled");
|
||||
if (responsiveUIEnabled) {
|
||||
|
@ -1246,26 +1245,14 @@ var gBrowserInit = {
|
|||
// Add Devtools menuitems and listeners
|
||||
gDevToolsBrowser.registerBrowserWindow(window);
|
||||
|
||||
let appMenuButton = document.getElementById("appmenu-button");
|
||||
let appMenuPopup = document.getElementById("appmenu-popup");
|
||||
if (appMenuButton && appMenuPopup) {
|
||||
let appMenuOpening = null;
|
||||
appMenuButton.addEventListener("mousedown", function(event) {
|
||||
if (event.button == 0)
|
||||
appMenuOpening = new Date();
|
||||
}, false);
|
||||
appMenuPopup.addEventListener("popupshown", function(event) {
|
||||
if (event.target != appMenuPopup || !appMenuOpening)
|
||||
return;
|
||||
let duration = new Date() - appMenuOpening;
|
||||
appMenuOpening = null;
|
||||
Services.telemetry.getHistogramById("FX_APP_MENU_OPEN_MS").add(duration);
|
||||
}, false);
|
||||
}
|
||||
|
||||
window.addEventListener("mousemove", MousePosTracker, false);
|
||||
window.addEventListener("dragover", MousePosTracker, false);
|
||||
|
||||
gNavToolbox.addEventListener("customizationstarting", CustomizationHandler);
|
||||
gNavToolbox.addEventListener("customizationending", CustomizationHandler);
|
||||
|
||||
gCustomizeMode.init();
|
||||
|
||||
// End startup crash tracking after a delay to catch crashes while restoring
|
||||
// tabs and to postpone saving the pref to disk.
|
||||
try {
|
||||
|
@ -1361,6 +1348,9 @@ var gBrowserInit = {
|
|||
IndexedDBPromptHelper.uninit();
|
||||
AddonManager.removeAddonListener(AddonsMgrListener);
|
||||
SocialUI.uninit();
|
||||
LightweightThemeListener.uninit();
|
||||
gCustomizeMode.uninit();
|
||||
PanelUI.uninit();
|
||||
}
|
||||
|
||||
// Final window teardown, do this last.
|
||||
|
@ -2644,8 +2634,8 @@ var PrintPreviewListener = {
|
|||
if (this._chromeState.sidebarOpen)
|
||||
toggleSidebar(this._sidebarCommand);
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
updateAppButtonDisplay();
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
updateTitlebarDisplay();
|
||||
#endif
|
||||
},
|
||||
_hideChrome: function () {
|
||||
|
@ -3310,119 +3300,13 @@ function OpenBrowserWindow(options)
|
|||
return win;
|
||||
}
|
||||
|
||||
var gCustomizeSheet = false;
|
||||
//XXXunf Are these still useful to keep around?
|
||||
function BrowserCustomizeToolbar() {
|
||||
// Disable the toolbar context menu items
|
||||
var menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", true);
|
||||
|
||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
|
||||
var splitter = document.getElementById("urlbar-search-splitter");
|
||||
if (splitter)
|
||||
splitter.parentNode.removeChild(splitter);
|
||||
|
||||
CombinedStopReload.uninit();
|
||||
|
||||
PlacesToolbarHelper.customizeStart();
|
||||
BookmarkingUI.customizeStart();
|
||||
DownloadsButton.customizeStart();
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", false);
|
||||
|
||||
var customizeURL = "chrome://global/content/customizeToolbar.xul";
|
||||
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
|
||||
|
||||
if (gCustomizeSheet) {
|
||||
let sheetFrame = document.createElement("iframe");
|
||||
let panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
sheetFrame.id = "customizeToolbarSheetIFrame";
|
||||
sheetFrame.toolbox = gNavToolbox;
|
||||
sheetFrame.panel = panel;
|
||||
sheetFrame.setAttribute("style", panel.getAttribute("sheetstyle"));
|
||||
panel.appendChild(sheetFrame);
|
||||
|
||||
// Open the panel, but make it invisible until the iframe has loaded so
|
||||
// that the user doesn't see a white flash.
|
||||
panel.style.visibility = "hidden";
|
||||
gNavToolbox.addEventListener("beforecustomization", function onBeforeCustomization() {
|
||||
gNavToolbox.removeEventListener("beforecustomization", onBeforeCustomization, false);
|
||||
panel.style.removeProperty("visibility");
|
||||
}, false);
|
||||
|
||||
sheetFrame.setAttribute("src", customizeURL);
|
||||
|
||||
panel.openPopup(gNavToolbox, "after_start", 0, 0);
|
||||
} else {
|
||||
window.openDialog(customizeURL,
|
||||
"CustomizeToolbar",
|
||||
"chrome,titlebar,toolbar,location,resizable,dependent",
|
||||
gNavToolbox);
|
||||
}
|
||||
gCustomizeMode.enter();
|
||||
}
|
||||
|
||||
function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
||||
if (gCustomizeSheet) {
|
||||
document.getElementById("customizeToolbarSheetPopup").hidePopup();
|
||||
let iframe = document.getElementById("customizeToolbarSheetIFrame");
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
}
|
||||
|
||||
// Update global UI elements that may have been added or removed
|
||||
if (aToolboxChanged) {
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
||||
gHomeButton.updateTooltip();
|
||||
gIdentityHandler._cacheElements();
|
||||
window.XULBrowserWindow.init();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
#endif
|
||||
|
||||
// Hacky: update the PopupNotifications' object's reference to the iconBox,
|
||||
// if it already exists, since it may have changed if the URL bar was
|
||||
// added/removed.
|
||||
if (!window.__lookupGetter__("PopupNotifications"))
|
||||
PopupNotifications.iconBox = document.getElementById("notification-popup-box");
|
||||
}
|
||||
|
||||
PlacesToolbarHelper.customizeDone();
|
||||
BookmarkingUI.customizeDone();
|
||||
DownloadsButton.customizeDone();
|
||||
|
||||
// The url bar splitter state is dependent on whether stop/reload
|
||||
// and the location bar are combined, so we need this ordering
|
||||
CombinedStopReload.init();
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
setUrlAndSearchBarWidthForConditionalForwardButton();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
XULBrowserWindow.asyncUpdateUI();
|
||||
BookmarkingUI.updateStarState();
|
||||
SocialMark.updateMarkState();
|
||||
SocialShare.update();
|
||||
}
|
||||
|
||||
TabsInTitlebar.allowedBy("customizing-toolbars", true);
|
||||
|
||||
// Re-enable parts of the UI we disabled during the dialog
|
||||
var menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.childNodes)
|
||||
childNode.setAttribute("disabled", false);
|
||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.removeAttribute("disabled");
|
||||
|
||||
// make sure to re-enable click-and-hold
|
||||
if (!getBoolPref("ui.click_hold_context_menus", false))
|
||||
SetClickAndHoldHandlers();
|
||||
|
||||
gBrowser.selectedBrowser.focus();
|
||||
gCustomizeMode.exit(aToolboxChanged);
|
||||
}
|
||||
|
||||
function BrowserToolboxCustomizeChange(aType) {
|
||||
|
@ -3486,9 +3370,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,
|
||||
|
@ -3499,10 +3380,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;
|
||||
|
@ -3535,9 +3412,6 @@ function updateEditUIVisibility()
|
|||
function updateCharacterEncodingMenuState()
|
||||
{
|
||||
let charsetMenu = document.getElementById("charsetMenu");
|
||||
let appCharsetMenu = document.getElementById("appmenu_charsetMenu");
|
||||
let appDevCharsetMenu =
|
||||
document.getElementById("appmenu_developer_charsetMenu");
|
||||
// gBrowser is null on Mac when the menubar shows in the context of
|
||||
// non-browser windows. The above elements may be null depending on
|
||||
// what parts of the menubar are present. E.g. no app menu on Mac.
|
||||
|
@ -3547,22 +3421,10 @@ function updateCharacterEncodingMenuState()
|
|||
if (charsetMenu) {
|
||||
charsetMenu.removeAttribute("disabled");
|
||||
}
|
||||
if (appCharsetMenu) {
|
||||
appCharsetMenu.removeAttribute("disabled");
|
||||
}
|
||||
if (appDevCharsetMenu) {
|
||||
appDevCharsetMenu.removeAttribute("disabled");
|
||||
}
|
||||
} else {
|
||||
if (charsetMenu) {
|
||||
charsetMenu.setAttribute("disabled", "true");
|
||||
}
|
||||
if (appCharsetMenu) {
|
||||
appCharsetMenu.setAttribute("disabled", "true");
|
||||
}
|
||||
if (appDevCharsetMenu) {
|
||||
appDevCharsetMenu.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3593,8 +3455,8 @@ var XULBrowserWindow = {
|
|||
startTime: 0,
|
||||
statusText: "",
|
||||
isBusy: false,
|
||||
inContentWhitelist: ["about:addons", "about:downloads", "about:permissions",
|
||||
"about:sync-progress", "about:preferences"],
|
||||
// Left here for add-on compatibility, see bug 752434
|
||||
inContentWhitelist: [],
|
||||
|
||||
QueryInterface: function (aIID) {
|
||||
if (aIID.equals(Ci.nsIWebProgressListener) ||
|
||||
|
@ -3884,17 +3746,6 @@ var XULBrowserWindow = {
|
|||
SocialShare.update();
|
||||
}
|
||||
|
||||
// Show or hide browser chrome based on the whitelist
|
||||
if (this.hideChromeForLocation(location)) {
|
||||
document.documentElement.setAttribute("disablechrome", "true");
|
||||
} else {
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
if (ss.getTabValue(gBrowser.selectedTab, "appOrigin"))
|
||||
document.documentElement.setAttribute("disablechrome", "true");
|
||||
else
|
||||
document.documentElement.removeAttribute("disablechrome");
|
||||
}
|
||||
|
||||
// Utility functions for disabling find
|
||||
var shouldDisableFind = function shouldDisableFind(aDocument) {
|
||||
let docElt = aDocument.documentElement;
|
||||
|
@ -3971,12 +3822,8 @@ var XULBrowserWindow = {
|
|||
FeedHandler.updateFeeds();
|
||||
},
|
||||
|
||||
hideChromeForLocation: function(aLocation) {
|
||||
aLocation = aLocation.toLowerCase();
|
||||
return this.inContentWhitelist.some(function(aSpec) {
|
||||
return aSpec == aLocation;
|
||||
});
|
||||
},
|
||||
// Left here for add-on compatibility, see bug 752434
|
||||
hideChromeForLocation: function() {},
|
||||
|
||||
onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
|
||||
this.status = aMessage;
|
||||
|
@ -4154,8 +4001,7 @@ var CombinedStopReload = {
|
|||
var stop = document.getElementById("stop-button");
|
||||
|
||||
if (urlbar) {
|
||||
if (urlbar.parentNode.getAttribute("mode") != "icons" ||
|
||||
!reload || urlbar.nextSibling != reload ||
|
||||
if (!reload || urlbar.nextSibling != reload ||
|
||||
!stop || reload.nextSibling != stop)
|
||||
urlbar.removeAttribute("combined");
|
||||
else {
|
||||
|
@ -4480,8 +4326,6 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
|
|||
menuItem.setAttribute("type", "checkbox");
|
||||
menuItem.setAttribute("label", toolbarName);
|
||||
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
|
||||
if (popup.id != "appmenu_customizeMenu")
|
||||
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
|
||||
if (popup.id != "toolbar-context-menu")
|
||||
menuItem.setAttribute("key", toolbar.getAttribute("key"));
|
||||
|
||||
|
@ -4510,8 +4354,8 @@ function setToolbarVisibility(toolbar, isVisible) {
|
|||
BookmarkingUI.onToolbarVisibilityChange();
|
||||
gBrowser.updateWindowResizers();
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
updateAppButtonDisplay();
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
updateTitlebarDisplay();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -4572,10 +4416,19 @@ var TabsInTitlebar = {
|
|||
this._readPref();
|
||||
Services.prefs.addObserver(this._prefName, this, false);
|
||||
|
||||
// Don't trust the initial value of the sizemode attribute; wait for
|
||||
// the resize event (handled in tabbrowser.xml).
|
||||
this.allowedBy("sizemode", false);
|
||||
|
||||
// We need to update the appearance of the titlebar when the menu changes
|
||||
// from the active to the inactive state. We can't, however, rely on
|
||||
// DOMMenuBarInactive, because the menu fires this event and then removes
|
||||
// the inactive attribute after an event-loop spin.
|
||||
//
|
||||
// Because updating the appearance involves sampling the heights and margins
|
||||
// of various elements, it's important that the layout be more or less
|
||||
// settled before updating the titlebar. So instead of listening to
|
||||
// DOMMenuBarActive and DOMMenuBarInactive, we use a MutationObserver to
|
||||
// watch the "invalid" attribute directly.
|
||||
let menu = document.getElementById("toolbar-menubar");
|
||||
this._menuObserver = new MutationObserver(this._onMenuMutate);
|
||||
this._menuObserver.observe(menu, {attributes: true});
|
||||
this._initialized = true;
|
||||
#endif
|
||||
},
|
||||
|
@ -4585,17 +4438,23 @@ var TabsInTitlebar = {
|
|||
if (allow) {
|
||||
if (condition in this._disallowed) {
|
||||
delete this._disallowed[condition];
|
||||
this._update();
|
||||
this._update(true);
|
||||
}
|
||||
} else {
|
||||
if (!(condition in this._disallowed)) {
|
||||
this._disallowed[condition] = null;
|
||||
this._update();
|
||||
this._update(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
},
|
||||
|
||||
updateAppearance: function updateAppearance(aForce) {
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
this._update(aForce);
|
||||
#endif
|
||||
},
|
||||
|
||||
get enabled() {
|
||||
return document.documentElement.getAttribute("tabsintitlebar") == "true";
|
||||
},
|
||||
|
@ -4606,16 +4465,33 @@ var TabsInTitlebar = {
|
|||
this._readPref();
|
||||
},
|
||||
|
||||
_onMenuMutate: function (aMutations) {
|
||||
// We don't care about restored windows, since the menu shouldn't be
|
||||
// pushing the tab-strip down.
|
||||
if (document.documentElement.getAttribute("sizemode") == "normal") {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let mutation of aMutations) {
|
||||
if (mutation.attributeName == "inactive" ||
|
||||
mutation.attributeName == "autohide") {
|
||||
TabsInTitlebar._update(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_initialized: false,
|
||||
_disallowed: {},
|
||||
_prefName: "browser.tabs.drawInTitlebar",
|
||||
_lastSizeMode: null,
|
||||
|
||||
_readPref: function () {
|
||||
this.allowedBy("pref",
|
||||
Services.prefs.getBoolPref(this._prefName));
|
||||
},
|
||||
|
||||
_update: function () {
|
||||
_update: function (aForce=false) {
|
||||
function $(id) document.getElementById(id);
|
||||
function rect(ele) ele.getBoundingClientRect();
|
||||
|
||||
|
@ -4623,45 +4499,99 @@ var TabsInTitlebar = {
|
|||
return;
|
||||
|
||||
let allowed = true;
|
||||
|
||||
if (!aForce) {
|
||||
// _update is called on resize events, because the window is not ready
|
||||
// after sizemode events. However, we only care about the event when the
|
||||
// sizemode is different from the last time we updated the appearance of
|
||||
// the tabs in the titlebar.
|
||||
let sizemode = document.documentElement.getAttribute("sizemode");
|
||||
if (this._lastSizeMode == sizemode) {
|
||||
return;
|
||||
}
|
||||
this._lastSizeMode = sizemode;
|
||||
}
|
||||
|
||||
for (let something in this._disallowed) {
|
||||
allowed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (allowed == this.enabled)
|
||||
return;
|
||||
function $(id) document.getElementById(id);
|
||||
|
||||
let titlebar = $("titlebar");
|
||||
let titlebarContent = $("titlebar-content");
|
||||
let menubar = $("toolbar-menubar");
|
||||
|
||||
// Reset the margins and padding that _update modifies so that we can take
|
||||
// accurate measurements.
|
||||
titlebarContent.style.marginBottom = "";
|
||||
titlebar.style.marginBottom = "";
|
||||
menubar.style.paddingBottom = "";
|
||||
|
||||
if (allowed) {
|
||||
let tabsToolbar = $("TabsToolbar");
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
let appmenuButtonBox = $("appmenu-button-container");
|
||||
this._sizePlaceholder("appmenu-button", rect(appmenuButtonBox).width);
|
||||
#endif
|
||||
let captionButtonsBox = $("titlebar-buttonbox");
|
||||
this._sizePlaceholder("caption-buttons", rect(captionButtonsBox).width);
|
||||
|
||||
let tabsToolbarRect = rect(tabsToolbar);
|
||||
let titlebarTop = rect($("titlebar-content")).top;
|
||||
titlebar.style.marginBottom = - Math.min(tabsToolbarRect.top - titlebarTop,
|
||||
tabsToolbarRect.height) + "px";
|
||||
|
||||
// We set the tabsintitlebar attribute first so that our CSS for
|
||||
// tabsintitlebar manifests before we do our measurements.
|
||||
document.documentElement.setAttribute("tabsintitlebar", "true");
|
||||
|
||||
if (!this._draghandle) {
|
||||
let captionButtonsBox = $("titlebar-buttonbox");
|
||||
this._sizePlaceholder("caption-buttons", rect(captionButtonsBox).width);
|
||||
#ifdef XP_MACOSX
|
||||
let fullscreenButton = $("titlebar-fullscreen-button");
|
||||
this._sizePlaceholder("fullscreen-button", rect(fullscreenButton).width);
|
||||
#endif
|
||||
let titlebarContentHeight = rect(titlebarContent).height;
|
||||
let menuHeight = this._outerHeight(menubar);
|
||||
|
||||
// If the titlebar is taller than the menubar, add more padding to the
|
||||
// bottom of the menubar so that it matches.
|
||||
if (menuHeight && titlebarContentHeight > menuHeight) {
|
||||
let menuTitlebarDelta = titlebarContentHeight - menuHeight;
|
||||
menubar.style.paddingBottom = menuTitlebarDelta + "px";
|
||||
menuHeight += menuTitlebarDelta;
|
||||
}
|
||||
|
||||
// Next, we calculate how much we need to stretch the titlebar down to
|
||||
// go all the way to the bottom of the tab strip.
|
||||
let tabsToolbar = $("TabsToolbar");
|
||||
let tabAndMenuHeight = this._outerHeight(tabsToolbar) + menuHeight;
|
||||
titlebarContent.style.marginBottom = tabAndMenuHeight + "px";
|
||||
|
||||
// Finally, we have to determine how much to bring up the elements below
|
||||
// the titlebar. We start with a baseHeight of tabAndMenuHeight, to offset
|
||||
// the amount we added to the titlebar content. Then, we have two cases:
|
||||
//
|
||||
// 1) The titlebar is larger than the tabAndMenuHeight. This can happen in
|
||||
// large font mode with the menu autohidden. In this case, we want to
|
||||
// add tabAndMenuHeight, since this should line up the bottom of the
|
||||
// tabstrip with the bottom of the titlebar.
|
||||
//
|
||||
// 2) The titlebar is equal to or smaller than the tabAndMenuHeight. This
|
||||
// is the more common case, and occurs with normal font sizes. In this
|
||||
// case, we want to bring the menu and tabstrip right up to the top of
|
||||
// the titlebar, so we add the titlebarContentHeight to the baseHeight.
|
||||
let baseHeight = tabAndMenuHeight;
|
||||
baseHeight += (titlebarContentHeight > tabAndMenuHeight) ? tabAndMenuHeight
|
||||
: titlebarContentHeight;
|
||||
titlebar.style.marginBottom = "-" + baseHeight + "px";
|
||||
|
||||
if (!this._draghandles) {
|
||||
this._draghandles = {};
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
||||
this._draghandle = new tmp.WindowDraggingElement(tabsToolbar);
|
||||
this._draghandle.mouseDownCheck = function () {
|
||||
|
||||
let mouseDownCheck = function () {
|
||||
return !this._dragBindingAlive && TabsInTitlebar.enabled;
|
||||
};
|
||||
|
||||
this._draghandles.tabsToolbar = new tmp.WindowDraggingElement(tabsToolbar);
|
||||
this._draghandles.tabsToolbar.mouseDownCheck = mouseDownCheck;
|
||||
|
||||
this._draghandles.navToolbox = new tmp.WindowDraggingElement(gNavToolbox);
|
||||
this._draghandles.navToolbox.mouseDownCheck = mouseDownCheck;
|
||||
}
|
||||
} else {
|
||||
document.documentElement.removeAttribute("tabsintitlebar");
|
||||
|
||||
titlebar.style.marginBottom = "";
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -4669,36 +4599,45 @@ var TabsInTitlebar = {
|
|||
Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='"+ type +"']"),
|
||||
function (node) { node.width = width; });
|
||||
},
|
||||
|
||||
/**
|
||||
* Retrieve the height of an element, including its top and bottom
|
||||
* margins.
|
||||
*
|
||||
* @param ele
|
||||
* The element to measure.
|
||||
* @return
|
||||
* The height and margins as an integer. If the height of the element
|
||||
* is 0, then this returns 0, regardless of what the margins are.
|
||||
*/
|
||||
_outerHeight: function (ele) {
|
||||
let cstyle = document.defaultView.getComputedStyle(ele);
|
||||
let margins = parseInt(cstyle.marginTop) + parseInt(cstyle.marginBottom);
|
||||
let height = ele.getBoundingClientRect().height;
|
||||
return height > 0 ? Math.abs(height + margins) : 0;
|
||||
},
|
||||
#endif
|
||||
|
||||
uninit: function () {
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
this._initialized = false;
|
||||
Services.prefs.removeObserver(this._prefName, this);
|
||||
this._menuObserver.disconnect();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
function updateAppButtonDisplay() {
|
||||
var displayAppButton =
|
||||
!gInPrintPreviewMode &&
|
||||
window.menubar.visible &&
|
||||
document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
document.getElementById("titlebar").hidden = !displayAppButton;
|
||||
function updateTitlebarDisplay() {
|
||||
let drawInTitlebar = !gInPrintPreviewMode && window.toolbar.visible;
|
||||
document.getElementById("titlebar").hidden = !drawInTitlebar;
|
||||
|
||||
if (displayAppButton)
|
||||
if (drawInTitlebar)
|
||||
document.documentElement.setAttribute("chromemargin", "0,2,2,2");
|
||||
else
|
||||
document.documentElement.removeAttribute("chromemargin");
|
||||
|
||||
TabsInTitlebar.allowedBy("drawing-in-titlebar", displayAppButton);
|
||||
#else
|
||||
document.getElementById("appmenu-toolbar-button").hidden =
|
||||
!displayAppButton;
|
||||
#endif
|
||||
TabsInTitlebar.allowedBy("drawing-in-titlebar", drawInTitlebar);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -6735,12 +6674,6 @@ let gPrivateBrowsingUI = {
|
|||
document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
|
||||
|
||||
if (window.location.href == getBrowserURL()) {
|
||||
#ifdef XP_MACOSX
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
document.documentElement.setAttribute("drawintitlebar", true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Adjust the window's title
|
||||
let docElement = document.documentElement;
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
|
@ -6757,7 +6690,6 @@ let gPrivateBrowsingUI = {
|
|||
// Adjust the New Window menu entries
|
||||
[
|
||||
{ normal: "menu_newNavigator", private: "menu_newPrivateWindow" },
|
||||
{ normal: "appmenu_newNavigator", private: "appmenu_newPrivateWindow" },
|
||||
].forEach(function(menu) {
|
||||
let newWindow = document.getElementById(menu.normal);
|
||||
let newPrivateWindow = document.getElementById(menu.private);
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
|
||||
|
@ -22,6 +24,7 @@
|
|||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
|
||||
title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
|
||||
|
@ -32,6 +35,7 @@
|
|||
titlemodifier=""
|
||||
titlemodifier_normal=""
|
||||
titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
|
||||
chromemargin="0,-1,-1,-1"
|
||||
#else
|
||||
title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
|
||||
titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
|
||||
|
@ -432,29 +436,27 @@
|
|||
</popupnotificationcontent>
|
||||
</popupnotification>
|
||||
|
||||
#include ../../components/customizableui/content/panelUI.inc.xul
|
||||
</popupset>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
<vbox id="titlebar">
|
||||
<hbox id="titlebar-content">
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
<hbox id="appmenu-button-container">
|
||||
<button id="appmenu-button"
|
||||
type="menu"
|
||||
label="&brandShortName;"
|
||||
style="-moz-user-focus: ignore;">
|
||||
#include browser-appmenu.inc
|
||||
</button>
|
||||
</hbox>
|
||||
#endif
|
||||
<spacer id="titlebar-spacer" flex="1"/>
|
||||
<hbox id="titlebar-buttonbox-container" align="start">
|
||||
<hbox id="titlebar-buttonbox-container" align="start"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#endif
|
||||
>
|
||||
<hbox id="titlebar-buttonbox">
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
#ifdef XP_MACOSX
|
||||
<hbox id="titlebar-fullscreen-button" ordinal="1000"/>
|
||||
#endif
|
||||
</hbox>
|
||||
</vbox>
|
||||
#endif
|
||||
|
@ -482,140 +484,378 @@
|
|||
</toolbaritem>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#else
|
||||
ordinal="1000"
|
||||
#endif
|
||||
/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<hbox class="titlebar-placeholder" type="fullscreen-button" ordinal="1000"/>
|
||||
#endif
|
||||
#endif
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
|
||||
toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
|
||||
aria-label="&navbarCmd.label;"
|
||||
fullscreentoolbar="true" mode="icons" customizable="true"
|
||||
iconsize="large"
|
||||
defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,window-controls"
|
||||
customizationtarget="nav-bar-customizationtarget"
|
||||
context="toolbar-context-menu">
|
||||
|
||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||
context="backForwardMenu" removable="true"
|
||||
forwarddisabled="true"
|
||||
title="&backForwardItem.title;">
|
||||
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
||||
label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="back-button-tooltip"/>
|
||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||
label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="forward-button-tooltip"/>
|
||||
<dummyobservertarget hidden="true"
|
||||
onbroadcast="if (this.getAttribute('disabled') == 'true')
|
||||
this.parentNode.setAttribute('forwarddisabled', 'true');
|
||||
else
|
||||
this.parentNode.removeAttribute('forwarddisabled');">
|
||||
<observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
|
||||
</dummyobservertarget>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||
title="&locationItem.title;" class="chromeclass-location" removable="true">
|
||||
<textbox id="urlbar" flex="1"
|
||||
placeholder="&urlbar.placeholder2;"
|
||||
type="autocomplete"
|
||||
autocompletesearch="urlinline history"
|
||||
autocompletesearchparam="enable-actions"
|
||||
autocompletepopup="PopupAutoCompleteRichResult"
|
||||
completeselectedindex="true"
|
||||
tabscrolling="true"
|
||||
showcommentcolumn="true"
|
||||
showimagecolumn="true"
|
||||
enablehistory="true"
|
||||
maxrows="6"
|
||||
newlines="stripsurroundingwhitespace"
|
||||
oninput="gBrowser.userTypedValue = this.value;"
|
||||
ontextentered="this.handleCommand(param);"
|
||||
ontextreverted="return this.handleRevert();"
|
||||
pageproxystate="invalid"
|
||||
onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
||||
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
||||
<box id="notification-popup-box" hidden="true" align="center">
|
||||
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
</box>
|
||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||
code fires onmousedown, and hence eats our favicon drag events.
|
||||
We only add the identity-box button to the tab order when the location bar
|
||||
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
||||
<box id="identity-box" role="button"
|
||||
align="center"
|
||||
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
ondragstart="gIdentityHandler.onDragStart(event);">
|
||||
<image id="page-proxy-favicon"
|
||||
onclick="PageProxyClickHandler(event);"
|
||||
pageproxystate="invalid"/>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
<label id="identity-icon-country-label" class="plain"/>
|
||||
</hbox>
|
||||
</box>
|
||||
<box id="urlbar-display-box" align="center">
|
||||
<label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
|
||||
</box>
|
||||
<hbox id="urlbar-icons">
|
||||
<image id="page-report-button"
|
||||
class="urlbar-icon"
|
||||
hidden="true"
|
||||
tooltiptext="&pageReportIcon.tooltip;"
|
||||
onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
|
||||
<image id="star-button"
|
||||
class="urlbar-icon"
|
||||
onclick="BookmarkingUI.onCommand(event);"/>
|
||||
<image id="go-button"
|
||||
class="urlbar-icon"
|
||||
tooltiptext="&goEndCap.tooltip;"
|
||||
onclick="gURLBar.handleCommand(event);"/>
|
||||
</hbox>
|
||||
<toolbarbutton id="urlbar-go-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
onclick="gURLBar.handleCommand(event);"
|
||||
tooltiptext="&goEndCap.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-reload-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
<hbox id="nav-bar-customizationtarget" class="customization-target" flex="0">
|
||||
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
|
||||
context="backForwardMenu" removable="true"
|
||||
forwarddisabled="true"
|
||||
title="&backForwardItem.title;">
|
||||
<toolbarbutton id="back-button" class="toolbarbutton-1"
|
||||
label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-stop-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
</textbox>
|
||||
tooltip="back-button-tooltip"/>
|
||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||
label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltip="forward-button-tooltip"/>
|
||||
<dummyobservertarget hidden="true"
|
||||
onbroadcast="if (this.getAttribute('disabled') == 'true')
|
||||
this.parentNode.setAttribute('forwarddisabled', 'true');
|
||||
else
|
||||
this.parentNode.removeAttribute('forwarddisabled');">
|
||||
<observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
|
||||
</dummyobservertarget>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||
title="&locationItem.title;" class="chromeclass-location" removable="true">
|
||||
<textbox id="urlbar" flex="1"
|
||||
placeholder="&urlbar.placeholder2;"
|
||||
type="autocomplete"
|
||||
autocompletesearch="urlinline history"
|
||||
autocompletesearchparam="enable-actions"
|
||||
autocompletepopup="PopupAutoCompleteRichResult"
|
||||
completeselectedindex="true"
|
||||
tabscrolling="true"
|
||||
showcommentcolumn="true"
|
||||
showimagecolumn="true"
|
||||
enablehistory="true"
|
||||
maxrows="6"
|
||||
newlines="stripsurroundingwhitespace"
|
||||
oninput="gBrowser.userTypedValue = this.value;"
|
||||
ontextentered="this.handleCommand(param);"
|
||||
ontextreverted="return this.handleRevert();"
|
||||
pageproxystate="invalid"
|
||||
onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
||||
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
||||
<box id="notification-popup-box" hidden="true" align="center">
|
||||
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
<image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
|
||||
</box>
|
||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||
code fires onmousedown, and hence eats our favicon drag events.
|
||||
We only add the identity-box button to the tab order when the location bar
|
||||
has focus, otherwise pressing F6 focuses it instead of the location bar -->
|
||||
<box id="identity-box" role="button"
|
||||
align="center"
|
||||
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
|
||||
ondragstart="gIdentityHandler.onDragStart(event);">
|
||||
<image id="page-proxy-favicon"
|
||||
onclick="PageProxyClickHandler(event);"
|
||||
pageproxystate="invalid"/>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
<label id="identity-icon-country-label" class="plain"/>
|
||||
</hbox>
|
||||
</box>
|
||||
<box id="urlbar-display-box" align="center">
|
||||
<label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
|
||||
</box>
|
||||
<hbox id="urlbar-icons">
|
||||
<image id="page-report-button"
|
||||
class="urlbar-icon"
|
||||
hidden="true"
|
||||
tooltiptext="&pageReportIcon.tooltip;"
|
||||
onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
|
||||
<image id="star-button"
|
||||
class="urlbar-icon"
|
||||
onclick="BookmarkingUI.onCommand(event);"/>
|
||||
<image id="go-button"
|
||||
class="urlbar-icon"
|
||||
tooltiptext="&goEndCap.tooltip;"
|
||||
onclick="gURLBar.handleCommand(event);"/>
|
||||
</hbox>
|
||||
<toolbarbutton id="urlbar-go-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
onclick="gURLBar.handleCommand(event);"
|
||||
tooltiptext="&goEndCap.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-reload-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
<toolbarbutton id="urlbar-stop-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
</textbox>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&reloadCmd.label;" removable="true"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
|
||||
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&stopCmd.label;" removable="true"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
|
||||
<toolbarbutton id="webrtc-status-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
type="menu"
|
||||
hidden="true"
|
||||
orient="horizontal"
|
||||
label="&webrtcIndicatorButton.label;"
|
||||
tooltiptext="&webrtcIndicatorButton.tooltip;">
|
||||
<menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
|
||||
onpopuphiding="WebrtcIndicator.clearPopup(this);"
|
||||
oncommand="WebrtcIndicator.menuCommand(event.target);"/>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="social-share-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
hidden="true"
|
||||
label="&sharePageCmd.label;"
|
||||
tooltiptext="&sharePageCmd.label;"
|
||||
command="Social:SharePage"/>
|
||||
|
||||
<toolbaritem id="social-toolbar-item"
|
||||
class="chromeclass-toolbar-additional"
|
||||
removable="false"
|
||||
title="&socialToolbar.title;"
|
||||
hidden="true"
|
||||
skipintoolbarset="true"
|
||||
observes="socialActiveBroadcaster">
|
||||
<toolbarbutton id="social-provider-button"
|
||||
class="toolbarbutton-1"
|
||||
type="menu">
|
||||
<menupopup id="social-statusarea-popup">
|
||||
<menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
|
||||
observes="socialBroadcaster_userDetails"
|
||||
oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
|
||||
<image class="social-statusarea-user-portrait"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
<vbox>
|
||||
<label class="social-statusarea-loggedInStatus"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
</vbox>
|
||||
</menuitem>
|
||||
#ifndef XP_WIN
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
#endif
|
||||
<menuitem class="social-toggle-sidebar-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleSidebar"
|
||||
label="&social.toggleSidebar.label;"
|
||||
accesskey="&social.toggleSidebar.accesskey;"/>
|
||||
<menuitem class="social-toggle-notifications-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleNotifications"
|
||||
label="&social.toggleNotifications.label;"
|
||||
accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
|
||||
<menuseparator/>
|
||||
<menuseparator class="social-provider-menu" hidden="true"/>
|
||||
<menuitem class="social-addons-menuitem" command="Social:Addons"
|
||||
label="&social.addons.label;"/>
|
||||
<menuitem label="&social.learnMore.label;"
|
||||
accesskey="&social.learnMore.accesskey;"
|
||||
oncommand="SocialUI.showLearnMore();"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="social-mark-button"
|
||||
class="toolbarbutton-1"
|
||||
hidden="true"
|
||||
disabled="true"
|
||||
command="Social:TogglePageMark"/>
|
||||
</toolbaritem>
|
||||
</hbox>
|
||||
|
||||
<toolbaritem id="PanelUI-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
removable="false"
|
||||
title="&appmenu.title;">
|
||||
<toolbarbutton id="PanelUI-menu-button"
|
||||
class="toolbarbutton-1"
|
||||
label="&brandShortName;"
|
||||
tooltiptext="&appmenu.title;"
|
||||
oncommand="PanelUI.toggle(event);"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&reloadCmd.label;" removable="true"
|
||||
command="Browser:ReloadOrDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&reloadButton.tooltip;"/>
|
||||
<hbox id="window-controls" hidden="true" pack="end">
|
||||
<toolbarbutton id="minimize-button"
|
||||
tooltiptext="&fullScreenMinimize.tooltip;"
|
||||
oncommand="window.minimize();"/>
|
||||
|
||||
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&stopCmd.label;" removable="true"
|
||||
command="Browser:Stop"
|
||||
tooltiptext="&stopButton.tooltip;"/>
|
||||
<toolbarbutton id="restore-button"
|
||||
tooltiptext="&fullScreenRestore.tooltip;"
|
||||
oncommand="BrowserFullScreen();"/>
|
||||
|
||||
<toolbarbutton id="close-button"
|
||||
tooltiptext="&fullScreenClose.tooltip;"
|
||||
oncommand="BrowserTryToCloseWindow();"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
|
||||
|
||||
<toolbar id="PersonalToolbar"
|
||||
mode="icons" iconsize="small" defaulticonsize="small"
|
||||
lockiconsize="true"
|
||||
class="chromeclass-directories"
|
||||
context="toolbar-context-menu"
|
||||
defaultset="personal-bookmarks"
|
||||
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
|
||||
collapsed="true"
|
||||
customizable="true">
|
||||
<toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
|
||||
removable="true">
|
||||
<hbox flex="1"
|
||||
id="PlacesToolbar"
|
||||
context="placesContext"
|
||||
onclick="BookmarksEventHandler.onClick(event, this._placesView);"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
|
||||
tooltip="bhTooltip"
|
||||
popupsinherittooltip="true">
|
||||
<toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
|
||||
mousethrough="never"
|
||||
label="&bookmarksToolbarItem.label;"/>
|
||||
<hbox flex="1">
|
||||
<hbox align="center">
|
||||
<image id="PlacesToolbarDropIndicator"
|
||||
mousethrough="always"
|
||||
collapsed="true"/>
|
||||
</hbox>
|
||||
<scrollbox orient="horizontal"
|
||||
id="PlacesToolbarItems"
|
||||
flex="1"/>
|
||||
<toolbarbutton type="menu"
|
||||
id="PlacesChevron"
|
||||
class="chevron"
|
||||
mousethrough="never"
|
||||
collapsed="true"
|
||||
tooltiptext="&bookmarksToolbarChevron.tooltip;"
|
||||
onpopupshowing="document.getElementById('PlacesToolbar')
|
||||
._placesView._onChevronPopupShowing(event);">
|
||||
<menupopup id="PlacesChevronPopup"
|
||||
placespopup="true"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true"
|
||||
context="placesContext"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</toolbaritem>
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="TabsToolbar"
|
||||
class="toolbar-primary"
|
||||
fullscreentoolbar="true"
|
||||
customizable="true"
|
||||
mode="icons" lockmode="true"
|
||||
iconsize="small" defaulticonsize="small" lockiconsize="true"
|
||||
aria-label="&tabsToolbar.label;"
|
||||
context="toolbar-context-menu"
|
||||
defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
|
||||
collapsed="true">
|
||||
|
||||
<tabs id="tabbrowser-tabs"
|
||||
class="tabbrowser-tabs"
|
||||
tabbrowser="content"
|
||||
flex="1"
|
||||
setfocus="false"
|
||||
tooltip="tabbrowser-tab-tooltip"
|
||||
stopwatchid="FX_TAB_CLICK_MS">
|
||||
<tab class="tabbrowser-tab" selected="true" fadein="true"/>
|
||||
</tabs>
|
||||
|
||||
<toolbarbutton id="new-tab-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&tabCmd.label;"
|
||||
command="cmd_newNavigatorTab"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&newTabButton.tooltip;"
|
||||
ondrop="newTabButtonObserver.onDrop(event)"
|
||||
ondragover="newTabButtonObserver.onDragOver(event)"
|
||||
ondragenter="newTabButtonObserver.onDragOver(event)"
|
||||
ondragexit="newTabButtonObserver.onDragExit(event)"
|
||||
removable="true"/>
|
||||
|
||||
<toolbarbutton id="alltabs-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
|
||||
type="menu"
|
||||
label="&listAllTabs.label;"
|
||||
tooltiptext="&listAllTabs.label;"
|
||||
removable="true">
|
||||
<menupopup id="alltabs-popup"
|
||||
position="after_end">
|
||||
<menuitem id="menu_tabview"
|
||||
class="menuitem-iconic"
|
||||
key="key_tabview"
|
||||
label="&viewTabGroups.label;"
|
||||
command="Browser:ToggleTabView"
|
||||
observes="tabviewGroupsNumber"/>
|
||||
<menuseparator id="alltabs-popup-separator"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="tabs-closebutton"
|
||||
class="close-button tabs-closebutton"
|
||||
command="cmd_close"
|
||||
label="&closeTab.label;"
|
||||
tooltiptext="&closeTab.label;"/>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons"
|
||||
#ifdef XP_MACOSX
|
||||
ordinal="0"
|
||||
#else
|
||||
ordinal="1000"
|
||||
#endif
|
||||
/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<hbox class="titlebar-placeholder" type="fullscreen-button"
|
||||
ordinal="1000"/>
|
||||
#endif
|
||||
#endif
|
||||
</toolbar>
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
|
||||
# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
|
||||
# or removing default items with the toolbarbutton-1 class.
|
||||
|
||||
<toolbaritem id="search-container" title="&searchItem.title;"
|
||||
align="center" class="chromeclass-toolbar-additional"
|
||||
|
@ -623,18 +863,6 @@
|
|||
<searchbar id="searchbar" flex="1"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton id="webrtc-status-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
type="menu"
|
||||
hidden="true"
|
||||
orient="horizontal"
|
||||
label="&webrtcIndicatorButton.label;"
|
||||
tooltiptext="&webrtcIndicatorButton.tooltip;">
|
||||
<menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
|
||||
onpopuphiding="WebrtcIndicator.clearPopup(this);"
|
||||
oncommand="WebrtcIndicator.menuCommand(event.target);"/>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="bookmarks-menu-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
persist="class"
|
||||
|
@ -727,223 +955,13 @@
|
|||
onclick="BrowserGoHome(event);"
|
||||
aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
|
||||
|
||||
<toolbarbutton id="social-share-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
hidden="true"
|
||||
label="&sharePageCmd.label;"
|
||||
tooltiptext="&sharePageCmd.label;"
|
||||
command="Social:SharePage"/>
|
||||
|
||||
<toolbaritem id="social-toolbar-item"
|
||||
class="chromeclass-toolbar-additional"
|
||||
removable="false"
|
||||
title="&socialToolbar.title;"
|
||||
hidden="true"
|
||||
skipintoolbarset="true"
|
||||
observes="socialActiveBroadcaster">
|
||||
<toolbarbutton id="social-provider-button"
|
||||
class="toolbarbutton-1"
|
||||
type="menu">
|
||||
<menupopup id="social-statusarea-popup">
|
||||
<menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
|
||||
observes="socialBroadcaster_userDetails"
|
||||
oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
|
||||
<image class="social-statusarea-user-portrait"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
<vbox>
|
||||
<label class="social-statusarea-loggedInStatus"
|
||||
observes="socialBroadcaster_userDetails"/>
|
||||
</vbox>
|
||||
</menuitem>
|
||||
#ifndef XP_WIN
|
||||
<menuseparator class="social-statusarea-separator"/>
|
||||
#endif
|
||||
<menuitem class="social-toggle-sidebar-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleSidebar"
|
||||
label="&social.toggleSidebar.label;"
|
||||
accesskey="&social.toggleSidebar.accesskey;"/>
|
||||
<menuitem class="social-toggle-notifications-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleNotifications"
|
||||
label="&social.toggleNotifications.label;"
|
||||
accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
|
||||
<menuseparator/>
|
||||
<menuseparator class="social-provider-menu" hidden="true"/>
|
||||
<menuitem class="social-addons-menuitem" command="Social:Addons"
|
||||
label="&social.addons.label;"/>
|
||||
<menuitem label="&social.learnMore.label;"
|
||||
accesskey="&social.learnMore.accesskey;"
|
||||
oncommand="SocialUI.showLearnMore();"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="social-mark-button"
|
||||
class="toolbarbutton-1"
|
||||
hidden="true"
|
||||
disabled="true"
|
||||
command="Social:TogglePageMark"/>
|
||||
</toolbaritem>
|
||||
|
||||
<hbox id="window-controls" hidden="true" pack="end">
|
||||
<toolbarbutton id="minimize-button"
|
||||
tooltiptext="&fullScreenMinimize.tooltip;"
|
||||
oncommand="window.minimize();"/>
|
||||
|
||||
<toolbarbutton id="restore-button"
|
||||
tooltiptext="&fullScreenRestore.tooltip;"
|
||||
oncommand="BrowserFullScreen();"/>
|
||||
|
||||
<toolbarbutton id="close-button"
|
||||
tooltiptext="&fullScreenClose.tooltip;"
|
||||
oncommand="BrowserTryToCloseWindow();"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
|
||||
|
||||
<toolbar id="PersonalToolbar"
|
||||
mode="icons" iconsize="small" defaulticonsize="small"
|
||||
lockiconsize="true"
|
||||
class="chromeclass-directories"
|
||||
context="toolbar-context-menu"
|
||||
defaultset="personal-bookmarks"
|
||||
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
|
||||
collapsed="true"
|
||||
customizable="true">
|
||||
<toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
|
||||
removable="true">
|
||||
<hbox flex="1"
|
||||
id="PlacesToolbar"
|
||||
context="placesContext"
|
||||
onclick="BookmarksEventHandler.onClick(event, this._placesView);"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
|
||||
tooltip="bhTooltip"
|
||||
popupsinherittooltip="true">
|
||||
<toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
|
||||
mousethrough="never"
|
||||
label="&bookmarksToolbarItem.label;"/>
|
||||
<hbox flex="1">
|
||||
<hbox align="center">
|
||||
<image id="PlacesToolbarDropIndicator"
|
||||
mousethrough="always"
|
||||
collapsed="true"/>
|
||||
</hbox>
|
||||
<scrollbox orient="horizontal"
|
||||
id="PlacesToolbarItems"
|
||||
flex="1"/>
|
||||
<toolbarbutton type="menu"
|
||||
id="PlacesChevron"
|
||||
class="chevron"
|
||||
mousethrough="never"
|
||||
collapsed="true"
|
||||
tooltiptext="&bookmarksToolbarChevron.tooltip;"
|
||||
onpopupshowing="document.getElementById('PlacesToolbar')
|
||||
._placesView._onChevronPopupShowing(event);">
|
||||
<menupopup id="PlacesChevronPopup"
|
||||
placespopup="true"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true"
|
||||
context="placesContext"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</toolbaritem>
|
||||
</toolbar>
|
||||
|
||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||
#ifndef CAN_DRAW_IN_TITLEBAR
|
||||
#define APPMENU_ON_TABBAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
<toolbar id="TabsToolbar"
|
||||
class="toolbar-primary"
|
||||
fullscreentoolbar="true"
|
||||
customizable="true"
|
||||
mode="icons" lockmode="true"
|
||||
iconsize="small" defaulticonsize="small" lockiconsize="true"
|
||||
aria-label="&tabsToolbar.label;"
|
||||
context="toolbar-context-menu"
|
||||
#ifdef APPMENU_ON_TABBAR
|
||||
defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
|
||||
#else
|
||||
defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
|
||||
#endif
|
||||
collapsed="true">
|
||||
|
||||
#ifdef APPMENU_ON_TABBAR
|
||||
<toolbarbutton id="appmenu-toolbar-button"
|
||||
class="chromeclass-toolbar-additional"
|
||||
type="menu"
|
||||
label="&brandShortName;"
|
||||
tooltiptext="&appMenuButton.tooltip;">
|
||||
#include browser-appmenu.inc
|
||||
</toolbarbutton>
|
||||
#endif
|
||||
|
||||
<tabs id="tabbrowser-tabs"
|
||||
class="tabbrowser-tabs"
|
||||
tabbrowser="content"
|
||||
flex="1"
|
||||
setfocus="false"
|
||||
tooltip="tabbrowser-tab-tooltip"
|
||||
stopwatchid="FX_TAB_CLICK_MS">
|
||||
<tab class="tabbrowser-tab" selected="true" fadein="true"/>
|
||||
</tabs>
|
||||
|
||||
<toolbarbutton id="new-tab-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&tabCmd.label;"
|
||||
command="cmd_newNavigatorTab"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&newTabButton.tooltip;"
|
||||
ondrop="newTabButtonObserver.onDrop(event)"
|
||||
ondragover="newTabButtonObserver.onDragOver(event)"
|
||||
ondragenter="newTabButtonObserver.onDragOver(event)"
|
||||
ondragexit="newTabButtonObserver.onDragExit(event)"
|
||||
removable="true"/>
|
||||
|
||||
<toolbarbutton id="alltabs-button"
|
||||
class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
|
||||
type="menu"
|
||||
label="&listAllTabs.label;"
|
||||
tooltiptext="&listAllTabs.label;"
|
||||
removable="true">
|
||||
<menupopup id="alltabs-popup"
|
||||
position="after_end">
|
||||
<menuitem id="menu_tabview"
|
||||
class="menuitem-iconic"
|
||||
key="key_tabview"
|
||||
label="&viewTabGroups.label;"
|
||||
command="Browser:ToggleTabView"
|
||||
observes="tabviewGroupsNumber"/>
|
||||
<menuseparator id="alltabs-popup-separator"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="tabs-closebutton"
|
||||
class="close-button tabs-closebutton"
|
||||
command="cmd_close"
|
||||
label="&closeTab.label;"
|
||||
tooltiptext="&closeTab.label;"/>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
|
||||
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
|
||||
#endif
|
||||
</toolbar>
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
|
||||
# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
|
||||
# or removing default items with the toolbarbutton-1 class.
|
||||
|
||||
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&printButton.label;" command="cmd_print"
|
||||
tooltiptext="&printButton.tooltip;"/>
|
||||
#ifdef XP_MACOSX
|
||||
command="cmd_print"
|
||||
#else
|
||||
command="cmd_printPreview"
|
||||
#endif
|
||||
label="&printButton.label;" tooltiptext="&printButton.tooltip;"/>
|
||||
|
||||
<!-- This is a placeholder for the Downloads Indicator. It is visible
|
||||
during the customization of the toolbar, in the palette, and before
|
||||
|
@ -1046,45 +1064,49 @@
|
|||
|
||||
<hbox id="fullscr-toggler" collapsed="true"/>
|
||||
|
||||
<hbox flex="1" id="browser">
|
||||
<vbox id="browser-border-start" hidden="true" layer="true"/>
|
||||
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
|
||||
<sidebarheader id="sidebar-header" align="center">
|
||||
<label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
|
||||
<image id="sidebar-throbber"/>
|
||||
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
|
||||
</sidebarheader>
|
||||
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<deck id="content-deck" flex="1">
|
||||
<hbox flex="1" id="browser">
|
||||
<vbox id="browser-border-start" hidden="true" layer="true"/>
|
||||
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
|
||||
<sidebarheader id="sidebar-header" align="center">
|
||||
<label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
|
||||
<image id="sidebar-throbber"/>
|
||||
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
|
||||
</sidebarheader>
|
||||
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
|
||||
<vbox id="appcontent" flex="1">
|
||||
<tabbrowser id="content" disablehistory="true"
|
||||
flex="1" contenttooltip="aHTMLTooltip"
|
||||
tabcontainer="tabbrowser-tabs"
|
||||
contentcontextmenu="contentAreaContextMenu"
|
||||
autocompletepopup="PopupAutoComplete"/>
|
||||
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
|
||||
<statuspanel id="statusbar-display" inactive="true"/>
|
||||
</vbox>
|
||||
<splitter id="social-sidebar-splitter"
|
||||
class="chromeclass-extrachrome sidebar-splitter"
|
||||
observes="socialSidebarBroadcaster"/>
|
||||
<vbox id="social-sidebar-box"
|
||||
class="chromeclass-extrachrome"
|
||||
observes="socialSidebarBroadcaster"
|
||||
persist="width">
|
||||
<browser id="social-sidebar-browser"
|
||||
type="content"
|
||||
context="contentAreaContextMenu"
|
||||
disableglobalhistory="true"
|
||||
tooltip="aHTMLTooltip"
|
||||
flex="1"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<vbox id="browser-border-end" hidden="true" layer="true"/>
|
||||
</hbox>
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
|
||||
<vbox id="appcontent" flex="1">
|
||||
<tabbrowser id="content" disablehistory="true"
|
||||
flex="1" contenttooltip="aHTMLTooltip"
|
||||
tabcontainer="tabbrowser-tabs"
|
||||
contentcontextmenu="contentAreaContextMenu"
|
||||
autocompletepopup="PopupAutoComplete"
|
||||
onclick="contentAreaClick(event, false);"/>
|
||||
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
|
||||
<statuspanel id="statusbar-display" inactive="true"/>
|
||||
</vbox>
|
||||
<splitter id="social-sidebar-splitter"
|
||||
class="chromeclass-extrachrome sidebar-splitter"
|
||||
observes="socialSidebarBroadcaster"/>
|
||||
<vbox id="social-sidebar-box"
|
||||
class="chromeclass-extrachrome"
|
||||
observes="socialSidebarBroadcaster"
|
||||
persist="width">
|
||||
<browser id="social-sidebar-browser"
|
||||
type="content"
|
||||
context="contentAreaContextMenu"
|
||||
disableglobalhistory="true"
|
||||
tooltip="aHTMLTooltip"
|
||||
flex="1"
|
||||
style="min-width: 14em; width: 18em; max-width: 36em;"/>
|
||||
</vbox>
|
||||
<vbox id="browser-border-end" hidden="true" layer="true"/>
|
||||
</hbox>
|
||||
#include ../../components/customizableui/content/customizeMode.inc.xul
|
||||
</deck>
|
||||
|
||||
<hbox id="full-screen-warning-container" hidden="true" fadeout="true">
|
||||
<hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
|
||||
|
@ -1145,7 +1167,6 @@
|
|||
mode="icons" iconsize="small" defaulticonsize="small"
|
||||
lockiconsize="true"
|
||||
defaultset="addonbar-closebutton,spring,status-bar"
|
||||
customizable="true"
|
||||
key="key_toggleAddonBar">
|
||||
<toolbarbutton id="addonbar-closebutton"
|
||||
tooltiptext="&addonBarCloseButton.tooltip;"
|
||||
|
@ -1154,38 +1175,34 @@
|
|||
</toolbar>
|
||||
</vbox>
|
||||
|
||||
#ifndef XP_UNIX
|
||||
<svg:svg height="0">
|
||||
<svg:clipPath id="tab-curve-clip-path-start" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 1,0.0645 C 0.5683,0.0679,0.51693,0.3764,0.4837,0.5484 c -0.0522,0.2702,-0.1425,0.4194,-0.4333,0.4194 L 0,1 H 1.0333 V 0.0645 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="tab-curve-clip-path-end" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M -0.0333,0.0645 C 0.4317,0.0679,0.4831,0.3764,0.5163,0.5484 c 0.0522,0.2702,+0.1425,0.4194,0.4333,0.4194 L 1,1 H -0.033 V 0.0645 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="tab-clip-path-outer" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 30,0 C 24,0 17.78,2.58 15.10,8.09 12.05,13.46 13.14,20.37 9.18,25.3 7.1,27.7 3.8,28 0.8,28 c -0.4,0.6 -2.09,1.11 -1.46,1.80 l 2.45,2.72 61.60,0 2.59,-3.06 C 65.15,28.96 64.57,27.80 63.5,28 60.13,28.13 56.33,27.03 54.74,23.78 51.85,18.44 52.65,11.81 49.09,6.73 45.88,1.65 39.54,-0.26 33.8,0 32.5,0 31.7,0 30,0 z"/>
|
||||
</svg:clipPath>
|
||||
|
||||
#ifndef XP_UNIX
|
||||
<svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 0,0 C 0.16,0.11 0.28,0.29 0.28,0.5 0.28,0.71 0.16,0.89 0,1 L 1,1 1,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="windows-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 0,0 0,7.8 C 2.5,11 4,14 4,18 4,22 2.5,25 0,28 l 0,22 10000,0 0,-50 L 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
<svg:svg height="0">
|
||||
<svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 0,0 C 0.15,0.12 0.25,0.3 0.25,0.5 0.25,0.7 0.15,0.88 0,1 L 1,1 1,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,-5 0,4.03 C 3.6,1.8 6,6.1 6,11 6,16 3.6,20 0,23 l 0,27 10000,0 0,-55 L 0,-5 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 9,0 C 7.3,0 6,1.3 6,3 l 0,14 c 0,3 -2.2,5 -5,5 l -1,0 0,1 12,0 0,-1 0,-19 0,-3 -3,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,3 0,19 0,1 12,0 0,-1 -1,0 C 8.2,22 6,20 6,17 L 6,3 C 6,1.3 4.7,0 3,0 L 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 1,0 c 2.8,0 5,2.2 5,5 l 0,14 c 0,2 1.3,3 3,3 l 3,0 0,-3 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 0,19 0,3 3,0 c 1.7,0 3,-1 3,-3 L 6,6 C 6,3.2 8.2,1 11,1 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
</svg:svg>
|
||||
|
||||
</vbox>
|
||||
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUI.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>
|
||||
|
|
|
@ -41,6 +41,7 @@ tabpanels {
|
|||
z-index: 2;
|
||||
}
|
||||
|
||||
.tab-icon-image:not([src]):not([pinned]),
|
||||
.tab-throbber:not([busy]),
|
||||
.tab-throbber[busy] + .tab-icon-image {
|
||||
display: none;
|
||||
|
|
|
@ -3484,9 +3484,7 @@
|
|||
if (aEvent.target != window)
|
||||
break;
|
||||
|
||||
let sizemode = document.documentElement.getAttribute("sizemode");
|
||||
TabsInTitlebar.allowedBy("sizemode",
|
||||
sizemode == "maximized" || sizemode == "fullscreen");
|
||||
TabsInTitlebar.updateAppearance();
|
||||
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
|
|
|
@ -138,9 +138,7 @@ _BROWSER_FILES = \
|
|||
browser_bug596687.js \
|
||||
browser_bug597218.js \
|
||||
browser_bug598923.js \
|
||||
browser_bug599325.js \
|
||||
browser_bug609700.js \
|
||||
browser_bug616836.js \
|
||||
browser_bug623155.js \
|
||||
browser_bug623893.js \
|
||||
browser_bug624734.js \
|
||||
|
@ -168,14 +166,12 @@ _BROWSER_FILES = \
|
|||
browser_bug832435.js \
|
||||
browser_bug839103.js \
|
||||
browser_canonizeURL.js \
|
||||
browser_customize.js \
|
||||
browser_findbarClose.js \
|
||||
browser_homeDrop.js \
|
||||
browser_keywordBookmarklets.js \
|
||||
browser_contextSearchTabPosition.js \
|
||||
browser_ctrlTab.js \
|
||||
browser_customize_popupNotification.js \
|
||||
browser_disablechrome.js \
|
||||
browser_discovery.js \
|
||||
browser_duplicateIDs.js \
|
||||
browser_fullscreen-window-open.js \
|
||||
|
@ -242,7 +238,6 @@ _BROWSER_FILES = \
|
|||
browser_visibleTabs_bookmarkAllTabs.js \
|
||||
browser_visibleTabs_tabPreview.js \
|
||||
bug592338.html \
|
||||
disablechrome.html \
|
||||
discovery.html \
|
||||
domplate_test.js \
|
||||
file_bug822367_1.html \
|
||||
|
|
|
@ -13,9 +13,8 @@ function test() {
|
|||
function onTopMenuShown(event) {
|
||||
ok(1, "top menu popupshown listener called");
|
||||
event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
|
||||
// open the customize or toolbars menu
|
||||
toolbarMenu = document.getElementById("appmenu_customizeMenu") ||
|
||||
document.getElementById("viewToolbarsMenu").firstElementChild;
|
||||
// open the toolbars menu
|
||||
toolbarMenu = document.getElementById("viewToolbarsMenu").firstElementChild;
|
||||
toolbarMenu.addEventListener("popupshown", onToolbarMenuShown, false);
|
||||
toolbarMenu.addEventListener("popuphidden", onToolbarMenuHidden, false);
|
||||
toolbarMenu.openPopup();
|
||||
|
@ -54,9 +53,8 @@ function test() {
|
|||
topMenu.hidePopup();
|
||||
}
|
||||
|
||||
// open the appmenu or view menu
|
||||
topMenu = document.getElementById("appmenu-popup") ||
|
||||
document.getElementById("menu_viewPopup");
|
||||
// open the view menu
|
||||
topMenu = document.getElementById("menu_viewPopup");
|
||||
topMenu.addEventListener("popupshown", onTopMenuShown, false);
|
||||
topMenu.addEventListener("popuphidden", onTopMenuHidden, false);
|
||||
topMenu.openPopup();
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
let addonBar = document.getElementById("addon-bar");
|
||||
ok(addonBar, "got addon bar");
|
||||
ok(!isElementVisible(addonBar), "addon bar initially hidden");
|
||||
|
||||
openToolbarCustomizationUI(function () {
|
||||
ok(isElementVisible(addonBar),
|
||||
"add-on bar is visible during toolbar customization");
|
||||
|
||||
closeToolbarCustomizationUI(onClose);
|
||||
});
|
||||
|
||||
function onClose() {
|
||||
ok(!isElementVisible(addonBar),
|
||||
"addon bar is hidden after toolbar customization");
|
||||
|
||||
finish();
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
function test() {
|
||||
is(document.querySelectorAll("#appmenu-popup [accesskey]").length, 0,
|
||||
"there should be no items with access keys in the app menu popup");
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
openToolbarCustomizationUI(customizationWindowLoaded);
|
||||
}
|
||||
|
||||
function customizationWindowLoaded(win) {
|
||||
let x = win.screenX;
|
||||
let iconModeList = win.document.getElementById("modelist");
|
||||
|
||||
iconModeList.addEventListener("popupshown", function popupshown() {
|
||||
iconModeList.removeEventListener("popupshown", popupshown, false);
|
||||
|
||||
executeSoon(function () {
|
||||
is(win.screenX, x,
|
||||
"toolbar customization window shouldn't move when the iconmode menulist is opened");
|
||||
iconModeList.open = false;
|
||||
|
||||
closeToolbarCustomizationUI(finish);
|
||||
});
|
||||
}, false);
|
||||
|
||||
iconModeList.open = true;
|
||||
}
|
|
@ -1,216 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
// Tests that the disablechrome attribute gets propogated to the main UI
|
||||
|
||||
const HTTPSRC = "http://example.com/browser/browser/base/content/test/";
|
||||
|
||||
function is_element_hidden(aElement) {
|
||||
var style = window.getComputedStyle(document.getElementById("nav-bar"), "");
|
||||
if (style.visibility != "visible" || style.display == "none")
|
||||
return true;
|
||||
|
||||
if (aElement.ownerDocument != aElement.parentNode)
|
||||
return is_element_hidden(aElement.parentNode);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_chrome_hidden() {
|
||||
is(document.documentElement.getAttribute("disablechrome"), "true", "Attribute should be set");
|
||||
if (TabsOnTop.enabled)
|
||||
ok(is_element_hidden(document.getElementById("nav-bar")), "Toolbar should be hidden");
|
||||
else
|
||||
ok(!is_element_hidden(document.getElementById("nav-bar")), "Toolbar should not be hidden");
|
||||
}
|
||||
|
||||
function is_chrome_visible() {
|
||||
isnot(document.getElementById("main-window").getAttribute("disablechrome"), "true", "Attribute should not be set");
|
||||
ok(!is_element_hidden(document.getElementById("nav-bar")), "Toolbar should not be hidden");
|
||||
}
|
||||
|
||||
function load_page(aURL, aCanHide, aCallback) {
|
||||
gNewBrowser.addEventListener("pageshow", function() {
|
||||
// Filter out about:blank loads
|
||||
if (gNewBrowser.currentURI.spec != aURL)
|
||||
return;
|
||||
|
||||
gNewBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
|
||||
if (aCanHide)
|
||||
is_chrome_hidden();
|
||||
else
|
||||
is_chrome_visible();
|
||||
|
||||
if (aURL == "about:addons") {
|
||||
function check_after_init() {
|
||||
if (aCanHide)
|
||||
is_chrome_hidden();
|
||||
else
|
||||
is_chrome_visible();
|
||||
|
||||
aCallback();
|
||||
}
|
||||
|
||||
if (gNewBrowser.contentWindow.gIsInitializing) {
|
||||
gNewBrowser.contentDocument.addEventListener("Initialized", function() {
|
||||
gNewBrowser.contentDocument.removeEventListener("Initialized", arguments.callee, false);
|
||||
|
||||
check_after_init();
|
||||
}, false);
|
||||
}
|
||||
else {
|
||||
check_after_init();
|
||||
}
|
||||
}
|
||||
else {
|
||||
executeSoon(aCallback);
|
||||
}
|
||||
}, false);
|
||||
gNewBrowser.loadURI(aURL);
|
||||
}
|
||||
|
||||
var gOldTab;
|
||||
var gNewTab;
|
||||
var gNewBrowser;
|
||||
|
||||
function test() {
|
||||
// Opening the add-ons manager and waiting for it to load the discovery pane
|
||||
// takes more time in windows debug builds
|
||||
requestLongerTimeout(2);
|
||||
|
||||
var gOldTabsOnTop = TabsOnTop.enabled;
|
||||
registerCleanupFunction(function() {
|
||||
TabsOnTop.enabled = gOldTabsOnTop;
|
||||
});
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
gOldTab = gBrowser.selectedTab;
|
||||
gNewTab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
gNewBrowser = gBrowser.selectedBrowser;
|
||||
|
||||
info("Tabs on top");
|
||||
TabsOnTop.enabled = true;
|
||||
|
||||
run_http_test_1();
|
||||
}
|
||||
|
||||
function end_test() {
|
||||
gBrowser.removeTab(gNewTab);
|
||||
finish();
|
||||
}
|
||||
|
||||
function test_url(aURL, aCanHide, aNextTest) {
|
||||
is_chrome_visible();
|
||||
info("Page load");
|
||||
load_page(aURL, aCanHide, function() {
|
||||
info("Switch away");
|
||||
gBrowser.selectedTab = gOldTab;
|
||||
is_chrome_visible();
|
||||
|
||||
info("Switch back");
|
||||
gBrowser.selectedTab = gNewTab;
|
||||
if (aCanHide)
|
||||
is_chrome_hidden();
|
||||
else
|
||||
is_chrome_visible();
|
||||
|
||||
gBrowser.removeTab(gNewTab);
|
||||
gNewTab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
gNewBrowser = gBrowser.selectedBrowser;
|
||||
|
||||
gBrowser.selectedTab = gOldTab;
|
||||
|
||||
info("Background load");
|
||||
load_page(aURL, false, function() {
|
||||
info("Switch back");
|
||||
gBrowser.selectedTab = gNewTab;
|
||||
if (aCanHide)
|
||||
is_chrome_hidden();
|
||||
else
|
||||
is_chrome_visible();
|
||||
|
||||
load_page("about:blank", false, aNextTest);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Should never hide the chrome
|
||||
function run_http_test_1() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test);
|
||||
}
|
||||
|
||||
// Should hide the chrome
|
||||
function run_chrome_about_test() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:addons", true, function() {
|
||||
info("Tabs on bottom");
|
||||
TabsOnTop.enabled = false;
|
||||
run_http_test_2();
|
||||
});
|
||||
}
|
||||
|
||||
// Should never hide the chrome
|
||||
function run_http_test_2() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_2);
|
||||
}
|
||||
|
||||
// Should not hide the chrome
|
||||
function run_chrome_about_test_2() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:addons", true, run_http_test3);
|
||||
}
|
||||
|
||||
function run_http_test3() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_3);
|
||||
}
|
||||
|
||||
// Should not hide the chrome
|
||||
function run_chrome_about_test_3() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:Addons", true, function(){
|
||||
info("Tabs on top");
|
||||
TabsOnTop.enabled = true;
|
||||
run_http_test4();
|
||||
});
|
||||
}
|
||||
|
||||
function run_http_test4() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_4);
|
||||
}
|
||||
|
||||
function run_chrome_about_test_4() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:Addons", true, run_http_test5);
|
||||
}
|
||||
|
||||
function run_http_test5() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_5);
|
||||
}
|
||||
|
||||
// Should hide the chrome
|
||||
function run_chrome_about_test_5() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:preferences", true, function(){
|
||||
info("Tabs on bottom");
|
||||
TabsOnTop.enabled = false;
|
||||
run_http_test6();
|
||||
});
|
||||
}
|
||||
|
||||
function run_http_test6() {
|
||||
info("HTTP tests");
|
||||
test_url(HTTPSRC + "disablechrome.html", false, run_chrome_about_test_6);
|
||||
}
|
||||
|
||||
function run_chrome_about_test_6() {
|
||||
info("Chrome about: tests");
|
||||
test_url("about:preferences", true, end_test);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -37,49 +37,27 @@ function updateTabContextMenu(tab) {
|
|||
menu.hidePopup();
|
||||
}
|
||||
|
||||
function findToolbarCustomizationWindow(aBrowserWin) {
|
||||
if (!aBrowserWin)
|
||||
aBrowserWin = window;
|
||||
|
||||
let iframe = aBrowserWin.document.getElementById("customizeToolbarSheetIFrame");
|
||||
let win = iframe && iframe.contentWindow;
|
||||
if (win)
|
||||
return win;
|
||||
|
||||
win = findChromeWindowByURI("chrome://global/content/customizeToolbar.xul");
|
||||
if (win && win.opener == aBrowserWin)
|
||||
return win;
|
||||
|
||||
throw Error("Failed to find the customization window");
|
||||
}
|
||||
|
||||
function openToolbarCustomizationUI(aCallback, aBrowserWin) {
|
||||
if (!aBrowserWin)
|
||||
aBrowserWin = window;
|
||||
|
||||
aBrowserWin.document.getElementById("cmd_CustomizeToolbars").doCommand();
|
||||
aBrowserWin.gCustomizeMode.enter();
|
||||
|
||||
aBrowserWin.gNavToolbox.addEventListener("beforecustomization", function UI_loaded() {
|
||||
aBrowserWin.gNavToolbox.removeEventListener("beforecustomization", UI_loaded);
|
||||
|
||||
let win = findToolbarCustomizationWindow(aBrowserWin);
|
||||
waitForFocus(function () {
|
||||
aCallback(win);
|
||||
}, win);
|
||||
aBrowserWin.gNavToolbox.addEventListener("customizationready", function UI_loaded() {
|
||||
aBrowserWin.gNavToolbox.removeEventListener("customizationready", UI_loaded);
|
||||
executeSoon(function() {
|
||||
aCallback(aBrowserWin)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function closeToolbarCustomizationUI(aCallback, aBrowserWin) {
|
||||
let win = findToolbarCustomizationWindow(aBrowserWin);
|
||||
|
||||
win.addEventListener("unload", function unloaded() {
|
||||
win.removeEventListener("unload", unloaded);
|
||||
aBrowserWin.gNavToolbox.addEventListener("aftercustomization", function unloaded() {
|
||||
aBrowserWin.gNavToolbox.removeEventListener("aftercustomization", unloaded);
|
||||
executeSoon(aCallback);
|
||||
});
|
||||
|
||||
let button = win.document.getElementById("donebutton");
|
||||
button.focus();
|
||||
button.doCommand();
|
||||
aBrowserWin.gCustomizeMode.exit();
|
||||
}
|
||||
|
||||
function waitForCondition(condition, nextTest, errorMsg) {
|
||||
|
|
|
@ -1494,120 +1494,6 @@
|
|||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="splitmenu">
|
||||
<content>
|
||||
<xul:hbox anonid="menuitem" flex="1"
|
||||
class="splitmenu-menuitem"
|
||||
xbl:inherits="iconic,label,disabled,onclick=oncommand,_moz-menuactive=active"/>
|
||||
<xul:menu anonid="menu" class="splitmenu-menu"
|
||||
xbl:inherits="disabled,_moz-menuactive=active"
|
||||
oncommand="event.stopPropagation();">
|
||||
<children includes="menupopup"/>
|
||||
</xul:menu>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<constructor><![CDATA[
|
||||
this._parentMenupopup.addEventListener("DOMMenuItemActive", this, false);
|
||||
this._parentMenupopup.addEventListener("popuphidden", this, false);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
this._parentMenupopup.removeEventListener("DOMMenuItemActive", this, false);
|
||||
this._parentMenupopup.removeEventListener("popuphidden", this, false);
|
||||
]]></destructor>
|
||||
|
||||
<field name="menuitem" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
|
||||
</field>
|
||||
<field name="menu" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "menu");
|
||||
</field>
|
||||
|
||||
<field name="_menuDelay">600</field>
|
||||
|
||||
<field name="_parentMenupopup"><![CDATA[
|
||||
this._getParentMenupopup(this);
|
||||
]]></field>
|
||||
|
||||
<method name="_getParentMenupopup">
|
||||
<parameter name="aNode"/>
|
||||
<body><![CDATA[
|
||||
let node = aNode.parentNode;
|
||||
while (node) {
|
||||
if (node.localName == "menupopup")
|
||||
break;
|
||||
node = node.parentNode;
|
||||
}
|
||||
return node;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="event"/>
|
||||
<body><![CDATA[
|
||||
switch (event.type) {
|
||||
case "DOMMenuItemActive":
|
||||
if (this.getAttribute("active") == "true" &&
|
||||
event.target != this &&
|
||||
this._getParentMenupopup(event.target) == this._parentMenupopup)
|
||||
this.removeAttribute("active");
|
||||
break;
|
||||
case "popuphidden":
|
||||
if (event.target == this._parentMenupopup)
|
||||
this.removeAttribute("active");
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="mouseover"><![CDATA[
|
||||
if (this.getAttribute("active") != "true") {
|
||||
this.setAttribute("active", "true");
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("DOMMenuItemActive", true, false);
|
||||
this.dispatchEvent(event);
|
||||
|
||||
if (this.getAttribute("disabled") != "true") {
|
||||
let self = this;
|
||||
setTimeout(function () {
|
||||
if (self.getAttribute("active") == "true")
|
||||
self.menu.open = true;
|
||||
}, this._menuDelay);
|
||||
}
|
||||
}
|
||||
]]></handler>
|
||||
|
||||
<handler event="popupshowing"><![CDATA[
|
||||
if (event.target == this.firstChild &&
|
||||
this._parentMenupopup._currentPopup)
|
||||
this._parentMenupopup._currentPopup.hidePopup();
|
||||
]]></handler>
|
||||
|
||||
<handler event="click" phase="capturing"><![CDATA[
|
||||
if (this.getAttribute("disabled") == "true") {
|
||||
// Prevent the command from being carried out
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
let node = event.originalTarget;
|
||||
while (true) {
|
||||
if (node == this.menuitem)
|
||||
break;
|
||||
if (node == this)
|
||||
return;
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
||||
this._parentMenupopup.hidePopup();
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="menuitem-tooltip" extends="chrome://global/content/bindings/menu.xml#menuitem">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
|
|
|
@ -13,8 +13,7 @@ browser.jar:
|
|||
#endif
|
||||
% overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
% overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul
|
||||
% style chrome://global/content/customizeToolbar.xul chrome://browser/content/browser.css
|
||||
% style chrome://global/content/customizeToolbar.xul chrome://browser/skin/
|
||||
|
||||
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
|
||||
* content/browser/aboutDialog.js (content/aboutDialog.js)
|
||||
content/browser/aboutDialog.css (content/aboutDialog.css)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
# BrandFullNameInternal is used for some registry and file system values
|
||||
# instead of BrandFullName and typically should not be modified.
|
||||
!define BrandFullNameInternal "Nightly"
|
||||
!define BrandFullNameInternal "UX"
|
||||
!define CompanyName "mozilla.org"
|
||||
!define URLInfoAbout "http://www.mozilla.org"
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_DISPLAYNAME=Nightly
|
||||
MOZ_APP_DISPLAYNAME=UX
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY brandShortName "Nightly">
|
||||
<!ENTITY brandFullName "Nightly">
|
||||
<!ENTITY brandShortName "UX">
|
||||
<!ENTITY brandFullName "UX">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY trademarkInfo.part1 " ">
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
brandShortName=Nightly
|
||||
brandFullName=Nightly
|
||||
brandShortName=UX
|
||||
brandFullName=UX
|
||||
vendorShortName=Mozilla
|
||||
|
||||
syncBrandShortName=Sync
|
||||
|
|
|
@ -84,6 +84,8 @@ static RedirEntry kRedirMap[] = {
|
|||
{ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
#endif
|
||||
{ "customizing", "chrome://browser/content/customizableui/aboutCustomizing.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
};
|
||||
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#endif
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "customizing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#if defined(XP_WIN)
|
||||
{ NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
|
||||
#elif defined(XP_MACOSX)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
disablefastfind="true">
|
||||
<head>
|
||||
<title>&customizeMode.tabTitle;</title>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<hbox id="customization-container" flex="1" hidden="true">
|
||||
<vbox flex="1" id="customization-palette-container">
|
||||
<label id="customization-header" value="&customizeMode.menuAndToolbars.header;"/>
|
||||
<vbox id="customization-palette" flex="1"/>
|
||||
<hbox pack="start">
|
||||
<button id="customization-reset-button" oncommand="gCustomizeMode.reset();" label="&customizeMode.restoreDefaults;" class="customizationmode-button"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="customization-panel-container">
|
||||
<vbox id="customization-panelWrapper">
|
||||
<html:style html:type="text/html" scoped="scoped">
|
||||
@import url(chrome://global/skin/popup.css);
|
||||
</html:style>
|
||||
<box class="panel-arrowbox">
|
||||
<box flex="1"/>
|
||||
<image class="panel-arrow" side="top"/>
|
||||
</box>
|
||||
<box class="panel-arrowcontent" flex="1">
|
||||
<hbox id="customization-panelHolder"/>
|
||||
<box class="panel-inner-arrowcontentfooter" hidden="true"/>
|
||||
</box>
|
||||
</vbox>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
</hbox>
|
|
@ -0,0 +1,11 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
browser.jar:
|
||||
content/browser/customizableui/aboutCustomizing.xhtml
|
||||
content/browser/customizableui/panelUI.css
|
||||
content/browser/customizableui/panelUI.js
|
||||
content/browser/customizableui/panelUI.xml
|
||||
content/browser/customizableui/toolbar.xml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
.panel-viewstack[view="main"] > .panel-clickcapturer {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.panel-viewcontainer,
|
||||
.panel-viewstack {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-viewstack {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.panel-subviews {
|
||||
-moz-stack-sizing: ignore;
|
||||
transform: translateX(0);
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.panel-subviews[panelopen] {
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
.panel-viewcontainer[panelopen] {
|
||||
transition: height 150ms;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<panel id="PanelUI-popup"
|
||||
role="group"
|
||||
type="arrow"
|
||||
level="top"
|
||||
consumeoutsideclicks="true">
|
||||
<panelmultiview id="PanelUI-multiView">
|
||||
<panelmainview id="PanelUI-mainView">
|
||||
<vbox class="PanelUI-pageControls" pack="center">
|
||||
<hbox class="PanelUI-editControls">
|
||||
<toolbarbutton id="PanelUI-cut-btn" flex="1"
|
||||
label="&cutCmd.label;"
|
||||
tooltiptext="&cutButton.tooltip;"
|
||||
command="cmd_cut"/>
|
||||
<toolbarbutton id="PanelUI-copy-btn" flex="1"
|
||||
label="©Cmd.label;"
|
||||
tooltiptext="©Button.tooltip;"
|
||||
command="cmd_copy"/>
|
||||
<toolbarbutton id="PanelUI-paste-btn" flex="1"
|
||||
label="&pasteCmd.label;"
|
||||
tooltiptext="&pasteButton.tooltip;"
|
||||
command="cmd_paste"/>
|
||||
</hbox>
|
||||
<hbox class="PanelUI-zoomControls">
|
||||
<toolbarbutton id="PanelUI-zoomOut-btn" flex="1"
|
||||
noautoclose="true" label="&fullZoomReduceCmd.label;"
|
||||
command="cmd_fullZoomReduce"
|
||||
tooltiptext="&zoomOutButton.tooltip;"/>
|
||||
<toolbarbutton id="PanelUI-zoomReset-btn" flex="1"
|
||||
noautoclose="true" command="cmd_fullZoomReset"
|
||||
tooltiptext="&zoomReset.tooltip;"/>
|
||||
<toolbarbutton id="PanelUI-zoomIn-btn" flex="1"
|
||||
noautoclose="true" label="&fullZoomEnlargeCmd.label;"
|
||||
command="cmd_fullZoomEnlarge"
|
||||
tooltiptext="&zoomInButton.tooltip;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox id="PanelUI-contents" type="grid"/>
|
||||
|
||||
<vbox id="PanelUI-mainView-spring" flex="1"/>
|
||||
|
||||
<footer class="PanelUI-footer" align="center">
|
||||
<!-- The parentNode is used so that the footer is presented as the anchor
|
||||
instead of just the button being the anchor. -->
|
||||
<toolbarbutton id="PanelUI-help-btn" label="&helpMenu.label;"
|
||||
onclick="PanelUI.showHelpView(this.parentNode);"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton id="PanelUI-customize-btn" label="&appMenuCustomize.label;"
|
||||
command="cmd_CustomizeToolbars"/>
|
||||
</footer>
|
||||
</panelmainview>
|
||||
|
||||
<panelsubview id="PanelUI-history" flex="1">
|
||||
<label value="&appMenuHistory.label;"/>
|
||||
<vbox id="PanelUI-historyItems"/>
|
||||
<label value="&appMenuHistoryMore.label;"
|
||||
id="PanelUI-historyMore"
|
||||
class="text-link"
|
||||
onclick="PlacesCommandHook.showPlacesOrganizer('History'); PanelUI.hide();"/>
|
||||
</panelsubview>
|
||||
|
||||
<panelsubview id="PanelUI-help" flex="1">
|
||||
<label value="&helpMenu.label;"/>
|
||||
<vbox id="PanelUI-helpItems"/>
|
||||
</panelsubview>
|
||||
</panelmultiview>
|
||||
</panel>
|
|
@ -0,0 +1,255 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
|
||||
"resource:///modules/CustomizableUI.jsm");
|
||||
/**
|
||||
* Maintains the state and dispatches events for the main menu panel.
|
||||
*/
|
||||
|
||||
const PanelUI = {
|
||||
/** Panel events that we listen for. **/
|
||||
get kEvents() ["popupshowing", "popupshown", "popuphiding", "popuphidden"],
|
||||
/**
|
||||
* Used for lazily getting and memoizing elements from the document. Lazy
|
||||
* getters are set in init, and memoizing happens after the first retrieval.
|
||||
*/
|
||||
get kElements() {
|
||||
return {
|
||||
contents: "PanelUI-contents",
|
||||
mainView: "PanelUI-mainView",
|
||||
multiView: "PanelUI-multiView",
|
||||
helpView: "PanelUI-help",
|
||||
menuButton: "PanelUI-menu-button",
|
||||
panel: "PanelUI-popup",
|
||||
zoomResetButton: "PanelUI-zoomReset-btn"
|
||||
};
|
||||
},
|
||||
|
||||
init: function() {
|
||||
for (let [k, v] of Iterator(this.kElements)) {
|
||||
// Need to do fresh let-bindings per iteration
|
||||
let getKey = k;
|
||||
let id = v;
|
||||
this.__defineGetter__(getKey, function() {
|
||||
delete this[getKey];
|
||||
return this[getKey] = document.getElementById(id);
|
||||
});
|
||||
}
|
||||
|
||||
for (let event of this.kEvents) {
|
||||
this.panel.addEventListener(event, this);
|
||||
}
|
||||
|
||||
// Register ourselves with the service so we know when the zoom prefs change.
|
||||
Services.obs.addObserver(this, "browser-fullZoom:zoomChange", false);
|
||||
Services.obs.addObserver(this, "browser-fullZoom:zoomReset", false);
|
||||
|
||||
this._updateZoomResetButton();
|
||||
|
||||
this.helpView.addEventListener("ViewShowing", this._onHelpViewShow, false);
|
||||
this.helpView.addEventListener("ViewHiding", this._onHelpViewHide, false);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
for (let event of this.kEvents) {
|
||||
this.panel.removeEventListener(event, this);
|
||||
}
|
||||
this.helpView.removeEventListener("ViewShowing", this._onHelpViewShow);
|
||||
this.helpView.removeEventListener("ViewHiding", this._onHelpViewHide);
|
||||
Services.obs.removeObserver(this, "browser-fullZoom:zoomChange");
|
||||
Services.obs.removeObserver(this, "browser-fullZoom:zoomReset");
|
||||
},
|
||||
|
||||
/**
|
||||
* Customize mode extracts the mainView and puts it somewhere else while the
|
||||
* user customizes. Upon completion, this function can be called to put the
|
||||
* panel back to where it belongs in normal browsing mode.
|
||||
*
|
||||
* @param aMainView
|
||||
* The mainView node to put back into place.
|
||||
*/
|
||||
replaceMainView: function(aMainView) {
|
||||
this.multiView.insertBefore(aMainView, this.multiView.firstChild);
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the menu panel if it's closed, or closes it if it's
|
||||
* open. If the event target has a child with the toolbarbutton-icon
|
||||
* attribute, the panel will be anchored on that child. Otherwise, the panel
|
||||
* is anchored on the event target itself.
|
||||
*
|
||||
* @param aEvent the event that triggers the toggle.
|
||||
*/
|
||||
toggle: function(aEvent) {
|
||||
if (this.panel.state == "open") {
|
||||
this.hide();
|
||||
} else if (this.panel.state == "closed") {
|
||||
this.ensureRegistered();
|
||||
|
||||
let anchor = aEvent.target;
|
||||
let iconAnchor =
|
||||
document.getAnonymousElementByAttribute(anchor, "class",
|
||||
"toolbarbutton-icon");
|
||||
this.panel.openPopup(iconAnchor || anchor, "bottomcenter topright");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If the menu panel is being shown, hide it.
|
||||
*/
|
||||
hide: function() {
|
||||
this.panel.hidePopup();
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "popupshowing":
|
||||
// Fall through
|
||||
case "popupshown":
|
||||
// Fall through
|
||||
case "popuphiding":
|
||||
// Fall through
|
||||
case "popuphidden": {
|
||||
this._updatePanelButton(aEvent.target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* nsIObserver implementation, responding to zoom pref changes
|
||||
*/
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
this._updateZoomResetButton();
|
||||
},
|
||||
|
||||
/**
|
||||
* Registering the menu panel is done lazily for performance reasons. This
|
||||
* method is exposed so that CustomizationMode can force registration in the
|
||||
* event that customization mode is started before the panel has had a chance
|
||||
* to register itself.
|
||||
*/
|
||||
ensureRegistered: function() {
|
||||
CustomizableUI.registerMenuPanel(this.contents);
|
||||
},
|
||||
|
||||
/**
|
||||
* Switch the panel to the main view if it's not already
|
||||
* in that view.
|
||||
*/
|
||||
showMainView: function() {
|
||||
this.multiView.showMainView();
|
||||
},
|
||||
|
||||
/**
|
||||
* Switch the panel to the help view if it's not already
|
||||
* in that view.
|
||||
*/
|
||||
showHelpView: function(aAnchor) {
|
||||
this.multiView.showSubView("PanelUI-help", aAnchor);
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows a subview in the panel with a given ID.
|
||||
*
|
||||
* @param aViewId the ID of the subview to show.
|
||||
* @param aAnchor the element that spawned the subview.
|
||||
* @param aPlacementArea the CustomizableUI area that aAnchor is in.
|
||||
*/
|
||||
showSubView: function(aViewId, aAnchor, aPlacementArea) {
|
||||
let viewNode = document.getElementById(aViewId);
|
||||
if (!viewNode) {
|
||||
Cu.reportError("Could not show panel subview with id: " + aViewId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aAnchor) {
|
||||
Cu.reportError("Expected an anchor when opening subview with id: " + aViewId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aPlacementArea == CustomizableUI.AREA_PANEL) {
|
||||
this.multiView.showSubView(aViewId, aAnchor);
|
||||
} else {
|
||||
// Emit the ViewShowing event so that the widget definition has a chance
|
||||
// to lazily populate the subview with things.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewShowing", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
let tempPanel = document.createElement("panel");
|
||||
tempPanel.appendChild(viewNode);
|
||||
tempPanel.setAttribute("type", "arrow");
|
||||
tempPanel.setAttribute("id", "customizationui-widget-panel");
|
||||
document.getElementById(CustomizableUI.AREA_NAVBAR).appendChild(tempPanel);
|
||||
tempPanel.addEventListener("popuphidden", function panelRemover() {
|
||||
tempPanel.removeEventListener("popuphidden", panelRemover);
|
||||
this.multiView.appendChild(viewNode);
|
||||
tempPanel.parentElement.removeChild(tempPanel);
|
||||
}.bind(this));
|
||||
|
||||
tempPanel.openPopup(aAnchor, "bottomcenter topright");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the anchor node into the open or closed state, depending
|
||||
* on the state of the panel.
|
||||
*/
|
||||
_updatePanelButton: function() {
|
||||
this.menuButton.open = this.panel.state == "open" ||
|
||||
this.panel.state == "showing";
|
||||
},
|
||||
|
||||
_updateZoomResetButton: function() {
|
||||
this.zoomResetButton.setAttribute("label", gNavigatorBundle
|
||||
.getFormattedString("zoomReset.label", [Math.floor(ZoomManager.zoom * 100)]));
|
||||
},
|
||||
|
||||
// Button onclick handler which hides the whole PanelUI
|
||||
_onHelpViewClick: function(aEvent) {
|
||||
if (aEvent.button == 0 && !aEvent.target.hasAttribute("disabled")) {
|
||||
PanelUI.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_onHelpViewShow: function(aEvent) {
|
||||
// Call global menu setup function
|
||||
buildHelpMenu();
|
||||
|
||||
let helpMenu = document.getElementById("menu_HelpPopup");
|
||||
let items = this.getElementsByTagName("vbox")[0];
|
||||
let attrs = ["oncommand", "onclick", "label", "key", "disabled"];
|
||||
let NSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
// Remove all buttons from the view
|
||||
while (items.firstChild) {
|
||||
items.removeChild(items.firstChild);
|
||||
}
|
||||
|
||||
// Add the current set of menuitems of the Help menu to this view
|
||||
let menuItems = Array.prototype.slice.call(helpMenu.getElementsByTagName("menuitem"));
|
||||
let fragment = document.createDocumentFragment();
|
||||
for (let node of menuItems) {
|
||||
if (node.hidden)
|
||||
continue;
|
||||
let button = document.createElementNS(NSXUL, "toolbarbutton");
|
||||
// Copy specific attributes from a menuitem of the Help menu
|
||||
for (let attrName of attrs) {
|
||||
if (!node.hasAttribute(attrName))
|
||||
continue;
|
||||
button.setAttribute(attrName, node.getAttribute(attrName));
|
||||
}
|
||||
fragment.appendChild(button);
|
||||
}
|
||||
items.appendChild(fragment);
|
||||
|
||||
this.addEventListener("click", PanelUI._onHelpViewClick, false);
|
||||
},
|
||||
|
||||
_onHelpViewHide: function(aEvent) {
|
||||
this.removeEventListener("click", PanelUI._onHelpViewClick);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,236 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<bindings id="browserPanelUIBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="toolbarbutton" display="xul:button"
|
||||
extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/toolbarbutton.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<children includes="observes|template|menupopup|panel|tooltip"/>
|
||||
<xul:hbox align="center" flex="1">
|
||||
<xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:label class="toolbarbutton-text" crop="right" flex="1"
|
||||
xbl:inherits="value=label,accesskey,crop"/>
|
||||
<xul:hbox pack="end">
|
||||
<xul:label class="toolbarbutton-acceltext" crop="middle"
|
||||
xbl:inherits="value=acceltext"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULToolbarButton;
|
||||
</getter>
|
||||
</property>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="panelmultiview">
|
||||
<resources>
|
||||
<stylesheet src="chrome://browser/content/customizableui/panelUI.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:box anonid="viewContainer" class="panel-viewcontainer" xbl:inherits="panelopen">
|
||||
<xul:stack anonid="viewStack" view="main" class="panel-viewstack">
|
||||
<children includes="panelmainview"/>
|
||||
|
||||
<!-- Used to capture click events over the PanelUI-mainView if we're in
|
||||
subview mode. That way, any click on the PanelUI-mainView causes us
|
||||
to revert to the mainView mode, whereupon PanelUI-click-capture then
|
||||
allows click events to go through it. -->
|
||||
<xul:vbox anonid="clickCapturer" class="panel-clickcapturer"/>
|
||||
|
||||
<!-- We manually set display: none (via a CSS attribute selector) on the
|
||||
subviews that are not being displayed. We're using this over a deck
|
||||
because a deck assumes the size of its largest child, regardless of
|
||||
whether or not it is shown. That's not good for our case, since we
|
||||
want to allow each subview to be uniquely sized. -->
|
||||
<xul:vbox anonid="subViews" class="panel-subviews" xbl:inherits="panelopen">
|
||||
<children includes="panelsubview"/>
|
||||
</xul:vbox>
|
||||
</xul:stack>
|
||||
</xul:box>
|
||||
</content>
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<field name="_clickCapturer" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "clickCapturer");
|
||||
</field>
|
||||
<field name="_viewContainer" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "viewContainer");
|
||||
</field>
|
||||
<field name="_mainView" readonly="true">
|
||||
this.querySelector("panelmainview");
|
||||
</field>
|
||||
<field name="_subViews" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "subViews");
|
||||
</field>
|
||||
<field name="_viewStack" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "viewStack");
|
||||
</field>
|
||||
<field name="_panel" readonly="true">
|
||||
this.parentNode;
|
||||
</field>
|
||||
|
||||
<field name="_currentSubView">null</field>
|
||||
<field name="_anchorElement">null</field>
|
||||
<field name="_mainViewHeight">0</field>
|
||||
<field name="_subViewObserver">null</field>
|
||||
|
||||
<property name="showingSubView" readonly="true"
|
||||
onget="return this._viewStack.getAttribute('view') == 'subview'"/>
|
||||
|
||||
<constructor><![CDATA[
|
||||
this._clickCapturer.addEventListener("click", this);
|
||||
this._panel.addEventListener("popupshowing", this);
|
||||
this._panel.addEventListener("popuphidden", this);
|
||||
// Get a MutationObserver ready to react to subview size changes. We
|
||||
// only attach this MutationObserver when a subview is being displayed.
|
||||
this._subViewObserver =
|
||||
new MutationObserver(this._syncContainerWithSubView.bind(this));
|
||||
this._subViews.addEventListener("overflow", this);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
this._subViewObserver.disconnect();
|
||||
this._panel.removeEventListener("popupshowing", this);
|
||||
this._panel.removeEventListener("popuphidden", this);
|
||||
this._clickCapturer.removeEventListener("click", this);
|
||||
]]></destructor>
|
||||
|
||||
<method name="showMainView">
|
||||
<body><![CDATA[
|
||||
if (this.showingSubView) {
|
||||
let viewNode = this._currentSubView;
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewHiding", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
viewNode.removeAttribute("current");
|
||||
this._currentSubView = null;
|
||||
|
||||
this._viewContainer.style.height = this._mainViewHeight + "px";
|
||||
this._subViewObserver.disconnect();
|
||||
|
||||
this._viewStack.setAttribute("view", "main");
|
||||
}
|
||||
|
||||
this._shiftMainView();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="showSubView">
|
||||
<parameter name="aViewId"/>
|
||||
<parameter name="aAnchor"/>
|
||||
<body><![CDATA[
|
||||
let viewNode = this.querySelector("#" + aViewId);
|
||||
viewNode.setAttribute("current", true);
|
||||
// Emit the ViewShowing event so that the widget definition has a chance
|
||||
// to lazily populate the subview with things.
|
||||
let evt = document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent("ViewShowing", true, true, viewNode);
|
||||
viewNode.dispatchEvent(evt);
|
||||
|
||||
this._currentSubView = viewNode;
|
||||
|
||||
// Now we have to transition to transition the panel. There are a few parts
|
||||
// to this:
|
||||
//
|
||||
// 1) The main view content gets shifted so that the center of the anchor
|
||||
// node is at the left-most edge of the panel.
|
||||
// 2) The subview deck slides in so that it takes up almost all of the
|
||||
// panel.
|
||||
// 3) If the subview is taller then the main panel contents, then the panel
|
||||
// must grow to meet that new height. Otherwise, it must shrink.
|
||||
//
|
||||
// All three of these actions make use of CSS transformations, so they
|
||||
// should all occur simultaneously.
|
||||
this._viewStack.setAttribute("view", "subview");
|
||||
this._shiftMainView(aAnchor);
|
||||
|
||||
this._mainViewHeight = this._viewStack.clientHeight;
|
||||
this._viewContainer.style.height = this._subViews.scrollHeight + "px";
|
||||
this._subViewObserver.observe(viewNode, {
|
||||
attributes: true,
|
||||
characterData: true,
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_shiftMainView">
|
||||
<parameter name="aAnchor"/>
|
||||
<body><![CDATA[
|
||||
if (aAnchor) {
|
||||
// We need to find the left edge of the anchor, relative to the main
|
||||
// panel. Then we need to add half the width of the anchor. This is the
|
||||
// target that we need to transition to.
|
||||
let anchorRect = aAnchor.getBoundingClientRect();
|
||||
let mainViewRect = this._mainView.getBoundingClientRect();
|
||||
let leftEdge = anchorRect.left - mainViewRect.left;
|
||||
let center = aAnchor.clientWidth / 2;
|
||||
let target = leftEdge + center;
|
||||
this._mainView.style.transform = "translateX(-" + target + "px)";
|
||||
aAnchor.classList.add("panel-multiview-anchor");
|
||||
} else {
|
||||
this._mainView.style.transform = "";
|
||||
if (this.anchorElement)
|
||||
this.anchorElement.classList.remove("panel-multiview-anchor");
|
||||
}
|
||||
this.anchorElement = aAnchor;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
switch(aEvent.type) {
|
||||
case "click":
|
||||
if (aEvent.originalTarget == this._clickCapturer) {
|
||||
this.showMainView();
|
||||
}
|
||||
break;
|
||||
case "overflow":
|
||||
// Resize the subview on the next tick.
|
||||
setTimeout(this._syncContainerWithSubView.bind(this), 0);
|
||||
break;
|
||||
case "popupshowing":
|
||||
this.setAttribute("panelopen", "true");
|
||||
this._syncContainerWithMainView();
|
||||
break;
|
||||
case "popuphidden":
|
||||
this.removeAttribute("panelopen");
|
||||
this.showMainView();
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_syncContainerWithSubView">
|
||||
<body><![CDATA[
|
||||
this._viewContainer.style.height = this._subViews.scrollHeight + "px";
|
||||
]]></body>
|
||||
</method>
|
||||
<method name="_syncContainerWithMainView">
|
||||
<body><![CDATA[
|
||||
this._viewContainer.style.height = this._mainView.scrollHeight + "px";
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
|
@ -0,0 +1,265 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<bindings id="browserToolbarBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="toolbar">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/toolbar.css"/>
|
||||
</resources>
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
return Components.interfaces.nsIAccessibleProvider.XULToolbar;
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<constructor><![CDATA[
|
||||
if (document.readyState == "complete") {
|
||||
this._init();
|
||||
} else {
|
||||
// Need to wait until XUL overlays are loaded. See bug 554279.
|
||||
let self = this;
|
||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
||||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange, false);
|
||||
self._init();
|
||||
}, false);
|
||||
}
|
||||
]]></constructor>
|
||||
|
||||
<method name="_init">
|
||||
<body><![CDATA[
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
||||
let CustomizableUI = scope.CustomizableUI;
|
||||
|
||||
// Searching for the toolbox palette in the toolbar binding because
|
||||
// toolbars are constructed first.
|
||||
let toolbox = this.toolbox;
|
||||
if (toolbox && !toolbox.palette) {
|
||||
for (let node of toolbox.children) {
|
||||
if (node.localName == "toolbarpalette") {
|
||||
// Hold on to the palette but remove it from the document.
|
||||
toolbox.palette = node;
|
||||
toolbox.removeChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomizableUI.registerToolbar(this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="insertItem">
|
||||
<parameter name="aId"/>
|
||||
<parameter name="aBeforeElt"/>
|
||||
<parameter name="aWrapper"/>
|
||||
<body><![CDATA[
|
||||
if (aWrapper) {
|
||||
Cu.reportError("Can't insert " + aId + ": using insertItem " +
|
||||
"no longer supports wrapper elements.");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Hack, the customizable UI code makes this be the last position
|
||||
let pos = null;
|
||||
if (aBeforeElt) {
|
||||
let beforeInfo = CustomizableUI.getPlacementOfWidget(aBeforeElt.id);
|
||||
if (beforeInfo.area != this.id) {
|
||||
Cu.reportError("Can't insert " + aId + " before " +
|
||||
aBeforeElt.id + " which isn't in this area (" +
|
||||
this.id + ").");
|
||||
return null;
|
||||
}
|
||||
pos = beforeInfo.position;
|
||||
}
|
||||
|
||||
CustomizableUI.addWidgetToArea(aId, this.id, pos);
|
||||
return this.ownerDocument.getElementById(aId);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="toolbarName"
|
||||
onget="return this.getAttribute('toolbarname');"
|
||||
onset="this.setAttribute('toolbarname', val); return val;"/>
|
||||
|
||||
<property name="customizationTarget" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this._customizationTarget)
|
||||
return this._customizationTarget;
|
||||
|
||||
let id = this.getAttribute("customizationtarget");
|
||||
if (id)
|
||||
this._customizationTarget = document.getElementById(id);
|
||||
|
||||
if (!this._customizationTarget)
|
||||
this._customizationTarget = this;
|
||||
|
||||
return this._customizationTarget;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="toolbox" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this._toolbox)
|
||||
return this._toolbox;
|
||||
|
||||
let toolboxId = this.getAttribute("toolboxid");
|
||||
if (toolboxId) {
|
||||
let toolbox = document.getElementById(toolboxId);
|
||||
if (toolbox) {
|
||||
if (toolbox.externalToolbars.indexOf(this) == -1)
|
||||
toolbox.externalToolbars.push(this);
|
||||
|
||||
this._toolbox = toolbox;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this._toolbox && this.parentNode &&
|
||||
this.parentNode.localName == "toolbox") {
|
||||
this._toolbox = this.parentNode;
|
||||
}
|
||||
|
||||
return this._toolbox;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="currentSet" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (!this._customizationTarget)
|
||||
return "";
|
||||
|
||||
return [node.id for (node of this._customizationTarget.children)].join(',');
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- The toolbar-menubar-autohide and toolbar-drag bindings are almost
|
||||
verbatim copies of their toolkit counterparts - they just inherit from
|
||||
the customizableui's toolbar binding instead of toolkit's. We're currently
|
||||
OK with the maintainance burden of having two copies of a binding, since
|
||||
the long term goal is to move the customization framework into toolkit. -->
|
||||
|
||||
<binding id="toolbar-menubar-autohide"
|
||||
extends="chrome://browser/content/customizableui/toolbar.xml#toolbar">
|
||||
<implementation>
|
||||
<constructor>
|
||||
this._setInactive();
|
||||
</constructor>
|
||||
|
||||
<field name="_inactiveTimeout">null</field>
|
||||
|
||||
<field name="_contextMenuListener"><![CDATA[({
|
||||
toolbar: this,
|
||||
contextMenu: null,
|
||||
|
||||
get active () !!this.contextMenu,
|
||||
|
||||
init: function (event) {
|
||||
let node = event.target;
|
||||
while (node != this.toolbar) {
|
||||
if (node.localName == "menupopup")
|
||||
return;
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
||||
let contextMenuId = this.toolbar.getAttribute("context");
|
||||
if (!contextMenuId)
|
||||
return;
|
||||
|
||||
this.contextMenu = document.getElementById(contextMenuId);
|
||||
if (!this.contextMenu)
|
||||
return;
|
||||
|
||||
this.contextMenu.addEventListener("popupshown", this, false);
|
||||
this.contextMenu.addEventListener("popuphiding", this, false);
|
||||
this.toolbar.addEventListener("mousemove", this, false);
|
||||
},
|
||||
handleEvent: function (event) {
|
||||
switch (event.type) {
|
||||
case "popupshown":
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
break;
|
||||
case "popuphiding":
|
||||
case "mousemove":
|
||||
this.toolbar._setInactiveAsync();
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
this.contextMenu.removeEventListener("popuphiding", this, false);
|
||||
this.contextMenu.removeEventListener("popupshown", this, false);
|
||||
this.contextMenu = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
})]]></field>
|
||||
|
||||
<method name="_setInactive">
|
||||
<body><![CDATA[
|
||||
this.setAttribute("inactive", "true");
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_setInactiveAsync">
|
||||
<body><![CDATA[
|
||||
this._inactiveTimeout = setTimeout(function (self) {
|
||||
if (self.getAttribute("autohide") == "true") {
|
||||
self._inactiveTimeout = null;
|
||||
self._setInactive();
|
||||
}
|
||||
}, 0, this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_setActive">
|
||||
<body><![CDATA[
|
||||
if (this._inactiveTimeout) {
|
||||
clearTimeout(this._inactiveTimeout);
|
||||
this._inactiveTimeout = null;
|
||||
}
|
||||
this.removeAttribute("inactive");
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="DOMMenuBarActive" action="this._setActive();"/>
|
||||
<handler event="popupshowing" action="this._setActive();"/>
|
||||
<handler event="mousedown" button="2" action="this._contextMenuListener.init(event);"/>
|
||||
<handler event="DOMMenuBarInactive"><![CDATA[
|
||||
if (!this._contextMenuListener.active)
|
||||
this._setInactiveAsync();
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="toolbar-drag"
|
||||
extends="chrome://browser/content/customizableui/toolbar.xml#toolbar">
|
||||
<implementation>
|
||||
<field name="_dragBindingAlive">true</field>
|
||||
<constructor><![CDATA[
|
||||
if (!this._draggableStarted) {
|
||||
this._draggableStarted = true;
|
||||
try {
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
||||
let draggableThis = new tmp.WindowDraggingElement(this);
|
||||
draggableThis.mouseDownCheck = function(e) {
|
||||
// Don't move while customizing.
|
||||
return this._dragBindingAlive &&
|
||||
this.getAttribute("customizing") != "true";
|
||||
};
|
||||
} catch (e) {}
|
||||
}
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -0,0 +1,10 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
PARALLEL_DIRS += [
|
||||
'content',
|
||||
'src',
|
||||
]
|
|
@ -0,0 +1,222 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
|
||||
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm");
|
||||
|
||||
const CustomizableWidgets = [{
|
||||
id: "history-panelmenu",
|
||||
type: "view",
|
||||
viewId: "PanelUI-history",
|
||||
name: "History...",
|
||||
description: "History repeats itself!",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL, CustomizableUI.AREA_NAVBAR],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onViewShowing: function(aEvent) {
|
||||
// Populate our list of history
|
||||
const kMaxResults = 15;
|
||||
let doc = aEvent.detail.ownerDocument;
|
||||
|
||||
let options = PlacesUtils.history.getNewQueryOptions();
|
||||
options.excludeQueries = true;
|
||||
options.includeHidden = false;
|
||||
options.resultType = options.RESULTS_AS_URI;
|
||||
options.queryType = options.QUERY_TYPE_HISTORY;
|
||||
options.sortingMode = options.SORT_BY_DATE_DESCENDING;
|
||||
options.maxResults = kMaxResults;
|
||||
let query = PlacesUtils.history.getNewQuery();
|
||||
|
||||
let items = doc.getElementById("PanelUI-historyItems");
|
||||
// Clear previous history items.
|
||||
while (items.firstChild) {
|
||||
items.removeChild(items.firstChild);
|
||||
}
|
||||
|
||||
PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
|
||||
.asyncExecuteLegacyQueries([query], 1, options, {
|
||||
handleResult: function (aResultSet) {
|
||||
let fragment = doc.createDocumentFragment();
|
||||
for (let row, i = 0; (row = aResultSet.getNextRow()); i++) {
|
||||
try {
|
||||
let uri = row.getResultByIndex(1);
|
||||
let title = row.getResultByIndex(2);
|
||||
let icon = row.getResultByIndex(6);
|
||||
|
||||
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
|
||||
item.setAttribute("label", title || uri);
|
||||
item.addEventListener("click", function(aEvent) {
|
||||
if (aEvent.button == 0) {
|
||||
doc.defaultView.openUILink(uri, aEvent);
|
||||
doc.defaultView.PanelUI.hide();
|
||||
}
|
||||
});
|
||||
if (icon)
|
||||
item.setAttribute("image", "moz-anno:favicon:" + icon);
|
||||
fragment.appendChild(item);
|
||||
} catch (e) {
|
||||
Cu.reportError("Error while showing history subview: " + e);
|
||||
}
|
||||
}
|
||||
items.appendChild(fragment);
|
||||
},
|
||||
handleError: function (aError) {
|
||||
LOG("History view tried to show but had an error: " + aError);
|
||||
},
|
||||
handleCompletion: function (aReason) {
|
||||
LOG("History view is being shown!");
|
||||
},
|
||||
});
|
||||
},
|
||||
onViewHiding: function(aEvent) {
|
||||
LOG("History view is being hidden!");
|
||||
}
|
||||
}, {
|
||||
id: "privatebrowsing-button",
|
||||
name: "Private Browsing\u2026",
|
||||
description: "Open a new Private Browsing window",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(e) {
|
||||
if (e.target && e.target.ownerDocument && e.target.ownerDocument.defaultView) {
|
||||
let win = e.target.ownerDocument.defaultView;
|
||||
if (typeof win.OpenBrowserWindow == "function") {
|
||||
win.OpenBrowserWindow({private: true});
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "save-page-button",
|
||||
name: "Save Page",
|
||||
shortcut: "Ctrl+S",
|
||||
description: "Save this page",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target &&
|
||||
aEvent.target.ownerDocument &&
|
||||
aEvent.target.ownerDocument.defaultView;
|
||||
if (win && typeof win.saveDocument == "function") {
|
||||
win.saveDocument(win.content.document);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "find-button",
|
||||
name: "Find",
|
||||
shortcut: "Ctrl+F",
|
||||
description: "Find in this page",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target &&
|
||||
aEvent.target.ownerDocument &&
|
||||
aEvent.target.ownerDocument.defaultView;
|
||||
if (win && win.gFindBar) {
|
||||
win.gFindBar.onFindCommand();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "open-file-button",
|
||||
name: "Open File",
|
||||
shortcut: "Ctrl+O",
|
||||
description: "Open file",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target
|
||||
&& aEvent.target.ownerDocument
|
||||
&& aEvent.target.ownerDocument.defaultView;
|
||||
if (win && typeof win.BrowserOpenFileWindow == "function") {
|
||||
win.BrowserOpenFileWindow();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "developer-button",
|
||||
name: "Developer",
|
||||
shortcut: "Shift+F11",
|
||||
description: "Toggle Developer Tools",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target &&
|
||||
aEvent.target.ownerDocument &&
|
||||
aEvent.target.ownerDocument.defaultView;
|
||||
if (win && win.gDevToolsBrowser) {
|
||||
win.gDevToolsBrowser.toggleToolboxCommand(win.gBrowser);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "add-ons-button",
|
||||
name: "Add-ons",
|
||||
shortcut: "Ctrl+Shift+A",
|
||||
description: "Add-ons Manager",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target &&
|
||||
aEvent.target.ownerDocument &&
|
||||
aEvent.target.ownerDocument.defaultView;
|
||||
if (win && typeof win.BrowserOpenAddonsMgr == "function") {
|
||||
win.BrowserOpenAddonsMgr();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: "preferences-button",
|
||||
name: "Preferences",
|
||||
shortcut: "Ctrl+Shift+O",
|
||||
description: "Preferences\u2026",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
allowedAreas: [CustomizableUI.AREA_PANEL],
|
||||
icons: {
|
||||
"16": "chrome://branding/content/icon16.png",
|
||||
"32": "chrome://branding/content/icon48.png",
|
||||
"48": "chrome://branding/content/icon48.png"
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.target &&
|
||||
aEvent.target.ownerDocument &&
|
||||
aEvent.target.ownerDocument.defaultView;
|
||||
if (win && typeof win.openPreferences == "function") {
|
||||
win.openPreferences();
|
||||
}
|
||||
}
|
||||
}];
|
|
@ -0,0 +1,823 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizeMode"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
||||
const kPaletteId = "customization-palette";
|
||||
const kAboutURI = "about:customizing";
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm");
|
||||
|
||||
let gDebug = false;
|
||||
try {
|
||||
gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
|
||||
} catch (e) {}
|
||||
|
||||
function LOG(str) {
|
||||
if (gDebug) {
|
||||
Services.console.logStringMessage("[CustomizeMode] " + str);
|
||||
}
|
||||
}
|
||||
|
||||
function ERROR(aMsg) Cu.reportError("[CustomizeMode] " + aMsg);
|
||||
|
||||
function CustomizeMode(aWindow) {
|
||||
this.window = aWindow;
|
||||
this.document = aWindow.document;
|
||||
this.browser = aWindow.gBrowser;
|
||||
};
|
||||
|
||||
CustomizeMode.prototype = {
|
||||
_changed: false,
|
||||
window: null,
|
||||
document: null,
|
||||
// areas is used to cache the customizable areas when in customization mode.
|
||||
areas: null,
|
||||
// When in customizing mode, we swap out the reference to the invisible
|
||||
// palette in gNavToolbox.palette for our visiblePalette. This way, for the
|
||||
// customizing browser window, when widgets are removed from customizable
|
||||
// areas and added to the palette, they're added to the visible palette.
|
||||
// _stowedPalette is a reference to the old invisible palette so we can
|
||||
// restore gNavToolbox.palette to its original state after exiting
|
||||
// customization mode.
|
||||
_stowedPalette: null,
|
||||
_dragOverItem: null,
|
||||
_customizing: false,
|
||||
|
||||
get resetButton() {
|
||||
return this.document.getElementById("customization-reset-button");
|
||||
},
|
||||
|
||||
init: function() {
|
||||
// There are two palettes - there's the palette that can be overlayed with
|
||||
// toolbar items in browser.xul. This is invisible, and never seen by the
|
||||
// user. Then there's the visible palette, which gets populated and displayed
|
||||
// to the user when in customizing mode.
|
||||
this.visiblePalette = this.document.getElementById(kPaletteId);
|
||||
|
||||
this.browser.tabContainer.addEventListener("TabSelect", this, false);
|
||||
this.browser.addTabsProgressListener(this);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
this.browser.tabContainer.removeEventListener("TabSelect", this, false);
|
||||
this.browser.removeTabsProgressListener(this);
|
||||
},
|
||||
|
||||
enter: function() {
|
||||
if (this._customizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.dispatchToolboxEvent("beforecustomization");
|
||||
|
||||
let window = this.window;
|
||||
let document = this.document;
|
||||
|
||||
let customizer = document.getElementById("customization-container");
|
||||
customizer.hidden = false;
|
||||
|
||||
// We don't need to switch to kAboutURI, or open a new tab at
|
||||
// kAboutURI if we're already on it.
|
||||
if (this.browser.selectedBrowser.currentURI.spec != kAboutURI) {
|
||||
this.window.switchToTabHavingURI(kAboutURI, true);
|
||||
}
|
||||
|
||||
CustomizableUI.addListener(this);
|
||||
|
||||
// The menu panel is lazy, and registers itself when the popup shows. We
|
||||
// need to force the menu panel to register itself, or else customization
|
||||
// is really not going to work.
|
||||
window.PanelUI.ensureRegistered();
|
||||
|
||||
// Add a keypress listener and click listener to the tab-view-deck so that
|
||||
// we can quickly exit customization mode when pressing ESC or clicking on
|
||||
// the blueprint outside the customization container.
|
||||
let deck = document.getElementById("tab-view-deck");
|
||||
deck.addEventListener("keypress", this, false);
|
||||
deck.addEventListener("click", this, false);
|
||||
|
||||
// Same goes for the menu button - if we're customizing, a click to the
|
||||
// menu button means a quick exit from customization mode.
|
||||
window.PanelUI.menuButton.addEventListener("click", this, false);
|
||||
window.PanelUI.menuButton.disabled = true;
|
||||
|
||||
// Let everybody in this window know that we're about to customize.
|
||||
this.dispatchToolboxEvent("customizationstarting");
|
||||
|
||||
customizer.parentNode.selectedPanel = customizer;
|
||||
|
||||
window.PanelUI.hide();
|
||||
// Move the mainView in the panel to the holder so that we can see it
|
||||
// while customizing.
|
||||
let panelHolder = document.getElementById("customization-panelHolder");
|
||||
panelHolder.appendChild(window.PanelUI.mainView);
|
||||
|
||||
let self = this;
|
||||
deck.addEventListener("transitionend", function customizeTransitionEnd() {
|
||||
deck.removeEventListener("transitionend", customizeTransitionEnd);
|
||||
|
||||
// Add drag-and-drop event handlers to all of the customizable areas.
|
||||
self.areas = [];
|
||||
for (let area of CustomizableUI.areas) {
|
||||
let target = CustomizableUI.getCustomizeTargetForArea(area, window);
|
||||
target.addEventListener("dragstart", self);
|
||||
target.addEventListener("dragover", self);
|
||||
target.addEventListener("dragexit", self);
|
||||
target.addEventListener("drop", self);
|
||||
target.addEventListener("dragend", self);
|
||||
for (let child of target.children) {
|
||||
if (self.isCustomizableItem(child)) {
|
||||
self.wrapToolbarItem(child, getPlaceForItem(child));
|
||||
}
|
||||
}
|
||||
self.areas.push(target);
|
||||
}
|
||||
|
||||
self.populatePalette();
|
||||
self.dispatchToolboxEvent("customizationready");
|
||||
});
|
||||
|
||||
this.visiblePalette.addEventListener("dragstart", this);
|
||||
this.visiblePalette.addEventListener("dragover", this);
|
||||
this.visiblePalette.addEventListener("dragexit", this);
|
||||
this.visiblePalette.addEventListener("drop", this);
|
||||
this.visiblePalette.addEventListener("dragend", this);
|
||||
|
||||
this.resetButton.hidden = CustomizableUI.inDefaultState;
|
||||
|
||||
document.documentElement.setAttribute("customizing", true);
|
||||
this._customizing = true;
|
||||
},
|
||||
|
||||
exit: function() {
|
||||
if (!this._customizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
CustomizableUI.removeListener(this);
|
||||
|
||||
let deck = this.document.getElementById("tab-view-deck");
|
||||
deck.removeEventListener("keypress", this, false);
|
||||
deck.removeEventListener("click", this, false);
|
||||
this.window.PanelUI.menuButton.removeEventListener("click", this, false);
|
||||
this.window.PanelUI.menuButton.disabled = false;
|
||||
|
||||
this.depopulatePalette();
|
||||
|
||||
this.visiblePalette.removeEventListener("dragstart", this);
|
||||
this.visiblePalette.removeEventListener("dragover", this);
|
||||
this.visiblePalette.removeEventListener("dragexit", this);
|
||||
this.visiblePalette.removeEventListener("drop", this);
|
||||
this.visiblePalette.removeEventListener("dragend", this);
|
||||
|
||||
let window = this.window;
|
||||
let document = this.document;
|
||||
|
||||
let documentElement = document.documentElement;
|
||||
documentElement.setAttribute("customize-exiting", "true");
|
||||
let tabViewDeck = document.getElementById("tab-view-deck");
|
||||
tabViewDeck.addEventListener("transitionend", function onTransitionEnd(evt) {
|
||||
if (evt.propertyName != "padding-top")
|
||||
return;
|
||||
tabViewDeck.removeEventListener("transitionend", onTransitionEnd);
|
||||
documentElement.removeAttribute("customize-exiting");
|
||||
});
|
||||
|
||||
for (let target of this.areas) {
|
||||
for (let toolbarItem of target.children) {
|
||||
if (this.isWrappedToolbarItem(toolbarItem)) {
|
||||
this.unwrapToolbarItem(toolbarItem);
|
||||
}
|
||||
}
|
||||
target.removeEventListener("dragstart", this);
|
||||
target.removeEventListener("dragover", this);
|
||||
target.removeEventListener("dragexit", this);
|
||||
target.removeEventListener("drop", this);
|
||||
target.removeEventListener("dragend", this);
|
||||
}
|
||||
|
||||
if (this._changed) {
|
||||
// XXXmconley: At first, it seems strange to also persist the old way with
|
||||
// currentset - but this might actually be useful for switching
|
||||
// to old builds. We might want to keep this around for a little
|
||||
// bit.
|
||||
this.persistCurrentSets();
|
||||
}
|
||||
|
||||
// And drop all area references.
|
||||
this.areas = [];
|
||||
|
||||
// Let everybody in this window know that we're starting to
|
||||
// exit customization mode.
|
||||
this.dispatchToolboxEvent("customizationending");
|
||||
window.PanelUI.replaceMainView(window.PanelUI.mainView);
|
||||
|
||||
let browser = document.getElementById("browser");
|
||||
browser.parentNode.selectedPanel = browser;
|
||||
|
||||
// We need to set this._customizing to false before removing the tab
|
||||
// or the TabSelect event handler will think that we are exiting
|
||||
// customization mode for a second time.
|
||||
this._customizing = false;
|
||||
|
||||
if (this.browser.selectedBrowser.currentURI.spec == kAboutURI) {
|
||||
let custBrowser = this.browser.selectedBrowser;
|
||||
if (custBrowser.canGoBack) {
|
||||
// If there's history to this tab, just go back.
|
||||
custBrowser.goBack();
|
||||
} else {
|
||||
// If we can't go back, we're removing the about:customization tab.
|
||||
// We only do this if we're the top window for this window (so not
|
||||
// a dialog window, for example).
|
||||
if (this.window.getTopWin(true) == this.window) {
|
||||
let customizationTab = this.browser.selectedTab;
|
||||
if (this.browser.browsers.length == 1) {
|
||||
this.window.BrowserOpenTab();
|
||||
}
|
||||
this.browser.removeTab(customizationTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let deck = document.getElementById("tab-view-deck");
|
||||
let self = this;
|
||||
deck.addEventListener("transitionend", function customizeTransitionEnd() {
|
||||
deck.removeEventListener("transitionend", customizeTransitionEnd);
|
||||
self.dispatchToolboxEvent("aftercustomization");
|
||||
});
|
||||
documentElement.removeAttribute("customizing");
|
||||
|
||||
let customizer = document.getElementById("customization-container");
|
||||
customizer.hidden = true;
|
||||
|
||||
this._changed = false;
|
||||
},
|
||||
|
||||
dispatchToolboxEvent: function(aEventType, aDetails={}) {
|
||||
let evt = this.document.createEvent("CustomEvent");
|
||||
evt.initCustomEvent(aEventType, true, true, {changed: this._changed});
|
||||
let result = this.window.gNavToolbox.dispatchEvent(evt);
|
||||
},
|
||||
|
||||
populatePalette: function() {
|
||||
let toolboxPalette = this.window.gNavToolbox.palette;
|
||||
|
||||
let unusedWidgets = CustomizableUI.getUnusedWidgets(toolboxPalette);
|
||||
for (let widget of unusedWidgets) {
|
||||
let paletteItem = this.makePaletteItem(widget, "palette");
|
||||
this.visiblePalette.appendChild(paletteItem);
|
||||
}
|
||||
|
||||
this._stowedPalette = this.window.gNavToolbox.palette;
|
||||
this.window.gNavToolbox.palette = this.visiblePalette;
|
||||
},
|
||||
|
||||
//XXXunf Maybe this should use -moz-element instead of wrapping the node?
|
||||
// Would ensure no weird interactions/event handling from original node,
|
||||
// and makes it possible to put this in a lazy-loaded iframe/real tab
|
||||
// while still getting rid of the need for overlays.
|
||||
makePaletteItem: function(aWidget, aPlace) {
|
||||
let widgetNode = aWidget.forWindow(this.window).node;
|
||||
let wrapper = this.createWrapper(widgetNode, aPlace);
|
||||
wrapper.appendChild(widgetNode);
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
depopulatePalette: function() {
|
||||
let wrapper = this.visiblePalette.firstChild;
|
||||
|
||||
while (wrapper) {
|
||||
let widgetNode = wrapper.firstChild;
|
||||
|
||||
let provider = CustomizableUI.getWidget(widgetNode.id);
|
||||
// If provider is PROVIDER_SPECIAL, then it just gets thrown away.
|
||||
if (provider = CustomizableUI.PROVIDER_XUL) {
|
||||
if (wrapper.hasAttribute("itemdisabled")) {
|
||||
widgetNode.disabled = true;
|
||||
}
|
||||
|
||||
if (wrapper.hasAttribute("itemchecked")) {
|
||||
widgetNode.checked = true;
|
||||
}
|
||||
|
||||
if (wrapper.hasAttribute("itemcommand")) {
|
||||
let commandID = wrapper.getAttribute("itemcommand");
|
||||
widgetNode.setAttribute("command", commandID);
|
||||
|
||||
// Ensure node is in sync with its command after customizing.
|
||||
let command = this.document.getElementById(commandID);
|
||||
if (command && command.hasAttribute("disabled")) {
|
||||
widgetNode.setAttribute("disabled",
|
||||
command.getAttribute("disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
this._stowedPalette.appendChild(widgetNode);
|
||||
} else if (provider = CustomizableUI.PROVIDER_API) {
|
||||
//XXXunf Currently this doesn't destroy the (now unused) node. It would
|
||||
// be good to do so, but we need to keep strong refs to it in
|
||||
// CustomizableUI (can't iterate of WeakMaps), and there's the
|
||||
// question of what behavior wrappers should have if consumers
|
||||
// keep hold of them.
|
||||
//widget.destroyInstance(widgetNode);
|
||||
}
|
||||
|
||||
this.visiblePalette.removeChild(wrapper);
|
||||
wrapper = this.visiblePalette.firstChild;
|
||||
}
|
||||
this.window.gNavToolbox.palette = this._stowedPalette;
|
||||
},
|
||||
|
||||
isCustomizableItem: function(aNode) {
|
||||
return aNode.localName == "toolbarbutton" ||
|
||||
aNode.localName == "toolbaritem" ||
|
||||
aNode.localName == "toolbarseparator" ||
|
||||
aNode.localName == "toolbarspring" ||
|
||||
aNode.localName == "toolbarspacer";
|
||||
},
|
||||
|
||||
isWrappedToolbarItem: function(aNode) {
|
||||
return aNode.localName == "toolbarpaletteitem";
|
||||
},
|
||||
|
||||
wrapToolbarItem: function(aNode, aPlace) {
|
||||
let wrapper = this.createWrapper(aNode, aPlace);
|
||||
// It's possible that this toolbar node is "mid-flight" and doesn't have
|
||||
// a parent, in which case we skip replacing it. This can happen if a
|
||||
// toolbar item has been dragged into the palette. In that case, we tell
|
||||
// CustomizableUI to remove the widget from its area before putting the
|
||||
// widget in the palette - so the node will have no parent.
|
||||
if (aNode.parentNode) {
|
||||
aNode = aNode.parentNode.replaceChild(wrapper, aNode);
|
||||
}
|
||||
wrapper.appendChild(aNode);
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
createWrapper: function(aNode, aPlace) {
|
||||
let wrapper = this.document.createElement("toolbarpaletteitem");
|
||||
|
||||
// "place" is used by toolkit to add the toolbarpaletteitem-palette
|
||||
// binding to a toolbarpaletteitem, which gives it a label node for when
|
||||
// it's sitting in the palette.
|
||||
wrapper.setAttribute("place", aPlace);
|
||||
|
||||
// Ensure the wrapped item doesn't look like it's in any special state, and
|
||||
// can't be interactved with when in the customization palette.
|
||||
if (aNode.hasAttribute("command")) {
|
||||
wrapper.setAttribute("itemcommand", aNode.getAttribute("command"));
|
||||
aNode.removeAttribute("command");
|
||||
}
|
||||
|
||||
if (aNode.checked) {
|
||||
wrapper.setAttribute("itemchecked", "true");
|
||||
aNode.checked = false;
|
||||
}
|
||||
|
||||
if (aNode.disabled) {
|
||||
wrapper.setAttribute("itemdisabled", "true");
|
||||
aNode.disabled = false;
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("id")) {
|
||||
wrapper.setAttribute("id", "wrapper-" + aNode.getAttribute("id"));
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("title")) {
|
||||
wrapper.setAttribute("title", aNode.getAttribute("title"));
|
||||
} else if (aNode.hasAttribute("label")) {
|
||||
wrapper.setAttribute("title", aNode.getAttribute("label"));
|
||||
}
|
||||
|
||||
if (aNode.hasAttribute("flex")) {
|
||||
wrapper.setAttribute("flex", aNode.getAttribute("flex"));
|
||||
}
|
||||
|
||||
wrapper.addEventListener("mousedown", this);
|
||||
wrapper.addEventListener("mouseup", this);
|
||||
|
||||
return wrapper;
|
||||
},
|
||||
|
||||
unwrapToolbarItem: function(aWrapper) {
|
||||
aWrapper.removeEventListener("mousedown", this);
|
||||
aWrapper.removeEventListener("mouseup", this);
|
||||
|
||||
let toolbarItem = aWrapper.firstChild;
|
||||
|
||||
if (aWrapper.hasAttribute("itemdisabled")) {
|
||||
toolbarItem.disabled = true;
|
||||
}
|
||||
|
||||
if (aWrapper.hasAttribute("itemchecked")) {
|
||||
toolbarItem.checked = true;
|
||||
}
|
||||
|
||||
if (aWrapper.hasAttribute("itemcommand")) {
|
||||
let commandID = aWrapper.getAttribute("itemcommand");
|
||||
toolbarItem.setAttribute("command", commandID);
|
||||
|
||||
//XXX Bug 309953 - toolbarbuttons aren't in sync with their commands after customizing
|
||||
let command = this.document.getElementById(commandID);
|
||||
if (command && command.hasAttribute("disabled")) {
|
||||
toolbarItem.setAttribute("disabled", command.getAttribute("disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
if (aWrapper.parentNode) {
|
||||
aWrapper.parentNode.replaceChild(toolbarItem, aWrapper);
|
||||
}
|
||||
return toolbarItem;
|
||||
},
|
||||
|
||||
persistCurrentSets: function() {
|
||||
let document = this.document;
|
||||
let toolbars = document.querySelectorAll("toolbar[customizable='true']");
|
||||
for (let toolbar of toolbars) {
|
||||
let set = toolbar.currentSet;
|
||||
toolbar.setAttribute("currentset", set);
|
||||
LOG("Setting currentset of " + toolbar.id + " as " + set);
|
||||
// Persist the currentset attribute directly on hardcoded toolbars.
|
||||
document.persist(toolbar.id, "currentset");
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
CustomizableUI.reset();
|
||||
},
|
||||
|
||||
onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) {
|
||||
this._onUIChange();
|
||||
},
|
||||
|
||||
onWidgetAdded: function(aWidgetId, aArea, aPosition) {
|
||||
this._onUIChange();
|
||||
},
|
||||
|
||||
onWidgetRemoved: function(aWidgetId, aArea) {
|
||||
this._onUIChange();
|
||||
},
|
||||
|
||||
onWidgetCreated: function(aWidgetId) {
|
||||
},
|
||||
|
||||
onWidgetDestroyed: function(aWidgetId) {
|
||||
},
|
||||
|
||||
_onUIChange: function() {
|
||||
this._changed = true;
|
||||
this.resetButton.hidden = CustomizableUI.inDefaultState;
|
||||
this.dispatchToolboxEvent("customizationchange");
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch(aEvent.type) {
|
||||
case "dragstart":
|
||||
this._onDragStart(aEvent);
|
||||
break;
|
||||
case "dragover":
|
||||
this._onDragOver(aEvent);
|
||||
break;
|
||||
case "drop":
|
||||
this._onDragDrop(aEvent);
|
||||
break;
|
||||
case "dragexit":
|
||||
this._onDragExit(aEvent);
|
||||
break;
|
||||
case "dragend":
|
||||
this._onDragEnd(aEvent);
|
||||
break;
|
||||
case "mousedown":
|
||||
this._onMouseDown(aEvent);
|
||||
break;
|
||||
case "mouseup":
|
||||
this._onMouseUp(aEvent);
|
||||
break;
|
||||
case "keypress":
|
||||
if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
|
||||
this.exit();
|
||||
}
|
||||
break;
|
||||
case "click":
|
||||
if (aEvent.button == 0 &&
|
||||
(aEvent.originalTarget == this.window.PanelUI.menuButton) ||
|
||||
(aEvent.originalTarget == this.document.getElementById("tab-view-deck"))) {
|
||||
this.exit();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
break;
|
||||
case "TabSelect":
|
||||
this._onTabSelect(aEvent);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_onDragStart: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
let item = aEvent.target;
|
||||
while (item && item.localName != "toolbarpaletteitem") {
|
||||
if (item.localName == "toolbar") {
|
||||
return;
|
||||
}
|
||||
item = item.parentNode;
|
||||
}
|
||||
|
||||
let dt = aEvent.dataTransfer;
|
||||
let documentId = aEvent.target.ownerDocument.documentElement.id;
|
||||
dt.setData("text/toolbarwrapper-id/" + documentId, item.firstChild.id);
|
||||
dt.effectAllowed = "move";
|
||||
},
|
||||
|
||||
_onDragOver: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
|
||||
let document = aEvent.target.ownerDocument;
|
||||
let documentId = document.documentElement.id;
|
||||
if (!aEvent.dataTransfer.types.contains("text/toolbarwrapper-id/"
|
||||
+ documentId.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
let draggedItemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
|
||||
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
|
||||
let targetNode = aEvent.target;
|
||||
let targetParent = targetNode.parentNode;
|
||||
let targetArea = this._getCustomizableParent(targetNode);
|
||||
let originArea = this._getCustomizableParent(draggedWrapper);
|
||||
|
||||
// Do nothing if the target or origin are not customizable.
|
||||
if (!targetArea || !originArea) {
|
||||
gCurrentDragOverItem = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to determine the place that the widget is being dropped in
|
||||
// the target.
|
||||
let position = Array.indexOf(targetParent.children, targetNode);
|
||||
let dragOverItem = position == -1 ? targetParent.lastChild : targetParent.children[position];
|
||||
|
||||
if (this._dragOverItem && dragOverItem != this._dragOverItem) {
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
}
|
||||
|
||||
// XXXjaws Only handling the toolbar case first.
|
||||
if (targetArea.localName == "toolbar") {
|
||||
this._setDragActive(dragOverItem, true);
|
||||
}
|
||||
this._dragOverItem = dragOverItem;
|
||||
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
},
|
||||
|
||||
_onDragDrop: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
|
||||
let document = aEvent.target.ownerDocument;
|
||||
let documentId = document.documentElement.id;
|
||||
let draggedItemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
|
||||
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
|
||||
|
||||
draggedWrapper.removeAttribute("mousedown");
|
||||
|
||||
let targetNode = aEvent.target;
|
||||
let targetParent = targetNode.parentNode;
|
||||
let targetArea = this._getCustomizableParent(targetNode);
|
||||
let originArea = this._getCustomizableParent(draggedWrapper);
|
||||
|
||||
// Do nothing if the target area or origin area are not customizable.
|
||||
if (!targetArea || !originArea) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do nothing if the target was dropped onto itself (ie, no change in area
|
||||
// or position).
|
||||
if (draggedWrapper == targetNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Is the target area the customization palette? If so, we have two cases -
|
||||
// either the originArea was the palette, or a customizable area.
|
||||
if (targetArea.id == kPaletteId) {
|
||||
if (originArea.id !== kPaletteId) {
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
CustomizableUI.removeWidgetFromArea(draggedItemId);
|
||||
draggedWrapper = this.wrapToolbarItem(widget, "palette");
|
||||
}
|
||||
|
||||
// If the targetNode is the palette itself, just append
|
||||
if (targetNode == this.visiblePalette) {
|
||||
this.visiblePalette.appendChild(draggedWrapper);
|
||||
} else {
|
||||
this.visiblePalette.insertBefore(draggedWrapper, targetNode);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Is the target the customization area itself? If so, we just add the
|
||||
// widget to the end of the area.
|
||||
if (targetNode == targetArea.customizationTarget) {
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
CustomizableUI.addWidgetToArea(draggedItemId, targetArea.id);
|
||||
this.wrapToolbarItem(widget, getPlaceForItem(targetNode));
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to determine the place that the widget is being dropped in
|
||||
// the target.
|
||||
let placement = CustomizableUI.getPlacementOfWidget(targetNode.firstChild.id);
|
||||
if (!placement) {
|
||||
ERROR("Could not get a position for " + targetNode.firstChild.id);
|
||||
return;
|
||||
}
|
||||
|
||||
let position = placement.position;
|
||||
|
||||
// Is the target area the same as the origin? Since we've already handled
|
||||
// the possibility that the target is the customization palette, we know
|
||||
// that the widget is moving within a customizable area.
|
||||
if (targetArea == originArea) {
|
||||
let properPlace = getPlaceForItem(targetNode);
|
||||
// We unwrap the moving widget, as well as the widget that we're dropping
|
||||
// on (the target) so that moveWidgetWithinArea can correctly insert the
|
||||
// moving widget before the target widget.
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
let targetWidget = this.unwrapToolbarItem(targetNode);
|
||||
CustomizableUI.moveWidgetWithinArea(draggedItemId, position);
|
||||
this.wrapToolbarItem(targetWidget, properPlace);
|
||||
this.wrapToolbarItem(widget, properPlace);
|
||||
return;
|
||||
}
|
||||
|
||||
// A little hackery - we quickly unwrap the item and use CustomizableUI's
|
||||
// addWidgetToArea to move the widget to the right place for every window,
|
||||
// then we re-wrap the widget. We have to unwrap the target widget too so
|
||||
// that addWidgetToArea inserts the new widget into the right place.
|
||||
let properPlace = getPlaceForItem(targetNode);
|
||||
let widget = this.unwrapToolbarItem(draggedWrapper);
|
||||
let targetWidget = this.unwrapToolbarItem(targetNode);
|
||||
CustomizableUI.addWidgetToArea(draggedItemId, targetArea.id, position);
|
||||
this.wrapToolbarItem(targetWidget, properPlace);
|
||||
draggedWrapper = this.wrapToolbarItem(widget, properPlace);
|
||||
},
|
||||
|
||||
_onDragExit: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
if (this._dragOverItem) {
|
||||
this._setDragActive(this._dragOverItem, false);
|
||||
}
|
||||
},
|
||||
|
||||
_onDragEnd: function(aEvent) {
|
||||
__dumpDragData(aEvent);
|
||||
let document = aEvent.target.ownerDocument;
|
||||
document.documentElement.removeAttribute("customizing-movingItem");
|
||||
|
||||
let documentId = document.documentElement.id;
|
||||
if (!aEvent.dataTransfer.types.contains("text/toolbarwrapper-id/"
|
||||
+ documentId.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
let draggedItemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
|
||||
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
|
||||
|
||||
draggedWrapper.removeAttribute("mousedown");
|
||||
},
|
||||
|
||||
// XXXjaws Show a ghost image or blank area where the item could be added, instead of black bar
|
||||
_setDragActive: function(aItem, aValue) {
|
||||
let node = aItem;
|
||||
let window = aItem.ownerDocument.defaultView;
|
||||
let direction = window.getComputedStyle(aItem, null).direction;
|
||||
let value = direction == "ltr"? "left" : "right";
|
||||
if (aItem.localName == "toolbar") {
|
||||
node = aItem.lastChild;
|
||||
value = direction == "ltr"? "right" : "left";
|
||||
}
|
||||
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aValue) {
|
||||
if (!node.hasAttribute("dragover")) {
|
||||
node.setAttribute("dragover", value);
|
||||
}
|
||||
} else {
|
||||
node.removeAttribute("dragover");
|
||||
}
|
||||
},
|
||||
|
||||
_getCustomizableParent: function(aElement) {
|
||||
let areas = CustomizableUI.areas;
|
||||
areas.push(kPaletteId);
|
||||
while (aElement) {
|
||||
if (areas.indexOf(aElement.id) != -1) {
|
||||
return aElement;
|
||||
}
|
||||
aElement = aElement.parentNode;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
_onMouseDown: function(aEvent) {
|
||||
LOG("_onMouseDown");
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
doc.documentElement.setAttribute("customizing-movingItem", true);
|
||||
let item = this._getWrapper(aEvent.target);
|
||||
if (item) {
|
||||
item.setAttribute("mousedown", "true");
|
||||
}
|
||||
},
|
||||
|
||||
_onMouseUp: function(aEvent) {
|
||||
LOG("_onMouseUp");
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
doc.documentElement.removeAttribute("customizing-movingItem");
|
||||
let item = this._getWrapper(aEvent.target);
|
||||
if (item) {
|
||||
item.removeAttribute("mousedown");
|
||||
}
|
||||
},
|
||||
|
||||
_getWrapper: function(aElement) {
|
||||
while (aElement && aElement.localName != "toolbarpaletteitem") {
|
||||
if (aElement.localName == "toolbar")
|
||||
return null;
|
||||
aElement = aElement.parentNode;
|
||||
}
|
||||
return aElement;
|
||||
},
|
||||
|
||||
_onTabSelect: function(aEvent) {
|
||||
this._toggleCustomizationModeIfNecessary();
|
||||
},
|
||||
|
||||
onLocationChange: function(aBrowser, aProgress, aRequest, aLocation, aFlags) {
|
||||
if (this.browser.selectedBrowser != aBrowser) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._toggleCustomizationModeIfNecessary();
|
||||
},
|
||||
|
||||
/**
|
||||
* Looks at the currently selected browser tab, and if the location
|
||||
* is set to kAboutURI and we're not customizing, enters customize mode.
|
||||
* If we're not at kAboutURI and we are customizing, exits customize mode.
|
||||
*/
|
||||
_toggleCustomizationModeIfNecessary: function() {
|
||||
let browser = this.browser.selectedBrowser;
|
||||
if (browser.currentURI.spec == kAboutURI &&
|
||||
!this._customizing) {
|
||||
this.enter();
|
||||
} else if (browser.currentURI.spec != kAboutURI &&
|
||||
this._customizing) {
|
||||
this.exit();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function getPlaceForItem(aElement) {
|
||||
let place;
|
||||
let node = aElement;
|
||||
while (node && !place) {
|
||||
if (node.localName == "toolbar")
|
||||
place = "toolbar";
|
||||
else if (node.id == CustomizableUI.AREA_PANEL)
|
||||
place = "panel";
|
||||
else if (node.id == kPaletteId)
|
||||
place = "palette";
|
||||
|
||||
node = node.parentNode;
|
||||
}
|
||||
return place;
|
||||
}
|
||||
|
||||
function __dumpDragData(aEvent, caller) {
|
||||
let str = "Dumping drag data (CustomizeMode.jsm) {\n";
|
||||
str += " type: " + aEvent["type"] + "\n";
|
||||
for (let el of ["target", "currentTarget", "relatedTarget"]) {
|
||||
if (aEvent[el]) {
|
||||
str += " " + el + ": " + aEvent[el] + "(localName=" + aEvent[el].localName + "; id=" + aEvent[el].id + ")\n";
|
||||
}
|
||||
}
|
||||
for (let prop in aEvent.dataTransfer) {
|
||||
if (typeof aEvent.dataTransfer[prop] != "function") {
|
||||
str += " dataTransfer[" + prop + "]: " + aEvent.dataTransfer[prop] + "\n";
|
||||
}
|
||||
}
|
||||
str += "}";
|
||||
LOG(str);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
CustomizableUI.jsm \
|
||||
CustomizableWidgets.jsm \
|
||||
CustomizeMode.jsm \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,6 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
PARALLEL_DIRS += [
|
||||
'about',
|
||||
'certerror',
|
||||
'customizableui',
|
||||
'dirprovider',
|
||||
'downloads',
|
||||
'feeds',
|
||||
|
|
|
@ -1171,7 +1171,7 @@ BrowserGlue.prototype = {
|
|||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 13;
|
||||
const UI_VERSION = 14;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
|
@ -1361,6 +1361,34 @@ BrowserGlue.prototype = {
|
|||
catch (ex) {}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 13) {
|
||||
// Migrate users from text or text&icons mode to icons mode.
|
||||
let toolbarResources = [this._rdf.GetResource(BROWSER_DOCURL + "navigator-toolbox"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "nav-bar"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "PersonalToolbar"),
|
||||
this._rdf.GetResource(BROWSER_DOCURL + "addon-bar")];
|
||||
let modeResource = this._rdf.GetResource("mode");
|
||||
let iconsizeResource = this._rdf.GetResource("iconsize");
|
||||
for (let toolbarResource of toolbarResources) {
|
||||
let toolbarMode = this._getPersist(toolbarResource, modeResource);
|
||||
if (toolbarMode != "icons") {
|
||||
this._setPersist(toolbarResource, modeResource, "icons");
|
||||
// If the user wasn't previously using icons mode, switch
|
||||
// them to the default (large icon mode).
|
||||
this._setPersist(toolbarResource, iconsizeResource, "large");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 14) {
|
||||
let toolbarResource = this._rdf.GetResource(BROWSER_DOCURL + "nav-bar");
|
||||
let collapsedResource = this._rdf.GetResource("collapsed");
|
||||
let isCollapsed = this._getPersist(toolbarResource, collapsedResource);
|
||||
if (isCollapsed == "true") {
|
||||
this._setPersist(toolbarResource, collapsedResource, "false");
|
||||
}
|
||||
}
|
||||
|
||||
if (this._dirty)
|
||||
this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
inside the private browsing mode -->
|
||||
<!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)">
|
||||
|
||||
<!ENTITY appmenu.title "Customize and Control &brandFullName;">
|
||||
|
||||
<!-- Tab context menu -->
|
||||
<!ENTITY reloadTab.label "Reload Tab">
|
||||
<!ENTITY reloadTab.accesskey "R">
|
||||
|
@ -68,7 +70,6 @@ can reach it easily. -->
|
|||
<!ENTITY menubarCmd.label "Menu Bar">
|
||||
<!ENTITY menubarCmd.accesskey "M">
|
||||
<!ENTITY navbarCmd.label "Navigation Toolbar">
|
||||
<!ENTITY navbarCmd.accesskey "N">
|
||||
<!ENTITY personalbarCmd.label "Bookmarks Toolbar">
|
||||
<!ENTITY personalbarCmd.accesskey "B">
|
||||
<!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
|
||||
|
@ -160,8 +161,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY bookmarksItem.title "Bookmarks">
|
||||
|
||||
<!-- Toolbar items -->
|
||||
<!ENTITY appMenuButton.label "Menu">
|
||||
<!ENTITY appMenuButton.tooltip "Open &brandShortName; menu">
|
||||
<!ENTITY homeButton.label "Home">
|
||||
|
||||
<!ENTITY tabGroupsButton.label "Tab Groups">
|
||||
|
@ -320,16 +319,10 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY showAllHistoryCmd2.label "Show All History">
|
||||
<!ENTITY showAllHistoryCmd.commandkey "H">
|
||||
|
||||
<!ENTITY appMenuEdit.label "Edit">
|
||||
<!ENTITY appMenuCustomize.label "Customize">
|
||||
<!ENTITY appMenuToolbarLayout.label "Toolbar Layout…">
|
||||
<!ENTITY appMenuSidebars.label "Sidebars">
|
||||
<!ENTITY appMenuFind.label "Find…">
|
||||
<!ENTITY appMenuUnsorted.label "Unsorted Bookmarks">
|
||||
<!ENTITY appMenuWebDeveloper.label "Web Developer">
|
||||
<!ENTITY appMenuGettingStarted.label "Getting Started">
|
||||
<!ENTITY appMenuSafeMode.label "Restart with Add-ons Disabled…">
|
||||
<!ENTITY appMenuSafeMode.accesskey "R">
|
||||
<!ENTITY appMenuBookmarks.label "Bookmarks">
|
||||
<!ENTITY appMenuHistory.label "History">
|
||||
<!ENTITY appMenuHistoryMore.label "More…">
|
||||
|
||||
<!ENTITY openCmd.commandkey "l">
|
||||
<!ENTITY urlbar.placeholder2 "Search or enter address">
|
||||
|
@ -541,6 +534,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY zoomOutButton.tooltip "Zoom out">
|
||||
<!ENTITY zoomInButton.tooltip "Zoom in">
|
||||
<!ENTITY zoomControls.label "Zoom Controls">
|
||||
<!ENTITY zoomReset.tooltip "Reset Zoom">
|
||||
|
||||
<!ENTITY quitApplicationCmdWin.label "Exit">
|
||||
<!ENTITY quitApplicationCmdWin.accesskey "x">
|
||||
|
@ -651,6 +645,13 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
|||
<!ENTITY social.learnMore.accesskey "l">
|
||||
<!ENTITY social.closeNotificationItem.label "Not Now">
|
||||
|
||||
|
||||
|
||||
<!ENTITY customizeMode.tabTitle "Customize &brandShortName;">
|
||||
<!ENTITY customizeMode.menuAndToolbars.label "Menu and toolbars">
|
||||
<!ENTITY customizeMode.menuAndToolbars.header "More Tools to Add to the Menu and Toolbar">
|
||||
<!ENTITY customizeMode.restoreDefaults "Restore Defaults">
|
||||
|
||||
<!ENTITY social.chatBar.commandkey "c">
|
||||
<!ENTITY social.chatBar.label "Focus chats">
|
||||
<!ENTITY social.chatBar.accesskey "c">
|
||||
|
|
|
@ -465,3 +465,6 @@ slowStartup.helpButton.label = Learn How to Speed It Up
|
|||
slowStartup.helpButton.accesskey = L
|
||||
slowStartup.disableNotificationButton.label = Don't Tell Me Again
|
||||
slowStartup.disableNotificationButton.accesskey = A
|
||||
|
||||
# LOCALIZATION NOTE(zoomReset.label): %S is the current zoom level.
|
||||
zoomReset.label = %S%%
|
||||
|
|
|
@ -47,45 +47,6 @@ this.webappsUI = {
|
|||
}
|
||||
},
|
||||
|
||||
openURL: function(aUrl, aOrigin) {
|
||||
let browserEnumerator = Services.wm.getEnumerator("navigator:browser");
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
// Check each browser instance for our URL
|
||||
let found = false;
|
||||
while (!found && browserEnumerator.hasMoreElements()) {
|
||||
let browserWin = browserEnumerator.getNext();
|
||||
let tabbrowser = browserWin.gBrowser;
|
||||
|
||||
// Check each tab of this browser instance
|
||||
let numTabs = tabbrowser.tabs.length;
|
||||
for (let index = 0; index < numTabs; index++) {
|
||||
let tab = tabbrowser.tabs[index];
|
||||
let appURL = ss.getTabValue(tab, "appOrigin");
|
||||
if (appURL == aOrigin) {
|
||||
// The URL is already opened. Select this tab.
|
||||
tabbrowser.selectedTab = tab;
|
||||
browserWin.focus();
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Our URL isn't open. Open it now.
|
||||
if (!found) {
|
||||
let recentWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (recentWindow) {
|
||||
// Use an existing browser window
|
||||
let browser = recentWindow.gBrowser;
|
||||
let tab = browser.addTab(aUrl);
|
||||
browser.pinTab(tab);
|
||||
browser.selectedTab = tab;
|
||||
ss.setTabValue(tab, "appOrigin", aOrigin);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_getBrowserForId: function(aId) {
|
||||
let content = Services.wm.getOuterWindowWithId(aId);
|
||||
if (content) {
|
||||
|
|
После Ширина: | Высота: | Размер: 247 B |
|
@ -0,0 +1,29 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%include linuxShared.inc
|
||||
%filter substitution
|
||||
|
||||
/*
|
||||
* LightweightThemeListener will append the current lightweight theme's header
|
||||
* image to the background-image for each of the following rulesets.
|
||||
*/
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
|
||||
background-attachment: scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: @fgTabTextureLWT@;/*, lwtHeader;*/
|
||||
background-position: 0 0, right top;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabTextureLWT@;/*,
|
||||
lwtHeader;*/
|
||||
background-position: 0 0, 0 0, right top;
|
||||
}
|
|
@ -10,12 +10,12 @@
|
|||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../shared/browser.inc
|
||||
%include linuxShared.inc
|
||||
%filter substitution
|
||||
%define toolbarHighlight rgba(255,255,255,.3)
|
||||
%define selectedTabHighlight rgba(255,255,255,.8) 1px, rgba(255,255,255,.5) 3px
|
||||
|
||||
%define forwardTransitionLength 150ms
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons], #nav-bar:not([currentset])[mode=icons]) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar_small window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][mode=icons][iconsize=small],#nav-bar:not([currentset])[mode=icons][iconsize=small]) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"], #nav-bar:not([currentset])) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar_small window:not([chromehidden~=toolbar]) :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"][iconsize=small],#nav-bar:not([currentset])[iconsize=small]) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbarWidth 32
|
||||
%define conditionalForwardWithUrlbarWidth_small 24
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
#main-window:not([disablechrome]) #navigator-toolbox[tabsontop=true] {
|
||||
#navigator-toolbox[tabsontop=true] {
|
||||
border-bottom: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,16 @@
|
|||
background-image: linear-gradient(@toolbarHighlight@, rgba(255,255,255,0));
|
||||
}
|
||||
|
||||
#nav-bar[tabsontop=true],
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar {
|
||||
box-shadow: 0 1px 0 @toolbarHighlight@ inset;
|
||||
margin-top: -1px; /* Move up 1px into the TabsToolbar */
|
||||
/* Position the toolbar above the bottom of background tabs */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#personal-bookmarks {
|
||||
min-height: 29px;
|
||||
}
|
||||
|
@ -96,7 +106,7 @@ toolbarbutton.bookmark-item[open="true"] {
|
|||
}
|
||||
|
||||
|
||||
/* Prevent [mode="icons"] from hiding the label */
|
||||
/* Force the display of the label for bookmarks */
|
||||
.bookmark-item > .toolbarbutton-text {
|
||||
display: -moz-box !important;
|
||||
}
|
||||
|
@ -218,7 +228,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
|
||||
}
|
||||
|
||||
#appmenu_newNavigator,
|
||||
#placesContext_open\:newwindow,
|
||||
#menu_newNavigator,
|
||||
#context-openlink,
|
||||
|
@ -227,8 +236,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
-moz-image-region: rect(0px 80px 16px 64px);
|
||||
}
|
||||
|
||||
#appmenu_newTab,
|
||||
#appmenu_newTab_popup,
|
||||
#placesContext_open\:newtab,
|
||||
#placesContext_openContainer\:tabs,
|
||||
#menu_newNavigatorTab,
|
||||
|
@ -238,7 +245,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
-moz-image-region: rect(0px 64px 16px 48px);
|
||||
}
|
||||
|
||||
#appmenu_openFile,
|
||||
#menu_openFile {
|
||||
list-style-image: url("moz-icon://stock/gtk-open?size=menu");
|
||||
}
|
||||
|
@ -255,7 +261,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-media-pause?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_savePage,
|
||||
#menu_savePage,
|
||||
#context-savelink,
|
||||
#context-saveimage,
|
||||
|
@ -266,19 +271,15 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-save-as?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_printPreview,
|
||||
#menu_printPreview {
|
||||
list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_print,
|
||||
#appmenu_print_popup,
|
||||
#menu_print,
|
||||
#context-printframe {
|
||||
list-style-image: url("moz-icon://stock/gtk-print?size=menu");
|
||||
}
|
||||
|
||||
#appmenu-quit,
|
||||
#menu_FileQuitItem {
|
||||
list-style-image: url("moz-icon://stock/gtk-quit?size=menu");
|
||||
}
|
||||
|
@ -361,7 +362,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-select-all?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_find,
|
||||
#menu_find {
|
||||
list-style-image: url("moz-icon://stock/gtk-find?size=menu");
|
||||
}
|
||||
|
@ -370,8 +370,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-find?size=menu&state=disabled");
|
||||
}
|
||||
|
||||
#appmenu_customize,
|
||||
#appmenu_preferences,
|
||||
#menu_preferences {
|
||||
list-style-image: url("moz-icon://stock/gtk-preferences?size=menu");
|
||||
}
|
||||
|
@ -454,15 +452,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-home?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_history,
|
||||
#appmenu_showAllHistory,
|
||||
#menu_showAllHistory {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
-moz-image-region: rect(0px 32px 16px 16px);
|
||||
}
|
||||
|
||||
#appmenu_bookmarks,
|
||||
#appmenu_showAllBookmarks,
|
||||
#bookmarksShowAll {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
-moz-image-region: rect(0px 48px 16px 32px);
|
||||
|
@ -488,13 +482,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
|
||||
}
|
||||
|
||||
#appmenu_downloads,
|
||||
#menu_openDownloads {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
-moz-image-region: rect(0px 16px 16px 0px);
|
||||
}
|
||||
|
||||
#appmenu_addons,
|
||||
#menu_openAddons {
|
||||
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png");
|
||||
}
|
||||
|
@ -505,8 +497,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-info?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_privateBrowsing,
|
||||
#appmenu_newPrivateWindow,
|
||||
#privateBrowsingItem {
|
||||
list-style-image: url("chrome://browser/skin/Privacy-16.png");
|
||||
}
|
||||
|
@ -515,18 +505,14 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
list-style-image: url("moz-icon://stock/gtk-properties?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_sanitizeHistory,
|
||||
#sanitizeItem {
|
||||
list-style-image: url("moz-icon://stock/gtk-clear?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_help,
|
||||
#appmenu_openHelp,
|
||||
#menu_openHelp {
|
||||
list-style-image: url("moz-icon://stock/gtk-help?size=menu");
|
||||
}
|
||||
|
||||
#appmenu_about,
|
||||
#aboutName {
|
||||
list-style-image: url("moz-icon://stock/gtk-about?size=menu");
|
||||
}
|
||||
|
@ -546,11 +532,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
|
|||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="full"] .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
padding: 5px;
|
||||
|
@ -1616,125 +1597,63 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
|||
|
||||
/* Tabstrip */
|
||||
|
||||
%include ../shared/tabs.inc.css
|
||||
|
||||
#tabbrowser-tabs {
|
||||
/* override the global style to allow the selected tab to be above the nav-bar */
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/*
|
||||
* Draw the bottom border of the tabstrip:
|
||||
*/
|
||||
#TabsToolbar::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
border-bottom: 1px solid hsla(0,0%,0%,.3);
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: menubar;
|
||||
color: -moz-menubartext;
|
||||
box-shadow: 0 -1px 0 rgba(0,0,0,.1) inset;
|
||||
}
|
||||
|
||||
#toolbar-menubar:not([autohide="true"]):not(:-moz-lwtheme):-moz-system-metric(menubar-drag),
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) > #tabbrowser-tabs > .tabbrowser-tab:not([selected]) {
|
||||
color: -moz-menubartext;
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop=false] {
|
||||
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
position: static;
|
||||
-moz-appearance: none;
|
||||
background: linear-gradient(hsla(0,0%,100%,.2), hsla(0,0%,45%,.2) 2px, hsla(0,0%,32%,.2) 80%);
|
||||
background-origin: border-box;
|
||||
background-position: 1px 2px;
|
||||
background-size: 100% calc(100% - 2px);
|
||||
background-repeat: no-repeat;
|
||||
color: inherit;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 4px 5px 3px 6px;
|
||||
border-style: solid;
|
||||
border-image: url(tabbrowser/tab.png) 4 5 3 6 fill repeat stretch;
|
||||
border-radius: 10px 8px 0 0;
|
||||
min-height: 25px; /* reserve space for the sometimes hidden close button */
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabTexture@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover,
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.2) 4px, hsla(0,0%,75%,.2) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
color: -moz-dialogtext;
|
||||
}
|
||||
|
||||
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, transparent 1px),
|
||||
linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
|
||||
linear-gradient(-moz-dialog, -moz-dialog);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:-moz-lwtheme {
|
||||
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%);
|
||||
.tabbrowser-tab:-moz-lwtheme {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.6), hsla(0,0%,40%,.6) 4px, hsla(0,0%,30%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,80%,.6), hsla(0,0%,60%,.6) 4px, hsla(0,0%,45%,.6) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.5), hsla(0,0%,60%,.5) 4px, hsla(0,0%,45%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext:hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.5), hsla(0,0%,80%,.5) 4px, hsla(0,0%,60%,.5) 80%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0));
|
||||
}
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
|
||||
background-image: linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,100%,.6) 2px, hsla(0,0%,75%,.2) 80%),
|
||||
radial-gradient(circle farthest-corner at 50% 3px, rgba(233,242,252,1) 3%, rgba(172,206,255,.75) 40%, rgba(87,151,201,.5) 80%, rgba(87,151,201,0));
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab > .tab-stack > .tab-content[pinned] {
|
||||
min-height: 18px; /* corresponds to the max. height of non-textual tab contents, i.e. the tab close button */
|
||||
}
|
||||
|
||||
.tabbrowser-tab:focus > .tab-stack {
|
||||
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
|
||||
outline: 1px dotted;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
-moz-margin-end: 3px;
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
}
|
||||
|
||||
.tab-throbber[pinned],
|
||||
.tab-icon-image[pinned],
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-margin-start: 2px;
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
#context_reloadTab {
|
||||
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
|
||||
}
|
||||
|
@ -1758,7 +1677,8 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
|||
/* Tab drag and drop */
|
||||
.tab-drop-indicator {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
|
||||
margin-bottom: -11px;
|
||||
margin-bottom: -9px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
/* In-tab close button */
|
||||
|
@ -1769,11 +1689,10 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
|||
}
|
||||
|
||||
.tab-close-button {
|
||||
padding: 0;
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
margin-top: -1px;
|
||||
margin-top: 0;
|
||||
margin-bottom: -1px;
|
||||
-moz-margin-end: -1px;
|
||||
-moz-margin-end: -4px;
|
||||
}
|
||||
|
||||
/* Tabstrip new tab button */
|
||||
|
@ -1894,10 +1813,6 @@ toolbarbutton.chevron > .toolbarbutton-icon {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
display: -moz-box; /* display chevron icon in text mode */
|
||||
}
|
||||
|
||||
/* Ctrl-Tab */
|
||||
|
||||
.ctrlTab-preview {
|
||||
|
@ -1935,44 +1850,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Application button menu */
|
||||
|
||||
.splitmenu-menuitem {
|
||||
-moz-margin-end: 1px;
|
||||
}
|
||||
|
||||
#appmenu-toolbar-button:not(:hover):not([open]):not(:-moz-lwtheme) {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#appmenu-toolbar-button > .toolbarbutton-text,
|
||||
#appmenu-toolbar-button > .toolbarbutton-menu-dropmarker {
|
||||
margin-top: -2px !important;
|
||||
margin-bottom: -2px !important;
|
||||
}
|
||||
#appmenuSecondaryPane {
|
||||
-moz-border-start: 1px solid ThreeDShadow;
|
||||
}
|
||||
#appmenuSecondaryPane-spacer {
|
||||
min-height: 1em;
|
||||
}
|
||||
#appmenu-cut,
|
||||
#appmenu-editmenu-cut {
|
||||
list-style-image: url("moz-icon://stock/gtk-cut?size=menu");
|
||||
}
|
||||
#appmenu-copy,
|
||||
#appmenu-editmenu-copy {
|
||||
list-style-image: url("moz-icon://stock/gtk-copy?size=menu");
|
||||
}
|
||||
#appmenu-paste,
|
||||
#appmenu-editmenu-paste {
|
||||
list-style-image: url("moz-icon://stock/gtk-paste?size=menu");
|
||||
}
|
||||
#wrapper-appmenu-toolbar-button,
|
||||
.appmenu-edit-button[disabled="true"] {
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
/* Add-on bar */
|
||||
|
||||
#addon-bar {
|
||||
|
@ -2282,6 +2159,27 @@ chatbox {
|
|||
border-top-right-radius: 2.5px;
|
||||
}
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
%include ../shared/customizableui/customizeMode.inc.css
|
||||
|
||||
#main-window[customizing] #tab-view-deck {
|
||||
background-image: url("chrome://browser/skin/customizableui/customizeMode-gridTexture.png"),
|
||||
url("chrome://browser/skin/customizableui/background-noise-toolbar.png"),
|
||||
linear-gradient(to bottom, #bcbcbc, #b5b5b5);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
#main-window[customizing] #tab-view-deck {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
#main-window[customizing] #tab-view-deck > #browser-panel {
|
||||
box-shadow: 0 0 3px #333;
|
||||
}
|
||||
|
||||
/* End customization mode */
|
||||
|
||||
.click-to-play-plugins-notification-content {
|
||||
margin: -10px;
|
||||
}
|
||||
|
|
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 118 B |
Двоичные данные
browser/themes/linux/customizableui/customizeMode-separatorHorizontal.png
Normal file
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
|
@ -0,0 +1,41 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
%define menuPanelWidth 23em
|
||||
|
||||
%include ../../shared/customizableui/panelUIOverlay.inc.css
|
||||
|
||||
#PanelUI-cut-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar");
|
||||
}
|
||||
#PanelUI-cut-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-copy-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar");
|
||||
}
|
||||
#PanelUI-copy-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-paste-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar");
|
||||
}
|
||||
#PanelUI-paste-btn[disabled="true"] {
|
||||
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled");
|
||||
}
|
||||
|
||||
#PanelUI-zoomOut-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-zoom-out?size=toolbar");
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn {
|
||||
list-style-image: url("moz-icon://stock/gtk-zoom-in?size=toolbar");
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
|
@ -18,8 +18,14 @@ browser.jar:
|
|||
skin/classic/browser/aboutSyncTabs.css
|
||||
#endif
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
skin/classic/browser/appmenu.png
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
|
||||
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
||||
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
||||
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
||||
* skin/classic/browser/engineManager.css
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-64.png
|
||||
|
@ -57,6 +63,7 @@ browser.jar:
|
|||
skin/classic/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/browser/webRTC-shareDevice-64.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
|
||||
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
skin/classic/browser/downloads/download-glow-small.png (downloads/download-glow-small.png)
|
||||
|
@ -113,8 +120,15 @@ browser.jar:
|
|||
skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png)
|
||||
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator.png)
|
||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
|
||||
%define toolbarHighlight rgba(255,255,255,.3)
|
||||
%define fgTabTexture linear-gradient(transparent 0px, transparent 2px, hsla(0,0%,100%,0.35) 2px, hsla(0,0%,100%,0.35) 3px, hsla(0,0%,100%,0.65) 3px, hsla(0,0%,100%,0.65) 4px, @toolbarHighlight@)
|
||||
%define fgTabTextureLWT @fgTabTexture@
|
||||
%define fgTabBackgroundMiddle @fgTabTexture@, linear-gradient(transparent 0px, transparent 2px, -moz-dialog 2px, -moz-dialog)
|
После Ширина: | Высота: | Размер: 96 B |
После Ширина: | Высота: | Размер: 721 B |
После Ширина: | Высота: | Размер: 161 B |
После Ширина: | Высота: | Размер: 705 B |
После Ширина: | Высота: | Размер: 192 B |
После Ширина: | Высота: | Размер: 473 B |
После Ширина: | Высота: | Размер: 483 B |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 247 B |
|
@ -0,0 +1,28 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%include shared.inc
|
||||
|
||||
/*
|
||||
* LightweightThemeListener will append the current lightweight theme's header
|
||||
* image to the background-image for each of the following rulesets.
|
||||
*/
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
|
||||
background-attachment: scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: @fgTabTextureLWT@;/*, lwtHeader;*/
|
||||
background-position: 0 0, right top;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle-lwtheme.png),
|
||||
@fgTabTextureLWT@;/*,
|
||||
lwtHeader;*/
|
||||
background-position: 0 0, 0 0, right top;
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
%include shared.inc
|
||||
%filter substitution
|
||||
%define forwardTransitionLength 150ms
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbar window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #nav-bar-customizationtarget > #unified-back-forward-button
|
||||
%define conditionalForwardWithUrlbarWidth 27
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
@ -18,19 +18,25 @@
|
|||
opacity: .9;
|
||||
}
|
||||
|
||||
#navigator-toolbox::after {
|
||||
-moz-box-ordinal-group: 101; /* tabs toolbar is 100 */
|
||||
background-image: linear-gradient(to top, hsla(0,0%,0%,.15), hsla(0,0%,0%,.15) 1px, hsla(0,0%,100%,.15) 1px, hsla(0,0%,100%,.15) 2px, transparent 3px);
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
height: 2px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
#navigator-toolbox[tabsontop=false]::after {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#navigator-toolbox toolbarbutton:-moz-lwtheme {
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
|
||||
#PersonalToolbar:-moz-lwtheme,
|
||||
#nav-bar:-moz-lwtheme,
|
||||
#main-window[privatebrowsingmode=temporary] #nav-bar[tabsontop=false] {
|
||||
-moz-appearance: none !important;
|
||||
background: none !important;
|
||||
/* Switching to a lightweight theme shouldn't move the content area,
|
||||
so avoid changing border widths here. */
|
||||
border-color: transparent !important;
|
||||
}
|
||||
|
||||
#main-window {
|
||||
|
@ -38,13 +44,20 @@
|
|||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
#titlebar-buttonbox-container,
|
||||
#main-window:not([drawintitlebar=true]) > #titlebar {
|
||||
#titlebar-buttonbox > .titlebar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#titlebar {
|
||||
height: 22px;
|
||||
padding-top: 9px;
|
||||
}
|
||||
|
||||
#main-window[chromehidden~="toolbar"] > #titlebar {
|
||||
padding-top: 22px;
|
||||
}
|
||||
|
||||
#main-window:not(:-moz-lwtheme):not([privatebrowsingmode=temporary]) > #titlebar {
|
||||
-moz-appearance: -moz-window-titlebar;
|
||||
}
|
||||
|
||||
#main-window[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
|
||||
|
@ -62,41 +75,34 @@ toolbarseparator {
|
|||
min-height: 22px;
|
||||
}
|
||||
|
||||
/* We need more height when toolbar buttons show both icon and text. */
|
||||
toolbar[mode="full"] toolbarseparator {
|
||||
min-height: 36px;
|
||||
toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):not(#nav-bar):not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%);
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
padding-bottom: 4px !important;
|
||||
}
|
||||
|
||||
#PersonalToolbar {
|
||||
-moz-appearance: none;
|
||||
margin-top: -2px; /* overlay the bottom border of the toolbar above us */
|
||||
padding-top: 1px !important;
|
||||
background-color: -moz-mac-chrome-active;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.57);
|
||||
}
|
||||
|
||||
#nav-bar[tabsontop=true],
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar {
|
||||
-moz-appearance: none;
|
||||
margin-top: 0; /* don't overlay the bottom border of the tabs toolbar */
|
||||
padding-top: 4px !important;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.57);
|
||||
background-color: -moz-mac-chrome-active;
|
||||
background-image: linear-gradient(rgba(255,255,255,.43), rgba(255,255,255,0)) !important; /* override lwtheme style */
|
||||
background: url(chrome://browser/skin/Toolbar-background-noise.png),
|
||||
linear-gradient(hsl(0,0%,93%), hsl(0,0%,83%));
|
||||
background-clip: border-box;
|
||||
background-origin: border-box !important;
|
||||
box-shadow: inset 0 1px 0 hsla(0,0%,100%,.4);
|
||||
margin-top: -1px;
|
||||
/* Position the toolbar above the bottom of background tabs */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#PersonalToolbar:-moz-lwtheme,
|
||||
#nav-bar[tabsontop=true]:-moz-lwtheme,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:-moz-lwtheme,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:-moz-lwtheme {
|
||||
background-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
#navigator-toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):-moz-lwtheme {
|
||||
background-color: @toolbarColorLWT@;
|
||||
background-image: url(chrome://browser/skin/Toolbar-background-noise.png);
|
||||
}
|
||||
|
||||
#PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
|
@ -104,7 +110,6 @@ toolbar[mode="full"] toolbarseparator {
|
|||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.32);
|
||||
}
|
||||
|
||||
/* ----- BOOKMARK TOOLBAR ----- */
|
||||
|
@ -123,10 +128,6 @@ toolbarbutton.chevron > .toolbarbutton-text {
|
|||
display: none;
|
||||
}
|
||||
|
||||
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
|
||||
display: -moz-box; /* display chevron icon in text mode */
|
||||
}
|
||||
|
||||
toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
@ -172,7 +173,7 @@ toolbarbutton.bookmark-item {
|
|||
}
|
||||
|
||||
.bookmark-item > .toolbarbutton-text {
|
||||
display: -moz-box !important; /* prevent [mode="icons"] from hiding the label */
|
||||
display: -moz-box !important; /* Force the display of the label for bookmarks */
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
|
@ -433,30 +434,12 @@ toolbarbutton.bookmark-item > menupopup {
|
|||
}
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
height: auto;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
#restore-button {
|
||||
min-width: 28px;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
|
||||
margin: 2px;
|
||||
|
@ -519,11 +502,6 @@ toolbar:not([mode="icons"]) #restore-button {
|
|||
-moz-border-start: none !important;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
width: auto;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
border-top-left-radius: 0;
|
||||
|
@ -536,36 +514,32 @@ toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmar
|
|||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([open="true"]) > .toolbarbutton-menubutton-dropmarker {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-text,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
|
||||
margin: 2px 0 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"])[open="true"]:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover:-moz-lwtheme,
|
||||
toolbar[mode="icons"] .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme,
|
||||
toolbar[mode="icons"] #restore-button:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover:-moz-lwtheme,
|
||||
.toolbarbutton-1:not([type="menu-button"])[open="true"]:-moz-lwtheme,
|
||||
.toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover:-moz-lwtheme,
|
||||
.toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme,
|
||||
#restore-button:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
text-shadow: @loweredShadow@;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
box-shadow: inset 0 2px 5px rgba(0,0,0,0.6), 0 1px rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:-moz-lwtheme {
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
box-shadow: inset 0 2px 5px rgba(0,0,0,0.7), 0 1px rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
.toolbarbutton-1:not([type="menu-button"]):not(#fullscreen-button)[checked="true"]:not([disabled="true"]):active:hover:-moz-lwtheme {
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 1px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
|
||||
.toolbarbutton-1 > menupopup {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
@ -582,42 +556,42 @@ toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
|
|||
|
||||
#back-button,
|
||||
#forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 40px, 20px, 20px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#back-button,
|
||||
#forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 80px, 40px, 40px);
|
||||
}
|
||||
}
|
||||
|
||||
#forward-button,
|
||||
#back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 60px, 20px, 40px);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#forward-button,
|
||||
#back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
-moz-image-region: rect(0, 120px, 40px, 80px);
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
toolbar[mode="icons"] #back-button:-moz-locale-dir(rtl):-moz-lwtheme,
|
||||
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:-moz-locale-dir(rtl),
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
|
||||
#back-button:-moz-locale-dir(rtl):-moz-lwtheme,
|
||||
#forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button {
|
||||
-moz-appearance: none;
|
||||
-moz-margin-end: -7px;
|
||||
position: relative;
|
||||
|
@ -630,12 +604,12 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
|||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button {
|
||||
-moz-image-region: rect(0, 40px, 40px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
height: 31px;
|
||||
padding: 4px 5px 5px 3px;
|
||||
margin-bottom: -1px;
|
||||
|
@ -644,32 +618,32 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
|
|||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not(:-moz-lwtheme) {
|
||||
background-image: url(chrome://browser/skin/keyhole-circle@2x.png);
|
||||
background-size: 90px;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-window-inactive:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:-moz-window-inactive:not(:-moz-lwtheme) {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):active:hover:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"]:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button:not([disabled="true"]):active:hover:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #back-button[open="true"]:not(:-moz-lwtheme) {
|
||||
background-position: -30px 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #forward-button {
|
||||
#forward-button {
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button > .toolbarbutton-icon {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button > .toolbarbutton-icon {
|
||||
/* shift the icon away from the back button */
|
||||
margin-left: 3px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button {
|
||||
#navigator-toolbox[iconsize="large"] > #nav-bar #forward-button {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-keyhole-forward-clip-path);
|
||||
}
|
||||
|
||||
|
@ -738,25 +712,25 @@ toolbar[mode="icons"] #forward-button {
|
|||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #forward-button {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #forward-button {
|
||||
width: 27px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #forward-button:-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #forward-button:-moz-lwtheme {
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #forward-button:-moz-lwtheme {
|
||||
#forward-button:-moz-lwtheme {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #back-button {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #back-button {
|
||||
-moz-margin-end: 0;
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar #back-button:-moz-lwtheme {
|
||||
#navigator-toolbox[iconsize="small"] > #nav-bar #back-button:-moz-lwtheme {
|
||||
padding-right: 2px;
|
||||
border-right-width: 0;
|
||||
border-top-right-radius: 0;
|
||||
|
@ -1074,11 +1048,11 @@ toolbar[mode="icons"] #forward-button:-moz-lwtheme {
|
|||
}
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #zoom-out-button {
|
||||
#zoom-out-button {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] #zoom-in-button {
|
||||
#zoom-in-button {
|
||||
-moz-border-start: none;
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
|
@ -2190,19 +2164,12 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
%include ../shared/tabs.inc.css
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
.tab-label {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
|
@ -2221,251 +2188,55 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
}
|
||||
|
||||
.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected="true"]) {
|
||||
opacity: .8;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.tab-label:not([selected="true"]) {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([pinned]):not([fadein]) {
|
||||
transition: min-width 200ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
max-width 250ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
opacity 50ms ease-out 100ms /* hide the tab for the last 100ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tab-stack {
|
||||
/* ensure stable tab height with and without toolbarbuttons on the tab bar */
|
||||
height: 26px;
|
||||
max-width 230ms ease-out /* copied from browser/base/content/browser.css */,
|
||||
opacity 50ms ease-out 80ms /* hide the tab for the last 100ms of the max-width transition */;
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
font: message-box;
|
||||
font-weight: bold;
|
||||
text-shadow: @loweredShadow@;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
%define TABSONTOP_TAB #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab
|
||||
%define TABSONBOTTOM_TAB #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab
|
||||
%define TABSONTOP_TAB_STACK #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab > .tab-stack
|
||||
%define TABSONBOTTOM_TAB_STACK #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab > .tab-stack
|
||||
.tabbrowser-tab {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
%define TABSONTOP_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
|
||||
%define TABSONBOTTOM_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background:not([selected="true"]):not(:-moz-lwtheme) {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background:not([selected="true"]) {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.tab-background,
|
||||
.tab-content,
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-margin-start: -5px;
|
||||
-moz-margin-end: -4px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs[closebuttons="hidden"] > * > * > * > .tab-close-button:not([pinned]) {
|
||||
display: -moz-box;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 4px;
|
||||
}
|
||||
|
||||
.tab-content,
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
-moz-box-align: center;
|
||||
border: solid transparent;
|
||||
border-width: 0 11px;
|
||||
}
|
||||
|
||||
.tab-background-start,
|
||||
.tab-background-end {
|
||||
width: 12px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
.tab-background-middle {
|
||||
-moz-box-flex: 1;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(ltr),
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-ontop-left-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(ltr),
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-ontop-right-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(ltr),
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-onbottom-left-curve-clip-path);
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-end:-moz-locale-dir(ltr),
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-start:-moz-locale-dir(rtl) {
|
||||
clip-path: url(chrome://browser/content/browser.xul#osx-tab-onbottom-right-curve-clip-path);
|
||||
}
|
||||
|
||||
.tab-background-start[selected="true"]:not(:-moz-lwtheme),
|
||||
.tab-background-middle[selected="true"]:not(:-moz-lwtheme),
|
||||
.tab-background-end[selected="true"]:not(:-moz-lwtheme) {
|
||||
background-color: -moz-mac-chrome-active;
|
||||
}
|
||||
|
||||
.tab-background-start[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
.tab-background-middle[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive,
|
||||
.tab-background-end[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background-color: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
.tab-background-start[pinned][titlechanged]:not([selected="true"]),
|
||||
.tab-background-end[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: linear-gradient(rgba(148,205,253,.2), rgba(148,205,253,.2)) !important;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-background > .tab-background-middle[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 99%, rgba(254,254,255,1) 3%, rgba(210,235,255,.9) 12%, rgba(148,205,253,.6) 30%, rgba(148,205,253,.2) 70%);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-background > .tab-background-middle[pinned][titlechanged]:not([selected="true"]) {
|
||||
background-image: radial-gradient(circle farthest-corner at 50% 2px, rgba(254,254,255,1) 3%, rgba(210,235,255,.9) 12%, rgba(148,205,253,.6) 30%, rgba(148,205,253,.2) 70%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle:-moz-lwtheme-brighttext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end:-moz-lwtheme-brighttext:not([selected="true"]) {
|
||||
background-image: linear-gradient(hsla(0,0%,40%,.6), hsla(0,0%,30%,.6) 50%);
|
||||
}
|
||||
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle:-moz-lwtheme-darktext:not([selected="true"]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end:-moz-lwtheme-darktext:not([selected="true"]) {
|
||||
background-image: linear-gradient(hsla(0,0%,60%,.5), hsla(0,0%,45%,.5) 50%);
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content,
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-normal-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONTOP_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-hover-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-selected-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content,
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content,
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-normal-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONTOP_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-hover-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-top-selected-active@2x.png) 0 22 fill repeat stretch;
|
||||
}
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB@:hover > .tab-stack > .tab-content:not([selected="true"]),
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@:hover > .toolbarbutton-icon {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content[selected="true"] {
|
||||
border-image: url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png) 0 11 fill repeat stretch;
|
||||
}
|
||||
|
||||
/* preloading hack */
|
||||
#TabsToolbar::after {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
#TabsToolbar::after {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-normal-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-hover-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-top-selected-active@2x.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-normal-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-hover-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-bottom-selected-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png),
|
||||
url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png);
|
||||
}
|
||||
}
|
||||
|
||||
.tabbrowser-tab:focus > .tab-stack {
|
||||
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
|
||||
box-shadow: @focusRingShadow@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([selected="true"]):not(:hover):not(:-moz-lwtheme) {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
color: #000;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme {
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
|
||||
#main-window:not([privatebrowsingmode=temporary]) #navigator-toolbox[tabsontop="true"]:not(:-moz-lwtheme)::before {
|
||||
#main-window:not([privatebrowsingmode=temporary]):not([customizing]):not([customize-exiting]) #navigator-toolbox[tabsontop="true"]:not(:-moz-lwtheme)::before {
|
||||
/* We want the titlebar to be unified, but we still want to be able
|
||||
* to give #TabsToolbar a background. So we can't set -moz-appearance:
|
||||
* toolbar on #TabsToolbar itself. Instead, we set it on a box of the
|
||||
|
@ -2474,13 +2245,13 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
content: '';
|
||||
display: block;
|
||||
-moz-appearance: toolbar;
|
||||
height: 25px;
|
||||
margin-bottom: -25px;
|
||||
height: calc(@tabHeight@ + 1px);
|
||||
margin-bottom: calc(-1px - @tabHeight@);
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
position: relative;
|
||||
-moz-appearance: none;
|
||||
height: 26px;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
|
@ -2489,59 +2260,40 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* For tabs-on-top, only fill the bottom 2px with the chrome background
|
||||
* color, so that the borders in tabbar-top-bg-*.png can mix with it.
|
||||
* In the top 24px the unified toolbar (from the ::before above) will show.
|
||||
/*
|
||||
* Draw the bottom border of the tabstrip:
|
||||
*/
|
||||
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme) {
|
||||
padding-bottom: 2px;
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png),
|
||||
linear-gradient(to top, -moz-mac-chrome-active 2px, transparent 2px);
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png),
|
||||
linear-gradient(to top, -moz-mac-chrome-inactive 2px, transparent 2px);
|
||||
#TabsToolbar::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
border-bottom: 1px solid hsla(0,0%,0%,.3);
|
||||
}
|
||||
|
||||
/* In tabs-on-bottom mode, fill the whole toolbar with the chrome
|
||||
* background color.
|
||||
*/
|
||||
#TabsToolbar[tabsontop="false"]:not(:-moz-lwtheme) {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-active.png) -moz-mac-chrome-active;
|
||||
background: -moz-mac-chrome-active;
|
||||
}
|
||||
|
||||
#TabsToolbar[tabsontop="false"]:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
background: url(chrome://browser/skin/tabbrowser/tabbar-bottom-bg-inactive.png) -moz-mac-chrome-inactive;
|
||||
background: -moz-mac-chrome-inactive;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs {
|
||||
-moz-box-align: stretch;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox:not(:-moz-lwtheme) {
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[tabsontop="false"] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
@TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
padding: 4px 0 2px;
|
||||
}
|
||||
|
||||
@TABSONTOP_TAB_STACK@ > .tab-content {
|
||||
padding-top: 2px;
|
||||
padding: 6px 0 4px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon {
|
||||
padding: 2px 0 4px;
|
||||
}
|
||||
|
||||
@TABSONBOTTOM_TAB_STACK@ > .tab-content {
|
||||
padding-bottom: 2px;
|
||||
padding: 4px 0 6px;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2550,7 +2302,8 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
|
||||
.tab-drop-indicator {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
|
||||
margin-bottom: -8px;
|
||||
margin-top: -2px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
|
@ -2572,8 +2325,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
list-style-image: url("chrome://global/skin/icons/close.png");
|
||||
-moz-appearance: none;
|
||||
border: none !important;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
cursor: default;
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
|
@ -3891,6 +3642,49 @@ chatbox {
|
|||
border-top-right-radius: @toolbarbuttonCornerRadius@;
|
||||
}
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
%include ../shared/customizableui/customizeMode.inc.css
|
||||
|
||||
#main-window[customizing] #titlebar {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#main-window[customizing] #tab-view-deck {
|
||||
padding: 28px 2em 2em;
|
||||
}
|
||||
|
||||
#main-window[customizing] #tab-view-deck,
|
||||
#main-window[customize-exiting] #tab-view-deck {
|
||||
background-image: url("chrome://browser/skin/customizableui/customizeMode-gridTexture.png"),
|
||||
url("chrome://browser/skin/customizableui/background-noise-toolbar.png"),
|
||||
linear-gradient(to bottom, rgb(233,233,233), rgb(178,178,178) 21px);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
#main-window[customizing] #navigator-toolbox > toolbar:not(#TabsToolbar),
|
||||
#main-window[customizing] #customization-container {
|
||||
border: 3px solid hsla(0,0%,0%,.1);
|
||||
border-top-width: 0;
|
||||
background-clip: padding-box;
|
||||
background-origin: padding-box;
|
||||
-moz-border-right-colors: hsla(0,0%,0%,.05) hsla(0,0%,0%,.1) hsla(0,0%,0%,.2);
|
||||
-moz-border-bottom-colors: hsla(0,0%,0%,.05) hsla(0,0%,0%,.1) hsla(0,0%,0%,.2);
|
||||
-moz-border-left-colors: hsla(0,0%,0%,.05) hsla(0,0%,0%,.1) hsla(0,0%,0%,.2);
|
||||
}
|
||||
|
||||
#main-window[customizing] #navigator-toolbox > toolbar:not(#TabsToolbar) {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
#main-window[customizing] #TabsToolbar {
|
||||
background-clip: padding-box;
|
||||
border-right: 3px solid transparent;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
/* End customization mode */
|
||||
|
||||
panel[type="arrow"][popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="top"],
|
||||
panel[type="arrow"][popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="bottom"] {
|
||||
list-style-image: url("chrome://global/skin/arrow/panelarrow-light-vertical.png");
|
||||
|
|
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 118 B |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
|
@ -0,0 +1,57 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
%filter substitution
|
||||
%define menuPanelWidth 26em
|
||||
|
||||
%include ../../shared/customizableui/panelUIOverlay.inc.css
|
||||
|
||||
.PanelUI-pageControls toolbarbutton {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
.PanelUI-pageControls toolbarbutton:not(:first-child) {
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
.PanelUI-pageControls toolbarbutton:not(:last-child) {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
.PanelUI-pageControls toolbarbutton:not(:first-child):not(:last-child) {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#PanelUI-cut-btn {
|
||||
-moz-image-region: rect(0, 260px, 20px, 240px);
|
||||
}
|
||||
#PanelUI-copy-btn {
|
||||
-moz-image-region: rect(0, 280px, 20px, 260px);
|
||||
}
|
||||
#PanelUI-paste-btn {
|
||||
-moz-image-region: rect(0, 300px, 20px, 280px);
|
||||
}
|
||||
|
||||
#PanelUI-zoomOut-btn {
|
||||
-moz-image-region: rect(0, 400px, 20px, 380px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
#PanelUI-zoomIn-btn {
|
||||
-moz-image-region: rect(0, 420px, 20px, 400px);
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.PanelUI-editControls #PanelUI-copy-btn,
|
||||
.PanelUI-zoomControls #PanelUI-zoomReset-btn {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomOut-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomReset-btn .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
|
@ -18,8 +18,14 @@ browser.jar:
|
|||
#endif
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
skin/classic/browser/actionicon-tab@2x.png
|
||||
skin/classic/browser/appmenu.png
|
||||
* skin/classic/browser/browser.css (browser.css)
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
|
||||
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
||||
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
||||
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
skin/classic/browser/Geolocation-16@2x.png
|
||||
|
@ -94,6 +100,7 @@ browser.jar:
|
|||
skin/classic/browser/webRTC-shareDevice-64@2x.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16@2x.png
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
|
||||
skin/classic/browser/downloads/buttons@2x.png (downloads/buttons@2x.png)
|
||||
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
|
||||
|
@ -182,26 +189,25 @@ browser.jar:
|
|||
skin/classic/browser/tabbrowser/connecting@2x.png (tabbrowser/connecting@2x.png)
|
||||
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
|
||||
skin/classic/browser/tabbrowser/loading@2x.png (tabbrowser/loading@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle.png (tabbrowser/tab-active-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-active-middle-lwtheme.png (tabbrowser/tab-active-middle-lwtheme.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-left@2x.png (tabbrowser/tab-arrow-left@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-right.png (tabbrowser/tab-arrow-right.png)
|
||||
skin/classic/browser/tabbrowser/tab-arrow-right@2x.png (tabbrowser/tab-arrow-right@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-end.png (tabbrowser/tab-background-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
|
||||
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-end.png (tabbrowser/tab-stroke-end.png)
|
||||
skin/classic/browser/tabbrowser/tab-stroke-start.png (tabbrowser/tab-stroke-start.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-bottom-bg-active.png (tabbrowser/tabbar-bottom-bg-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-bottom-bg-inactive.png (tabbrowser/tabbar-bottom-bg-inactive.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-normal-active.png (tabbrowser/tab-bottom-normal-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-hover-active.png (tabbrowser/tab-bottom-hover-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-bottom-selected-active.png (tabbrowser/tab-bottom-selected-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-top-bg-active.png (tabbrowser/tabbar-top-bg-active.png)
|
||||
skin/classic/browser/tabbrowser/tabbar-top-bg-inactive.png (tabbrowser/tabbar-top-bg-inactive.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-normal-active.png (tabbrowser/tab-top-normal-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-normal-active@2x.png (tabbrowser/tab-top-normal-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-hover-active.png (tabbrowser/tab-top-hover-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-hover-active@2x.png (tabbrowser/tab-top-hover-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-selected-active.png (tabbrowser/tab-top-selected-active.png)
|
||||
skin/classic/browser/tabbrowser/tab-top-selected-active@2x.png (tabbrowser/tab-top-selected-active@2x.png)
|
||||
skin/classic/browser/tabbrowser/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator@2x.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tab-separator.png (tabbrowser/tab-separator.png)
|
||||
skin/classic/browser/tabview/close.png (tabview/close.png)
|
||||
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png)
|
||||
skin/classic/browser/tabview/search.png (tabview/search.png)
|
||||
|
@ -322,6 +328,7 @@ browser.jar:
|
|||
skin/classic/browser/keyhole-circle@2x.png (keyhole-circle-lion@2x.png)
|
||||
skin/classic/browser/lion/Toolbar.png (Toolbar-lion.png)
|
||||
skin/classic/browser/Toolbar@2x.png (Toolbar-lion@2x.png)
|
||||
skin/classic/browser/Toolbar-background-noise.png (Toolbar-background-noise.png)
|
||||
skin/classic/browser/lion/toolbarbutton-dropmarker.png (toolbarbutton-dropmarker-lion.png)
|
||||
skin/classic/browser/toolbarbutton-dropmarker@2x.png (toolbarbutton-dropmarker-lion@2x.png)
|
||||
skin/classic/browser/lion/tabbrowser/alltabs-box-bkgnd-icon.png (tabbrowser/alltabs-box-bkgnd-icon-lion.png)
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
%include ../../../toolkit/themes/osx/global/shared.inc
|
||||
%include ../shared/browser.inc
|
||||
|
||||
%define fgTabTexture linear-gradient(hsla(0,0%,100%,0.6), hsla(0,0%,100%,0.6) 0px, hsl(0,0%,99%) 1px, hsl(0,0%,92%))
|
||||
%define toolbarColorLWT rgba(253,253,253,0.45)
|
||||
%define fgTabTextureLWT linear-gradient(transparent, transparent 2px, rgba(254,254,254,0.72) 2px, @toolbarColorLWT@)
|
||||
%define fgTabBackgroundMiddle linear-gradient(transparent, transparent)
|
||||
%define hudButton -moz-appearance: none; color: #434343; border-radius: 4px; border: 1px solid #b5b5b5; background: linear-gradient(#fff, #f2f2f2); box-shadow: inset 0 1px rgba(255,255,255,.8), inset 0 0 1px rgba(255,255, 255,.25), 0 1px rgba(255,255,255,.3); background-clip: padding-box; background-origin: padding-box; padding: 2px 6px;
|
||||
%define hudButtonPressed box-shadow: inset 0 1px 4px -3px #000, 0 1px rgba(255,255,255,.3);
|
||||
%define hudButtonFocused box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 2px 1px -moz-mac-focusring;
|
||||
|
|
После Ширина: | Высота: | Размер: 148 B |
После Ширина: | Высота: | Размер: 227 B |
После Ширина: | Высота: | Размер: 677 B |
После Ширина: | Высота: | Размер: 153 B |
После Ширина: | Высота: | Размер: 657 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-bottom-hover-active.png
До Ширина: | Высота: | Размер: 422 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-bottom-normal-active.png
До Ширина: | Высота: | Размер: 405 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-bottom-selected-active.png
До Ширина: | Высота: | Размер: 487 B |
После Ширина: | Высота: | Размер: 159 B |
После Ширина: | Высота: | Размер: 3.0 KiB |
После Ширина: | Высота: | Размер: 433 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-hover-active.png
До Ширина: | Высота: | Размер: 466 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-hover-active@2x.png
До Ширина: | Высота: | Размер: 891 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-normal-active.png
До Ширина: | Высота: | Размер: 520 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-normal-active@2x.png
До Ширина: | Высота: | Размер: 968 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-selected-active.png
До Ширина: | Высота: | Размер: 611 B |
Двоичные данные
browser/themes/osx/tabbrowser/tab-top-selected-active@2x.png
До Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,103 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Customization mode */
|
||||
|
||||
#tab-view-deck {
|
||||
transition-property: padding;
|
||||
transition-duration: 150ms;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
|
||||
#main-window[customizing] .customization-target,
|
||||
#main-window[customizing] #customization-panelHolder > #PanelUI-mainView {
|
||||
border: 1px dashed transparent;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
#main-window[customizing-movingItem] .customization-target,
|
||||
#main-window[customizing-movingItem] #customization-panelHolder > #PanelUI-mainView {
|
||||
border-color: #bbb;
|
||||
}
|
||||
|
||||
#main-window[customizing] .customization-target {
|
||||
min-width: 100px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#customization-container {
|
||||
background-color: rgb(247,247,247);
|
||||
}
|
||||
|
||||
#customization-palette-container {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
#customization-header {
|
||||
font-size: 1.5em;
|
||||
line-height: 1.5em;
|
||||
color: rgb(64,100,128);
|
||||
font-weight: lighter;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#customization-panel-container {
|
||||
padding: 15px 25px 25px;
|
||||
background-image: url("chrome://browser/skin/customizableui/customizeMode-separatorHorizontal.png"),
|
||||
url("chrome://browser/skin/customizableui/customizeMode-separatorVertical.png"),
|
||||
url("chrome://browser/skin/customizableui/customizeMode-gridTexture.png"),
|
||||
url("chrome://browser/skin/customizableui/background-noise-toolbar.png"),
|
||||
linear-gradient(to bottom, #3e86ce, #3878ba);
|
||||
background-position: center top, left center, left top, left top, left top;
|
||||
background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
|
||||
background-size: auto 12px, 12px 100%, auto, auto, auto;
|
||||
background-attachment: scroll, scroll, fixed, fixed, scroll;
|
||||
|
||||
}
|
||||
|
||||
#customization-panelWrapper > .panel-arrowcontent {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
toolbarpaletteitem {
|
||||
cursor: -moz-grab;
|
||||
transition: transform, background-color, border-color, box-shadow;
|
||||
transition-duration: 50ms, 10ms, 10ms, 10ms;
|
||||
transition-timing-function: ease-in-out, linear, linear, linear;
|
||||
}
|
||||
|
||||
toolbarpaletteitem[mousedown] {
|
||||
box-shadow: inset 0 0 3px hsl(204,100%,40%);
|
||||
cursor: -moz-grabbing;
|
||||
opacity: 0.8;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
#customization-palette {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
min-height: 3em;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
#customization-palette > toolbarpaletteitem {
|
||||
width: 110px;
|
||||
height: 94px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#customization-palette .toolbarpaletteitem-box {
|
||||
-moz-box-pack: center;
|
||||
-moz-box-flex: 1;
|
||||
width: 110px;
|
||||
max-width: 110px;
|
||||
}
|
||||
|
||||
#customization-palette > toolbarpaletteitem > label {
|
||||
text-align: center;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
panelmultiview {
|
||||
-moz-binding: url("chrome://browser/content/customizableui/panelUI.xml#panelmultiview");
|
||||
}
|
||||
|
||||
panelmainview,
|
||||
panelsubview {
|
||||
display: -moz-box;
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
panelmainview {
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
panelmultiview > panelsubview:not([current]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel-subviews {
|
||||
background-image: linear-gradient(to bottom, white 1px, rgba(255, 255, 255, 0) 15px);
|
||||
background-color: -moz-dialog;
|
||||
box-shadow: -1px 0px 0px rgba(0, 0, 0, 0.2), -1px 0px 2px rgba(0, 0, 0, 0.1), 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
|
||||
margin-left: 38px;
|
||||
}
|
||||
|
||||
.panel-viewstack[view="main"] > .panel-subviews {
|
||||
transform: translateX(@menuPanelWidth@);
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] > toolbarbutton {
|
||||
-moz-binding: url("chrome://browser/content/panelUI.xml#toolbarbutton");
|
||||
}
|
||||
|
||||
#app-extension-point-end > #PanelUI-menu-button {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
#app-extension-point-end > #PanelUI-menu-button .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
#app-extension-point-end > #PanelUI-menu-button .toolbarbutton-icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#PanelUI-popup > arrowscrollbox > autorepeatbutton {
|
||||
display: none;
|
||||
}
|
||||
#PanelUI-popup > arrowscrollbox > scrollbox {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#PanelUI-popup > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#PanelUI-menu-button > .toolbarbutton-icon {
|
||||
list-style-image: url("chrome://browser/skin/appmenu.png");
|
||||
}
|
||||
|
||||
#PanelUI-menu-button {
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
#PanelUI-mainView .toolbarbutton-text {
|
||||
display: -moz-box;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls {
|
||||
padding: 1em 0 0;
|
||||
}
|
||||
|
||||
.PanelUI-footer,
|
||||
.PanelUI-editControls,
|
||||
.PanelUI-zoomControls,
|
||||
#PanelUI-contents,
|
||||
.PanelUI-footer,
|
||||
#customizationui-widget-panel {
|
||||
max-width: @menuPanelWidth@;
|
||||
padding: .5em 1em;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton > .toolbarbutton-text,
|
||||
panelsubview toolbarbutton > .toolbarbutton-text,
|
||||
#customizationui-widget-panel toolbarbutton > .toolbarbutton-text {
|
||||
text-align: start;
|
||||
-moz-padding-start: 8px;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton .toolbarbutton-acceltext {
|
||||
font-size: calc(5em / 6);
|
||||
color: GrayText;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="list"] toolbarbutton .toolbarbutton-icon {
|
||||
min-width: 2em;
|
||||
max-width: 2em;
|
||||
min-height: 2em;
|
||||
max-height: 2em;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls toolbarbutton {
|
||||
min-width: 7em;
|
||||
}
|
||||
|
||||
.PanelUI-pageControls toolbarbutton > .toolbarbutton-icon {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] toolbarbutton,
|
||||
#customization-palette toolbarbutton {
|
||||
-moz-appearance: none;
|
||||
-moz-box-orient: vertical;
|
||||
min-width: 7em;
|
||||
max-width: 7em;
|
||||
min-height: 6em;
|
||||
max-height: 6em;
|
||||
}
|
||||
|
||||
#PanelUI-contents[type="grid"] toolbarbutton > .toolbarbutton-icon,
|
||||
#customization-palette toolbarbutton > .toolbarbutton-icon {
|
||||
min-width: calc(8em / 3);
|
||||
max-width: calc(8em / 3);
|
||||
min-height: calc(8em / 3);
|
||||
max-height: calc(8em / 3);
|
||||
margin: calc(5em / 12);
|
||||
}
|
||||
|
||||
.PanelUI-editControls #PanelUI-copy-btn,
|
||||
.PanelUI-zoomControls #PanelUI-zoomReset-btn {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#PanelUI-zoomIn-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomOut-btn .toolbarbutton-text,
|
||||
#PanelUI-zoomReset-btn .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.PanelUI-footer {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-top: 1px solid rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.PanelUI-footer toolbarbutton > .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#PanelUI-help-btn {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#customization-palette .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
panelmainview toolbarbutton,
|
||||
panelsubview toolbarbutton,
|
||||
#customizationui-widget-panel toolbarbutton,
|
||||
.customizationmode-button {
|
||||
-moz-appearance: none;
|
||||
padding: 2px 6px;
|
||||
background: hsla(210,32%,93%,0) padding-box;
|
||||
border-radius: 2px;
|
||||
border: 1px solid;
|
||||
border-color: hsla(210,54%,20%,0) hsla(210,54%,20%,0) hsla(210,54%,20%,0);
|
||||
box-shadow: 0 1px hsla(0,0%,100%,0) inset,
|
||||
0 1px hsla(210,54%,20%,0),
|
||||
0 0 2px hsla(210,54%,20%,0);
|
||||
transition-property: background-color, border-color, box-shadow;
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
panelmainview toolbarbutton:not([disabled]):not([checked]):not([open]):not(:active):hover,
|
||||
panelsubview toolbarbutton:not([disabled]):not([checked]):not([open]):not(:active):hover,
|
||||
#customizationui-widget-panel toolbarbutton:not([disabled]):not([checked]):not([open]):not(:active):hover,
|
||||
#PanelUI-mainView .PanelUI-pageControls toolbarbutton,
|
||||
.customizationmode-button,
|
||||
#PanelUI-mainView #PanelUI-customize-btn {
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.2) hsla(210,54%,20%,.25);
|
||||
box-shadow: 0 1px hsla(0,0%,100%,.3) inset,
|
||||
0 1px hsla(210,54%,20%,.03),
|
||||
0 0 2px hsla(210,54%,20%,.1);
|
||||
}
|
||||
|
||||
panelmainview toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active),
|
||||
panelsubview toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active),
|
||||
.customizationmode-button:hover:active,
|
||||
#customizationui-widget-panel toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active) {
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
background-color: hsla(210,54%,20%,.15);
|
||||
border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4);
|
||||
box-shadow: 0 1px 1px hsla(210,54%,20%,.1) inset,
|
||||
0 0 1px hsla(210,54%,20%,.2) inset,
|
||||
0 1px 0 hsla(210,54%,20%,0),
|
||||
0 0 2px hsla(210,54%,20%,0);
|
||||
text-shadow: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
#PanelUI-historyItems > toolbarbutton {
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
.PanelUI-footer.panel-multiview-anchor,
|
||||
.PanelUI-footer.panel-multiview-anchor > #PanelUI-help-btn,
|
||||
toolbarbutton.panel-multiview-anchor {
|
||||
background-color: Highlight;
|
||||
background-image: linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0));
|
||||
background-repeat: repeat-x;
|
||||
color: HighlightText;
|
||||
}
|
|
@ -0,0 +1,256 @@
|
|||
%if 0
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
%define tabHeight 31px
|
||||
%define tabCurveWidth 30px
|
||||
%define tabCurveHalfWidth 15px
|
||||
|
||||
/* image preloading hack */
|
||||
#TabsToolbar::before {
|
||||
content: '';
|
||||
display: block;
|
||||
background-image:
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-end.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-start.png);
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
/* The selected tab should appear above adjacent tabs, .tabs-newtab-button and the highlight of #nav-bar */
|
||||
.tabbrowser-tab[selected=true] {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tab-background-middle {
|
||||
-moz-box-flex: 1;
|
||||
background-clip: padding-box;
|
||||
border-left: @tabCurveHalfWidth@ solid transparent;
|
||||
border-right: @tabCurveHalfWidth@ solid transparent;
|
||||
margin: 0 -@tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
-moz-padding-end: 9px;
|
||||
-moz-padding-start: 9px;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image,
|
||||
.tab-close-button {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.tab-throbber,
|
||||
.tab-icon-image {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.tab-icon-image {
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
.tab-throbber {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
|
||||
}
|
||||
|
||||
.tab-throbber[progress] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
|
||||
}
|
||||
|
||||
.tab-throbber:not([pinned]),
|
||||
.tab-icon-image:not([pinned]) {
|
||||
-moz-margin-end: 6px;
|
||||
}
|
||||
|
||||
.tab-label {
|
||||
-moz-margin-end: 0;
|
||||
-moz-margin-start: 0;
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: -2px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tab-background,
|
||||
.tabs-newtab-button {
|
||||
/* overlap the tab curves */
|
||||
-moz-margin-end: -@tabCurveHalfWidth@;
|
||||
-moz-margin-start: -@tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
|
||||
-moz-padding-end: @tabCurveHalfWidth@;
|
||||
-moz-padding-start: @tabCurveHalfWidth@;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::after,
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-start,
|
||||
.tab-background-end,
|
||||
.tab-background-end[selected=true]::after,
|
||||
.tab-background-end[selected=true]::before {
|
||||
min-height: @tabHeight@;
|
||||
width: @tabCurveWidth@;
|
||||
}
|
||||
|
||||
/* Selected tab */
|
||||
|
||||
/*
|
||||
Tab background pseudo-elements which are positioned above .tab-background-start/end:
|
||||
- ::before - provides the fill of the tab curve and is clipped to the tab shape. This is where
|
||||
pointer events go for the curve.
|
||||
- ::after - provides the border/stroke of the tab curve and is overlayed above ::before. Pointer
|
||||
events go through to ::before to get the proper shape.
|
||||
*/
|
||||
|
||||
|
||||
.tab-background-start[selected=true]::after,
|
||||
.tab-background-end[selected=true]::after {
|
||||
/* position ::after on top of its parent */
|
||||
-moz-margin-start: -@tabCurveWidth@;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before {
|
||||
/* all ::before pseudo elements */
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(ltr)::before,
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(rtl)::before {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-start);
|
||||
}
|
||||
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(ltr)::before,
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(rtl)::before {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-end);
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(ltr)::after,
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(rtl)::after {
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-stroke-start.png);
|
||||
}
|
||||
|
||||
.tab-background-end[selected=true]:-moz-locale-dir(ltr)::after,
|
||||
.tab-background-start[selected=true]:-moz-locale-dir(rtl)::after {
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-stroke-end.png);
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before {
|
||||
background-color: -moz-dialog;
|
||||
background-image: @fgTabTexture@;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.tab-background-middle[selected=true] {
|
||||
background-color: transparent;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
@fgTabBackgroundMiddle@;
|
||||
background-repeat: repeat-x;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
/* Selected tab lightweight theme styles */
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
/* Don't stretch the LWT header images */
|
||||
background-size: 100% 100%, 100% 100%, auto auto;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
.tab-background-end[selected=true]:-moz-lwtheme::before {
|
||||
background-image: @fgTabTextureLWT@;
|
||||
}
|
||||
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle-lwtheme.png), @fgTabTextureLWT@;
|
||||
}
|
||||
|
||||
.tab-background-start[selected=true]:-moz-lwtheme::before,
|
||||
.tab-background-end[selected=true]:-moz-lwtheme::before,
|
||||
.tab-background-middle[selected=true]:-moz-lwtheme {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* End selected tab */
|
||||
|
||||
/* new tab button border and gradient on hover */
|
||||
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]),
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-background-start.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
|
||||
url(chrome://browser/skin/tabbrowser/tab-background-end.png);
|
||||
background-position: left bottom, @tabCurveWidth@ bottom, right bottom;
|
||||
background-repeat: no-repeat;
|
||||
background-size: @tabCurveWidth@ 100%, calc(100% - (2 * @tabCurveWidth@)) 100%, @tabCurveWidth@ 100%;
|
||||
}
|
||||
|
||||
/* Tab pointer-events */
|
||||
.tabbrowser-tab {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Allow pointer-events on ::before of the ends of selected tabs
|
||||
since they are clipped to the curve shape. */
|
||||
.tab-background-start[selected=true]::before,
|
||||
.tab-background-end[selected=true]::before,
|
||||
.tab-background-middle,
|
||||
.tabs-newtab-button,
|
||||
.tab-close-button {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* Pinned tabs */
|
||||
|
||||
/* pinned tabs need position: fixed for separator when overflowing */
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]::before {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) > .tab-stack > .tab-content {
|
||||
background-image: radial-gradient(farthest-corner at center bottom, rgb(255,255,255) 3%, rgba(186,221,251,0.75) 20%, rgba(127,179,255,0.25) 40%, rgba(127,179,255,0) 70%);
|
||||
background-position: center bottom 1px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 85% 100%;
|
||||
}
|
||||
|
||||
/* Background tab separators (3px wide).
|
||||
Also show separators beside the selected tab when dragging it. */
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
|
||||
.tabbrowser-tab:not([selected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([selected]):not([beforehovered]):not(:hover)::after {
|
||||
-moz-margin-start: -1.5px;
|
||||
-moz-margin-end: -1.5px;
|
||||
content: url(chrome://browser/skin/tabbrowser/tab-separator.png);
|
||||
display: -moz-box;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
/* New tab button */
|
||||
|
||||
.tabs-newtab-button {
|
||||
clip-path: url(chrome://browser/content/browser.xul#tab-clip-path-outer);
|
||||
width: 66px;
|
||||
}
|
Двоичные данные
browser/themes/windows/appmenu-dropmarker.png
До Ширина: | Высота: | Размер: 262 B |
Двоичные данные
browser/themes/windows/appmenu-icons.png
До Ширина: | Высота: | Размер: 2.1 KiB |
После Ширина: | Высота: | Размер: 247 B |
|
@ -11,31 +11,10 @@
|
|||
%define glassInactiveBorderColor rgb(102, 102, 102)
|
||||
|
||||
@media not all and (-moz-windows-classic) {
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
|
||||
#main-window[sizemode="normal"] > #tab-view-deck > #browser-panel > #navigator-toolbox > #toolbar-menubar {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
#appmenu-button {
|
||||
border-width: 2px;
|
||||
-moz-border-left-colors: @appMenuButtonBorderColor@;
|
||||
-moz-border-bottom-colors: @appMenuButtonBorderColor@;
|
||||
-moz-border-right-colors: @appMenuButtonBorderColor@;
|
||||
margin-bottom: 1px; /* compensate white outer border */
|
||||
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
|
||||
0 0 2px 1px rgba(255,255,255,.25) inset;
|
||||
}
|
||||
|
||||
#main-window[privatebrowsingmode=temporary] #appmenu-button {
|
||||
-moz-border-left-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
|
||||
-moz-border-bottom-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
|
||||
-moz-border-right-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
|
||||
}
|
||||
|
||||
#appmenu-popup {
|
||||
margin-top: -1px;
|
||||
-moz-margin-start: 1px;
|
||||
}
|
||||
|
||||
.panel-promo-message {
|
||||
font-style: italic;
|
||||
}
|
||||
|
@ -47,27 +26,15 @@
|
|||
background-color: @customToolbarColor@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme),
|
||||
.tabs-newtab-button:not(:-moz-lwtheme) {
|
||||
background-image: @toolbarShadowOnTab@, @bgTabTexture@,
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
.tab-background-start[selected=true]:not(:-moz-lwtheme)::before,
|
||||
.tab-background-end[selected=true]:not(:-moz-lwtheme)::before {
|
||||
background-color: @customToolbarColor@;
|
||||
background-image: @fgTabTexture@;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme):hover,
|
||||
.tabs-newtab-button:not(:-moz-lwtheme):hover {
|
||||
background-image: @toolbarShadowOnTab@, @bgTabTextureHover@,
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
|
||||
background-image: linear-gradient(#fff, @toolbarHighlight@ 50%),
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
}
|
||||
|
||||
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: @toolbarShadowOnTab@,
|
||||
linear-gradient(#fff, @toolbarHighlight@ 50%),
|
||||
linear-gradient(@customToolbarColor@, @customToolbarColor@);
|
||||
.tab-background-middle[selected=true]:not(:-moz-lwtheme) {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
|
||||
linear-gradient(transparent, transparent 2px, @customToolbarColor@ 2px, @customToolbarColor@);
|
||||
}
|
||||
|
||||
#navigator-toolbox:not(:-moz-lwtheme)::after {
|
||||
|
@ -137,10 +104,6 @@
|
|||
-moz-appearance: -moz-win-exclude-glass;
|
||||
}
|
||||
|
||||
#main-window[chromemargin^="0,"][sizemode=normal] #navigator-toolbox {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
/* Artificially draw window borders that are covered by lwtheme, see bug 591930. */
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme {
|
||||
border-top: 2px solid;
|
||||
|
@ -151,23 +114,10 @@
|
|||
-moz-border-top-colors: @glassInactiveBorderColor@ rgba(255,255,255,.6);
|
||||
}
|
||||
|
||||
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container:-moz-lwtheme {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
#main-window[sizemode="normal"] #titlebar-buttonbox:-moz-lwtheme {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
#appmenu-button {
|
||||
margin-bottom: -1px; /* compensate white outer border */
|
||||
}
|
||||
|
||||
#main-window[sizemode=fullscreen]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background-color: #556;
|
||||
}
|
||||
|
||||
#toolbar-menubar:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true]:not(:-moz-lwtheme),
|
||||
#nav-bar[tabsontop=false]:not(:-moz-lwtheme),
|
||||
|
@ -179,17 +129,13 @@
|
|||
border-right-style: none !important;
|
||||
}
|
||||
|
||||
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
:-moz-any(#toolbar-menubar, #nav-bar[tabsontop=false]) :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status])) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@) > toolbarbutton > .toolbarbutton-icon:not(:-moz-lwtheme) {
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#sync-button[status],#bookmarks-menu-button)) > .toolbarbutton-icon:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(:-moz-any(#alltabs-button,#tabview-button,#new-tab-button,#sync-button[status],#bookmarks-menu-button)) > .toolbarbutton-icon:not(:-moz-lwtheme) {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
|
||||
}
|
||||
|
||||
:-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
:-moz-any(#toolbar-menubar, #TabsToolbar[tabsontop=true], #nav-bar[tabsontop=false]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
#navigator-toolbox[tabsontop=false] > :-moz-any(#toolbar-menubar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menu-dropmarker:not(:-moz-lwtheme),
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:not(:-moz-lwtheme) {
|
||||
list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png");
|
||||
|
@ -203,9 +149,6 @@
|
|||
border-right: 1px solid @toolbarShadowColor@;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
#main-window[sizemode=normal] #navigator-toolbox > toolbar:-moz-lwtheme {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
#main-window[sizemode=normal] #browser-border-start,
|
||||
#main-window[sizemode=normal] #browser-border-end {
|
||||
display: -moz-box;
|
||||
|
@ -224,23 +167,25 @@
|
|||
}
|
||||
|
||||
/* Toolbar shadow behind tabs */
|
||||
#nav-bar[tabsontop=true] {
|
||||
border-top: 1px solid @toolbarShadowColor@ !important;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
/* This code is only needed for restored windows (i.e. sizemode=normal)
|
||||
because of the border radius on the toolbar below the tab bar. */
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true]:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after {
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true],
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar,
|
||||
#main-window[sizemode=normal] #nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar {
|
||||
border-top: 1px solid @toolbarShadowColor@;
|
||||
border-top-left-radius: 2.5px;
|
||||
border-top-right-radius: 2.5px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
#main-window[sizemode=normal] #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
|
||||
|
||||
/* Cover the top border of the adjacent toolbar */
|
||||
#TabsToolbar[tabsontop=true] {
|
||||
margin-bottom: -1px;
|
||||
background-image: none !important;
|
||||
}
|
||||
#main-window[sizemode=normal] #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navigator-toolbox[tabsontop=false] > #PersonalToolbar {
|
||||
|
@ -253,8 +198,8 @@
|
|||
}
|
||||
|
||||
#main-window[sizemode=normal] #TabsToolbar[tabsontop=true] {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
#main-window[sizemode=normal] #TabsToolbar[tabsontop=false] {
|
||||
|
@ -262,21 +207,13 @@
|
|||
padding-right: 2px;
|
||||
}
|
||||
|
||||
/* Rounded corners for when chrome is disabled */
|
||||
#main-window[sizemode=normal][disablechrome] #navigator-toolbox[tabsontop=true]:not(:-moz-lwtheme)::after {
|
||||
visibility: visible;
|
||||
background-color: @customToolbarColor@;
|
||||
background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
/* Make the window draggable by glassed toolbars (bug 555081) */
|
||||
#toolbar-menubar:not([autohide="true"]),
|
||||
#TabsToolbar[tabsontop="true"],
|
||||
#nav-bar[tabsontop=false],
|
||||
#nav-bar + #customToolbars + #PersonalToolbar[collapsed="true"] + #TabsToolbar[tabsontop="false"]:last-child,
|
||||
#navigator-toolbox > toolbar:not(#toolbar-menubar):-moz-lwtheme {
|
||||
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
|
||||
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
|
||||
}
|
||||
|
||||
#appcontent:not(:-moz-lwtheme) {
|
||||
|
@ -338,6 +275,41 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media (-moz-windows-glass) {
|
||||
#main-window[sizemode=fullscreen]:not(:-moz-lwtheme) {
|
||||
-moz-appearance: none;
|
||||
background-color: #556;
|
||||
}
|
||||
|
||||
/* Glass Fog */
|
||||
|
||||
#TabsToolbar:not(:-moz-lwtheme) {
|
||||
background-image: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#TabsToolbar:not(:-moz-lwtheme)::before {
|
||||
box-shadow: 0 0 30px 30px rgb(174,189,204);
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
height: 0;
|
||||
margin: 0 60px; /* (30px + 30px) from box-shadow */
|
||||
opacity: 0.85;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
top: 50%;
|
||||
width: -moz-available;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#main-window[sizemode=normal] #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* End Glass Fog */
|
||||
}
|
||||
|
||||
|
||||
@media not all and (-moz-windows-compositor) {
|
||||
@media (-moz-windows-default-theme) {
|
||||
#main-window {
|
||||
|
@ -391,72 +363,3 @@
|
|||
#close-button:-moz-locale-dir(rtl) {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
/* ::::: splitmenu highlight style that imitates Windows 7 start menu ::::: */
|
||||
@media (-moz-windows-default-theme) {
|
||||
.splitmenu-menuitem,
|
||||
.splitmenu-menu {
|
||||
-moz-appearance: none;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.splitmenu-menuitem {
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
.splitmenu-menu {
|
||||
-moz-margin-start: -1px;
|
||||
}
|
||||
.splitmenu-menuitem:-moz-locale-dir(ltr),
|
||||
.splitmenu-menu:-moz-locale-dir(rtl) {
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
.splitmenu-menu:-moz-locale-dir(ltr),
|
||||
.splitmenu-menuitem:-moz-locale-dir(rtl) {
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.splitmenu-menuitem > .menu-text {
|
||||
-moz-margin-start: 1px !important;
|
||||
-moz-margin-end: 3px !important;
|
||||
}
|
||||
.splitmenu-menu > .menu-right {
|
||||
-moz-margin-end: -3px;
|
||||
}
|
||||
|
||||
.splitmenu-menuitem[iconic],
|
||||
.splitmenu-menu[iconic] {
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.splitmenu-menuitem[iconic] > .menu-iconic-left {
|
||||
margin-top: -3px;
|
||||
margin-bottom: -2px;
|
||||
-moz-margin-start: -1px;
|
||||
}
|
||||
.splitmenu-menuitem[iconic] > .menu-iconic-text {
|
||||
-moz-margin-start: 2px !important;
|
||||
-moz-margin-end: 3px !important;
|
||||
}
|
||||
.splitmenu-menu[iconic] > .menu-right {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.splitmenu-menuitem[_moz-menuactive],
|
||||
.splitmenu-menu[_moz-menuactive] {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(#fafbfd, #ebf3fd);
|
||||
border-color: #aeccf1;
|
||||
}
|
||||
|
||||
.splitmenu-menuitem[disabled][_moz-menuactive],
|
||||
.splitmenu-menu[disabled][_moz-menuactive] {
|
||||
background-image: linear-gradient(#f8f9f9, #eaeaea);
|
||||
border-color: #d8d7d7;
|
||||
}
|
||||
|
||||
.splitmenu-menu[_moz-menuactive]:not(:hover):not([open]) {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
|
|