This commit is contained in:
Mike Conley 2013-05-24 11:45:45 -04:00
Родитель 702a315b61 7f37ac2c90
Коммит 9c7f0ba4e8
144 изменённых файлов: 6763 добавлений и 2964 удалений

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

@ -98,6 +98,16 @@
// xul:tab ("about:") // xul:tab ("about:")
role: ROLE_PAGETAB, role: ROLE_PAGETAB,
children: [ children: [
{
// :before and :after image
// (selected tab border on left/right)
role: ROLE_GRAPHIC,
children: []
},
{
role: ROLE_GRAPHIC,
children: []
},
{ {
// xul:toolbarbutton ("Close Tab") // xul:toolbarbutton ("Close Tab")
role: ROLE_PUSHBUTTON, role: ROLE_PUSHBUTTON,
@ -113,6 +123,11 @@
// xul:toolbarbutton ("Close Tab") // xul:toolbarbutton ("Close Tab")
role: ROLE_PUSHBUTTON, role: ROLE_PUSHBUTTON,
children: [] children: []
},
{
// :after image (separator)
role: ROLE_GRAPHIC,
children: []
} }
] ]
}, },

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

@ -413,10 +413,10 @@ pref("browser.tabs.loadBookmarksInBackground", false);
pref("browser.tabs.tabClipWidth", 140); pref("browser.tabs.tabClipWidth", 140);
pref("browser.tabs.animate", true); pref("browser.tabs.animate", true);
pref("browser.tabs.onTop", true); pref("browser.tabs.onTop", true);
#ifdef XP_WIN #ifdef UNIX_BUT_NOT_MAC
pref("browser.tabs.drawInTitlebar", true);
#else
pref("browser.tabs.drawInTitlebar", false); pref("browser.tabs.drawInTitlebar", false);
#else
pref("browser.tabs.drawInTitlebar", true);
#endif #endif
// Where to show tab close buttons: // Where to show tab close buttons:
@ -1249,3 +1249,6 @@ pref("media.webaudio.enabled", true);
// If this turns true, Moz*Gesture events are not called stopPropagation() // If this turns true, Moz*Gesture events are not called stopPropagation()
// before content. // before content.
pref("dom.debug.propagate_gesture_events_through_content", false); pref("dom.debug.propagate_gesture_events_through_content", false);
// Enable CustomizableUI debug logging.
pref("browser.uiCustomization.debug", true);

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

@ -415,3 +415,58 @@ var LightWeightThemeWebInstaller = {
node.baseURI); 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="&copyButton.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="&copyCmd.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; enterFS = !enterFS;
// Toggle the View:FullScreen command, which controls elements like the // 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); document.getElementById("View:FullScreen").setAttribute("checked", enterFS);
#ifdef XP_MACOSX #ifdef XP_MACOSX

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

@ -382,6 +382,8 @@ var FullZoom = {
* when done. * when done.
*/ */
_applySettingToPref: function FullZoom__applySettingToPref(suppressZoomChange, callback) { _applySettingToPref: function FullZoom__applySettingToPref(suppressZoomChange, callback) {
Services.obs.notifyObservers(null, "browser-fullZoom:zoomChange", "");
if (!this.siteSpecific || if (!this.siteSpecific ||
gInPrintPreviewMode || gInPrintPreviewMode ||
content.document.mozSyntheticDocument) { content.document.mozSyntheticDocument) {
@ -410,6 +412,8 @@ var FullZoom = {
* @param callback Optional. If given, it's asynchronously called when done. * @param callback Optional. If given, it's asynchronously called when done.
*/ */
_removePref: function FullZoom__removePref(callback) { _removePref: function FullZoom__removePref(callback) {
Services.obs.notifyObservers(null, "browser-fullZoom:zoomReset", "");
if (content.document.mozSyntheticDocument) { if (content.document.mozSyntheticDocument) {
this._executeSoon(callback); this._executeSoon(callback);
return; return;

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

@ -420,16 +420,13 @@ let TabView = {
let toolbar = document.getElementById("TabsToolbar"); let toolbar = document.getElementById("TabsToolbar");
let currentSet = toolbar.currentSet.split(","); let currentSet = toolbar.currentSet.split(",");
let alltabsPos = currentSet.indexOf("alltabs-button"); let alltabsPos = currentSet.indexOf("alltabs-button");
if (-1 == alltabsPos) if (-1 == alltabsPos)
return; return;
currentSet[alltabsPos] += "," + buttonId; let allTabsBtn = document.getElementById("alltabs-button");
currentSet = currentSet.join(","); let nextItem = allTabsBtn.nextSibling;
toolbar.currentSet = currentSet; toolbar.insertItem(buttonId, nextItem);
toolbar.setAttribute("currentset", currentSet);
document.persist(toolbar.id, "currentset");
}, },
// ---------- // ----------

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

@ -13,6 +13,20 @@ browser[remote="true"] {
-moz-binding: url("chrome://global/content/bindings/remote-browser.xml#remote-browser"); -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 { tabbrowser {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser"); -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
} }
@ -39,11 +53,11 @@ tabbrowser {
.tabbrowser-tab:not([pinned]) { .tabbrowser-tab:not([pinned]) {
-moz-box-flex: 100; -moz-box-flex: 100;
max-width: 250px; max-width: 180px;
min-width: 100px; min-width: 100px;
width: 0; width: 0;
transition: min-width 200ms ease-out, 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 */; 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; min-width: 0.1px;
opacity: 0 !important; opacity: 0 !important;
transition: min-width 200ms ease-out, transition: min-width 200ms ease-out,
max-width 250ms ease-out, max-width 230ms ease-out,
opacity 50ms ease-out 180ms /* hide the tab for the last 20ms of the max-width transition */; opacity 50ms ease-out 160ms /* hide the tab for the last 20ms of the max-width transition */;
} }
.tab-throbber:not([fadein]):not([pinned]), .tab-throbber:not([fadein]):not([pinned]),
@ -94,6 +108,15 @@ toolbar[printpreview="true"] {
-moz-box-ordinal-group: 50; -moz-box-ordinal-group: 50;
} }
toolbar[overflowable] > .customization-target {
overflow: hidden;
}
toolbar[customizing][overflowable] > .overflow-button,
toolbar[overflowable]:not([overflowing]) > .overflow-button {
display: none;
}
#TabsToolbar { #TabsToolbar {
-moz-box-ordinal-group: 100; -moz-box-ordinal-group: 100;
} }
@ -117,10 +140,26 @@ toolbar[printpreview="true"] {
pointer-events: none; pointer-events: none;
} }
#main-window[tabsintitlebar] #appmenu-button-container,
#main-window[tabsintitlebar] #titlebar-buttonbox { #main-window[tabsintitlebar] #titlebar-buttonbox {
position: relative; 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 %endif
.bookmarks-toolbar-customize, .bookmarks-toolbar-customize,
@ -132,19 +171,14 @@ toolbar[printpreview="true"] {
display: -moz-box; 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, #wrapper-urlbar-container #urlbar-container > #urlbar > toolbarbutton,
#urlbar-container:not([combined]) > #urlbar > toolbarbutton, #urlbar-container:not([combined]) > #urlbar > toolbarbutton,
#urlbar-container[combined] + #reload-button + #stop-button, #urlbar-container[combined] + #reload-button + #stop-button,
#urlbar-container[combined] + #reload-button, #urlbar-container[combined] + #reload-button,
toolbar:not([mode="icons"]) > #urlbar-container > #urlbar > toolbarbutton, #urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button:not([displaystop]) + #urlbar-stop-button, #urlbar-reload-button[displaystop],
toolbar[mode="icons"] > #urlbar-container > #urlbar > #urlbar-reload-button[displaystop], #reload-button:not([displaystop]) + #stop-button,
toolbar[mode="icons"] > #reload-button:not([displaystop]) + #stop-button, #reload-button[displaystop] {
toolbar[mode="icons"] > #reload-button[displaystop] {
visibility: collapse; visibility: collapse;
} }
@ -156,6 +190,14 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
direction: rtl; direction: rtl;
} }
#urlbar-container {
min-width: 50ch;
}
#search-container {
min-width: 25ch;
}
#main-window:-moz-lwtheme { #main-window:-moz-lwtheme {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: top right; background-position: top right;
@ -172,27 +214,6 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
background-position: bottom left; 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 { .menuitem-tooltip {
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-tooltip"); -moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-tooltip");
} }
@ -203,18 +224,6 @@ splitmenu {
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-iconic-tooltip"); -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 */ /* Hide menu elements intended for keyboard access support */
#main-menubar[openedwithkey=false] .show-only-for-keyboard { #main-menubar[openedwithkey=false] .show-only-for-keyboard {
display: none; display: none;
@ -437,14 +446,6 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
min-width: 1px; 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 ::::: */ /* ::::: Ctrl-Tab Panel ::::: */
.ctrlTab-preview > html|img, .ctrlTab-preview > html|img,

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

@ -91,6 +91,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils", XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
"resource:///modules/AboutHomeUtils.jsm"); "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 #ifdef MOZ_SERVICES_SYNC
XPCOMUtils.defineLazyModuleGetter(this, "Weave", XPCOMUtils.defineLazyModuleGetter(this, "Weave",
"resource://services-sync/main.js"); "resource://services-sync/main.js");
@ -147,6 +153,7 @@ let gInitialPages = [
]; ];
#include browser-addons.js #include browser-addons.js
#include browser-customization.js
#include browser-feeds.js #include browser-feeds.js
#include browser-fullScreen.js #include browser-fullScreen.js
#include browser-fullZoom.js #include browser-fullZoom.js
@ -936,8 +943,8 @@ var gBrowserInit = {
goSetCommandEnabled("cmd_newNavigatorTab", false); goSetCommandEnabled("cmd_newNavigatorTab", false);
} }
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef CAN_DRAW_IN_TITLEBAR
updateAppButtonDisplay(); updateTitlebarDisplay();
#endif #endif
// Misc. inits. // Misc. inits.
@ -1031,7 +1038,13 @@ var gBrowserInit = {
OfflineApps.init(); OfflineApps.init();
IndexedDBPromptHelper.init(); IndexedDBPromptHelper.init();
gFormSubmitObserver.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(); SocialUI.init();
LightweightThemeListener.init();
AddonManager.addAddonListener(AddonsMgrListener); AddonManager.addAddonListener(AddonsMgrListener);
WebrtcIndicator.init(); WebrtcIndicator.init();
@ -1078,11 +1091,6 @@ var gBrowserInit = {
if (!getBoolPref("ui.click_hold_context_menus", false)) if (!getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers(); 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 // Bug 666804 - NetworkPrioritizer support for e10s
if (!gMultiProcessBrowser) { if (!gMultiProcessBrowser) {
let NP = {}; let NP = {};
@ -1226,15 +1234,6 @@ var gBrowserInit = {
cmd.removeAttribute("hidden"); 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? // Enable Responsive UI?
let responsiveUIEnabled = gPrefService.getBoolPref("devtools.responsiveUI.enabled"); let responsiveUIEnabled = gPrefService.getBoolPref("devtools.responsiveUI.enabled");
if (responsiveUIEnabled) { if (responsiveUIEnabled) {
@ -1246,26 +1245,14 @@ var gBrowserInit = {
// Add Devtools menuitems and listeners // Add Devtools menuitems and listeners
gDevToolsBrowser.registerBrowserWindow(window); 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("mousemove", MousePosTracker, false);
window.addEventListener("dragover", 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 // End startup crash tracking after a delay to catch crashes while restoring
// tabs and to postpone saving the pref to disk. // tabs and to postpone saving the pref to disk.
try { try {
@ -1378,6 +1365,9 @@ var gBrowserInit = {
IndexedDBPromptHelper.uninit(); IndexedDBPromptHelper.uninit();
AddonManager.removeAddonListener(AddonsMgrListener); AddonManager.removeAddonListener(AddonsMgrListener);
SocialUI.uninit(); SocialUI.uninit();
LightweightThemeListener.uninit();
gCustomizeMode.uninit();
PanelUI.uninit();
} }
// Final window teardown, do this last. // Final window teardown, do this last.
@ -2662,8 +2652,8 @@ var PrintPreviewListener = {
if (this._chromeState.sidebarOpen) if (this._chromeState.sidebarOpen)
toggleSidebar(this._sidebarCommand); toggleSidebar(this._sidebarCommand);
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef CAN_DRAW_IN_TITLEBAR
updateAppButtonDisplay(); updateTitlebarDisplay();
#endif #endif
}, },
_hideChrome: function () { _hideChrome: function () {
@ -3328,119 +3318,13 @@ function OpenBrowserWindow(options)
return win; return win;
} }
var gCustomizeSheet = false; //XXXunf Are these still useful to keep around?
function BrowserCustomizeToolbar() { function BrowserCustomizeToolbar() {
// Disable the toolbar context menu items gCustomizeMode.enter();
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);
}
} }
function BrowserToolboxCustomizeDone(aToolboxChanged) { function BrowserToolboxCustomizeDone(aToolboxChanged) {
if (gCustomizeSheet) { gCustomizeMode.exit(aToolboxChanged);
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();
} }
function BrowserToolboxCustomizeChange(aType) { function BrowserToolboxCustomizeChange(aType) {
@ -3504,9 +3388,6 @@ function updateEditUIVisibility()
let editMenuPopupState = document.getElementById("menu_EditPopup").state; let editMenuPopupState = document.getElementById("menu_EditPopup").state;
let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state; let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
let placesContextMenuPopupState = document.getElementById("placesContext").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 // 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, // is open, or if the toolbar has been customized to include the Cut, Copy,
@ -3517,10 +3398,6 @@ function updateEditUIVisibility()
contextMenuPopupState == "open" || contextMenuPopupState == "open" ||
placesContextMenuPopupState == "showing" || placesContextMenuPopupState == "showing" ||
placesContextMenuPopupState == "open" || placesContextMenuPopupState == "open" ||
#ifdef MENUBAR_CAN_AUTOHIDE
appMenuPopupState == "showing" ||
appMenuPopupState == "open" ||
#endif
document.getElementById("cut-button") || document.getElementById("cut-button") ||
document.getElementById("copy-button") || document.getElementById("copy-button") ||
document.getElementById("paste-button") ? true : false; document.getElementById("paste-button") ? true : false;
@ -3553,9 +3430,6 @@ function updateEditUIVisibility()
function updateCharacterEncodingMenuState() function updateCharacterEncodingMenuState()
{ {
let charsetMenu = document.getElementById("charsetMenu"); 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 // gBrowser is null on Mac when the menubar shows in the context of
// non-browser windows. The above elements may be null depending on // 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. // what parts of the menubar are present. E.g. no app menu on Mac.
@ -3565,22 +3439,10 @@ function updateCharacterEncodingMenuState()
if (charsetMenu) { if (charsetMenu) {
charsetMenu.removeAttribute("disabled"); charsetMenu.removeAttribute("disabled");
} }
if (appCharsetMenu) {
appCharsetMenu.removeAttribute("disabled");
}
if (appDevCharsetMenu) {
appDevCharsetMenu.removeAttribute("disabled");
}
} else { } else {
if (charsetMenu) { if (charsetMenu) {
charsetMenu.setAttribute("disabled", "true"); charsetMenu.setAttribute("disabled", "true");
} }
if (appCharsetMenu) {
appCharsetMenu.setAttribute("disabled", "true");
}
if (appDevCharsetMenu) {
appDevCharsetMenu.setAttribute("disabled", "true");
}
} }
} }
@ -3611,8 +3473,8 @@ var XULBrowserWindow = {
startTime: 0, startTime: 0,
statusText: "", statusText: "",
isBusy: false, isBusy: false,
inContentWhitelist: ["about:addons", "about:downloads", "about:permissions", // Left here for add-on compatibility, see bug 752434
"about:sync-progress", "about:preferences"], inContentWhitelist: [],
QueryInterface: function (aIID) { QueryInterface: function (aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) || if (aIID.equals(Ci.nsIWebProgressListener) ||
@ -3902,17 +3764,6 @@ var XULBrowserWindow = {
SocialShare.update(); 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 // Utility functions for disabling find
var shouldDisableFind = function shouldDisableFind(aDocument) { var shouldDisableFind = function shouldDisableFind(aDocument) {
let docElt = aDocument.documentElement; let docElt = aDocument.documentElement;
@ -3989,12 +3840,8 @@ var XULBrowserWindow = {
FeedHandler.updateFeeds(); FeedHandler.updateFeeds();
}, },
hideChromeForLocation: function(aLocation) { // Left here for add-on compatibility, see bug 752434
aLocation = aLocation.toLowerCase(); hideChromeForLocation: function() {},
return this.inContentWhitelist.some(function(aSpec) {
return aSpec == aLocation;
});
},
onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) { onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
this.status = aMessage; this.status = aMessage;
@ -4172,8 +4019,7 @@ var CombinedStopReload = {
var stop = document.getElementById("stop-button"); var stop = document.getElementById("stop-button");
if (urlbar) { if (urlbar) {
if (urlbar.parentNode.getAttribute("mode") != "icons" || if (!reload || urlbar.nextSibling != reload ||
!reload || urlbar.nextSibling != reload ||
!stop || reload.nextSibling != stop) !stop || reload.nextSibling != stop)
urlbar.removeAttribute("combined"); urlbar.removeAttribute("combined");
else { else {
@ -4498,8 +4344,6 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
menuItem.setAttribute("type", "checkbox"); menuItem.setAttribute("type", "checkbox");
menuItem.setAttribute("label", toolbarName); menuItem.setAttribute("label", toolbarName);
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true"); menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
if (popup.id != "appmenu_customizeMenu")
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
if (popup.id != "toolbar-context-menu") if (popup.id != "toolbar-context-menu")
menuItem.setAttribute("key", toolbar.getAttribute("key")); menuItem.setAttribute("key", toolbar.getAttribute("key"));
@ -4528,8 +4372,8 @@ function setToolbarVisibility(toolbar, isVisible) {
BookmarkingUI.onToolbarVisibilityChange(); BookmarkingUI.onToolbarVisibilityChange();
gBrowser.updateWindowResizers(); gBrowser.updateWindowResizers();
#ifdef MENUBAR_CAN_AUTOHIDE #ifdef CAN_DRAW_IN_TITLEBAR
updateAppButtonDisplay(); updateTitlebarDisplay();
#endif #endif
} }
@ -4590,10 +4434,19 @@ var TabsInTitlebar = {
this._readPref(); this._readPref();
Services.prefs.addObserver(this._prefName, this, false); Services.prefs.addObserver(this._prefName, this, false);
// Don't trust the initial value of the sizemode attribute; wait for // We need to update the appearance of the titlebar when the menu changes
// the resize event (handled in tabbrowser.xml). // from the active to the inactive state. We can't, however, rely on
this.allowedBy("sizemode", false); // 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; this._initialized = true;
#endif #endif
}, },
@ -4603,17 +4456,23 @@ var TabsInTitlebar = {
if (allow) { if (allow) {
if (condition in this._disallowed) { if (condition in this._disallowed) {
delete this._disallowed[condition]; delete this._disallowed[condition];
this._update(); this._update(true);
} }
} else { } else {
if (!(condition in this._disallowed)) { if (!(condition in this._disallowed)) {
this._disallowed[condition] = null; this._disallowed[condition] = null;
this._update(); this._update(true);
} }
} }
#endif #endif
}, },
updateAppearance: function updateAppearance(aForce) {
#ifdef CAN_DRAW_IN_TITLEBAR
this._update(aForce);
#endif
},
get enabled() { get enabled() {
return document.documentElement.getAttribute("tabsintitlebar") == "true"; return document.documentElement.getAttribute("tabsintitlebar") == "true";
}, },
@ -4624,16 +4483,33 @@ var TabsInTitlebar = {
this._readPref(); 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, _initialized: false,
_disallowed: {}, _disallowed: {},
_prefName: "browser.tabs.drawInTitlebar", _prefName: "browser.tabs.drawInTitlebar",
_lastSizeMode: null,
_readPref: function () { _readPref: function () {
this.allowedBy("pref", this.allowedBy("pref",
Services.prefs.getBoolPref(this._prefName)); Services.prefs.getBoolPref(this._prefName));
}, },
_update: function () { _update: function (aForce=false) {
function $(id) document.getElementById(id); function $(id) document.getElementById(id);
function rect(ele) ele.getBoundingClientRect(); function rect(ele) ele.getBoundingClientRect();
@ -4641,45 +4517,99 @@ var TabsInTitlebar = {
return; return;
let allowed = true; 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) { for (let something in this._disallowed) {
allowed = false; allowed = false;
break; break;
} }
if (allowed == this.enabled) function $(id) document.getElementById(id);
return;
let titlebar = $("titlebar"); 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) { if (allowed) {
let tabsToolbar = $("TabsToolbar"); // We set the tabsintitlebar attribute first so that our CSS for
// tabsintitlebar manifests before we do our measurements.
#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";
document.documentElement.setAttribute("tabsintitlebar", "true"); 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 = {}; let tmp = {};
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", 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; 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 { } else {
document.documentElement.removeAttribute("tabsintitlebar"); document.documentElement.removeAttribute("tabsintitlebar");
titlebar.style.marginBottom = "";
} }
}, },
@ -4687,36 +4617,45 @@ var TabsInTitlebar = {
Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='"+ type +"']"), Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='"+ type +"']"),
function (node) { node.width = width; }); 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 #endif
uninit: function () { uninit: function () {
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef CAN_DRAW_IN_TITLEBAR
this._initialized = false; this._initialized = false;
Services.prefs.removeObserver(this._prefName, this); Services.prefs.removeObserver(this._prefName, this);
this._menuObserver.disconnect();
#endif #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 #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"); document.documentElement.setAttribute("chromemargin", "0,2,2,2");
else else
document.documentElement.removeAttribute("chromemargin"); document.documentElement.removeAttribute("chromemargin");
TabsInTitlebar.allowedBy("drawing-in-titlebar", displayAppButton); TabsInTitlebar.allowedBy("drawing-in-titlebar", drawInTitlebar);
#else
document.getElementById("appmenu-toolbar-button").hidden =
!displayAppButton;
#endif
} }
#endif #endif
@ -6807,12 +6746,6 @@ let gPrivateBrowsingUI = {
document.getElementById("Tools:Sanitize").setAttribute("disabled", "true"); document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
if (window.location.href == getBrowserURL()) { if (window.location.href == getBrowserURL()) {
#ifdef XP_MACOSX
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
document.documentElement.setAttribute("drawintitlebar", true);
}
#endif
// Adjust the window's title // Adjust the window's title
let docElement = document.documentElement; let docElement = document.documentElement;
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
@ -6829,7 +6762,6 @@ let gPrivateBrowsingUI = {
// Adjust the New Window menu entries // Adjust the New Window menu entries
[ [
{ normal: "menu_newNavigator", private: "menu_newPrivateWindow" }, { normal: "menu_newNavigator", private: "menu_newPrivateWindow" },
{ normal: "appmenu_newNavigator", private: "appmenu_newPrivateWindow" },
].forEach(function(menu) { ].forEach(function(menu) {
let newWindow = document.getElementById(menu.normal); let newWindow = document.getElementById(menu.normal);
let newPrivateWindow = document.getElementById(menu.private); 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/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.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/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/" 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://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?> <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
@ -22,6 +24,7 @@
<window id="main-window" <window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" 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" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();" onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
title="&mainWindow.title;@PRE_RELEASE_SUFFIX@" title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
@ -32,6 +35,7 @@
titlemodifier="" titlemodifier=""
titlemodifier_normal="" titlemodifier_normal=""
titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;" titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
chromemargin="0,-1,-1,-1"
#else #else
title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;" title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@" titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
@ -432,29 +436,27 @@
</popupnotificationcontent> </popupnotificationcontent>
</popupnotification> </popupnotification>
#include ../../components/customizableui/content/panelUI.inc.xul
</popupset> </popupset>
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef CAN_DRAW_IN_TITLEBAR
<vbox id="titlebar"> <vbox id="titlebar">
<hbox id="titlebar-content"> <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"/> <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"> <hbox id="titlebar-buttonbox">
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/> <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-max" oncommand="onTitlebarMaxClick();"/>
<toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/> <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
</hbox> </hbox>
</hbox> </hbox>
#ifdef XP_MACOSX
<hbox id="titlebar-fullscreen-button" ordinal="1000"/>
#endif
</hbox> </hbox>
</vbox> </vbox>
#endif #endif
@ -482,159 +484,397 @@
</toolbaritem> </toolbaritem>
#ifdef CAN_DRAW_IN_TITLEBAR #ifdef CAN_DRAW_IN_TITLEBAR
<hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/> <hbox class="titlebar-placeholder" type="caption-buttons"
<hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/> #ifdef XP_MACOSX
ordinal="0"
#else
ordinal="1000"
#endif
/>
#ifdef XP_MACOSX
<hbox class="titlebar-placeholder" type="fullscreen-button" ordinal="1000"/>
#endif
#endif #endif
</toolbar> </toolbar>
<toolbar id="nav-bar" class="toolbar-primary chromeclass-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" fullscreentoolbar="true" mode="icons" customizable="true"
iconsize="large" 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" defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button"
customizationtarget="nav-bar-customizationtarget"
overflowbutton="nav-bar-overflow-button"
context="toolbar-context-menu"> context="toolbar-context-menu">
<toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional" <hbox id="nav-bar-customizationtarget" class="customization-target" flex="1">
context="backForwardMenu" removable="true" <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
forwarddisabled="true" context="backForwardMenu" removable="false"
title="&backForwardItem.title;"> forwarddisabled="true"
<toolbarbutton id="back-button" class="toolbarbutton-1" title="&backForwardItem.title;"
label="&backCmd.label;" nooverflow="true">
command="Browser:BackOrBackDuplicate" <toolbarbutton id="back-button" class="toolbarbutton-1"
onclick="checkForMiddleClick(this, event);" label="&backCmd.label;"
tooltip="back-button-tooltip"/> command="Browser:BackOrBackDuplicate"
<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);" onclick="checkForMiddleClick(this, event);"
tooltiptext="&reloadButton.tooltip;"/> tooltip="back-button-tooltip"/>
<toolbarbutton id="urlbar-stop-button" <toolbarbutton id="forward-button" class="toolbarbutton-1"
class="chromeclass-toolbar-additional" label="&forwardCmd.label;"
command="Browser:Stop" command="Browser:ForwardOrForwardDuplicate"
tooltiptext="&stopButton.tooltip;"/> onclick="checkForMiddleClick(this, event);"
</textbox> 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="false" nooverflow="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;"
nooverflow="true"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&stopCmd.label;" removable="true"
command="Browser:Stop"
tooltiptext="&stopButton.tooltip;"
nooverflow="true"/>
<toolbarbutton id="webrtc-status-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
type="menu"
hidden="true"
orient="horizontal"
label="&webrtcIndicatorButton.label;"
tooltiptext="&webrtcIndicatorButton.tooltip;"
nooverflow="true">
<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"
nooverflow="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"
nooverflow="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>
<toolbarbutton id="nav-bar-overflow-button"
class="toolbarbutton-1 chromeclass-toolbar-additional chevron overflow-button"
skipintoolbarset="true"
tooltiptext="&navbarOverflow.label;"/>
<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> </toolbaritem>
<toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional" <hbox id="window-controls" hidden="true" pack="end">
label="&reloadCmd.label;" removable="true" <toolbarbutton id="minimize-button"
command="Browser:ReloadOrDuplicate" tooltiptext="&fullScreenMinimize.tooltip;"
onclick="checkForMiddleClick(this, event);" oncommand="window.minimize();"/>
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional" <toolbarbutton id="restore-button"
label="&stopCmd.label;" removable="true" tooltiptext="&fullScreenRestore.tooltip;"
command="Browser:Stop" oncommand="BrowserFullScreen();"/>
tooltiptext="&stopButton.tooltip;"/>
<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;" <toolbaritem id="search-container" title="&searchItem.title;"
align="center" class="chromeclass-toolbar-additional" align="center" class="chromeclass-toolbar-additional"
flex="100" persist="width" removable="true"> flex="100" persist="width" removable="true" noautoclose="true">
<searchbar id="searchbar" flex="1"/> <searchbar id="searchbar" flex="1"/>
</toolbaritem> </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" <toolbarbutton id="bookmarks-menu-button"
class="toolbarbutton-1 chromeclass-toolbar-additional" class="toolbarbutton-1 chromeclass-toolbar-additional"
persist="class" persist="class"
@ -727,223 +967,13 @@
onclick="BrowserGoHome(event);" onclick="BrowserGoHome(event);"
aboutHomeOverrideTooltip="&abouthome.pageTitle;"/> 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" <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&printButton.label;" command="cmd_print" #ifdef XP_MACOSX
tooltiptext="&printButton.tooltip;"/> 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 <!-- This is a placeholder for the Downloads Indicator. It is visible
during the customization of the toolbar, in the palette, and before during the customization of the toolbar, in the palette, and before
@ -1046,45 +1076,49 @@
<hbox id="fullscr-toggler" collapsed="true"/> <hbox id="fullscr-toggler" collapsed="true"/>
<hbox flex="1" id="browser"> <deck id="content-deck" flex="1">
<vbox id="browser-border-start" hidden="true" layer="true"/> <hbox flex="1" id="browser">
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome"> <vbox id="browser-border-start" hidden="true" layer="true"/>
<sidebarheader id="sidebar-header" align="center"> <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
<label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/> <sidebarheader id="sidebar-header" align="center">
<image id="sidebar-throbber"/> <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
<toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/> <image id="sidebar-throbber"/>
</sidebarheader> <toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
<browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" </sidebarheader>
style="min-width: 14em; width: 18em; max-width: 36em;"/> <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
</vbox> style="min-width: 14em; width: 18em; max-width: 36em;"/>
</vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/> <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
<vbox id="appcontent" flex="1"> <vbox id="appcontent" flex="1">
<tabbrowser id="content" disablehistory="true" <tabbrowser id="content" disablehistory="true"
flex="1" contenttooltip="aHTMLTooltip" flex="1" contenttooltip="aHTMLTooltip"
tabcontainer="tabbrowser-tabs" tabcontainer="tabbrowser-tabs"
contentcontextmenu="contentAreaContextMenu" contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"/> autocompletepopup="PopupAutoComplete"
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/> onclick="contentAreaClick(event, false);"/>
<statuspanel id="statusbar-display" inactive="true"/> <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
</vbox> <statuspanel id="statusbar-display" inactive="true"/>
<splitter id="social-sidebar-splitter" </vbox>
class="chromeclass-extrachrome sidebar-splitter" <splitter id="social-sidebar-splitter"
observes="socialSidebarBroadcaster"/> class="chromeclass-extrachrome sidebar-splitter"
<vbox id="social-sidebar-box" observes="socialSidebarBroadcaster"/>
class="chromeclass-extrachrome" <vbox id="social-sidebar-box"
observes="socialSidebarBroadcaster" class="chromeclass-extrachrome"
persist="width"> observes="socialSidebarBroadcaster"
<browser id="social-sidebar-browser" persist="width">
type="content" <browser id="social-sidebar-browser"
context="contentAreaContextMenu" type="content"
disableglobalhistory="true" context="contentAreaContextMenu"
tooltip="aHTMLTooltip" disableglobalhistory="true"
flex="1" tooltip="aHTMLTooltip"
style="min-width: 14em; width: 18em; max-width: 36em;"/> flex="1"
</vbox> style="min-width: 14em; width: 18em; max-width: 36em;"/>
<vbox id="browser-border-end" hidden="true" layer="true"/> </vbox>
</hbox> <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 id="full-screen-warning-container" hidden="true" fadeout="true">
<hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. --> <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
@ -1145,7 +1179,6 @@
mode="icons" iconsize="small" defaulticonsize="small" mode="icons" iconsize="small" defaulticonsize="small"
lockiconsize="true" lockiconsize="true"
defaultset="addonbar-closebutton,spring,status-bar" defaultset="addonbar-closebutton,spring,status-bar"
customizable="true"
key="key_toggleAddonBar"> key="key_toggleAddonBar">
<toolbarbutton id="addonbar-closebutton" <toolbarbutton id="addonbar-closebutton"
tooltiptext="&addonBarCloseButton.tooltip;" tooltiptext="&addonBarCloseButton.tooltip;"
@ -1154,38 +1187,34 @@
</toolbar> </toolbar>
</vbox> </vbox>
#ifndef XP_UNIX
<svg:svg height="0"> <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="objectBoundingBox">
<svg:path d="m 0.2197,0 0,0.4264 c -0.0156,0.1238 -0.0201,0.2548 -0.0492,0.3730 C 0.1464,0.9030 0.0889,0.9397 0.0379,0.9355 L 0,1 1,1 0.9621,0.9355 c -0.0511,0.0042 -0.1085,-0.0322 -0.1326,-0.1361 -0.0292,-0.1152 -0.0334,-0.2486 -0.0492,-0.3730 L 0.7803,0 z"/>
</svg:clipPath>
#ifndef XP_UNIX
<svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox"> <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: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>
<svg:clipPath id="windows-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse"> <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: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:clipPath>
</svg:svg>
#endif #endif
#ifdef XP_MACOSX #ifdef XP_MACOSX
<svg:svg height="0">
<svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox"> <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: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>
<svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse"> <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: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>
<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 #endif
</svg:svg>
</vbox> </vbox>
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck. # <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/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/downloads/downloads.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/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/inlineSpellCheckUI.js"/>
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/> <script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>

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

@ -41,6 +41,7 @@ tabpanels {
z-index: 2; z-index: 2;
} }
.tab-icon-image:not([src]):not([pinned]),
.tab-throbber:not([busy]), .tab-throbber:not([busy]),
.tab-throbber[busy] + .tab-icon-image { .tab-throbber[busy] + .tab-icon-image {
display: none; display: none;

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

@ -3484,9 +3484,7 @@
if (aEvent.target != window) if (aEvent.target != window)
break; break;
let sizemode = document.documentElement.getAttribute("sizemode"); TabsInTitlebar.updateAppearance();
TabsInTitlebar.allowedBy("sizemode",
sizemode == "maximized" || sizemode == "fullscreen");
var width = this.mTabstrip.boxObject.width; var width = this.mTabstrip.boxObject.width;
if (width != this.mTabstripWidth) { if (width != this.mTabstripWidth) {

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

@ -138,9 +138,7 @@ _BROWSER_FILES = \
browser_bug596687.js \ browser_bug596687.js \
browser_bug597218.js \ browser_bug597218.js \
browser_bug598923.js \ browser_bug598923.js \
browser_bug599325.js \
browser_bug609700.js \ browser_bug609700.js \
browser_bug616836.js \
browser_bug623155.js \ browser_bug623155.js \
browser_bug623893.js \ browser_bug623893.js \
browser_bug624734.js \ browser_bug624734.js \
@ -168,14 +166,12 @@ _BROWSER_FILES = \
browser_bug832435.js \ browser_bug832435.js \
browser_bug839103.js \ browser_bug839103.js \
browser_canonizeURL.js \ browser_canonizeURL.js \
browser_customize.js \
browser_findbarClose.js \ browser_findbarClose.js \
browser_homeDrop.js \ browser_homeDrop.js \
browser_keywordBookmarklets.js \ browser_keywordBookmarklets.js \
browser_contextSearchTabPosition.js \ browser_contextSearchTabPosition.js \
browser_ctrlTab.js \ browser_ctrlTab.js \
browser_customize_popupNotification.js \ browser_customize_popupNotification.js \
browser_disablechrome.js \
browser_discovery.js \ browser_discovery.js \
browser_duplicateIDs.js \ browser_duplicateIDs.js \
browser_fullscreen-window-open.js \ browser_fullscreen-window-open.js \
@ -242,7 +238,6 @@ _BROWSER_FILES = \
browser_visibleTabs_bookmarkAllTabs.js \ browser_visibleTabs_bookmarkAllTabs.js \
browser_visibleTabs_tabPreview.js \ browser_visibleTabs_tabPreview.js \
bug592338.html \ bug592338.html \
disablechrome.html \
discovery.html \ discovery.html \
domplate_test.js \ domplate_test.js \
file_bug822367_1.html \ file_bug822367_1.html \

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

@ -13,9 +13,8 @@ function test() {
function onTopMenuShown(event) { function onTopMenuShown(event) {
ok(1, "top menu popupshown listener called"); ok(1, "top menu popupshown listener called");
event.currentTarget.removeEventListener("popupshown", arguments.callee, false); event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
// open the customize or toolbars menu // open the toolbars menu
toolbarMenu = document.getElementById("appmenu_customizeMenu") || toolbarMenu = document.getElementById("viewToolbarsMenu").firstElementChild;
document.getElementById("viewToolbarsMenu").firstElementChild;
toolbarMenu.addEventListener("popupshown", onToolbarMenuShown, false); toolbarMenu.addEventListener("popupshown", onToolbarMenuShown, false);
toolbarMenu.addEventListener("popuphidden", onToolbarMenuHidden, false); toolbarMenu.addEventListener("popuphidden", onToolbarMenuHidden, false);
toolbarMenu.openPopup(); toolbarMenu.openPopup();
@ -54,9 +53,8 @@ function test() {
topMenu.hidePopup(); topMenu.hidePopup();
} }
// open the appmenu or view menu // open the view menu
topMenu = document.getElementById("appmenu-popup") || topMenu = document.getElementById("menu_viewPopup");
document.getElementById("menu_viewPopup");
topMenu.addEventListener("popupshown", onTopMenuShown, false); topMenu.addEventListener("popupshown", onTopMenuShown, false);
topMenu.addEventListener("popuphidden", onTopMenuHidden, false); topMenu.addEventListener("popuphidden", onTopMenuHidden, false);
topMenu.openPopup(); 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(); 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) { function openToolbarCustomizationUI(aCallback, aBrowserWin) {
if (!aBrowserWin) if (!aBrowserWin)
aBrowserWin = window; aBrowserWin = window;
aBrowserWin.document.getElementById("cmd_CustomizeToolbars").doCommand(); aBrowserWin.gCustomizeMode.enter();
aBrowserWin.gNavToolbox.addEventListener("beforecustomization", function UI_loaded() { aBrowserWin.gNavToolbox.addEventListener("customizationready", function UI_loaded() {
aBrowserWin.gNavToolbox.removeEventListener("beforecustomization", UI_loaded); aBrowserWin.gNavToolbox.removeEventListener("customizationready", UI_loaded);
executeSoon(function() {
let win = findToolbarCustomizationWindow(aBrowserWin); aCallback(aBrowserWin)
waitForFocus(function () { });
aCallback(win);
}, win);
}); });
} }
function closeToolbarCustomizationUI(aCallback, aBrowserWin) { function closeToolbarCustomizationUI(aCallback, aBrowserWin) {
let win = findToolbarCustomizationWindow(aBrowserWin); aBrowserWin.gNavToolbox.addEventListener("aftercustomization", function unloaded() {
aBrowserWin.gNavToolbox.removeEventListener("aftercustomization", unloaded);
win.addEventListener("unload", function unloaded() {
win.removeEventListener("unload", unloaded);
executeSoon(aCallback); executeSoon(aCallback);
}); });
let button = win.document.getElementById("donebutton"); aBrowserWin.gCustomizeMode.exit();
button.focus();
button.doCommand();
} }
function waitForCondition(condition, nextTest, errorMsg) { function waitForCondition(condition, nextTest, errorMsg) {

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

@ -1494,120 +1494,6 @@
</implementation> </implementation>
</binding> </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"> <binding id="menuitem-tooltip" extends="chrome://global/content/bindings/menu.xml#menuitem">
<implementation> <implementation>
<constructor><![CDATA[ <constructor><![CDATA[

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

@ -13,8 +13,7 @@ browser.jar:
#endif #endif
% overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul % overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul
% overlay chrome://global/content/viewPartialSource.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.xul (content/aboutDialog.xul)
* content/browser/aboutDialog.js (content/aboutDialog.js) * content/browser/aboutDialog.js (content/aboutDialog.js)
content/browser/aboutDialog.css (content/aboutDialog.css) content/browser/aboutDialog.css (content/aboutDialog.css)

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

@ -8,7 +8,7 @@
# BrandFullNameInternal is used for some registry and file system values # BrandFullNameInternal is used for some registry and file system values
# instead of BrandFullName and typically should not be modified. # instead of BrandFullName and typically should not be modified.
!define BrandFullNameInternal "Nightly" !define BrandFullNameInternal "UX"
!define CompanyName "mozilla.org" !define CompanyName "mozilla.org"
!define URLInfoAbout "http://www.mozilla.org" !define URLInfoAbout "http://www.mozilla.org"
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox" !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 # 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/. # 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 - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY brandShortName "Nightly"> <!ENTITY brandShortName "UX">
<!ENTITY brandFullName "Nightly"> <!ENTITY brandFullName "UX">
<!ENTITY vendorShortName "Mozilla"> <!ENTITY vendorShortName "Mozilla">
<!ENTITY trademarkInfo.part1 " "> <!ENTITY trademarkInfo.part1 " ">

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

@ -2,8 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
brandShortName=Nightly brandShortName=UX
brandFullName=Nightly brandFullName=UX
vendorShortName=Mozilla vendorShortName=Mozilla
syncBrandShortName=Sync syncBrandShortName=Sync

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

@ -84,6 +84,8 @@ static RedirEntry kRedirMap[] = {
{ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml", { "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
nsIAboutModule::ALLOW_SCRIPT }, nsIAboutModule::ALLOW_SCRIPT },
#endif #endif
{ "customizing", "chrome://browser/content/customizableui/aboutCustomizing.xhtml",
nsIAboutModule::ALLOW_SCRIPT },
}; };
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap); static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);

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

@ -107,6 +107,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
#ifdef MOZ_SERVICES_HEALTHREPORT #ifdef MOZ_SERVICES_HEALTHREPORT
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID }, { NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#endif #endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "customizing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#if defined(XP_WIN) #if defined(XP_WIN)
{ NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID }, { NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
#elif defined(XP_MACOSX) #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,92 @@
<!-- 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;"
class="panel-combined-button"
command="cmd_cut"/>
<toolbarbutton id="PanelUI-copy-btn" flex="1"
label="&copyCmd.label;"
tooltiptext="&copyButton.tooltip;"
class="panel-combined-button"
command="cmd_copy"/>
<toolbarbutton id="PanelUI-paste-btn" flex="1"
label="&pasteCmd.label;"
tooltiptext="&pasteButton.tooltip;"
class="panel-combined-button"
command="cmd_paste"/>
</hbox>
<hbox class="PanelUI-zoomControls">
<toolbarbutton id="PanelUI-zoomOut-btn" flex="1"
noautoclose="true" label="&fullZoomReduceCmd.label;"
command="cmd_fullZoomReduce"
class="panel-combined-button"
tooltiptext="&zoomOutButton.tooltip;"/>
<toolbarbutton id="PanelUI-zoomReset-btn" flex="1"
noautoclose="true" command="cmd_fullZoomReset"
class="panel-combined-button"
tooltiptext="&zoomReset.tooltip;"/>
<toolbarbutton id="PanelUI-zoomIn-btn" flex="1"
noautoclose="true" label="&fullZoomEnlargeCmd.label;"
command="cmd_fullZoomEnlarge"
class="panel-combined-button"
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;"/>
<toolbarbutton id="appMenuClearRecentHistory"
label="&appMenuHistory.clearRecent.label;"
command="Tools:Sanitize"/>
<toolbarbutton id="appMenuRestoreLastSession"
label="&appMenuHistory.restoreSession.label;"
command="Browser:RestoreLastSession"/>
<vbox id="PanelUI-historyItems"/>
<label value="&appMenuHistory.showAll.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>
<panel id="widget-overflow"
role="group"
type="arrow"
level="top"
consumeoutsideclicks="true">
<vbox id="widget-overflow-list">
</vbox>
</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,241 @@
/* 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");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
let gDebug = false;
try {
gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
} catch (e) {}
function LOG(aMsg) {
if (gDebug) {
Services.console.logStringMessage("[CustomizableWidgets] " + aMsg);
}
}
function ERROR(aMsg) Cu.reportError("[CustomizableWidgets] " + aMsg);
const CustomizableWidgets = [{
id: "history-panelmenu",
type: "view",
viewId: "PanelUI-history",
name: "History...",
description: "History",
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,850 @@
/* 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;
let customizableToolbars = document.querySelectorAll("toolbar[customizable=true]:not([autohide=true])");
for (let toolbar of customizableToolbars)
toolbar.setAttribute("customizing", true);
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 customizableToolbars = document.querySelectorAll("toolbar[customizable=true]:not([autohide=true])");
for (let toolbar of customizableToolbars)
toolbar.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) {
return;
}
// Do nothing if thw widget is not allowed to be removed.
if (targetArea.id == kPaletteId &&
!CustomizableUI.isWidgetRemovable(draggedItemId)) {
return;
}
// Do nothing if the widget is not allowed to move to the target area.
if (targetArea.id != kPaletteId &&
!CustomizableUI.canWidgetMoveToArea(draggedItemId, targetArea.id)) {
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) {
if (!CustomizableUI.isWidgetRemovable(draggedItemId)) {
return;
}
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;
}
if (!CustomizableUI.canWidgetMoveToArea(draggedItemId, targetArea.id)) {
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 += [ PARALLEL_DIRS += [
'about', 'about',
'certerror', 'certerror',
'customizableui',
'dirprovider', 'dirprovider',
'downloads', 'downloads',
'feeds', 'feeds',

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

@ -1171,7 +1171,7 @@ BrowserGlue.prototype = {
}, },
_migrateUI: function BG__migrateUI() { _migrateUI: function BG__migrateUI() {
const UI_VERSION = 13; const UI_VERSION = 14;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#"; const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
let currentUIVersion = 0; let currentUIVersion = 0;
try { try {
@ -1361,6 +1361,34 @@ BrowserGlue.prototype = {
catch (ex) {} 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) if (this._dirty)
this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush(); this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();

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

@ -1,6 +1,9 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
Cu.import("resource:///modules/CustomizableUI.jsm");
function test() { function test() {
let cw; let cw;
let win; let win;
@ -31,10 +34,7 @@ function test() {
let pos = currentSet.indexOf(buttonId); let pos = currentSet.indexOf(buttonId);
if (-1 < pos) { if (-1 < pos) {
currentSet.splice(pos, 1); CustomizableUI.removeWidgetFromArea("tabview-button");
toolbar.setAttribute("currentset", currentSet.join(","));
toolbar.currentSet = currentSet.join(",");
win.document.persist(toolbar.id, "currentset");
} }
} }

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

@ -15,6 +15,9 @@
inside the private browsing mode --> inside the private browsing mode -->
<!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)"> <!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)">
<!ENTITY appmenu.title "Customize and Control &brandFullName;">
<!ENTITY navbarOverflow.label "More tools…">
<!-- Tab context menu --> <!-- Tab context menu -->
<!ENTITY reloadTab.label "Reload Tab"> <!ENTITY reloadTab.label "Reload Tab">
<!ENTITY reloadTab.accesskey "R"> <!ENTITY reloadTab.accesskey "R">
@ -68,7 +71,6 @@ can reach it easily. -->
<!ENTITY menubarCmd.label "Menu Bar"> <!ENTITY menubarCmd.label "Menu Bar">
<!ENTITY menubarCmd.accesskey "M"> <!ENTITY menubarCmd.accesskey "M">
<!ENTITY navbarCmd.label "Navigation Toolbar"> <!ENTITY navbarCmd.label "Navigation Toolbar">
<!ENTITY navbarCmd.accesskey "N">
<!ENTITY personalbarCmd.label "Bookmarks Toolbar"> <!ENTITY personalbarCmd.label "Bookmarks Toolbar">
<!ENTITY personalbarCmd.accesskey "B"> <!ENTITY personalbarCmd.accesskey "B">
<!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items"> <!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
@ -160,8 +162,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY bookmarksItem.title "Bookmarks"> <!ENTITY bookmarksItem.title "Bookmarks">
<!-- Toolbar items --> <!-- Toolbar items -->
<!ENTITY appMenuButton.label "Menu">
<!ENTITY appMenuButton.tooltip "Open &brandShortName; menu">
<!ENTITY homeButton.label "Home"> <!ENTITY homeButton.label "Home">
<!ENTITY tabGroupsButton.label "Tab Groups"> <!ENTITY tabGroupsButton.label "Tab Groups">
@ -320,16 +320,12 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY showAllHistoryCmd2.label "Show All History"> <!ENTITY showAllHistoryCmd2.label "Show All History">
<!ENTITY showAllHistoryCmd.commandkey "H"> <!ENTITY showAllHistoryCmd.commandkey "H">
<!ENTITY appMenuEdit.label "Edit">
<!ENTITY appMenuCustomize.label "Customize"> <!ENTITY appMenuCustomize.label "Customize">
<!ENTITY appMenuToolbarLayout.label "Toolbar Layout…"> <!ENTITY appMenuBookmarks.label "Bookmarks">
<!ENTITY appMenuSidebars.label "Sidebars"> <!ENTITY appMenuHistory.label "History">
<!ENTITY appMenuFind.label "Find…"> <!ENTITY appMenuHistory.showAll.label "Show All History">
<!ENTITY appMenuUnsorted.label "Unsorted Bookmarks"> <!ENTITY appMenuHistory.clearRecent.label "Clear Recent History…">
<!ENTITY appMenuWebDeveloper.label "Web Developer"> <!ENTITY appMenuHistory.restoreSession.label "Restore Previous Session">
<!ENTITY appMenuGettingStarted.label "Getting Started">
<!ENTITY appMenuSafeMode.label "Restart with Add-ons Disabled…">
<!ENTITY appMenuSafeMode.accesskey "R">
<!ENTITY openCmd.commandkey "l"> <!ENTITY openCmd.commandkey "l">
<!ENTITY urlbar.placeholder2 "Search or enter address"> <!ENTITY urlbar.placeholder2 "Search or enter address">
@ -541,6 +537,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY zoomOutButton.tooltip "Zoom out"> <!ENTITY zoomOutButton.tooltip "Zoom out">
<!ENTITY zoomInButton.tooltip "Zoom in"> <!ENTITY zoomInButton.tooltip "Zoom in">
<!ENTITY zoomControls.label "Zoom Controls"> <!ENTITY zoomControls.label "Zoom Controls">
<!ENTITY zoomReset.tooltip "Reset Zoom">
<!ENTITY quitApplicationCmdWin.label "Exit"> <!ENTITY quitApplicationCmdWin.label "Exit">
<!ENTITY quitApplicationCmdWin.accesskey "x"> <!ENTITY quitApplicationCmdWin.accesskey "x">
@ -651,6 +648,13 @@ just addresses the organization to follow, e.g. "This site is run by " -->
<!ENTITY social.learnMore.accesskey "l"> <!ENTITY social.learnMore.accesskey "l">
<!ENTITY social.closeNotificationItem.label "Not Now"> <!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.commandkey "c">
<!ENTITY social.chatBar.label "Focus chats"> <!ENTITY social.chatBar.label "Focus chats">
<!ENTITY social.chatBar.accesskey "c"> <!ENTITY social.chatBar.accesskey "c">

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

@ -465,3 +465,6 @@ slowStartup.helpButton.label = Learn How to Speed It Up
slowStartup.helpButton.accesskey = L slowStartup.helpButton.accesskey = L
slowStartup.disableNotificationButton.label = Don't Tell Me Again slowStartup.disableNotificationButton.label = Don't Tell Me Again
slowStartup.disableNotificationButton.accesskey = A 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) { _getBrowserForId: function(aId) {
let content = Services.wm.getOuterWindowWithId(aId); let content = Services.wm.getOuterWindowWithId(aId);
if (content) { if (content) {

Двоичные данные
browser/themes/linux/appmenu.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 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"); @namespace html url("http://www.w3.org/1999/xhtml");
%include ../shared/browser.inc %include ../shared/browser.inc
%include linuxShared.inc
%filter substitution %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 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 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"][mode=icons][iconsize=small],#nav-bar:not([currentset])[mode=icons][iconsize=small]) > #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 32
%define conditionalForwardWithUrlbarWidth_small 24 %define conditionalForwardWithUrlbarWidth_small 24
@ -33,7 +33,7 @@
border-top: none; border-top: none;
} }
#main-window:not([disablechrome]) #navigator-toolbox[tabsontop=true] { #navigator-toolbox[tabsontop=true] {
border-bottom: 1px solid ThreeDShadow; border-bottom: 1px solid ThreeDShadow;
} }
@ -53,11 +53,37 @@
#nav-bar[collapsed=true] + toolbar:not(:-moz-lwtheme), #nav-bar[collapsed=true] + toolbar:not(:-moz-lwtheme),
#nav-bar[collapsed=true] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme), #nav-bar[collapsed=true] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme),
#nav-bar[tabsontop=true], #nav-bar[tabsontop=true],
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar, #nav-bar[tabsontop=true][collapsed=true] + toolbar,
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar { #nav-bar[tabsontop=true][collapsed=true] + #customToolbars + #PersonalToolbar {
background-image: linear-gradient(@toolbarHighlight@, rgba(255,255,255,0)); background-image: linear-gradient(@toolbarHighlight@, rgba(255,255,255,0));
} }
#nav-bar[tabsontop=true],
#nav-bar[tabsontop=true][collapsed=true] + toolbar,
#nav-bar[tabsontop=true][collapsed=true] + #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;
}
#nav-bar-overflow-button {
-moz-image-region: rect(-5px, 12px, 11px, -4px);
}
#widget-overflow-list > .overflowedItem {
width: 100%;
min-height: 36px;
background-repeat: no-repeat;
background-position: 0 center;
}
#widget-overflow-list > .overflowedItem > .toolbarbutton-text {
-moz-padding-start: 10px;
text-align: start;
}
#personal-bookmarks { #personal-bookmarks {
min-height: 29px; min-height: 29px;
} }
@ -96,7 +122,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 { .bookmark-item > .toolbarbutton-text {
display: -moz-box !important; display: -moz-box !important;
} }
@ -218,7 +244,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic"); -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
} }
#appmenu_newNavigator,
#placesContext_open\:newwindow, #placesContext_open\:newwindow,
#menu_newNavigator, #menu_newNavigator,
#context-openlink, #context-openlink,
@ -227,8 +252,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-image-region: rect(0px 80px 16px 64px); -moz-image-region: rect(0px 80px 16px 64px);
} }
#appmenu_newTab,
#appmenu_newTab_popup,
#placesContext_open\:newtab, #placesContext_open\:newtab,
#placesContext_openContainer\:tabs, #placesContext_openContainer\:tabs,
#menu_newNavigatorTab, #menu_newNavigatorTab,
@ -238,7 +261,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-image-region: rect(0px 64px 16px 48px); -moz-image-region: rect(0px 64px 16px 48px);
} }
#appmenu_openFile,
#menu_openFile { #menu_openFile {
list-style-image: url("moz-icon://stock/gtk-open?size=menu"); list-style-image: url("moz-icon://stock/gtk-open?size=menu");
} }
@ -255,7 +277,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-media-pause?size=menu"); list-style-image: url("moz-icon://stock/gtk-media-pause?size=menu");
} }
#appmenu_savePage,
#menu_savePage, #menu_savePage,
#context-savelink, #context-savelink,
#context-saveimage, #context-saveimage,
@ -266,19 +287,15 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-save-as?size=menu"); list-style-image: url("moz-icon://stock/gtk-save-as?size=menu");
} }
#appmenu_printPreview,
#menu_printPreview { #menu_printPreview {
list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu"); list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu");
} }
#appmenu_print,
#appmenu_print_popup,
#menu_print, #menu_print,
#context-printframe { #context-printframe {
list-style-image: url("moz-icon://stock/gtk-print?size=menu"); list-style-image: url("moz-icon://stock/gtk-print?size=menu");
} }
#appmenu-quit,
#menu_FileQuitItem { #menu_FileQuitItem {
list-style-image: url("moz-icon://stock/gtk-quit?size=menu"); list-style-image: url("moz-icon://stock/gtk-quit?size=menu");
} }
@ -361,7 +378,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-select-all?size=menu"); list-style-image: url("moz-icon://stock/gtk-select-all?size=menu");
} }
#appmenu_find,
#menu_find { #menu_find {
list-style-image: url("moz-icon://stock/gtk-find?size=menu"); list-style-image: url("moz-icon://stock/gtk-find?size=menu");
} }
@ -370,8 +386,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-find?size=menu&state=disabled"); list-style-image: url("moz-icon://stock/gtk-find?size=menu&state=disabled");
} }
#appmenu_customize,
#appmenu_preferences,
#menu_preferences { #menu_preferences {
list-style-image: url("moz-icon://stock/gtk-preferences?size=menu"); list-style-image: url("moz-icon://stock/gtk-preferences?size=menu");
} }
@ -454,15 +468,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-home?size=menu"); list-style-image: url("moz-icon://stock/gtk-home?size=menu");
} }
#appmenu_history,
#appmenu_showAllHistory,
#menu_showAllHistory { #menu_showAllHistory {
list-style-image: url("chrome://browser/skin/Toolbar-small.png"); list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 32px 16px 16px); -moz-image-region: rect(0px 32px 16px 16px);
} }
#appmenu_bookmarks,
#appmenu_showAllBookmarks,
#bookmarksShowAll { #bookmarksShowAll {
list-style-image: url("chrome://browser/skin/Toolbar-small.png"); list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 48px 16px 32px); -moz-image-region: rect(0px 48px 16px 32px);
@ -488,13 +498,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png"); list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
} }
#appmenu_downloads,
#menu_openDownloads { #menu_openDownloads {
list-style-image: url("chrome://browser/skin/Toolbar-small.png"); list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 16px 16px 0px); -moz-image-region: rect(0px 16px 16px 0px);
} }
#appmenu_addons,
#menu_openAddons { #menu_openAddons {
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png"); list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png");
} }
@ -505,8 +513,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-info?size=menu"); list-style-image: url("moz-icon://stock/gtk-info?size=menu");
} }
#appmenu_privateBrowsing,
#appmenu_newPrivateWindow,
#privateBrowsingItem { #privateBrowsingItem {
list-style-image: url("chrome://browser/skin/Privacy-16.png"); list-style-image: url("chrome://browser/skin/Privacy-16.png");
} }
@ -515,18 +521,14 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
list-style-image: url("moz-icon://stock/gtk-properties?size=menu"); list-style-image: url("moz-icon://stock/gtk-properties?size=menu");
} }
#appmenu_sanitizeHistory,
#sanitizeItem { #sanitizeItem {
list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); list-style-image: url("moz-icon://stock/gtk-clear?size=menu");
} }
#appmenu_help,
#appmenu_openHelp,
#menu_openHelp { #menu_openHelp {
list-style-image: url("moz-icon://stock/gtk-help?size=menu"); list-style-image: url("moz-icon://stock/gtk-help?size=menu");
} }
#appmenu_about,
#aboutName { #aboutName {
list-style-image: url("moz-icon://stock/gtk-about?size=menu"); list-style-image: url("moz-icon://stock/gtk-about?size=menu");
} }
@ -546,11 +548,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
-moz-margin-end: 0; -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:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button { .toolbarbutton-1 > .toolbarbutton-menubutton-button {
padding: 5px; padding: 5px;
@ -654,7 +651,9 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-moz-image-region: rect(0px 24px 24px 0px); -moz-image-region: rect(0px 24px 24px 0px);
} }
#history-button { #history-button,
toolbar > .customization-target > #history-panelmenu,
toolbar > .customization-target > toolbarpaletteitem > #history-panelmenu {
-moz-image-region: rect(0px 48px 24px 24px); -moz-image-region: rect(0px 48px 24px 24px);
} }
@ -686,39 +685,53 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-moz-image-region: rect(0px 120px 24px 96px); -moz-image-region: rect(0px 120px 24px 96px);
} }
/* A lot of these buttons are going to be removed in later bugs, but until then
* we're overriding the menuPanel-icons sprites with these ones with
* !important.
*
* Here are the relevant removal bugs:
* #bookmarks-button - Bug 867368
* #cut-button, #copy-button, #paste-button - Bug 870901
* #zoom-out-button, #zoom-in-button - Bug 870897
*/
#bookmarks-button {
list-style-image: url("chrome://browser/skin/Toolbar.png") !important;
}
#cut-button { #cut-button {
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar"); list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar") !important;
} }
#cut-button[disabled="true"] { #cut-button[disabled="true"] {
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled"); list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar&state=disabled") !important;
} }
#copy-button { #copy-button {
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar"); list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar") !important;
} }
#copy-button[disabled="true"] { #copy-button[disabled="true"] {
list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled"); list-style-image: url("moz-icon://stock/gtk-copy?size=toolbar&state=disabled") !important;
} }
#paste-button { #paste-button {
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar"); list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar") !important;
} }
#paste-button[disabled="true"] { #paste-button[disabled="true"] {
list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled"); list-style-image: url("moz-icon://stock/gtk-paste?size=toolbar&state=disabled") !important;
}
#zoom-out-button {
list-style-image: url("moz-icon://stock/gtk-zoom-out?size=toolbar") !important;
}
#zoom-in-button {
list-style-image: url("moz-icon://stock/gtk-zoom-in?size=toolbar") !important;
} }
#fullscreen-button { #fullscreen-button {
list-style-image: url("moz-icon://stock/gtk-fullscreen?size=toolbar"); list-style-image: url("moz-icon://stock/gtk-fullscreen?size=toolbar");
} }
#zoom-out-button {
list-style-image: url("moz-icon://stock/gtk-zoom-out?size=toolbar");
}
#zoom-in-button {
list-style-image: url("moz-icon://stock/gtk-zoom-in?size=toolbar");
}
#sync-button { #sync-button {
-moz-image-region: rect(0px 144px 24px 120px); -moz-image-region: rect(0px 144px 24px 120px);
} }
@ -1616,125 +1629,63 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
/* Tabstrip */ /* 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 { #TabsToolbar {
min-height: 0; min-height: 0;
padding: 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) { #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
-moz-appearance: menubar; -moz-appearance: menubar;
color: -moz-menubartext; 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) { #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] { #TabsToolbar[tabsontop=false] {
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%); background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, rgba(0,0,0,.05) 1px, transparent 50%);
} }
.tabbrowser-tab, .tab-background-middle[selected=true]:-moz-lwtheme {
.tabs-newtab-button { background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
position: static; @fgTabTexture@;
-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 */
} }
.tabbrowser-tab:hover, .tabbrowser-tab:-moz-lwtheme {
.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%);
color: inherit; color: inherit;
} }
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]), .tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
.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 {
outline: 1px dotted; 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 { #context_reloadTab {
list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
} }
@ -1758,7 +1709,8 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
/* Tab drag and drop */ /* Tab drag and drop */
.tab-drop-indicator { .tab-drop-indicator {
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png); list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
margin-bottom: -11px; margin-bottom: -9px;
z-index: 3;
} }
/* In-tab close button */ /* In-tab close button */
@ -1769,11 +1721,10 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
} }
.tab-close-button { .tab-close-button {
padding: 0;
list-style-image: url("moz-icon://stock/gtk-close?size=menu"); list-style-image: url("moz-icon://stock/gtk-close?size=menu");
margin-top: -1px; margin-top: 0;
margin-bottom: -1px; margin-bottom: -1px;
-moz-margin-end: -1px; -moz-margin-end: -4px;
} }
/* Tabstrip new tab button */ /* Tabstrip new tab button */
@ -1894,10 +1845,6 @@ toolbarbutton.chevron > .toolbarbutton-icon {
margin: 0; margin: 0;
} }
toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
display: -moz-box; /* display chevron icon in text mode */
}
/* Ctrl-Tab */ /* Ctrl-Tab */
.ctrlTab-preview { .ctrlTab-preview {
@ -1935,44 +1882,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
margin-top: 10px; 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 */ /* Add-on bar */
#addon-bar { #addon-bar {
@ -2282,6 +2191,45 @@ chatbox {
border-top-right-radius: 2.5px; 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] #navigator-toolbox > toolbar:not(#toolbar-menubar):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(#toolbar-menubar):not(#TabsToolbar) {
border-bottom-width: 0;
}
#main-window[customizing] #TabsToolbar {
-moz-appearance: none;
background-clip: padding-box;
border-right: 3px solid transparent;
border-left: 3px solid transparent;
}
/* End customization mode */
.click-to-play-plugins-notification-content { .click-to-play-plugins-notification-content {
margin: -10px; margin: -10px;
} }

Двоичные данные
browser/themes/linux/customizableui/background-noise-toolbar.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 15 KiB

Двоичные данные
browser/themes/linux/customizableui/customizeMode-gridTexture.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 118 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичные данные
browser/themes/linux/customizableui/menuPanel-icons.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
browser/themes/linux/customizableui/menuPanel-small-icons.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 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,16 @@ browser.jar:
skin/classic/browser/aboutSyncTabs.css skin/classic/browser/aboutSyncTabs.css
#endif #endif
skin/classic/browser/actionicon-tab.png skin/classic/browser/actionicon-tab.png
skin/classic/browser/appmenu.png
* skin/classic/browser/browser.css * skin/classic/browser/browser.css
* skin/classic/browser/browser-lightweightTheme.css
skin/classic/browser/click-to-play-warning-stripes.png 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/customizableui/menuPanel-icons.png (customizableui/menuPanel-icons.png)
skin/classic/browser/customizableui/menuPanel-small-icons.png (customizableui/menuPanel-small-icons.png)
* skin/classic/browser/engineManager.css * skin/classic/browser/engineManager.css
skin/classic/browser/Geolocation-16.png skin/classic/browser/Geolocation-16.png
skin/classic/browser/Geolocation-64.png skin/classic/browser/Geolocation-64.png
@ -57,6 +65,7 @@ browser.jar:
skin/classic/browser/webRTC-shareDevice-16.png skin/classic/browser/webRTC-shareDevice-16.png
skin/classic/browser/webRTC-shareDevice-64.png skin/classic/browser/webRTC-shareDevice-64.png
skin/classic/browser/webRTC-sharingDevice-16.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/buttons.png (downloads/buttons.png)
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.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) skin/classic/browser/downloads/download-glow-small.png (downloads/download-glow-small.png)
@ -113,8 +122,15 @@ browser.jar:
skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png)
skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png) skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png)
skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.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/tab-active-middle.png (tabbrowser/tab-active-middle.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.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/edit-light.png (tabview/edit-light.png)
skin/classic/browser/tabview/search.png (tabview/search.png) skin/classic/browser/tabview/search.png (tabview/search.png)
skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.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)

Двоичные данные
browser/themes/linux/tabbrowser/tab-active-middle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 96 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-background-end.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 721 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-background-middle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 161 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-background-start.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 705 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-separator.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 192 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-stroke-end.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 473 B

Двоичные данные
browser/themes/linux/tabbrowser/tab-stroke-start.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 483 B

Двоичные данные
browser/themes/osx/Toolbar-background-noise.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 15 KiB

Двоичные данные
browser/themes/osx/appmenu.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 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 %include shared.inc
%filter substitution %filter substitution
%define forwardTransitionLength 150ms %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 %define conditionalForwardWithUrlbarWidth 27
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@ -18,19 +18,25 @@
opacity: .9; 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 { #navigator-toolbox toolbarbutton:-moz-lwtheme {
color: inherit; color: inherit;
text-shadow: inherit; text-shadow: inherit;
} }
#PersonalToolbar:-moz-lwtheme,
#nav-bar:-moz-lwtheme,
#main-window[privatebrowsingmode=temporary] #nav-bar[tabsontop=false] { #main-window[privatebrowsingmode=temporary] #nav-bar[tabsontop=false] {
-moz-appearance: none !important; -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 { #main-window {
@ -38,13 +44,20 @@
background-color: #eeeeee; background-color: #eeeeee;
} }
#titlebar-buttonbox-container, #titlebar-buttonbox > .titlebar-button {
#main-window:not([drawintitlebar=true]) > #titlebar {
display: none; display: none;
} }
#titlebar { #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"] { #main-window[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
@ -62,49 +75,57 @@ toolbarseparator {
min-height: 22px; min-height: 22px;
} }
/* We need more height when toolbar buttons show both icon and text. */ toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):not(#nav-bar):not(:-moz-lwtheme) {
toolbar[mode="full"] toolbarseparator { -moz-appearance: none;
min-height: 36px; background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%);
} }
#nav-bar { #nav-bar {
padding-bottom: 4px !important; 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],
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar, #nav-bar[tabsontop=true][collapsed=true] + toolbar,
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar { #nav-bar[tabsontop=true][collapsed=true] + #customToolbars + #PersonalToolbar {
-moz-appearance: none; -moz-appearance: none;
margin-top: 0; /* don't overlay the bottom border of the tabs toolbar */
padding-top: 4px !important; padding-top: 4px !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.57); background: url(chrome://browser/skin/Toolbar-background-noise.png),
background-color: -moz-mac-chrome-active; linear-gradient(hsl(0,0%,93%), hsl(0,0%,83%));
background-image: linear-gradient(rgba(255,255,255,.43), rgba(255,255,255,0)) !important; /* override lwtheme style */ background-clip: border-box;
background-origin: border-box !important; 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, #navigator-toolbox[tabsontop=true] > toolbar:not(#TabsToolbar):-moz-lwtheme {
#nav-bar[tabsontop=true]:-moz-lwtheme, background-color: @toolbarColorLWT@;
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:-moz-lwtheme, background-image: url(chrome://browser/skin/Toolbar-background-noise.png);
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:-moz-lwtheme {
background-color: transparent;
border-bottom-color: transparent;
} }
#PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive, #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive,
#nav-bar[tabsontop=true]:not(:-moz-lwtheme):-moz-window-inactive, #nav-bar[tabsontop=true]:not(:-moz-lwtheme):-moz-window-inactive,
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme):-moz-window-inactive, #nav-bar[tabsontop=true][collapsed=true] + toolbar:not(:-moz-lwtheme):-moz-window-inactive,
#nav-bar[tabsontop=true][collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive { #nav-bar[tabsontop=true][collapsed=true] + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive {
background-color: -moz-mac-chrome-inactive; background-color: -moz-mac-chrome-inactive;
border-bottom-color: rgba(0, 0, 0, 0.32); }
#nav-bar-overflow-button {
-moz-image-region: rect(-5px, 12px, 11px, -4px);
}
#widget-overflow-list > .overflowedItem {
width: 100%;
min-height: 36px;
background-repeat: no-repeat;
background-position: 0 center;
}
#widget-overflow-list > .overflowedItem > .toolbarbutton-text {
-moz-padding-start: 10px;
text-align: start;
} }
/* ----- BOOKMARK TOOLBAR ----- */ /* ----- BOOKMARK TOOLBAR ----- */
@ -123,10 +144,6 @@ toolbarbutton.chevron > .toolbarbutton-text {
display: none; 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 { toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon {
transform: scaleX(-1); transform: scaleX(-1);
} }
@ -172,7 +189,7 @@ toolbarbutton.bookmark-item {
} }
.bookmark-item > .toolbarbutton-text { .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; margin: 0 !important;
} }
@ -433,30 +450,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:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button, .toolbarbutton-1 > .toolbarbutton-menubutton-button,
#restore-button { #restore-button {
min-width: 28px; 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:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon,
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon { .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
margin: 2px; margin: 2px;
@ -519,11 +518,6 @@ toolbar:not([mode="icons"]) #restore-button {
-moz-border-start: none !important; -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-button:-moz-locale-dir(rtl),
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) { .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
border-top-left-radius: 0; border-top-left-radius: 0;
@ -536,36 +530,32 @@ toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmar
border-bottom-right-radius: 0; 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-text,
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text { .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
margin: 2px 0 0; margin: 2px 0 0;
} }
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover:-moz-lwtheme, .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, .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, .toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover:-moz-lwtheme,
toolbar[mode="icons"] .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme, .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:-moz-lwtheme,
toolbar[mode="icons"] #restore-button:not([disabled="true"]):active:hover:-moz-lwtheme { #restore-button:not([disabled="true"]):active:hover:-moz-lwtheme {
text-shadow: @loweredShadow@; text-shadow: @loweredShadow@;
background-color: rgba(0,0,0,0.2); 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); 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); 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); 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); 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); 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; margin-top: 1px;
} }
@ -582,42 +572,42 @@ toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
#back-button, #back-button,
#forward-button:-moz-locale-dir(rtl), #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); -moz-image-region: rect(0, 40px, 20px, 20px);
} }
@media (min-resolution: 2dppx) { @media (min-resolution: 2dppx) {
#back-button, #back-button,
#forward-button:-moz-locale-dir(rtl), #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); -moz-image-region: rect(0, 80px, 40px, 40px);
} }
} }
#forward-button, #forward-button,
#back-button:-moz-locale-dir(rtl), #back-button:-moz-locale-dir(rtl),
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl), #navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme { #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
-moz-image-region: rect(0, 60px, 20px, 40px); -moz-image-region: rect(0, 60px, 20px, 40px);
} }
@media (min-resolution: 2dppx) { @media (min-resolution: 2dppx) {
#forward-button, #forward-button,
#back-button:-moz-locale-dir(rtl), #back-button:-moz-locale-dir(rtl),
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl), #navigator-toolbox[iconsize="large"] > #nav-bar #forward-button:-moz-locale-dir(rtl),
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme { #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
-moz-image-region: rect(0, 120px, 40px, 80px); -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"] > #nav-bar #back-button:-moz-locale-dir(rtl),
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:-moz-locale-dir(rtl), #navigator-toolbox[iconsize="large"] > #nav-bar #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,
toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme { #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
transform: scaleX(-1); 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-appearance: none;
-moz-margin-end: -7px; -moz-margin-end: -7px;
position: relative; position: relative;
@ -630,12 +620,12 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
} }
@media (min-resolution: 2dppx) { @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); -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; height: 31px;
padding: 4px 5px 5px 3px; padding: 4px 5px 5px 3px;
margin-bottom: -1px; margin-bottom: -1px;
@ -644,32 +634,32 @@ toolbar[mode="icons"] #forward-button:-moz-locale-dir(rtl):-moz-lwtheme {
} }
@media (min-resolution: 2dppx) { @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-image: url(chrome://browser/skin/keyhole-circle@2x.png);
background-size: 90px; 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; 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"] > #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[open="true"]:not(:-moz-lwtheme) {
background-position: -30px 0; background-position: -30px 0;
} }
toolbar[mode="icons"] #forward-button { #forward-button {
-moz-margin-start: 0; -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 */ /* shift the icon away from the back button */
margin-left: 3px; margin-left: 3px;
margin-right: -1px; 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); clip-path: url(chrome://browser/content/browser.xul#osx-keyhole-forward-clip-path);
} }
@ -738,25 +728,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; 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; padding-left: 2px;
} }
toolbar[mode="icons"] #forward-button:-moz-lwtheme { #forward-button:-moz-lwtheme {
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-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; -moz-margin-end: 0;
width: 26px; 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; padding-right: 2px;
border-right-width: 0; border-right-width: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
@ -886,7 +876,9 @@ toolbar[mode="icons"] #forward-button:-moz-lwtheme {
/* history sidebar button */ /* history sidebar button */
#history-button { #history-button,
toolbar > .customization-target > #history-panelmenu,
toolbar > .customization-target > toolbarpaletteitem > #history-panelmenu {
-moz-image-region: rect(0, 160px, 20px, 140px); -moz-image-region: rect(0, 160px, 20px, 140px);
} }
@ -1074,11 +1066,11 @@ toolbar[mode="icons"] #forward-button:-moz-lwtheme {
} }
} }
toolbar[mode="icons"] #zoom-out-button { #zoom-out-button {
-moz-margin-end: 0; -moz-margin-end: 0;
} }
toolbar[mode="icons"] #zoom-in-button { #zoom-in-button {
-moz-border-start: none; -moz-border-start: none;
-moz-margin-start: 0; -moz-margin-start: 0;
} }
@ -2190,22 +2182,30 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
margin: 0; margin: 0;
} }
.tab-throbber, %include ../shared/tabs.inc.css
.tab-icon-image {
width: 16px;
height: 16px;
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
}
.tab-throbber { .tab-label {
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png"); margin-top: 3px;
} margin-bottom: 0;
text-align: center;
.tab-throbber[progress] {
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
} }
@media (min-resolution: 2dppx) { @media (min-resolution: 2dppx) {
/* image preloading hack from shared/tabs.inc.css */
#TabsToolbar::before {
background-image:
url(chrome://browser/skin/tabbrowser/tab-background-end@2x.png),
url(chrome://browser/skin/tabbrowser/tab-background-middle@2x.png),
url(chrome://browser/skin/tabbrowser/tab-background-start@2x.png);
}
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]),
.tabs-newtab-button:hover {
background-image: url(chrome://browser/skin/tabbrowser/tab-background-start@2x.png),
url(chrome://browser/skin/tabbrowser/tab-background-middle@2x.png),
url(chrome://browser/skin/tabbrowser/tab-background-end@2x.png);
}
.tab-icon-image { .tab-icon-image {
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png"); list-style-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png");
image-rendering: -moz-crisp-edges; image-rendering: -moz-crisp-edges;
@ -2221,251 +2221,55 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
} }
.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected="true"]) { .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]) { .tabbrowser-tab:not([pinned]):not([fadein]) {
transition: min-width 200ms ease-out /* copied from browser/base/content/browser.css */, 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 */, max-width 230ms 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 */; opacity 50ms ease-out 80ms /* 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;
} }
.tabbrowser-tab, .tabbrowser-tab,
.tabs-newtab-button { .tabs-newtab-button {
-moz-appearance: none;
font: message-box; font: message-box;
font-weight: bold; font-weight: bold;
text-shadow: @loweredShadow@; text-shadow: @loweredShadow@;
margin: 0;
padding: 0;
border: none; border: none;
text-align: center;
-moz-box-align: stretch;
} }
%define TABSONTOP_TAB #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab .tabbrowser-tab {
%define TABSONBOTTOM_TAB #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab color: #333;
%define TABSONTOP_TAB_STACK #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab > .tab-stack }
%define TABSONBOTTOM_TAB_STACK #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab > .tab-stack
%define TABSONTOP_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button %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 %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]) { .tabbrowser-tabs[closebuttons="hidden"] > * > * > * > .tab-close-button:not([pinned]) {
display: -moz-box; display: -moz-box;
visibility: hidden; visibility: hidden;
} }
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
-moz-padding-start: 5px;
-moz-padding-end: 4px;
}
.tab-content,
.tabs-newtab-button > .toolbarbutton-icon { .tabs-newtab-button > .toolbarbutton-icon {
-moz-box-align: center; -moz-box-align: center;
border: solid transparent; border: solid transparent;
border-width: 0 11px; border-width: 0 11px;
} }
.tab-background-start, .tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label {
.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 {
box-shadow: @focusRingShadow@; 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 { .tabbrowser-tab:-moz-lwtheme {
color: inherit; color: inherit;
text-shadow: 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 /* 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: * 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 * toolbar on #TabsToolbar itself. Instead, we set it on a box of the
@ -2474,13 +2278,13 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
content: ''; content: '';
display: block; display: block;
-moz-appearance: toolbar; -moz-appearance: toolbar;
height: 25px; height: calc(@tabHeight@ + 1px);
margin-bottom: -25px; margin-bottom: calc(-1px - @tabHeight@);
} }
#TabsToolbar { #TabsToolbar {
position: relative;
-moz-appearance: none; -moz-appearance: none;
height: 26px;
background-repeat: repeat-x; background-repeat: repeat-x;
} }
@ -2489,59 +2293,40 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
padding-top: 2px; 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. * Draw the bottom border of the tabstrip:
* In the top 24px the unified toolbar (from the ::before above) will show.
*/ */
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme) { #TabsToolbar::after {
padding-bottom: 2px; content: '';
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-active.png), position: absolute;
linear-gradient(to top, -moz-mac-chrome-active 2px, transparent 2px); bottom: 1px;
} left: 0;
right: 0;
#TabsToolbar[tabsontop="true"]:not(:-moz-lwtheme):-moz-window-inactive { z-index: 0;
background: url(chrome://browser/skin/tabbrowser/tabbar-top-bg-inactive.png), border-bottom: 1px solid hsla(0,0%,0%,.3);
linear-gradient(to top, -moz-mac-chrome-inactive 2px, transparent 2px);
} }
/* In tabs-on-bottom mode, fill the whole toolbar with the chrome /* In tabs-on-bottom mode, fill the whole toolbar with the chrome
* background color. * background color.
*/ */
#TabsToolbar[tabsontop="false"]:not(:-moz-lwtheme) { #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 { #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 { #tabbrowser-tabs {
-moz-box-align: stretch; -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 { @TABSONTOP_NEWTAB_BUTTON@ > .toolbarbutton-icon {
padding: 4px 0 2px; padding: 6px 0 4px;
}
@TABSONTOP_TAB_STACK@ > .tab-content {
padding-top: 2px;
} }
@TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon { @TABSONBOTTOM_NEWTAB_BUTTON@ > .toolbarbutton-icon {
padding: 2px 0 4px; padding: 4px 0 6px;
}
@TABSONBOTTOM_TAB_STACK@ > .tab-content {
padding-bottom: 2px;
} }
/** /**
@ -2550,7 +2335,8 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
.tab-drop-indicator { .tab-drop-indicator {
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png); list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
margin-bottom: -8px; margin-top: -2px;
z-index: 3;
} }
@media (min-resolution: 2dppx) { @media (min-resolution: 2dppx) {
@ -2572,8 +2358,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://global/skin/icons/close.png"); list-style-image: url("chrome://global/skin/icons/close.png");
-moz-appearance: none; -moz-appearance: none;
border: none !important; border: none !important;
padding: 0;
margin: 0;
background: none; background: none;
cursor: default; cursor: default;
-moz-image-region: rect(0, 16px, 16px, 0); -moz-image-region: rect(0, 16px, 16px, 0);
@ -3893,6 +3677,49 @@ chatbox {
border-top-right-radius: @toolbarbuttonCornerRadius@; 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="top"],
panel[type="arrow"][popupid="click-to-play-plugins"] > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="bottom"] { 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"); list-style-image: url("chrome://global/skin/arrow/panelarrow-light-vertical.png");

Двоичные данные
browser/themes/osx/customizableui/background-noise-toolbar.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 15 KiB

Двоичные данные
browser/themes/osx/customizableui/customizeMode-gridTexture.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 118 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичные данные
browser/themes/osx/customizableui/menuPanel-icons.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
browser/themes/osx/customizableui/menuPanel-icons@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 26 KiB

Двоичные данные
browser/themes/osx/customizableui/menuPanel-small-icons.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичные данные
browser/themes/osx/customizableui/menuPanel-small-icons@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

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

@ -0,0 +1,166 @@
/* 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
@media (min-resolution: 2dppx) {
#PanelUI-contents[type="grid"] toolbarbutton,
#customization-palette toolbarbutton {
list-style-image: url(chrome://browser/skin/customizableui/menuPanel-icons@2x.png);
}
#PanelUI-popup .panel-combined-button {
list-style-image: url(chrome://browser/skin/customizableui/menuPanel-small-icons@2x.png);
}
#PanelUI-contents[type="grid"] #new-window-button,
#customization-palette #new-window-button {
-moz-image-region: rect(0 128px 64px 64px);
}
#PanelUI-contents[type="grid"] #privatebrowsing-button,
#customization-palette #privatebrowsing-button {
-moz-image-region: rect(0 192px 64px 128px);
}
#PanelUI-contents[type="grid"] #open-file-button,
#customization-palette #open-file-button {
-moz-image-region: rect(64px 64px 128px 0);
}
#PanelUI-contents[type="grid"] #save-page-button,
#customization-palette #save-page-button {
-moz-image-region: rect(64px 128px 128px 64px);
}
#PanelUI-contents[type="grid"] #bookmarks-menu-button,
#customization-palette #bookmarks-menu-button {
-moz-image-region: rect(64px 192px 128px 128px);
}
#PanelUI-contents[type="grid"] #history-button,
#customization-palette #history-button,
#PanelUI-contents[type="grid"] #history-panelmenu,
#customization-palette #history-panelmenu {
-moz-image-region: rect(128px 64px 192px 0);
}
#PanelUI-contents[type="grid"] #add-ons-button,
#customization-palette #add-ons-button {
-moz-image-region: rect(128px 128px 192px 64px);
}
#PanelUI-contents[type="grid"] #downloads-button,
#customization-palette #downloads-button {
-moz-image-region: rect(128px 192px 192px 128px);
}
#PanelUI-contents[type="grid"] #sync-button,
#customization-palette #sync-button {
-moz-image-region: rect(192px 64px 256px 0);
}
#PanelUI-contents[type="grid"] #print-button,
#customization-palette #print-button {
-moz-image-region: rect(192px 128px 256px 64px);
}
#PanelUI-contents[type="grid"] #fullscreen-button,
#customization-palette #fullscreen-button {
-moz-image-region: rect(192px 192px 256px 128px);
}
#PanelUI-contents[type="grid"] #feed-button,
#customization-palette #feed-button {
-moz-image-region: rect(256px 64px 320px 0);
}
#PanelUI-contents[type="grid"] #find-button,
#customization-palette #find-button {
-moz-image-region: rect(256px 128px 320px 64px);
}
#PanelUI-contents[type="grid"] #developer-button,
#customization-palette #developer-button {
-moz-image-region: rect(256px 192px 320px 128px);
}
#PanelUI-contents[type="grid"] #tabview-button,
#customization-palette #tabview-button {
-moz-image-region: rect(320px 64px 384px 0);
}
#PanelUI-contents[type="grid"] #preferences-button,
#customization-palette #preferences-button {
-moz-image-region: rect(320px 128px 384px 64px);
}
#PanelUI-contents[type="grid"] #home-button,
#customization-palette #home-button {
-moz-image-region: rect(320px 192px 384px 128px);
}
#PanelUI-contents[type="grid"] #reload-button,
#customization-palette #reload-button {
-moz-image-region: rect(384px 64px 448px 0);
}
#PanelUI-contents[type="grid"] #stop-button,
#customization-palette #stop-button {
-moz-image-region: rect(384px 128px 448px 64px);
}
#PanelUI-popup #PanelUI-cut-btn {
-moz-image-region: rect(0 32px 32px 0);
}
#PanelUI-popup #PanelUI-copy-btn {
-moz-image-region: rect(0 64px 32px 32px);
}
#PanelUI-popup #PanelUI-paste-btn {
-moz-image-region: rect(0 96px 32px 64px);
}
#PanelUI-popup #PanelUI-zoomOut-btn {
-moz-image-region: rect(0 128px 32px 96px);
}
#PanelUI-popup #PanelUI-zoomIn-btn {
-moz-image-region: rect(0 160px 32px 128px);
}
}
.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-zoomIn-btn,
#PanelUI-zoomOut-btn {
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,18 @@ browser.jar:
#endif #endif
skin/classic/browser/actionicon-tab.png skin/classic/browser/actionicon-tab.png
skin/classic/browser/actionicon-tab@2x.png skin/classic/browser/actionicon-tab@2x.png
skin/classic/browser/appmenu.png
* skin/classic/browser/browser.css (browser.css) * 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/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/customizableui/menuPanel-icons.png (customizableui/menuPanel-icons.png)
skin/classic/browser/customizableui/menuPanel-icons@2x.png (customizableui/menuPanel-icons@2x.png)
skin/classic/browser/customizableui/menuPanel-small-icons.png (customizableui/menuPanel-small-icons.png)
skin/classic/browser/customizableui/menuPanel-small-icons@2x.png (customizableui/menuPanel-small-icons@2x.png)
* skin/classic/browser/engineManager.css (engineManager.css) * skin/classic/browser/engineManager.css (engineManager.css)
skin/classic/browser/Geolocation-16.png skin/classic/browser/Geolocation-16.png
skin/classic/browser/Geolocation-16@2x.png skin/classic/browser/Geolocation-16@2x.png
@ -94,6 +104,7 @@ browser.jar:
skin/classic/browser/webRTC-shareDevice-64@2x.png skin/classic/browser/webRTC-shareDevice-64@2x.png
skin/classic/browser/webRTC-sharingDevice-16.png skin/classic/browser/webRTC-sharingDevice-16.png
skin/classic/browser/webRTC-sharingDevice-16@2x.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.png (downloads/buttons.png)
skin/classic/browser/downloads/buttons@2x.png (downloads/buttons@2x.png) skin/classic/browser/downloads/buttons@2x.png (downloads/buttons@2x.png)
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png) skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
@ -182,26 +193,28 @@ browser.jar:
skin/classic/browser/tabbrowser/connecting@2x.png (tabbrowser/connecting@2x.png) 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.png (tabbrowser/loading.png)
skin/classic/browser/tabbrowser/loading@2x.png (tabbrowser/loading@2x.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.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-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.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-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-end@2x.png (tabbrowser/tab-background-end@2x.png)
skin/classic/browser/tabbrowser/tab-background-middle.png (tabbrowser/tab-background-middle.png)
skin/classic/browser/tabbrowser/tab-background-middle@2x.png (tabbrowser/tab-background-middle@2x.png)
skin/classic/browser/tabbrowser/tab-background-start.png (tabbrowser/tab-background-start.png)
skin/classic/browser/tabbrowser/tab-background-start@2x.png (tabbrowser/tab-background-start@2x.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-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/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-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/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/tab-overflow-border.png (tabbrowser/tab-overflow-border.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
skin/classic/browser/tabbrowser/tabDragIndicator@2x.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/close.png (tabview/close.png)
skin/classic/browser/tabview/edit-light.png (tabview/edit-light.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/search.png (tabview/search.png)
@ -322,6 +335,7 @@ browser.jar:
skin/classic/browser/keyhole-circle@2x.png (keyhole-circle-lion@2x.png) skin/classic/browser/keyhole-circle@2x.png (keyhole-circle-lion@2x.png)
skin/classic/browser/lion/Toolbar.png (Toolbar-lion.png) skin/classic/browser/lion/Toolbar.png (Toolbar-lion.png)
skin/classic/browser/Toolbar@2x.png (Toolbar-lion@2x.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/lion/toolbarbutton-dropmarker.png (toolbarbutton-dropmarker-lion.png)
skin/classic/browser/toolbarbutton-dropmarker@2x.png (toolbarbutton-dropmarker-lion@2x.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) 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 ../../../toolkit/themes/osx/global/shared.inc
%include ../shared/browser.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 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 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; %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;

Двоичные данные
browser/themes/osx/tabbrowser/tab-active-middle-lwtheme.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 148 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-active-middle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 227 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-end.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 677 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-end@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.8 KiB

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-middle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 153 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-middle@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 727 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-start.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 657 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-background-start@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.8 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 422 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 405 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 487 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-separator.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 159 B

Двоичные данные
browser/themes/osx/tabbrowser/tab-stroke-end.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Двоичные данные
browser/themes/osx/tabbrowser/tab-stroke-start.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 433 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 466 B

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше