1#filter substitution
2<?xml version="1.0"?>
3# -*- Mode: HTML -*-
4#
5# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
10<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
11<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
12<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
13<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
14<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
15<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
16<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
17<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
18
19<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
20
21# All DTD information is stored in a separate file so that it can be shared by
22# hiddenWindow.xul.
23#include browser-doctype.inc
24
25<window id="main-window"
26        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
27        xmlns:svg="http://www.w3.org/2000/svg"
28        xmlns:html="http://www.w3.org/1999/xhtml"
29        xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
30        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
31        onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
32        title="&mainWindow.title;"
33        title_normal="&mainWindow.title;"
34#ifdef XP_MACOSX
35        title_privatebrowsing="&mainWindow.title;&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
36        titledefault="&mainWindow.title;"
37        titlemodifier=""
38        titlemodifier_normal=""
39        titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
40#else
41        title_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
42        titlemodifier="&mainWindow.titlemodifier;"
43        titlemodifier_normal="&mainWindow.titlemodifier;"
44        titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
45#endif
46#ifdef CAN_DRAW_IN_TITLEBAR
47#ifdef XP_WIN
48        chromemargin="0,2,2,2"
49#else
50        chromemargin="0,-1,-1,-1"
51#endif
52        tabsintitlebar="true"
53#endif
54        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
55        windowtype="navigator:browser"
56        macanimationtype="document"
57        screenX="4" screenY="4"
58        fullscreenbutton="true"
59        sizemode="normal"
60        retargetdocumentfocus="urlbar"
61        persist="screenX screenY width height sizemode">
62
63# All JS files which are not content (only) dependent that browser.xul
64# wishes to include *must* go into the global-scripts.inc file
65# so that they can be shared by macBrowserOverlay.xul.
66#include global-scripts.inc
67
68<script type="application/javascript">
69  Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
70  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
71</script>
72
73# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
74# browser-sets.inc file for sharing with hiddenWindow.xul.
75#define FULL_BROWSER_WINDOW
76#include browser-sets.inc
77#undef FULL_BROWSER_WINDOW
78
79  <popupset id="mainPopupSet">
80    <menupopup id="tabContextMenu"
81               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
82               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
83      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
84                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
85      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
86      <menuseparator/>
87      <menuitem id="context_pinTab" label="&pinTab.label;"
88                accesskey="&pinTab.accesskey;"
89                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
90      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
91                accesskey="&unpinTab.accesskey;"
92                oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
93      <menuitem id="context_duplicateTab" label="&duplicateTab.label;"
94                accesskey="&duplicateTab.accesskey;"
95                oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/>
96      <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
97                accesskey="&moveToNewWindow.accesskey;"
98                tbattr="tabbrowser-multiple"
99                oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
100      <menuseparator id="context_sendTabToDevice_separator" class="sync-ui-item"/>
101      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
102            class="sync-ui-item"
103            accesskey="&sendTabToDevice.accesskey;">
104        <menupopup id="context_sendTabToDevicePopupMenu"
105                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
106      </menu>
107      <menuseparator/>
108      <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
109                tbattr="tabbrowser-multiple-visible"
110                oncommand="gBrowser.reloadAllTabs();"/>
111      <menuitem id="context_bookmarkAllTabs"
112                label="&bookmarkAllTabs.label;"
113                accesskey="&bookmarkAllTabs.accesskey;"
114                command="Browser:BookmarkAllTabs"/>
115      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
116                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
117      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
118                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
119      <menuseparator/>
120      <menuitem id="context_undoCloseTab"
121                label="&undoCloseTab.label;"
122                accesskey="&undoCloseTab.accesskey;"
123                observes="History:UndoCloseTab"/>
124      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
125                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
126    </menupopup>
127
128    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
129         of this menupopup -->
130    <menupopup id="backForwardMenu"
131               onpopupshowing="return FillHistoryMenu(event.target);"
132               oncommand="gotoHistoryIndex(event); event.stopPropagation();"
133               onclick="checkForMiddleClick(this, event);"/>
134    <tooltip id="aHTMLTooltip" page="true"/>
135    <tooltip id="remoteBrowserTooltip"/>
136
137    <!-- for search and content formfill/pw manager -->
138
139    <panel type="autocomplete-richlistbox"
140           id="PopupAutoComplete"
141           role="group"
142           noautofocus="true"
143           hidden="true"
144           overflowpadding="4"
145           norolluponanchor="true"
146           nomaxresults="true" />
147
148    <!-- for search with one-off buttons -->
149    <panel type="autocomplete-richlistbox"
150           id="PopupSearchAutoComplete"
151           role="group"
152           noautofocus="true"
153           hidden="true" />
154
155    <!-- for url bar autocomplete -->
156    <panel type="autocomplete-richlistbox"
157           id="PopupAutoCompleteRichResult"
158           role="group"
159           noautofocus="true"
160           hidden="true"
161           flip="none"
162           level="parent"
163           overflowpadding="15" />
164
165   <!-- for date/time picker. consumeoutsideclicks is set to never, so that
166        clicks on the anchored input box are never consumed. -->
167    <panel id="DateTimePickerPanel"
168           type="arrow"
169           hidden="true"
170           orient="vertical"
171           noautofocus="true"
172           norolluponanchor="true"
173           consumeoutsideclicks="never"
174           level="parent"
175           tabspecific="true">
176    </panel>
177
178    <!-- for select dropdowns. The menupopup is what shows the list of options,
179         and the popuponly menulist makes things like the menuactive attributes
180         work correctly on the menupopup. ContentSelectDropdown expects the
181         popuponly menulist to be its immediate parent. -->
182    <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
183      <menupopup rolluponmousewheel="true"
184                 activateontab="true" position="after_start"
185                 level="parent"
186#ifdef XP_WIN
187                 consumeoutsideclicks="false" ignorekeys="shortcuts"
188#endif
189        />
190    </menulist>
191
192    <!-- for invalid form error message -->
193    <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
194      <description/>
195    </panel>
196
197    <panel id="editBookmarkPanel"
198           type="arrow"
199           orient="vertical"
200           ignorekeys="true"
201           hidden="true"
202           tabspecific="true"
203           onpopupshown="StarUI.panelShown(event);"
204           aria-labelledby="editBookmarkPanelTitle">
205      <row id="editBookmarkPanelHeader" align="center" hidden="true">
206        <vbox align="center">
207          <image id="editBookmarkPanelStarIcon"/>
208        </vbox>
209        <vbox>
210          <label id="editBookmarkPanelTitle"/>
211          <description id="editBookmarkPanelDescription"/>
212        </vbox>
213      </row>
214      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
215      <hbox id="editBookmarkPanelBottomButtons" pack="end">
216#ifndef XP_UNIX
217        <button id="editBookmarkPanelDoneButton"
218                class="editBookmarkPanelBottomButton"
219                label="&editBookmark.done.label;"
220                default="true"
221                oncommand="StarUI.panel.hidePopup();"/>
222        <button id="editBookmarkPanelRemoveButton"
223                class="editBookmarkPanelBottomButton"
224                oncommand="StarUI.removeBookmarkButtonCommand();"
225                accesskey="&editBookmark.removeBookmark.accessKey;"/>
226#else
227        <button id="editBookmarkPanelRemoveButton"
228                class="editBookmarkPanelBottomButton"
229                oncommand="StarUI.removeBookmarkButtonCommand();"
230                accesskey="&editBookmark.removeBookmark.accessKey;"/>
231        <button id="editBookmarkPanelDoneButton"
232                class="editBookmarkPanelBottomButton"
233                label="&editBookmark.done.label;"
234                default="true"
235                oncommand="StarUI.panel.hidePopup();"/>
236#endif
237      </hbox>
238    </panel>
239
240    <!-- UI tour experience -->
241    <panel id="UITourTooltip"
242           type="arrow"
243           hidden="true"
244           noautofocus="true"
245           noautohide="true"
246           align="start"
247           orient="vertical"
248           role="alert">
249     <vbox>
250      <hbox id="UITourTooltipBody">
251        <image id="UITourTooltipIcon"/>
252        <vbox flex="1">
253          <hbox id="UITourTooltipTitleContainer">
254            <label id="UITourTooltipTitle" flex="1"/>
255            <toolbarbutton id="UITourTooltipClose" class="close-icon"
256                           tooltiptext="&uiTour.infoPanel.close;"/>
257          </hbox>
258          <description id="UITourTooltipDescription" flex="1"/>
259        </vbox>
260      </hbox>
261      <hbox id="UITourTooltipButtons" flex="1" align="center"/>
262     </vbox>
263    </panel>
264    <!-- type="default" forces frames to be created so that the panel's size can be determined -->
265    <panel id="UITourHighlightContainer"
266           type="default"
267           hidden="true"
268           noautofocus="true"
269           noautohide="true"
270           flip="none"
271           consumeoutsideclicks="false"
272           mousethrough="always">
273      <box id="UITourHighlight"></box>
274    </panel>
275
276    <panel id="sidebarMenu-popup"
277           class="cui-widget-panel"
278           role="group"
279           type="arrow"
280           hidden="true"
281           flip="slide"
282           orient="vertical"
283           position="bottomcenter topleft">
284      <toolbarbutton id="sidebar-switcher-bookmarks"
285                     class="subviewbutton subviewbutton-iconic"
286                     key="viewBookmarksSidebarKb"
287                     observes="viewBookmarksSidebar"
288                     oncommand="SidebarUI.show('viewBookmarksSidebar');">
289        <observes element="viewBookmarksSidebar" attribute="checked"/>
290      </toolbarbutton>
291      <toolbarbutton id="sidebar-switcher-history"
292                     label="&historyButton.label;"
293                     class="subviewbutton subviewbutton-iconic"
294                     key="key_gotoHistory"
295                     observes="viewHistorySidebar"
296                     oncommand="SidebarUI.show('viewHistorySidebar');">
297        <observes element="viewHistorySidebar" attribute="checked"/>
298      </toolbarbutton>
299      <toolbarbutton id="sidebar-switcher-tabs"
300                     label="&syncedTabs.sidebar.label;"
301                     class="subviewbutton subviewbutton-iconic sync-ui-item"
302                     observes="viewTabsSidebar"
303                     oncommand="SidebarUI.show('viewTabsSidebar');">
304        <observes element="viewTabsSidebar" attribute="checked"/>
305      </toolbarbutton>
306      <toolbarseparator/>
307      <!-- Extension toolbarbuttons go here. -->
308      <toolbarseparator id="sidebar-extensions-separator"/>
309      <toolbarbutton id="sidebar-reverse-position"
310                     class="subviewbutton"
311                     oncommand="SidebarUI.reversePosition()"/>
312      <toolbarseparator/>
313      <toolbarbutton label="&sidebarMenuClose.label;"
314                     class="subviewbutton"
315                     oncommand="SidebarUI.hide()"/>
316    </panel>
317
318    <menupopup id="toolbar-context-menu"
319               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
320      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
321                accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
322                label="&customizeMenu.pinToOverflowMenu.label;"
323                contexttype="toolbaritem"
324                class="customize-context-moveToPanel"/>
325      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
326                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
327                label="&customizeMenu.removeFromToolbar.label;"
328                contexttype="toolbaritem"
329                class="customize-context-removeFromToolbar"/>
330      <menuitem id="toolbar-context-reloadAllTabs"
331                class="toolbaritem-tabsmenu"
332                contexttype="tabbar"
333                oncommand="gBrowser.reloadAllTabs();"
334                label="&toolbarContextMenu.reloadAllTabs.label;"
335                accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/>
336      <menuitem id="toolbar-context-bookmarkAllTabs"
337                class="toolbaritem-tabsmenu"
338                contexttype="tabbar"
339                command="Browser:BookmarkAllTabs"
340                label="&toolbarContextMenu.bookmarkAllTabs.label;"
341                accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/>
342      <menuitem id="toolbar-context-undoCloseTab"
343                class="toolbaritem-tabsmenu"
344                contexttype="tabbar"
345                label="&toolbarContextMenu.undoCloseTab.label;"
346                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
347                observes="History:UndoCloseTab"/>
348      <menuseparator/>
349      <menuseparator id="viewToolbarsMenuSeparator"/>
350      <!-- XXXgijs: we're using oncommand handler here to avoid the event being
351                    redirected to the command element, thus preventing
352                    listeners on the menupopup or further up the tree from
353                    seeing the command event pass by. The observes attribute is
354                    here so that the menuitem is still disabled and re-enabled
355                    correctly. -->
356      <menuitem oncommand="gCustomizeMode.enter()"
357                observes="cmd_CustomizeToolbars"
358                class="viewCustomizeToolbar"
359                label="&viewCustomizeToolbar.label;"
360                accesskey="&viewCustomizeToolbar.accesskey;"/>
361    </menupopup>
362
363    <menupopup id="blockedPopupOptions"
364               onpopupshowing="gPopupBlockerObserver.fillPopupList(event);"
365               onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);">
366      <menuitem observes="blockedPopupAllowSite"/>
367      <menuitem observes="blockedPopupEditSettings"/>
368      <menuitem observes="blockedPopupDontShowMessage"/>
369      <menuseparator observes="blockedPopupsSeparator"/>
370    </menupopup>
371
372    <menupopup id="autohide-context"
373           onpopupshowing="FullScreen.getAutohide(this.firstChild);">
374      <menuitem type="checkbox" label="&fullScreenAutohide.label;"
375                accesskey="&fullScreenAutohide.accesskey;"
376                oncommand="FullScreen.setAutohide();"/>
377      <menuseparator/>
378      <menuitem label="&fullScreenExit.label;"
379                accesskey="&fullScreenExit.accesskey;"
380                oncommand="BrowserFullScreen();"/>
381    </menupopup>
382
383    <menupopup id="contentAreaContextMenu" pagemenu="#page-menu-separator"
384               onpopupshowing="if (event.target != this)
385                                 return true;
386                               gContextMenu = new nsContextMenu(this, event.shiftKey);
387                               if (gContextMenu.shouldDisplay)
388                                 updateEditUIVisibility();
389                               return gContextMenu.shouldDisplay;"
390               onpopuphiding="if (event.target != this)
391                                return;
392                              gContextMenu.hiding();
393                              gContextMenu = null;
394                              updateEditUIVisibility();">
395#include browser-context.inc
396    </menupopup>
397
398    <menupopup id="placesContext"/>
399
400    <panel id="ctrlTab-panel" hidden="true" norestorefocus="true" level="top">
401      <hbox>
402        <button class="ctrlTab-preview" flex="1"/>
403        <button class="ctrlTab-preview" flex="1"/>
404        <button class="ctrlTab-preview" flex="1"/>
405        <button class="ctrlTab-preview" flex="1"/>
406        <button class="ctrlTab-preview" flex="1"/>
407        <button class="ctrlTab-preview" flex="1"/>
408      </hbox>
409      <hbox pack="center">
410        <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
411      </hbox>
412    </panel>
413
414    <panel id="pageActionPanel"
415           class="cui-widget-panel"
416           role="group"
417           type="arrow"
418           hidden="true"
419           flip="slide"
420           photon="true"
421           position="bottomcenter topright"
422           tabspecific="true"
423           noautofocus="true"
424           copyURL-title="&pageAction.copyLink.label;"
425           emailLink-title="&emailPageCmd.label;"
426           sendToDevice-title="&pageAction.sendTabToDevice.label;"
427           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;">
428      <panelmultiview id="pageActionPanelMultiView"
429                      mainViewId="pageActionPanelMainView"
430                      viewCacheId="appMenu-viewCache">
431        <panelview id="pageActionPanelMainView"
432                   context="pageActionContextMenu"
433                   class="PanelUI-subView">
434          <vbox class="panel-subview-body"/>
435        </panelview>
436      </panelmultiview>
437    </panel>
438    <panel id="pageActionFeedback"
439           role="alert"
440           type="arrow"
441           hidden="true"
442           flip="slide"
443           position="bottomcenter topright"
444           tabspecific="true"
445           noautofocus="true"
446           copyURLFeedback="&copyURLFeedback.label;"
447           sendToDeviceFeedback="&sendToDeviceFeedback.label;"
448           sendToDeviceOfflineFeedback="&sendToDeviceOfflineFeedback.label;">
449      <hbox id="pageActionFeedbackAnimatableBox">
450        <image id="pageActionFeedbackAnimatableImage"/>
451      </hbox>
452      <label id="pageActionFeedbackMessage"/>
453    </panel>
454
455    <menupopup id="pageActionContextMenu"
456               onpopupshowing="BrowserPageActions.onContextMenuShowing(event, this);">
457      <menuitem class="pageActionContextMenuItem builtInUnpinned"
458                label="&pageAction.addToUrlbar.label;"
459                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
460      <menuitem class="pageActionContextMenuItem builtInPinned"
461                label="&pageAction.removeFromUrlbar.label;"
462                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
463      <menuitem class="pageActionContextMenuItem extensionUnpinned"
464                label="&pageAction.allowInUrlbar.label;"
465                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
466      <menuitem class="pageActionContextMenuItem extensionPinned"
467                label="&pageAction.disallowInUrlbar.label;"
468                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
469      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
470      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
471                label="&pageAction.manageExtension.label;"
472                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
473    </menupopup>
474
475    <!-- Bookmarks and history tooltip -->
476    <tooltip id="bhTooltip"/>
477
478    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
479
480    <tooltip id="back-button-tooltip">
481      <label class="tooltip-label" value="&backButton.tooltip;"/>
482#ifdef XP_MACOSX
483      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
484#else
485      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
486#endif
487    </tooltip>
488
489    <tooltip id="forward-button-tooltip">
490      <label class="tooltip-label" value="&forwardButton.tooltip;"/>
491#ifdef XP_MACOSX
492      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
493#else
494      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
495#endif
496    </tooltip>
497
498#include popup-notifications.inc
499
500#include ../../components/customizableui/content/panelUI.inc.xul
501#include ../../components/controlcenter/content/panel.inc.xul
502#include ../../components/downloads/content/downloadsPanel.inc.xul
503
504    <hbox id="downloads-animation-container" mousethrough="always">
505      <vbox id="downloads-notification-anchor" hidden="true">
506        <vbox id="downloads-indicator-notification"/>
507      </vbox>
508    </hbox>
509
510    <hbox id="bookmarked-notification-container" mousethrough="always">
511      <vbox id="bookmarked-notification-anchor">
512        <vbox id="bookmarked-notification"/>
513      </vbox>
514      <vbox id="bookmarked-notification-dropmarker-anchor">
515        <image id="bookmarked-notification-dropmarker-icon"/>
516      </vbox>
517    </hbox>
518
519    <tooltip id="dynamic-shortcut-tooltip"
520             onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
521
522    <menupopup id="SyncedTabsSidebarContext">
523      <menuitem label="&syncedTabs.context.open.label;"
524                accesskey="&syncedTabs.context.open.accesskey;"
525                id="syncedTabsOpenSelected" where="current"/>
526      <menuitem label="&syncedTabs.context.openInNewTab.label;"
527                accesskey="&syncedTabs.context.openInNewTab.accesskey;"
528                id="syncedTabsOpenSelectedInTab" where="tab"/>
529      <menuitem label="&syncedTabs.context.openInNewWindow.label;"
530                accesskey="&syncedTabs.context.openInNewWindow.accesskey;"
531                id="syncedTabsOpenSelectedInWindow" where="window"/>
532      <menuitem label="&syncedTabs.context.openInNewPrivateWindow.label;"
533                accesskey="&syncedTabs.context.openInNewPrivateWindow.accesskey;"
534                id="syncedTabsOpenSelectedInPrivateWindow" where="window" private="true"/>
535      <menuseparator/>
536      <menuitem label="&syncedTabs.context.bookmarkSingleTab.label;"
537                accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;"
538                id="syncedTabsBookmarkSelected"/>
539      <menuitem label="&syncedTabs.context.copy.label;"
540                accesskey="&syncedTabs.context.copy.accesskey;"
541                id="syncedTabsCopySelected"/>
542      <menuseparator/>
543      <menuitem label="&syncedTabs.context.openAllInTabs.label;"
544                accesskey="&syncedTabs.context.openAllInTabs.accesskey;"
545                id="syncedTabsOpenAllInTabs"/>
546      <menuitem label="&syncedTabs.context.managedevices.label;"
547                accesskey="&syncedTabs.context.managedevices.accesskey;"
548                id="syncedTabsManageDevices"
549                oncommand="gSync.openDevicesManagementPage('syncedtabs-sidebar');"/>
550      <menuitem label="&syncSyncNowItem.label;"
551                accesskey="&syncSyncNowItem.accesskey;"
552                id="syncedTabsRefresh"/>
553    </menupopup>
554    <menupopup id="SyncedTabsSidebarTabsFilterContext"
555               class="textbox-contextmenu">
556      <menuitem label="&undoCmd.label;"
557                accesskey="&undoCmd.accesskey;"
558                cmd="cmd_undo"/>
559      <menuseparator/>
560      <menuitem label="&cutCmd.label;"
561                accesskey="&cutCmd.accesskey;"
562                cmd="cmd_cut"/>
563      <menuitem label="&copyCmd.label;"
564                accesskey="&copyCmd.accesskey;"
565                cmd="cmd_copy"/>
566      <menuitem label="&pasteCmd.label;"
567                accesskey="&pasteCmd.accesskey;"
568                cmd="cmd_paste"/>
569      <menuitem label="&deleteCmd.label;"
570                accesskey="&deleteCmd.accesskey;"
571                cmd="cmd_delete"/>
572      <menuseparator/>
573      <menuitem label="&selectAllCmd.label;"
574                accesskey="&selectAllCmd.accesskey;"
575                cmd="cmd_selectAll"/>
576      <menuseparator/>
577      <menuitem label="&syncSyncNowItem.label;"
578                accesskey="&syncSyncNowItem.accesskey;"
579                id="syncedTabsRefreshFilter"/>
580    </menupopup>
581  </popupset>
582  <box id="appMenu-viewCache" hidden="true"/>
583
584#ifdef CAN_DRAW_IN_TITLEBAR
585<vbox id="titlebar">
586  <hbox id="titlebar-content">
587    <spacer id="titlebar-spacer" flex="1"/>
588    <hbox id="titlebar-buttonbox-container">
589      <hbox id="titlebar-buttonbox" class="titlebar-color">
590        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
591        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
592        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
593      </hbox>
594    </hbox>
595#ifdef XP_MACOSX
596    <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
597         buttonbox from reversing order in RTL by forcing an LTR direction. -->
598    <hbox id="titlebar-secondary-buttonbox" dir="ltr">
599      <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" aria-live="polite"/>
600      <hbox class="private-browsing-indicator"/>
601      <hbox id="titlebar-fullscreen-button"/>
602    </hbox>
603#endif
604  </hbox>
605</vbox>
606#endif
607
608  <toolbox id="navigator-toolbox">
609    <!-- Menu -->
610    <toolbar type="menubar" id="toolbar-menubar"
611             class="chromeclass-menubar titlebar-color"
612             customizable="true"
613             mode="icons"
614#ifdef MENUBAR_CAN_AUTOHIDE
615             toolbarname="&menubarCmd.label;"
616             accesskey="&menubarCmd.accesskey;"
617             autohide="true"
618#endif
619             context="toolbar-context-menu">
620      <toolbaritem id="menubar-items" align="center">
621# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
622# hiddenWindow.xul.
623#include browser-menubar.inc
624      </toolbaritem>
625
626#ifdef CAN_DRAW_IN_TITLEBAR
627#ifndef XP_MACOSX
628      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
629            skipintoolbarset="true"/>
630#endif
631#endif
632    </toolbar>
633
634    <toolbar id="TabsToolbar"
635             class="titlebar-color"
636             fullscreentoolbar="true"
637             customizable="true"
638             mode="icons"
639             aria-label="&tabsToolbar.label;"
640             context="toolbar-context-menu"
641             collapsed="true">
642
643#ifdef CAN_DRAW_IN_TITLEBAR
644      <hbox class="titlebar-placeholder" type="pre-tabs"
645            skipintoolbarset="true"/>
646#endif
647
648      <tabs id="tabbrowser-tabs"
649            flex="1"
650            setfocus="false"
651            tooltip="tabbrowser-tab-tooltip"
652            stopwatchid="FX_TAB_CLICK_MS">
653        <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
654      </tabs>
655
656      <toolbarbutton id="new-tab-button"
657                     class="toolbarbutton-1 chromeclass-toolbar-additional"
658                     label="&tabCmd.label;"
659                     command="cmd_newNavigatorTab"
660                     onclick="checkForMiddleClick(this, event);"
661                     tooltip="dynamic-shortcut-tooltip"
662                     ondrop="newTabButtonObserver.onDrop(event)"
663                     ondragover="newTabButtonObserver.onDragOver(event)"
664                     ondragenter="newTabButtonObserver.onDragOver(event)"
665                     ondragexit="newTabButtonObserver.onDragExit(event)"
666                     cui-areatype="toolbar"
667                     removable="true"/>
668
669      <toolbarbutton id="alltabs-button"
670                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
671                     type="menu"
672                     label="&listAllTabs.label;"
673                     tooltiptext="&listAllTabs.label;"
674                     removable="false">
675        <menupopup id="alltabs-popup"
676                   position="after_end">
677          <menuitem id="alltabs_undoCloseTab"
678                    key="key_undoCloseTab"
679                    label="&undoCloseTab.label;"
680                    observes="History:UndoCloseTab"/>
681          <menuseparator id="alltabs-popup-separator-1"/>
682          <menu id="alltabs_containersTab"
683                label="&newUserContext.label;">
684            <menupopup id="alltabs_containersMenuTab" />
685          </menu>
686          <menuseparator id="alltabs-popup-separator-2"/>
687        </menupopup>
688      </toolbarbutton>
689
690#ifdef CAN_DRAW_IN_TITLEBAR
691      <hbox class="titlebar-placeholder" type="post-tabs"
692            ordinal="1000"
693            skipintoolbarset="true"/>
694#endif
695
696      <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
697              ordinal="1000"
698              aria-live="polite" skipintoolbarset="true"/>
699      <hbox class="private-browsing-indicator" skipintoolbarset="true"
700            ordinal="1000"/>
701#ifdef CAN_DRAW_IN_TITLEBAR
702      <hbox class="titlebar-placeholder" type="caption-buttons"
703#ifndef XP_MACOSX
704            ordinal="1000"
705#endif
706            skipintoolbarset="true"/>
707
708#ifdef XP_MACOSX
709      <hbox class="titlebar-placeholder" type="fullscreen-button"
710            skipintoolbarset="true"/>
711#endif
712#endif
713    </toolbar>
714
715    <toolbar id="nav-bar"
716             aria-label="&navbarCmd.label;"
717             fullscreentoolbar="true" mode="icons" customizable="true"
718             customizationtarget="nav-bar-customization-target"
719             overflowable="true"
720             overflowbutton="nav-bar-overflow-button"
721             overflowtarget="widget-overflow-list"
722             overflowpanel="widget-overflow"
723             context="toolbar-context-menu">
724
725      <hbox id="nav-bar-customization-target" flex="1">
726        <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
727                       label="&backCmd.label;"
728                       removable="false" overflows="false"
729                       keepbroadcastattributeswhencustomizing="true"
730                       command="Browser:BackOrBackDuplicate"
731                       onclick="checkForMiddleClick(this, event);"
732                       tooltip="back-button-tooltip"
733                       context="backForwardMenu"/>
734        <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
735                       label="&forwardCmd.label;"
736                       removable="false" overflows="false"
737                       keepbroadcastattributeswhencustomizing="true"
738                       command="Browser:ForwardOrForwardDuplicate"
739                       onclick="checkForMiddleClick(this, event);"
740                       tooltip="forward-button-tooltip"
741                       context="backForwardMenu"/>
742        <toolbaritem id="stop-reload-button" class="chromeclass-toolbar-additional"
743                     title="&reloadCmd.label;"
744                     removable="true" overflows="false">
745          <toolbarbutton id="reload-button" class="toolbarbutton-1"
746                         label="&reloadCmd.label;"
747                         command="Browser:ReloadOrDuplicate"
748                         onclick="checkForMiddleClick(this, event);"
749                         tooltip="dynamic-shortcut-tooltip">
750            <box class="toolbarbutton-animatable-box">
751              <image class="toolbarbutton-animatable-image"/>
752            </box>
753          </toolbarbutton>
754          <toolbarbutton id="stop-button" class="toolbarbutton-1"
755                         label="&stopCmd.label;"
756                         command="Browser:Stop"
757                         tooltip="dynamic-shortcut-tooltip">
758            <box class="toolbarbutton-animatable-box">
759              <image class="toolbarbutton-animatable-image"/>
760            </box>
761          </toolbarbutton>
762        </toolbaritem>
763        <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
764                       removable="true"
765                       label="&homeButton.label;"
766                       ondragover="homeButtonObserver.onDragOver(event)"
767                       ondragenter="homeButtonObserver.onDragOver(event)"
768                       ondrop="homeButtonObserver.onDrop(event)"
769                       ondragexit="homeButtonObserver.onDragExit(event)"
770                       key="goHome"
771                       onclick="BrowserGoHome(event);"
772                       cui-areatype="toolbar"
773                       aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
774        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
775        <toolbaritem id="urlbar-container" flex="400" persist="width"
776                     removable="false"
777                     class="chromeclass-location" overflows="false">
778            <textbox id="urlbar" flex="1"
779                     placeholder="&urlbar.placeholder2;"
780                     defaultPlaceholder="&urlbar.placeholder2;"
781                     focused="true"
782                     type="autocomplete"
783                     autocompletesearch="unifiedcomplete"
784                     autocompletesearchparam="enable-actions"
785                     autocompletepopup="PopupAutoCompleteRichResult"
786                     completeselectedindex="true"
787                     shrinkdelay="250"
788                     tabscrolling="true"
789                     newlines="stripsurroundingwhitespace"
790                     ontextentered="this.handleCommand(param);"
791                     ontextreverted="return this.handleRevert();"
792                     pageproxystate="invalid">
793              <!-- Use onclick instead of normal popup= syntax since the popup
794                   code fires onmousedown, and hence eats our favicon drag events. -->
795              <box id="identity-box" role="button"
796                   align="center"
797                   aria-label="&urlbar.viewSiteInfo.label;"
798                   onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
799                   onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
800                   ondragstart="gIdentityHandler.onDragStart(event);">
801                <image id="identity-icon"
802                       consumeanchor="identity-box"
803                       onclick="PageProxyClickHandler(event);"/>
804                <image id="sharing-icon" mousethrough="always"/>
805                <image id="tracking-protection-icon"/>
806                <box id="blocked-permissions-container" align="center">
807                  <image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button"
808                         tooltiptext="&urlbar.geolocationBlocked.tooltip;"/>
809                  <image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button"
810                         tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/>
811                  <image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
812                         tooltiptext="&urlbar.cameraBlocked.tooltip;"/>
813                  <image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button"
814                         tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
815                  <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
816                         tooltiptext="&urlbar.screenBlocked.tooltip;"/>
817                  <image data-permission-id="persistent-storage" class="blocked-permission-icon persistent-storage-icon" role="button"
818                         tooltiptext="&urlbar.persistentStorageBlocked.tooltip;"/>
819                  <image data-permission-id="popup" class="blocked-permission-icon popup-icon" role="button"
820                         tooltiptext="&urlbar.popupBlocked.tooltip;"/>
821                  <image data-permission-id="canvas" class="blocked-permission-icon canvas-icon" role="button"
822                         tooltiptext="&urlbar.canvasBlocked.tooltip;"/>
823                  <image data-permission-id="plugin:flash" class="blocked-permission-icon plugin-icon" role="button"
824                         tooltiptext="&urlbar.flashPluginBlocked.tooltip;"/>
825                  <image data-permission-id="midi" class="blocked-permission-icon midi-icon" role="button"
826                         tooltiptext="&urlbar.midiBlocked.tooltip;"/>
827                </box>
828                <box id="notification-popup-box"
829                     hidden="true"
830                     onmouseover="document.getElementById('identity-box').classList.add('no-hover');"
831                     onmouseout="document.getElementById('identity-box').classList.remove('no-hover');"
832                     align="center">
833                  <image id="default-notification-icon" class="notification-anchor-icon" role="button"
834                         tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
835                  <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button"
836                         tooltiptext="&urlbar.geolocationNotificationAnchor.tooltip;"/>
837                  <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
838                         tooltiptext="&urlbar.addonsNotificationAnchor.tooltip;"/>
839                  <image id="canvas-notification-icon" class="notification-anchor-icon" role="button"
840                         tooltiptext="&urlbar.canvasNotificationAnchor.tooltip;"/>
841                  <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
842                         tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/>
843                  <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
844                         tooltiptext="&urlbar.passwordNotificationAnchor.tooltip;"/>
845                  <stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center"
846                         tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;">
847                    <image class="plugin-icon" />
848                    <image id="plugin-icon-badge" />
849                  </stack>
850                  <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button"
851                         tooltiptext="&urlbar.webNotificationAnchor.tooltip;"/>
852                  <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
853                         tooltiptext="&urlbar.webRTCShareDevicesNotificationAnchor.tooltip;"/>
854                  <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button"
855                         tooltiptext="&urlbar.webRTCShareMicrophoneNotificationAnchor.tooltip;"/>
856                  <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button"
857                         tooltiptext="&urlbar.webRTCShareScreenNotificationAnchor.tooltip;"/>
858                  <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button"
859                         tooltiptext="&urlbar.servicesNotificationAnchor.tooltip;"/>
860                  <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button"
861                         tooltiptext="&urlbar.translateNotificationAnchor.tooltip;"/>
862                  <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button"
863                         tooltiptext="&urlbar.translatedNotificationAnchor.tooltip;"/>
864                  <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button"
865                         tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/>
866                  <image id="persistent-storage-notification-icon" class="notification-anchor-icon persistent-storage-icon" role="button"
867                         tooltiptext="&urlbar.persistentStorageNotificationAnchor.tooltip;"/>
868                  <image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
869                         tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
870                  <image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
871                         tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
872                </box>
873                <image id="connection-icon"/>
874                <image id="extension-icon"/>
875                <image id="remote-control-icon"
876                       tooltiptext="&urlbar.remoteControlNotificationAnchor.tooltip;"/>
877                <hbox id="identity-icon-labels">
878                  <label id="identity-icon-label" class="plain" flex="1"/>
879                  <label id="identity-icon-country-label" class="plain"/>
880                </hbox>
881              </box>
882              <box id="urlbar-display-box" align="center">
883                <label id="switchtab" class="urlbar-display urlbar-display-switchtab" value="&urlbar.switchToTab.label;"/>
884                <label id="extension" class="urlbar-display urlbar-display-extension" value="&urlbar.extension.label;"/>
885              </box>
886              <hbox id="page-action-buttons" context="pageActionContextMenu">
887                <hbox id="userContext-icons" hidden="true">
888                  <label id="userContext-label"/>
889                  <image id="userContext-indicator"/>
890                </hbox>
891                <image id="reader-mode-button"
892                       class="urlbar-icon urlbar-page-action"
893                       tooltip="dynamic-shortcut-tooltip"
894                       role="button"
895                       hidden="true"
896                       onclick="ReaderParent.buttonClick(event);"/>
897                <toolbarbutton id="urlbar-zoom-button"
898                       onclick="FullZoom.reset();"
899                       tooltip="dynamic-shortcut-tooltip"
900                       hidden="true"/>
901                <box id="pageActionSeparator" class="urlbar-page-action"/>
902                <image id="pageActionButton"
903                       class="urlbar-icon urlbar-page-action"
904                       role="button"
905                       tooltiptext="&pageActionButton.tooltip;"
906                       onmousedown="BrowserPageActions.mainButtonClicked(event);"/>
907                <hbox id="star-button-box"
908                      hidden="true"
909                      class="urlbar-icon-wrapper urlbar-page-action"
910                      onclick="BrowserPageActions.doCommandForAction(PageActions.actionForID('bookmark'), event, this);">
911                  <image id="star-button"
912                         class="urlbar-icon"
913                         role="button"
914                         observes="bookmarkThisPageBroadcaster"/>
915                  <hbox id="star-button-animatable-box">
916                    <image id="star-button-animatable-image"
917                           role="presentation"
918                           observes="bookmarkThisPageBroadcaster"/>
919                  </hbox>
920                </hbox>
921              </hbox>
922            </textbox>
923        </toolbaritem>
924
925        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
926
927        <!-- This is a placeholder for the Downloads Indicator.  It is visible
928             during the customization of the toolbar, in the palette, and before
929             the Downloads Indicator overlay is loaded. -->
930        <toolbarbutton id="downloads-button"
931                       class="toolbarbutton-1 chromeclass-toolbar-additional badged-button"
932                       key="key_openDownloads"
933                       onmousedown="DownloadsIndicatorView.onCommand(event);"
934                       ondrop="DownloadsIndicatorView.onDrop(event);"
935                       ondragover="DownloadsIndicatorView.onDragOver(event);"
936                       ondragenter="DownloadsIndicatorView.onDragOver(event);"
937                       label="&downloads.label;"
938                       removable="true"
939                       overflows="false"
940                       cui-areatype="toolbar"
941                       hidden="true"
942                       tooltip="dynamic-shortcut-tooltip"
943                       indicator="true">
944            <!-- The panel's anchor area is smaller than the outer button, but must
945                 always be visible and must not move or resize when the indicator
946                 state changes, otherwise the panel could change its position or lose
947                 its arrow unexpectedly. -->
948            <stack id="downloads-indicator-anchor"
949                   consumeanchor="downloads-button">
950              <box id="downloads-indicator-icon"/>
951              <stack id="downloads-indicator-progress-outer">
952                <box id="downloads-indicator-progress-inner"/>
953              </stack>
954            </stack>
955          </toolbarbutton>
956
957        <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
958                       removable="true"
959                       onmousedown="PanelUI.showSubView('appMenu-libraryView', this, event);"
960                       closemenu="none"
961                       cui-areatype="toolbar"
962                       tooltiptext="&libraryButton.tooltip;"
963                       label="&places.library.title;"/>
964
965      </hbox>
966
967      <toolbarbutton id="nav-bar-overflow-button"
968                     class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button"
969                     skipintoolbarset="true"
970                     tooltiptext="&navbarOverflow.label;">
971        <box class="toolbarbutton-animatable-box">
972          <image class="toolbarbutton-animatable-image"/>
973        </box>
974      </toolbarbutton>
975
976      <toolbaritem id="PanelUI-button"
977                   removable="false">
978        <toolbarbutton id="PanelUI-menu-button"
979                       class="toolbarbutton-1 badged-button"
980                       consumeanchor="PanelUI-button"
981                       label="&brandShortName;"
982                       tooltiptext="&appmenu.tooltip;"/>
983      </toolbaritem>
984
985      <hbox id="window-controls" hidden="true" pack="end" skipintoolbarset="true"
986            ordinal="1000">
987        <toolbarbutton id="minimize-button"
988                       tooltiptext="&fullScreenMinimize.tooltip;"
989                       oncommand="window.minimize();"/>
990
991        <toolbarbutton id="restore-button"
992#ifdef XP_MACOSX
993# Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button
994# to exit fullscreen and want it to behave like other toolbar buttons.
995                       class="toolbarbutton-1"
996#endif
997                       tooltiptext="&fullScreenRestore.tooltip;"
998                       oncommand="BrowserFullScreen();"/>
999
1000        <toolbarbutton id="close-button"
1001                       tooltiptext="&fullScreenClose.tooltip;"
1002                       oncommand="BrowserTryToCloseWindow();"/>
1003      </hbox>
1004    </toolbar>
1005
1006    <toolbar id="PersonalToolbar"
1007             mode="icons"
1008             class="chromeclass-directories"
1009             context="toolbar-context-menu"
1010             toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
1011             collapsed="true"
1012             customizable="true">
1013      <toolbaritem id="personal-bookmarks"
1014                   title="&bookmarksToolbarItem.label;"
1015                   cui-areatype="toolbar"
1016                   removable="true">
1017        <toolbarbutton id="bookmarks-toolbar-placeholder"
1018                       class="bookmark-item"
1019                       label="&bookmarksToolbarItem.label;"/>
1020        <toolbarbutton id="bookmarks-toolbar-button"
1021                       class="toolbarbutton-1"
1022                       flex="1"
1023                       label="&bookmarksToolbarItem.label;"
1024                       oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/>
1025        <hbox flex="1"
1026              id="PlacesToolbar"
1027              context="placesContext"
1028              onmouseup="BookmarksEventHandler.onMouseUp(event);"
1029              onclick="BookmarksEventHandler.onClick(event, this._placesView);"
1030              oncommand="BookmarksEventHandler.onCommand(event);"
1031              tooltip="bhTooltip"
1032              popupsinherittooltip="true">
1033          <hbox flex="1">
1034            <hbox id="PlacesToolbarDropIndicatorHolder" align="center" collapsed="true">
1035              <image id="PlacesToolbarDropIndicator"
1036                     mousethrough="always"
1037                     collapsed="true"/>
1038            </hbox>
1039            <scrollbox orient="horizontal"
1040                       id="PlacesToolbarItems"
1041                       flex="1"/>
1042            <toolbarbutton type="menu"
1043                           id="PlacesChevron"
1044                           class="toolbarbutton-1"
1045                           mousethrough="never"
1046                           collapsed="true"
1047                           tooltiptext="&bookmarksToolbarChevron.tooltip;"
1048                           onpopupshowing="document.getElementById('PlacesToolbar')
1049                                                   ._placesView._onChevronPopupShowing(event);">
1050              <menupopup id="PlacesChevronPopup"
1051                         placespopup="true"
1052                         tooltip="bhTooltip" popupsinherittooltip="true"
1053                         context="placesContext"/>
1054            </toolbarbutton>
1055          </hbox>
1056        </hbox>
1057      </toolbaritem>
1058    </toolbar>
1059
1060    <toolbarpalette id="BrowserToolbarPalette">
1061
1062      <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1063#ifdef XP_MACOSX
1064                     command="cmd_print"
1065                     tooltip="dynamic-shortcut-tooltip"
1066#else
1067                     command="cmd_printPreview"
1068                     tooltiptext="&printButton.tooltip;"
1069#endif
1070                     label="&printButton.label;"/>
1071
1072
1073      <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1074                     label="&newNavigatorCmd.label;"
1075                     command="cmd_newNavigator"
1076                     tooltip="dynamic-shortcut-tooltip"
1077                     ondrop="newWindowButtonObserver.onDrop(event)"
1078                     ondragover="newWindowButtonObserver.onDragOver(event)"
1079                     ondragenter="newWindowButtonObserver.onDragOver(event)"
1080                     ondragexit="newWindowButtonObserver.onDragExit(event)"/>
1081
1082      <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1083                     observes="View:FullScreen"
1084                     type="checkbox"
1085                     label="&fullScreenCmd.label;"
1086                     tooltip="dynamic-shortcut-tooltip"/>
1087
1088      <toolbarbutton id="bookmarks-menu-button"
1089                     class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
1090                     type="menu"
1091                     label="&bookmarksMenuButton2.label;"
1092                     tooltip="dynamic-shortcut-tooltip"
1093                     anchor="dropmarker"
1094                     ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
1095                     ondragover="PlacesMenuDNDHandler.onDragOver(event);"
1096                     ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
1097                     ondrop="PlacesMenuDNDHandler.onDrop(event);"
1098                     oncommand="BookmarkingUI.onCommand(event);">
1099        <observes element="bookmarkThisPageBroadcaster" attribute="starred"/>
1100        <observes element="bookmarkThisPageBroadcaster" attribute="buttontooltiptext"/>
1101        <menupopup id="BMB_bookmarksPopup"
1102                   class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView"
1103                   placespopup="true"
1104                   context="placesContext"
1105                   openInTabs="children"
1106                   onmouseup="BookmarksEventHandler.onMouseUp(event);"
1107                   oncommand="BookmarksEventHandler.onCommand(event);"
1108                   onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
1109                   onpopupshowing="BookmarkingUI.onPopupShowing(event);
1110                                   BookmarkingUI.attachPlacesView(event, this);"
1111                   tooltip="bhTooltip" popupsinherittooltip="true">
1112          <menuitem id="BMB_viewBookmarksSidebar"
1113                    class="menuitem-iconic subviewbutton"
1114                    label-show="&viewBookmarksSidebar2.label;"
1115                    label-hide="&hideBookmarksSidebar.label;"
1116                    oncommand="SidebarUI.toggle('viewBookmarksSidebar');"/>
1117          <!-- NB: temporary solution for bug 985024, this should go away soon. -->
1118          <menuitem id="BMB_bookmarksShowAllTop"
1119                    class="menuitem-iconic subviewbutton"
1120                    label="&showAllBookmarks2.label;"
1121                    command="Browser:ShowAllBookmarks"
1122                    key="manBookmarkKb"/>
1123          <menuseparator/>
1124          <menu id="BMB_bookmarksToolbar"
1125                class="menu-iconic bookmark-item subviewbutton"
1126                label="&personalbarCmd.label;"
1127                container="true">
1128            <menupopup id="BMB_bookmarksToolbarPopup"
1129                       placespopup="true"
1130                       context="placesContext"
1131                       onpopupshowing="if (!this.parentNode._placesView)
1132                                         new PlacesMenu(event, 'place:folder=TOOLBAR',
1133                                                        PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);">
1134              <menuitem id="BMB_viewBookmarksToolbar"
1135                        class="menuitem-iconic subviewbutton"
1136                        label-show="&viewBookmarksToolbar.label;"
1137                        label-hide="&hideBookmarksToolbar.label;"
1138                        oncommand="BookmarkingUI.toggleBookmarksToolbar();"/>
1139              <menuseparator/>
1140              <!-- Bookmarks toolbar items -->
1141            </menupopup>
1142          </menu>
1143          <menu id="BMB_unsortedBookmarks"
1144                class="menu-iconic bookmark-item subviewbutton"
1145                label="&bookmarksMenuButton.other.label;"
1146                container="true">
1147            <menupopup id="BMB_unsortedBookmarksPopup"
1148                       placespopup="true"
1149                       context="placesContext"
1150                       onpopupshowing="if (!this.parentNode._placesView)
1151                                         new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
1152                                                        PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
1153          </menu>
1154          <menu id="BMB_mobileBookmarks"
1155                class="menu-iconic bookmark-item subviewbutton"
1156                label="&bookmarksMenuButton.mobile.label;"
1157                hidden="true"
1158                container="true">
1159            <menupopup id="BMB_mobileBookmarksPopup"
1160                       placespopup="true"
1161                       context="placesContext"
1162                       onpopupshowing="if (!this.parentNode._placesView)
1163                                         new PlacesMenu(event, 'place:folder=MOBILE_BOOKMARKS',
1164                                                        PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
1165          </menu>
1166
1167          <menuseparator/>
1168          <!-- Bookmarks menu items will go here -->
1169          <menuitem id="BMB_bookmarksShowAll"
1170                    class="subviewbutton panel-subview-footer"
1171                    label="&showAllBookmarks2.label;"
1172                    command="Browser:ShowAllBookmarks"
1173                    key="manBookmarkKb"/>
1174        </menupopup>
1175      </toolbarbutton>
1176
1177      <toolbaritem id="search-container"
1178                   class="chromeclass-toolbar-additional"
1179                   title="&searchItem.title;"
1180                   align="center"
1181                   flex="100"
1182                   persist="width">
1183        <searchbar id="searchbar" flex="1"/>
1184      </toolbaritem>
1185    </toolbarpalette>
1186    <box id="library-animatable-box" class="toolbarbutton-animatable-box">
1187      <image class="toolbarbutton-animatable-image"/>
1188    </box>
1189  </toolbox>
1190
1191  <hbox id="fullscr-toggler" hidden="true"/>
1192
1193  <deck id="content-deck" flex="1">
1194    <hbox flex="1" id="browser">
1195      <vbox id="browser-border-start" hidden="true" layer="true"/>
1196      <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
1197        <sidebarheader id="sidebar-header" align="center">
1198          <toolbarbutton id="sidebar-switcher-target" flex="1" class="tabbable">
1199            <image id="sidebar-icon" consumeanchor="sidebar-switcher-target"/>
1200            <label id="sidebar-title" persist="value" crop="end" flex="1" control="sidebar"/>
1201            <image id="sidebar-switcher-arrow"/>
1202          </toolbarbutton>
1203          <image id="sidebar-throbber"/>
1204# To ensure the button label's intrinsic width doesn't expand the sidebar
1205# if the label is long, the button needs flex=1.
1206# To ensure the button doesn't expand unnecessarily for short labels, the
1207# spacer should significantly out-flex the button.
1208          <spacer flex="1000"/>
1209          <toolbarbutton id="sidebar-close" class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
1210        </sidebarheader>
1211        <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" disablefullscreen="true"
1212                  style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
1213      </vbox>
1214
1215      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
1216      <vbox id="appcontent" flex="1">
1217        <notificationbox id="high-priority-global-notificationbox" notificationside="top"/>
1218        <tabbox id="tabbrowser-tabbox"
1219                    flex="1" eventnode="document" tabcontainer="tabbrowser-tabs"
1220                    onselect="if (event.target.localName == 'tabpanels') gBrowser.updateCurrentBrowser();">
1221          <tabpanels flex="1" class="plain" selectedIndex="0" id="tabbrowser-tabpanels">
1222            <notificationbox flex="1" notificationside="top">
1223              <hbox flex="1" class="browserSidebarContainer">
1224                <vbox flex="1" class="browserContainer">
1225                  <stack flex="1" class="browserStack">
1226                    <browser id="tabbrowser-initialBrowser" type="content"
1227                             message="true" messagemanagergroup="browsers"
1228                             primary="true" blank="true"
1229                             tooltip="aHTMLTooltip"
1230                             contextmenu="contentAreaContextMenu"
1231                             autocompletepopup="PopupAutoComplete"
1232                             selectmenulist="ContentSelectDropdown"
1233                             datetimepicker="DateTimePickerPanel"/>
1234                  </stack>
1235                </vbox>
1236              </hbox>
1237            </notificationbox>
1238          </tabpanels>
1239        </tabbox>
1240      </vbox>
1241      <vbox id="browser-border-end" hidden="true" layer="true"/>
1242    </hbox>
1243#include ../../components/customizableui/content/customizeMode.inc.xul
1244  </deck>
1245
1246  <html:div id="fullscreen-warning" class="pointerlockfswarning" hidden="true">
1247    <html:div class="pointerlockfswarning-domain-text">
1248      &fullscreenWarning.beforeDomain.label;
1249      <html:span class="pointerlockfswarning-domain"/>
1250      &fullscreenWarning.afterDomain.label;
1251    </html:div>
1252    <html:div class="pointerlockfswarning-generic-text">
1253      &fullscreenWarning.generic.label;
1254    </html:div>
1255    <html:button id="fullscreen-exit-button"
1256                 onclick="FullScreen.exitDomFullScreen();">
1257#ifdef XP_MACOSX
1258            &exitDOMFullscreenMac.button;
1259#else
1260            &exitDOMFullscreen.button;
1261#endif
1262    </html:button>
1263  </html:div>
1264
1265  <html:div id="pointerlock-warning" class="pointerlockfswarning" hidden="true">
1266    <html:div class="pointerlockfswarning-domain-text">
1267      &pointerlockWarning.beforeDomain.label;
1268      <html:span class="pointerlockfswarning-domain"/>
1269      &pointerlockWarning.afterDomain.label;
1270    </html:div>
1271    <html:div class="pointerlockfswarning-generic-text">
1272      &pointerlockWarning.generic.label;
1273    </html:div>
1274  </html:div>
1275
1276  <vbox id="browser-bottombox" layer="true">
1277    <notificationbox id="global-notificationbox" notificationside="bottom"/>
1278  </vbox>
1279
1280</window>
1281