mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 948983: Make about:newtab the start page with about:home and about:start as aliases and save all as about:newtab in sessionstore. r=mbrubeck
This commit is contained in:
parent
4be83d4a79
commit
4fd613f1e0
@ -209,6 +209,7 @@ let Util = {
|
||||
aURL == "about:blank" ||
|
||||
aURL == "about:empty" ||
|
||||
aURL == "about:home" ||
|
||||
aURL == "about:newtab" ||
|
||||
aURL == "about:start");
|
||||
},
|
||||
|
||||
|
@ -347,6 +347,12 @@ let WebNavigation = {
|
||||
let history = docShell.QueryInterface(Ci.nsIWebNavigation).sessionHistory;
|
||||
for (let i = 0; i < history.count; i++) {
|
||||
let entry = this._serializeHistoryEntry(history.getEntryAtIndex(i, false));
|
||||
|
||||
// If someone directly navigates to one of these URLs and they switch to Desktop,
|
||||
// we need to make the page load-able.
|
||||
if (entry.url == "about:home" || entry.url == "about:start") {
|
||||
entry.url = "about:newtab";
|
||||
}
|
||||
entries.push(entry);
|
||||
}
|
||||
let index = history.index + 1;
|
||||
|
@ -308,7 +308,7 @@ var BrowserUI = {
|
||||
|
||||
isStartURI: function isStartURI(aURI) {
|
||||
aURI = aURI || Browser.selectedBrowser.currentURI.spec;
|
||||
return aURI == kStartURI || aURI == "about:home";
|
||||
return aURI == kStartURI || aURI == "about:start" || aURI == "about:home";
|
||||
},
|
||||
|
||||
updateStartURIAttributes: function (aURI) {
|
||||
|
@ -11,7 +11,7 @@ let Cr = Components.results;
|
||||
Cu.import("resource://gre/modules/PageThumbs.jsm");
|
||||
|
||||
// Page for which the start UI is shown
|
||||
const kStartURI = "about:start";
|
||||
const kStartURI = "about:newtab";
|
||||
|
||||
// allow panning after this timeout on pages with registered touch listeners
|
||||
const kTouchTimeout = 300;
|
||||
|
@ -8,7 +8,7 @@ const Ci = Components.interfaces;
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
let modules = {
|
||||
start: {
|
||||
newtab: {
|
||||
uri: "chrome://browser/content/Start.xul",
|
||||
privileged: true
|
||||
},
|
||||
@ -37,8 +37,12 @@ let modules = {
|
||||
uri: "chrome://browser/content/aboutCertError.xhtml",
|
||||
privileged: true
|
||||
},
|
||||
start: {
|
||||
uri: "about:newtab",
|
||||
privileged: true
|
||||
},
|
||||
home: {
|
||||
uri: "about:start",
|
||||
uri: "about:newtab",
|
||||
privileged: true
|
||||
},
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
@ -73,7 +73,7 @@ function needHomepageOverride() {
|
||||
}
|
||||
|
||||
function getHomePage() {
|
||||
let url = "about:start";
|
||||
let url = "about:newtab";
|
||||
try {
|
||||
url = Services.prefs.getComplexValue("browser.startup.homepage", Ci.nsIPrefLocalizedString).data;
|
||||
} catch (e) { }
|
||||
|
@ -5,6 +5,7 @@ contract @mozilla.org/network/protocol/about;1?what=empty {433d2d75-5923-49b0-85
|
||||
contract @mozilla.org/network/protocol/about;1?what=firefox {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
contract @mozilla.org/network/protocol/about;1?what=rights {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
contract @mozilla.org/network/protocol/about;1?what=certerror {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
contract @mozilla.org/network/protocol/about;1?what=newtab {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
contract @mozilla.org/network/protocol/about;1?what=home {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
contract @mozilla.org/network/protocol/about;1?what=crashprompt {433d2d75-5923-49b0-854d-f37267b03dc7}
|
||||
|
Loading…
Reference in New Issue
Block a user