Merge mozilla-central to autoland. a=merge CLOSED TREE
[gecko.git] / browser / base / content / browser.xhtml
blobbe438b47d1b6c8ef45e415437a7023a5d3df1810
1 #filter substitution
2 <?xml version="1.0"?>
3 # -*- Mode: HTML -*-
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/.
9 <html id="main-window"
10 xmlns:html="http://www.w3.org/1999/xhtml"
11 xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
12 xmlns="http://www.w3.org/1999/xhtml"
13 #ifdef XP_MACOSX
14 data-l10n-id="browser-main-window-mac-window-titles"
15 #else
16 data-l10n-id="browser-main-window-window-titles"
17 #endif
18 data-l10n-args="{&quot;content-title&quot;:&quot;CONTENTTITLE&quot;}"
19 data-l10n-attrs="data-content-title-default, data-content-title-private, data-title-default, data-title-private"
20 #ifdef XP_WIN
21 chromemargin="0,2,2,2"
22 #else
23 chromemargin="0,-1,-1,-1"
24 #endif
25 tabsintitlebar="true"
26 windowtype="navigator:browser"
27 macanimationtype="document"
28 macnativefullscreen="true"
29 screenX="4" screenY="4"
30 sizemode="normal"
31 retargetdocumentfocus="urlbar-input"
32 scrolling="false"
33 persist="screenX screenY width height sizemode"
34 data-l10n-sync="true">
35 <head>
36 <!-- The "global.css" stylesheet is imported first to allow other stylesheets to
37 override rules using selectors with the same specificity. This applies to
38 both "content" and "skin" packages, which bug 1385444 will unify later. -->
39 <link rel="stylesheet" href="chrome://global/skin/global.css" />
41 <link rel="stylesheet" href="chrome://browser/content/browser.css" />
42 <link rel="stylesheet" href="chrome://browser/content/tabbrowser.css" />
43 <link
44 rel="stylesheet"
45 href="chrome://browser/content/downloads/downloads.css"
47 <link rel="stylesheet" href="chrome://browser/content/places/places.css" />
48 <link
49 rel="stylesheet"
50 href="chrome://browser/content/usercontext/usercontext.css"
52 <link rel="stylesheet" href="chrome://browser/skin/" />
54 <link rel="stylesheet" href="chrome://browser/skin/controlcenter/panel.css" />
55 <link
56 rel="stylesheet"
57 href="chrome://browser/skin/customizableui/panelUI.css"
59 <link rel="stylesheet" href="chrome://browser/skin/downloads/downloads.css" />
60 <link rel="stylesheet" href="chrome://browser/skin/searchbar.css" />
61 <link rel="stylesheet" href="chrome://browser/skin/translations/panel.css" />
62 <link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
63 <link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />
65 <link rel="localization" href="branding/brand.ftl"/>
66 <link rel="localization" href="browser/allTabsMenu.ftl"/>
67 <link rel="localization" href="browser/appmenu.ftl"/>
68 <link rel="localization" href="browser/browser.ftl"/>
69 <link rel="localization" href="browser/browserContext.ftl"/>
70 <link rel="localization" href="browser/browserSets.ftl"/>
71 <link rel="localization" href="browser/firefoxView.ftl"/>
72 <link rel="localization" href="browser/identityCredentialNotification.ftl" />
73 <link rel="localization" href="browser/menubar.ftl"/>
74 <link rel="localization" href="browser/originControls.ftl"/>
75 <link rel="localization" href="browser/panelUI.ftl"/>
76 <link rel="localization" href="browser/places.ftl"/>
77 <link rel="localization" href="browser/protectionsPanel.ftl"/>
78 <link rel="localization" href="browser/reportBrokenSite.ftl"/>
79 <link rel="localization" href="browser/screenshots.ftl"/>
80 <link rel="localization" href="browser/search.ftl"/>
81 <link rel="localization" href="browser/sidebarMenu.ftl"/>
82 <link rel="localization" href="browser/tabbrowser.ftl"/>
83 <link rel="localization" href="browser/toolbarContextMenu.ftl"/>
84 <link rel="localization" href="browser/translations.ftl" />
85 <link rel="localization" href="browser/unifiedExtensions.ftl"/>
86 <link rel="localization" href="browser/webrtcIndicator.ftl"/>
87 <link rel="localization" href="toolkit/branding/accounts.ftl"/>
88 <link rel="localization" href="toolkit/branding/brandings.ftl"/>
89 <link rel="localization" href="toolkit/global/contextual-identity.ftl"/>
90 <link rel="localization" href="toolkit/global/textActions.ftl"/>
91 <link rel="localization" href="toolkit/printing/printUI.ftl"/>
92 <!-- Untranslated FTL files -->
93 <link rel="localization" href="preview/enUS-searchFeatures.ftl" />
94 <link rel="localization" href="preview/interventions.ftl" />
95 <link rel="localization" href="preview/select-translations.ftl"/>
96 <link rel="localization" href="browser/shopping.ftl"/>
97 <link rel="localization" href="preview/shopping.ftl"/>
98 <link rel="localization" href="preview/profiles.ftl"/>
99 <link rel="localization" href="preview/onboarding.ftl"/>
101 <title data-l10n-id="browser-main-window-title"></title>
103 # All JS files which are needed by browser.xhtml and other top level windows to
104 # support MacOS specific features *must* go into the global-scripts.inc file so
105 # that they can be shared with macWindow.inc.xhtml.
106 #include global-scripts.inc
108 <script>
109 /* eslint-env mozilla/browser-window */
110 Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
111 Services.scriptloader.loadSubScript("chrome://browser/content/browser-captivePortal.js", this);
112 if (AppConstants.MOZ_DATA_REPORTING) {
113 Services.scriptloader.loadSubScript("chrome://browser/content/browser-data-submission-info-bar.js", this);
115 if (!AppConstants.MOZILLA_OFFICIAL) {
116 Services.scriptloader.loadSubScript("chrome://browser/content/browser-development-helpers.js", this);
118 Services.scriptloader.loadSubScript("chrome://browser/content/browser-pageActions.js", this);
119 Services.scriptloader.loadSubScript("chrome://browser/content/browser-sidebar.js", this);
120 Services.scriptloader.loadSubScript("chrome://browser/content/browser-tabsintitlebar.js", this);
121 Services.scriptloader.loadSubScript("chrome://browser/content/browser-unified-extensions.js", this);
122 Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
123 Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser-tab.js", this);
124 Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser-tabs.js", this);
125 Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
126 Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
127 Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
128 Services.scriptloader.loadSubScript("chrome://browser/content/shopping/shopping-sidebar.js", this);
130 window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
131 window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
132 window.onclose = WindowIsClosing;
134 window.addEventListener("MozBeforeInitialXULLayout",
135 gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
137 // The listener of DOMContentLoaded must be set on window, rather than
138 // document, because the window can go away before the event is fired.
139 // In that case, we don't want to initialize anything, otherwise we
140 // may be leaking things because they will never be destroyed after.
141 window.addEventListener("DOMContentLoaded",
142 gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
143 </script>
144 </head>
145 <html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
146 # All sets except for popupsets (commands, keys, and stringbundles)
147 # *must* go into the browser-sets.inc file so that they can be shared with other
148 # top level windows in macWindow.inc.xhtml.
149 #include browser-sets.inc
151 #include main-popupset.inc.xhtml
153 #include appmenu-viewcache.inc.xhtml
154 #include unified-extensions-viewcache.inc.xhtml
156 <html:dialog id="window-modal-dialog" style="visibility: hidden; height: 0; width: 0"/>
157 <html:template id="window-modal-dialog-template">
158 <vbox class="dialogTemplate dialogOverlay" topmost="true">
159 <hbox class="dialogBox">
160 <browser class="dialogFrame" autoscroll="false" disablehistory="true"/>
161 </hbox>
162 </vbox>
163 </html:template>
165 #include navigator-toolbox.inc.xhtml
167 #include browser-box.inc.xhtml
169 <html:template id="customizationPanel">
170 <box id="customization-container" flex="1" hidden="true"><![CDATA[
171 #include ../../components/customizableui/content/customizeMode.inc.xhtml
172 ]]></box>
173 </html:template>
175 #include fullscreen-and-pointerlock.inc.xhtml
177 <html:div id="a11y-announcement" role="alert"/>
179 <!-- Put it at the very end to make sure it's not covered by anything. -->
180 <html:div id="fullscr-toggler" hidden="hidden"/>
181 </html:body>
182 </html>