Bug 590465 - start page option Blank Page changed after restart [r=vingtetun]

This commit is contained in:
Mark Finkle 2010-08-31 15:49:40 -04:00
Родитель 5a5fcf0a70
Коммит 2f7aafeae1
4 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -182,7 +182,7 @@ let Util = {
/** Don't display anything in the urlbar for these special URIs. */
isURLEmpty: function isURLEmpty(aURL) {
return (!aURL || aURL == "about:blank" || aURL == "about:home");
return (!aURL || aURL == "about:blank" || aURL == "about:empty" || aURL == "about:home");
},
/** Recursively find all documents, including root document. */

Просмотреть файл

@ -206,7 +206,7 @@ var PreferencesView = {
} catch (e) { }
switch (url) {
case "about:blank":
case "about:empty":
value = "none";
display = null;
break;
@ -242,7 +242,7 @@ var PreferencesView = {
switch (value) {
case "none":
url = "about:blank";
url = "about:empty";
break;
case "default":
url = "about:home";

Просмотреть файл

@ -41,6 +41,11 @@ const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
let modules = {
// about:blank has some bad loading behavior we can avoid, if we use an alias
empty: {
uri: "about:blank",
privileged: false
},
fennec: {
uri: "chrome://browser/content/about.xhtml",
privileged: true
@ -105,6 +110,12 @@ AboutGeneric.prototype = {
}
};
function AboutEmpty() {}
AboutEmpty.prototype = {
__proto__: AboutGeneric.prototype,
classID: Components.ID("{433d2d75-5923-49b0-854d-f37267b03dc7}")
}
function AboutFirstrun() {}
AboutFirstrun.prototype = {
__proto__: AboutGeneric.prototype,
@ -141,6 +152,6 @@ AboutHome.prototype = {
classID: Components.ID("{b071364f-ab68-4669-a9db-33fca168271a}")
}
const components = [AboutFirstrun, AboutFennec, AboutRights,
const components = [AboutEmpty, AboutFirstrun, AboutFennec, AboutRights,
AboutCertError, AboutFirefox, AboutHome];
const NSGetFactory = XPCOMUtils.generateNSGetFactory(components);

Просмотреть файл

@ -1,4 +1,6 @@
# AboutRedirector.js
component {433d2d75-5923-49b0-854d-f37267b03dc7} AboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=empty {433d2d75-5923-49b0-854d-f37267b03dc7}
component {077ea23e-0f22-4168-a744-8e444b560197} AboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=firstrun {077ea23e-0f22-4168-a744-8e444b560197}
component {842a6d11-b369-4610-ba66-c3b5217e82be} AboutRedirector.js
@ -11,8 +13,6 @@ component {972efe64-8ac0-4e91-bdb0-22835d987815} AboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=certerror {972efe64-8ac0-4e91-bdb0-22835d987815}
component {b071364f-ab68-4669-a9db-33fca168271a} AboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=home {b071364f-ab68-4669-a9db-33fca168271a}
component {d503134a-f6f3-4824-bc3c-09c123177944} AboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=sync-tabs {d503134a-f6f3-4824-bc3c-09c123177944}
# DirectoryProvider.js
component {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b} DirectoryProvider.js