mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 731926 - Refactor init/shutdown functions in browser.js (trivial move of HandleAppCommandEvent). r=gavin
This commit is contained in:
parent
2c457ff2a9
commit
9cca843146
@ -1152,35 +1152,6 @@ function BrowserStartup() {
|
||||
gStartupRan = true;
|
||||
}
|
||||
|
||||
function HandleAppCommandEvent(evt) {
|
||||
evt.stopPropagation();
|
||||
switch (evt.command) {
|
||||
case "Back":
|
||||
BrowserBack();
|
||||
break;
|
||||
case "Forward":
|
||||
BrowserForward();
|
||||
break;
|
||||
case "Reload":
|
||||
BrowserReloadSkipCache();
|
||||
break;
|
||||
case "Stop":
|
||||
BrowserStop();
|
||||
break;
|
||||
case "Search":
|
||||
BrowserSearch.webSearch();
|
||||
break;
|
||||
case "Bookmarks":
|
||||
toggleSidebar('viewBookmarksSidebar');
|
||||
break;
|
||||
case "Home":
|
||||
BrowserHome();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function prepareForStartup() {
|
||||
gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
|
||||
|
||||
@ -1819,6 +1790,35 @@ function initializeSanitizer()
|
||||
}
|
||||
}
|
||||
|
||||
function HandleAppCommandEvent(evt) {
|
||||
evt.stopPropagation();
|
||||
switch (evt.command) {
|
||||
case "Back":
|
||||
BrowserBack();
|
||||
break;
|
||||
case "Forward":
|
||||
BrowserForward();
|
||||
break;
|
||||
case "Reload":
|
||||
BrowserReloadSkipCache();
|
||||
break;
|
||||
case "Stop":
|
||||
BrowserStop();
|
||||
break;
|
||||
case "Search":
|
||||
BrowserSearch.webSearch();
|
||||
break;
|
||||
case "Bookmarks":
|
||||
toggleSidebar('viewBookmarksSidebar');
|
||||
break;
|
||||
case "Home":
|
||||
BrowserHome();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function gotoHistoryIndex(aEvent) {
|
||||
let index = aEvent.target.getAttribute("index");
|
||||
if (!index)
|
||||
|
Loading…
Reference in New Issue
Block a user