diff --git a/mobile/chrome/content/Util.js b/mobile/chrome/content/Util.js index 79403253e02d..dc04ce116b6e 100644 --- a/mobile/chrome/content/Util.js +++ b/mobile/chrome/content/Util.js @@ -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. */ diff --git a/mobile/chrome/content/preferences.js b/mobile/chrome/content/preferences.js index 519b46d148f7..e2ab713b33df 100644 --- a/mobile/chrome/content/preferences.js +++ b/mobile/chrome/content/preferences.js @@ -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"; diff --git a/mobile/components/AboutRedirector.js b/mobile/components/AboutRedirector.js index dcf6ec1cfc2e..e717be966113 100644 --- a/mobile/components/AboutRedirector.js +++ b/mobile/components/AboutRedirector.js @@ -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); diff --git a/mobile/components/MobileComponents.manifest b/mobile/components/MobileComponents.manifest index 7956593e6f0f..11f6a1723578 100644 --- a/mobile/components/MobileComponents.manifest +++ b/mobile/components/MobileComponents.manifest @@ -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