16 + |
16 + |
17 +<!-- The "global.css" stylesheet is imported first to allow other stylesheets to |
17 +<!-- The "global.css" stylesheet is imported first to allow other stylesheets to |
18 + override rules using selectors with the same specificity. This applies to |
18 + override rules using selectors with the same specificity. This applies to |
19 + both "content" and "skin" packages, which bug 1385444 will unify later. --> |
19 + both "content" and "skin" packages, which bug 1385444 will unify later. --> |
20 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
20 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
|
21 + |
|
22 +<!-- While these stylesheets are defined in Toolkit, they are only used in the |
|
23 + main browser window, so we can load them here. Bug 1474241 is on file to |
|
24 + consider moving these widgets to the "browser" folder. --> |
|
25 +<?xml-stylesheet href="chrome://global/content/tabprompts.css" type="text/css"?> |
|
26 +<?xml-stylesheet href="chrome://global/skin/tabprompts.css" type="text/css"?> |
21 + |
27 + |
22 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?> |
28 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?> |
23 +<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?> |
29 +<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?> |
24 +<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?> |
30 +<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?> |
25 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?> |
31 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?> |
88 + Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this); |
98 + Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this); |
89 + |
99 + |
90 + window.onload = gBrowserInit.onLoad.bind(gBrowserInit); |
100 + window.onload = gBrowserInit.onLoad.bind(gBrowserInit); |
91 + window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); |
101 + window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); |
92 + window.onclose = WindowIsClosing; |
102 + window.onclose = WindowIsClosing; |
|
103 + |
93 +#ifdef BROWSER_XHTML |
104 +#ifdef BROWSER_XHTML |
94 + window.addEventListener("DOMContentLoaded", |
105 + window.addEventListener("readystatechange", () => { |
95 + gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); |
106 + // We initially hide the window to prevent layouts during parse. This lets us |
|
107 + // avoid accidental XBL construction and better match browser.xul (see Bug 1497975). |
|
108 + gBrowserInit.onBeforeInitialXULLayout(); |
|
109 + document.documentElement.removeAttribute("hidden"); |
|
110 + }, { once: true, capture: true }); |
96 +#else |
111 +#else |
97 + window.addEventListener("MozBeforeInitialXULLayout", |
112 + window.addEventListener("MozBeforeInitialXULLayout", |
98 + gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); |
113 + gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); |
99 +#endif |
114 +#endif |
100 + // The listener of DOMContentLoaded must be set on window, rather than |
115 + // The listener of DOMContentLoaded must be set on window, rather than |
114 + <menupopup id="tabContextMenu" |
129 + <menupopup id="tabContextMenu" |
115 + onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);" |
130 + onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);" |
116 + onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;"> |
131 + onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;"> |
117 + <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;" |
132 + <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;" |
118 + oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/> |
133 + oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/> |
119 + <menuitem id="context_reloadSelectedTabs" label="&reloadSelectedTabs.label;" hidden="true" |
134 + <menuitem id="context_reloadSelectedTabs" label="&reloadTabs.label;" hidden="true" |
120 + accesskey="&reloadSelectedTabs.accesskey;" |
135 + accesskey="&reloadTabs.accesskey;" |
121 + oncommand="gBrowser.reloadMultiSelectedTabs();"/> |
136 + oncommand="gBrowser.reloadMultiSelectedTabs();"/> |
122 + <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/> |
137 + <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/> |
123 + <menuitem id="context_toggleMuteSelectedTabs" hidden="true" |
138 + <menuitem id="context_toggleMuteSelectedTabs" hidden="true" |
124 + oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/> |
139 + oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/> |
125 + <menuseparator/> |
|
126 + <menuitem id="context_pinTab" label="&pinTab.label;" |
140 + <menuitem id="context_pinTab" label="&pinTab.label;" |
127 + accesskey="&pinTab.accesskey;" |
141 + accesskey="&pinTab.accesskey;" |
128 + oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/> |
142 + oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/> |
129 + <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true" |
143 + <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true" |
130 + accesskey="&unpinTab.accesskey;" |
144 + accesskey="&unpinTab.accesskey;" |
136 + accesskey="&unpinSelectedTabs.accesskey;" |
150 + accesskey="&unpinSelectedTabs.accesskey;" |
137 + oncommand="gBrowser.unpinMultiSelectedTabs();"/> |
151 + oncommand="gBrowser.unpinMultiSelectedTabs();"/> |
138 + <menuitem id="context_duplicateTab" label="&duplicateTab.label;" |
152 + <menuitem id="context_duplicateTab" label="&duplicateTab.label;" |
139 + accesskey="&duplicateTab.accesskey;" |
153 + accesskey="&duplicateTab.accesskey;" |
140 + oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/> |
154 + oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/> |
|
155 + <menuseparator/> |
|
156 + <menuitem id="context_selectAllTabs" label="&selectAllTabs.label;" accesskey="&selectAllTabs.accesskey;" |
|
157 + oncommand="gBrowser.selectAllTabs();"/> |
|
158 + <menuitem id="context_bookmarkSelectedTabs" |
|
159 + hidden="true" |
|
160 + label="&bookmarkSelectedTabs.label;" |
|
161 + accesskey="&bookmarkSelectedTabs.accesskey;" |
|
162 + oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"/> |
|
163 + <menuitem id="context_bookmarkTab" |
|
164 + label="&bookmarkTab.label;" |
|
165 + accesskey="&bookmarkTab.accesskey;" |
|
166 + oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.getUniquePages([TabContextMenu.contextTab]));"/> |
141 + <menu id="context_reopenInContainer" |
167 + <menu id="context_reopenInContainer" |
142 + label="&reopenInContainer.label;" |
168 + label="&reopenInContainer.label;" |
143 + accesskey="&reopenInContainer.accesskey;" |
169 + accesskey="&reopenInContainer.accesskey;" |
144 + hidden="true"> |
170 + hidden="true"> |
145 + <menupopup oncommand="TabContextMenu.reopenInContainer(event);" |
171 + <menupopup oncommand="TabContextMenu.reopenInContainer(event);" |
146 + onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/> |
172 + onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/> |
147 + </menu> |
173 + </menu> |
148 + <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;" |
174 + <menu id="context_moveTabOptions" |
149 + accesskey="&moveToNewWindow.accesskey;" |
175 + multiselectcontextlabel="&moveSelectedTabOptions.label;" |
150 + tbattr="tabbrowser-multiple" |
176 + multiselectcontextaccesskey="&moveSelectedTabOptions.accesskey;" |
151 + oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/> |
177 + nonmultiselectcontextlabel="&moveTabOptions.label;" |
152 + <menuseparator id="context_sendTabToDevice_separator" class="sync-ui-item"/> |
178 + nonmultiselectcontextaccesskey="&moveTabOptions.accesskey;"> |
153 + <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;" |
179 + <menupopup id="moveTabOptionsMenu"> |
154 + class="sync-ui-item" |
180 + <menuitem id="context_moveToStart" |
155 + accesskey="&sendTabToDevice.accesskey;"> |
181 + label="&moveToStart.label;" |
|
182 + accesskey="&moveToStart.accesskey;" |
|
183 + tbattr="tabbrowser-multiple" |
|
184 + oncommand="gBrowser.moveTabsToStart(TabContextMenu.contextTab);"/> |
|
185 + <menuitem id="context_moveToEnd" |
|
186 + label="&moveToEnd.label;" |
|
187 + accesskey="&moveToEnd.accesskey;" |
|
188 + tbattr="tabbrowser-multiple" |
|
189 + oncommand="gBrowser.moveTabsToEnd(TabContextMenu.contextTab);"/> |
|
190 + <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;" |
|
191 + accesskey="&moveToNewWindow.accesskey;" |
|
192 + tbattr="tabbrowser-multiple" |
|
193 + oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/> |
|
194 + </menupopup> |
|
195 + </menu> |
|
196 + <menu id="context_sendTabToDevice" |
|
197 + class="sync-ui-item"> |
156 + <menupopup id="context_sendTabToDevicePopupMenu" |
198 + <menupopup id="context_sendTabToDevicePopupMenu" |
157 + onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/> |
199 + onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle, TabContextMenu.contextTab.multiselected);"/> |
158 + </menu> |
200 + </menu> |
159 + <menuseparator/> |
201 + <menuseparator/> |
160 + <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;" |
|
161 + tbattr="tabbrowser-multiple-visible" |
|
162 + oncommand="gBrowser.reloadAllTabs();"/> |
|
163 + <menuitem id="context_bookmarkSelectedTabs" |
|
164 + hidden="true" |
|
165 + label="&bookmarkSelectedTabs.label;" |
|
166 + accesskey="&bookmarkSelectedTabs.accesskey;" |
|
167 + oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"/> |
|
168 + <menuitem id="context_bookmarkAllTabs" |
|
169 + label="&bookmarkAllTabs.label;" |
|
170 + accesskey="&bookmarkAllTabs.accesskey;" |
|
171 + command="Browser:BookmarkAllTabs"/> |
|
172 + <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;" |
202 + <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;" |
173 + oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/> |
203 + oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/> |
174 + <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;" |
204 + <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;" |
175 + oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/> |
205 + oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/> |
176 + <menuseparator/> |
|
177 + <menuitem id="context_undoCloseTab" |
206 + <menuitem id="context_undoCloseTab" |
178 + label="&undoCloseTab.label;" |
207 + label="&undoCloseTab.label;" |
179 + accesskey="&undoCloseTab.accesskey;" |
208 + accesskey="&undoCloseTab.accesskey;" |
180 + observes="History:UndoCloseTab"/> |
209 + observes="History:UndoCloseTab"/> |
181 + <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;" |
210 + <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;" |
182 + oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/> |
211 + oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/> |
183 + <menuitem id="context_closeSelectedTabs" label="&closeSelectedTabs.label;" |
212 + <menuitem id="context_closeSelectedTabs" label="&closeTabs.label;" |
184 + hidden="true" accesskey="&closeSelectedTabs.accesskey;" |
213 + hidden="true" accesskey="&closeTabs.accesskey;" |
185 + oncommand="gBrowser.removeMultiSelectedTabs();"/> |
214 + oncommand="gBrowser.removeMultiSelectedTabs();"/> |
186 + </menupopup> |
215 + </menupopup> |
187 + |
216 + |
188 + <!-- bug 415444/582485: event.stopPropagation is here for the cloned version |
217 + <!-- bug 415444/582485: event.stopPropagation is here for the cloned version |
189 + of this menupopup --> |
218 + of this menupopup --> |
372 + class="subviewbutton" |
417 + class="subviewbutton" |
373 + oncommand="SidebarUI.hide()"/> |
418 + oncommand="SidebarUI.hide()"/> |
374 + </panel> |
419 + </panel> |
375 + |
420 + |
376 + <menupopup id="toolbar-context-menu" |
421 + <menupopup id="toolbar-context-menu" |
377 + onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); UpdateDownloadsAutoHide(this); UpdateManageExtension(this)"> |
422 + onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); ToolbarContextMenu.updateDownloadsAutoHide(this); ToolbarContextMenu.updateExtension(this)"> |
378 + <menuitem oncommand="openAboutAddonsForContextAction(this.parentElement)" |
423 + <menuitem oncommand="ToolbarContextMenu.openAboutAddonsForContextAction(this.parentElement)" |
379 + accesskey="&customizeMenu.manageExtension.accesskey;" |
424 + accesskey="&customizeMenu.manageExtension.accesskey;" |
380 + label="&customizeMenu.manageExtension.label;" |
425 + label="&customizeMenu.manageExtension.label;" |
381 + contexttype="toolbaritem" |
426 + contexttype="toolbaritem" |
382 + class="customize-context-manageExtension"/> |
427 + class="customize-context-manageExtension"/> |
|
428 + <menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)" |
|
429 + accesskey="&customizeMenu.removeExtension.accesskey;" |
|
430 + label="&customizeMenu.removeExtension.label;" |
|
431 + contexttype="toolbaritem" |
|
432 + class="customize-context-removeExtension"/> |
383 + <menuseparator/> |
433 + <menuseparator/> |
384 + <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)" |
434 + <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)" |
385 + accesskey="&customizeMenu.pinToOverflowMenu.accesskey;" |
435 + accesskey="&customizeMenu.pinToOverflowMenu.accesskey;" |
386 + label="&customizeMenu.pinToOverflowMenu.label;" |
436 + label="&customizeMenu.pinToOverflowMenu.label;" |
387 + contexttype="toolbaritem" |
437 + contexttype="toolbaritem" |
388 + class="customize-context-moveToPanel"/> |
438 + class="customize-context-moveToPanel"/> |
389 + <menuitem oncommand="onDownloadsAutoHideChange(event)" |
439 + <menuitem oncommand="ToolbarContextMenu.onDownloadsAutoHideChange(event)" |
390 + type="checkbox" |
440 + type="checkbox" |
391 + accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;" |
441 + accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;" |
392 + label="&customizeMenu.autoHideDownloadsButton.label;" |
442 + label="&customizeMenu.autoHideDownloadsButton.label;" |
393 + contexttype="toolbaritem" |
443 + contexttype="toolbaritem" |
394 + class="customize-context-autoHide"/> |
444 + class="customize-context-autoHide"/> |
395 + <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)" |
445 + <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)" |
396 + accesskey="&customizeMenu.removeFromToolbar.accesskey;" |
446 + accesskey="&customizeMenu.removeFromToolbar.accesskey;" |
397 + label="&customizeMenu.removeFromToolbar.label;" |
447 + label="&customizeMenu.removeFromToolbar.label;" |
398 + contexttype="toolbaritem" |
448 + contexttype="toolbaritem" |
399 + class="customize-context-removeFromToolbar"/> |
449 + class="customize-context-removeFromToolbar"/> |
400 + <menuitem id="toolbar-context-reloadAllTabs" |
450 + <menuitem id="toolbar-context-reloadSelectedTab" |
401 + class="toolbaritem-tabsmenu" |
451 + class="toolbaritem-tabsmenu" |
402 + contexttype="tabbar" |
452 + contexttype="tabbar" |
403 + oncommand="gBrowser.reloadAllTabs();" |
453 + oncommand="gBrowser.reloadMultiSelectedTabs();" |
404 + label="&toolbarContextMenu.reloadAllTabs.label;" |
454 + label="&toolbarContextMenu.reloadSelectedTab.label;" |
405 + accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/> |
455 + accesskey="&toolbarContextMenu.reloadSelectedTab.accesskey;"/> |
406 + <menuitem id="toolbar-context-bookmarkAllTabs" |
456 + <menuitem id="toolbar-context-reloadSelectedTabs" |
407 + class="toolbaritem-tabsmenu" |
457 + class="toolbaritem-tabsmenu" |
408 + contexttype="tabbar" |
458 + contexttype="tabbar" |
409 + command="Browser:BookmarkAllTabs" |
459 + oncommand="gBrowser.reloadMultiSelectedTabs();" |
410 + label="&toolbarContextMenu.bookmarkAllTabs.label;" |
460 + label="&toolbarContextMenu.reloadSelectedTabs.label;" |
411 + accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/> |
461 + accesskey="&toolbarContextMenu.reloadSelectedTabs.accesskey;"/> |
|
462 + <menuitem id="toolbar-context-bookmarkSelectedTab" |
|
463 + class="toolbaritem-tabsmenu" |
|
464 + contexttype="tabbar" |
|
465 + oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);" |
|
466 + label="&toolbarContextMenu.bookmarkSelectedTab.label;" |
|
467 + accesskey="&toolbarContextMenu.bookmarkSelectedTab.accesskey;"/> |
|
468 + <menuitem id="toolbar-context-bookmarkSelectedTabs" |
|
469 + class="toolbaritem-tabsmenu" |
|
470 + contexttype="tabbar" |
|
471 + oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);" |
|
472 + label="&toolbarContextMenu.bookmarkSelectedTabs.label;" |
|
473 + accesskey="&toolbarContextMenu.bookmarkSelectedTabs.accesskey;"/> |
|
474 + <menuitem id="toolbar-context-selectAllTabs" |
|
475 + class="toolbaritem-tabsmenu" |
|
476 + contexttype="tabbar" |
|
477 + oncommand="gBrowser.selectAllTabs();" |
|
478 + label="&toolbarContextMenu.selectAllTabs.label;" |
|
479 + accesskey="&toolbarContextMenu.selectAllTabs.accesskey;"/> |
412 + <menuitem id="toolbar-context-undoCloseTab" |
480 + <menuitem id="toolbar-context-undoCloseTab" |
413 + class="toolbaritem-tabsmenu" |
481 + class="toolbaritem-tabsmenu" |
414 + contexttype="tabbar" |
482 + contexttype="tabbar" |
415 + label="&toolbarContextMenu.undoCloseTab.label;" |
483 + label="&toolbarContextMenu.undoCloseTab.label;" |
416 + accesskey="&toolbarContextMenu.undoCloseTab.accesskey;" |
484 + accesskey="&toolbarContextMenu.undoCloseTab.accesskey;" |
532 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
599 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
533 + <menuitem class="pageActionContextMenuItem builtInPinned" |
600 + <menuitem class="pageActionContextMenuItem builtInPinned" |
534 + label="&pageAction.removeFromUrlbar.label;" |
601 + label="&pageAction.removeFromUrlbar.label;" |
535 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
602 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
536 + <menuitem class="pageActionContextMenuItem extensionUnpinned" |
603 + <menuitem class="pageActionContextMenuItem extensionUnpinned" |
537 + label="&pageAction.allowInUrlbar.label;" |
604 + label="&pageAction.addToUrlbar.label;" |
538 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
605 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
539 + <menuitem class="pageActionContextMenuItem extensionPinned" |
606 + <menuitem class="pageActionContextMenuItem extensionPinned" |
540 + label="&pageAction.disallowInUrlbar.label;" |
607 + label="&pageAction.removeFromUrlbar.label;" |
541 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
608 + oncommand="BrowserPageActions.togglePinningForContextAction();"/> |
542 + <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/> |
609 + <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/> |
543 + <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned" |
610 + <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned" |
544 + label="&pageAction.manageExtension.label;" |
611 + label="&pageAction.manageExtension.label;" |
545 + oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/> |
612 + oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/> |
548 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul |
615 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul |
549 + |
616 + |
550 + <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/> |
617 + <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/> |
551 + |
618 + |
552 + <tooltip id="back-button-tooltip"> |
619 + <tooltip id="back-button-tooltip"> |
553 + <label class="tooltip-label" value="&backButton.tooltip;"/> |
620 + <description class="tooltip-label" value="&backButton.tooltip;"/> |
554 +#ifdef XP_MACOSX |
621 +#ifdef XP_MACOSX |
555 + <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
622 + <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
556 +#else |
623 +#else |
557 + <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
624 + <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
558 +#endif |
625 +#endif |
559 + </tooltip> |
626 + </tooltip> |
560 + |
627 + |
561 + <tooltip id="forward-button-tooltip"> |
628 + <tooltip id="forward-button-tooltip"> |
562 + <label class="tooltip-label" value="&forwardButton.tooltip;"/> |
629 + <description class="tooltip-label" value="&forwardButton.tooltip;"/> |
563 +#ifdef XP_MACOSX |
630 +#ifdef XP_MACOSX |
564 + <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
631 + <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
565 +#else |
632 +#else |
566 + <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
633 + <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
567 +#endif |
634 +#endif |
568 + </tooltip> |
635 + </tooltip> |
569 + |
636 + |
570 +#include popup-notifications.inc |
637 +#include popup-notifications.inc |
571 + |
638 + |
1384 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService) |
1451 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService) |
1385 #endif |
1452 #endif |
1386 |
1453 |
1387 #if defined(XP_WIN) |
1454 #if defined(XP_WIN) |
1388 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator) |
1455 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator) |
1389 @@ -70,17 +68,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID) |
1456 @@ -67,17 +65,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER |
1390 NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSERVICE_CID); |
|
1391 #endif |
1457 #endif |
1392 |
1458 |
1393 static const mozilla::Module::CIDEntry kBrowserCIDs[] = { |
1459 static const mozilla::Module::CIDEntry kBrowserCIDs[] = { |
|
1460 // clang-format off |
1394 { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor }, |
1461 { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor }, |
1395 #if defined(XP_WIN) |
1462 #if defined(XP_WIN) |
1396 { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor }, |
1463 { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor }, |
1397 #elif defined(MOZ_WIDGET_GTK) |
1464 #elif defined(MOZ_WIDGET_GTK) |
1398 - { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, |
1465 - { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, |
1399 + { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor }, |
1466 + { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor }, |
1400 #endif |
1467 #endif |
1401 { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor }, |
|
1402 { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create }, |
1468 { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create }, |
1403 #if defined(XP_WIN) |
1469 #if defined(XP_WIN) |
1404 { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor }, |
1470 { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor }, |
1405 #elif defined(XP_MACOSX) |
1471 #elif defined(XP_MACOSX) |
1406 { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor }, |
1472 { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor }, |
1407 #endif |
1473 #endif |
|
1474 #if defined(MOZ_WIDGET_COCOA) |
1408 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js |
1475 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js |
1409 --- a/browser/components/preferences/in-content/main.js |
1476 --- a/browser/components/preferences/in-content/main.js |
1410 +++ b/browser/components/preferences/in-content/main.js |
1477 +++ b/browser/components/preferences/in-content/main.js |
1411 @@ -327,16 +327,23 @@ var gMainPane = { |
1478 @@ -283,16 +283,23 @@ var gMainPane = { |
1412 this._backoffIndex++ : backoffTimes.length - 1]); |
1479 this._backoffIndex++ : backoffTimes.length - 1]); |
1413 }; |
1480 }; |
1414 |
1481 |
1415 window.setTimeout(() => { |
1482 window.setTimeout(() => { |
1416 window.requestIdleCallback(pollForDefaultBrowser); |
1483 window.requestIdleCallback(pollForDefaultBrowser); |
1638 + uristr->SetData( aURI ); |
1705 + uristr->SetData( aURI ); |
1639 + command->AppendElement( uristr ); |
1706 + command->AppendElement( uristr ); |
1640 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1707 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1641 +} |
1708 +} |
1642 + |
1709 + |
1643 +NS_IMETHODIMP |
|
1644 +nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval) |
|
1645 +{ |
|
1646 + *_retval = nullptr; |
|
1647 + |
|
1648 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
|
1649 + if( !command ) |
|
1650 + return NS_ERROR_FAILURE; |
|
1651 + |
|
1652 + nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
|
1653 + if( !str ) |
|
1654 + return NS_ERROR_FAILURE; |
|
1655 + |
|
1656 + str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" )); |
|
1657 + command->AppendElement( str ); |
|
1658 + |
|
1659 + nsCOMPtr<nsIArray> output; |
|
1660 + if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) ) |
|
1661 + return NS_ERROR_FAILURE; |
|
1662 + |
|
1663 + PRUint32 length; |
|
1664 + output->GetLength( &length ); |
|
1665 + if( length != 1 ) |
|
1666 + return NS_ERROR_FAILURE; |
|
1667 + |
|
1668 + nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 ); |
|
1669 + if( !resstr ) |
|
1670 + return NS_ERROR_FAILURE; |
|
1671 + |
|
1672 + nsAutoCString path; |
|
1673 + resstr->GetData( path ); |
|
1674 + if (path.IsEmpty()) |
|
1675 + return NS_ERROR_FAILURE; |
|
1676 + |
|
1677 + nsresult rv; |
|
1678 + nsCOMPtr<nsIFile> defaultReader = |
|
1679 + do_CreateInstance("@mozilla.org/file/local;1", &rv); |
|
1680 + NS_ENSURE_SUCCESS(rv, rv); |
|
1681 + |
|
1682 + rv = defaultReader->InitWithNativePath(path); |
|
1683 + NS_ENSURE_SUCCESS(rv, rv); |
|
1684 + |
|
1685 + bool exists; |
|
1686 + rv = defaultReader->Exists(&exists); |
|
1687 + NS_ENSURE_SUCCESS(rv, rv); |
|
1688 + if (!exists) |
|
1689 + return NS_ERROR_FAILURE; |
|
1690 + |
|
1691 + NS_ADDREF(*_retval = defaultReader); |
|
1692 + return NS_OK; |
|
1693 +} |
|
1694 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h |
1710 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h |
1695 new file mode 100644 |
1711 new file mode 100644 |
1696 --- /dev/null |
1712 --- /dev/null |
1697 +++ b/browser/components/shell/nsKDEShellService.h |
1713 +++ b/browser/components/shell/nsKDEShellService.h |
1698 @@ -0,0 +1,30 @@ |
1714 @@ -0,0 +1,30 @@ |