mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out changeset 746adaa9c9da (bug 455553)
This commit is contained in:
parent
8059d2926a
commit
6210f83731
@ -12,8 +12,6 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js" />
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
var gOpenerWnd = window.opener.wrappedJSObject;
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js" />
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js" />
|
||||
|
@ -1110,11 +1110,5 @@ pref("prompts.tab_modal.enabled", true);
|
||||
// Whether the Panorama should animate going in/out of tabs
|
||||
pref("browser.panorama.animate_zoom", true);
|
||||
|
||||
// Defines the url to be used for new tabs.
|
||||
pref("browser.newtab.url", "about:blank");
|
||||
|
||||
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
|
||||
pref("browser.newtabpage.enabled", false);
|
||||
|
||||
// Enable the DOM full-screen API.
|
||||
pref("full-screen-api.enabled", true);
|
||||
|
@ -225,7 +225,7 @@ var FullZoom = {
|
||||
return;
|
||||
|
||||
// Avoid the cps roundtrip and apply the default/global pref.
|
||||
if (isBlankPageURL(aURI.spec)) {
|
||||
if (aURI.spec == "about:blank") {
|
||||
this._applyPrefToSetting(undefined, aBrowser);
|
||||
return;
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ var PlacesStarButton = {
|
||||
}
|
||||
|
||||
// We can load about:blank before the actual page, but there is no point in handling that page.
|
||||
if (isBlankPageURL(this._uri.spec)) {
|
||||
if (this._uri.spec == "about:blank") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -174,9 +174,6 @@ XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
|
||||
}
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
|
||||
"resource:///modules/NewTabUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "InspectorUI", function() {
|
||||
let tmp = {};
|
||||
Cu.import("resource:///modules/inspector.jsm", tmp);
|
||||
@ -191,7 +188,6 @@ XPCOMUtils.defineLazyGetter(this, "Tilt", function() {
|
||||
|
||||
let gInitialPages = [
|
||||
"about:blank",
|
||||
"about:newtab",
|
||||
"about:privatebrowsing",
|
||||
"about:sessionrestore"
|
||||
];
|
||||
@ -1711,7 +1707,6 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
#endif
|
||||
|
||||
gBrowserThumbnails.init();
|
||||
NewTabUtils.init();
|
||||
TabView.init();
|
||||
|
||||
setUrlAndSearchBarWidthForConditionalForwardButton();
|
||||
@ -2209,7 +2204,7 @@ function openLocation() {
|
||||
else {
|
||||
// If there are no open browser windows, open a new one
|
||||
win = window.openDialog("chrome://browser/content/", "_blank",
|
||||
"chrome,all,dialog=no", BROWSER_NEW_TAB_URL);
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
win.addEventListener("load", openLocationCallback, false);
|
||||
}
|
||||
return;
|
||||
@ -2227,7 +2222,7 @@ function openLocationCallback()
|
||||
|
||||
function BrowserOpenTab()
|
||||
{
|
||||
openUILinkIn(BROWSER_NEW_TAB_URL, "tab");
|
||||
openUILinkIn("about:blank", "tab");
|
||||
}
|
||||
|
||||
/* Called from the openLocation dialog. This allows that dialog to instruct
|
||||
@ -2562,7 +2557,7 @@ function URLBarSetURI(aURI) {
|
||||
else
|
||||
value = losslessDecodeURI(uri);
|
||||
|
||||
valid = !isBlankPageURL(uri.spec);
|
||||
valid = (uri.spec != "about:blank");
|
||||
}
|
||||
|
||||
gURLBar.value = value;
|
||||
@ -2879,7 +2874,7 @@ function getMeOutOfHere() {
|
||||
// Get the start page from the *default* pref branch, not the user's
|
||||
var prefs = Cc["@mozilla.org/preferences-service;1"]
|
||||
.getService(Ci.nsIPrefService).getDefaultBranch(null);
|
||||
var url = BROWSER_NEW_TAB_URL;
|
||||
var url = "about:blank";
|
||||
try {
|
||||
url = prefs.getComplexValue("browser.startup.homepage",
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
@ -5197,7 +5192,7 @@ nsBrowserAccess.prototype = {
|
||||
case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
|
||||
// FIXME: Bug 408379. So how come this doesn't send the
|
||||
// referrer like the other loads do?
|
||||
var url = aURI ? aURI.spec : BROWSER_NEW_TAB_URL;
|
||||
var url = aURI ? aURI.spec : "about:blank";
|
||||
// Pass all params to openDialog to ensure that "url" isn't passed through
|
||||
// loadOneOrMoreURIs, which splits based on "|"
|
||||
newWindow = openDialog(getBrowserURL(), "_blank", "all,dialog=no", url, null, null, null);
|
||||
@ -5230,7 +5225,7 @@ nsBrowserAccess.prototype = {
|
||||
let loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground");
|
||||
let referrer = aOpener ? makeURI(aOpener.location.href) : null;
|
||||
|
||||
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : BROWSER_NEW_TAB_URL, {
|
||||
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", {
|
||||
referrerURI: referrer,
|
||||
fromExternal: isExternal,
|
||||
inBackground: loadInBackground});
|
||||
@ -7779,11 +7774,9 @@ function undoCloseWindow(aIndex) {
|
||||
*/
|
||||
function isTabEmpty(aTab) {
|
||||
let browser = aTab.linkedBrowser;
|
||||
let uri = browser.currentURI.spec;
|
||||
let body = browser.contentDocument.body;
|
||||
return browser.sessionHistory.count < 2 &&
|
||||
isBlankPageURL(uri) &&
|
||||
(!body || !body.hasChildNodes()) &&
|
||||
browser.currentURI.spec == "about:blank" &&
|
||||
!browser.contentDocument.body.hasChildNodes() &&
|
||||
!aTab.hasAttribute("busy");
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@
|
||||
autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
|
||||
delete this.mBrowser.registeredOpenURI;
|
||||
}
|
||||
if (!isBlankPageURL(aLocation.spec)) {
|
||||
if (aLocation.spec != "about:blank") {
|
||||
autocomplete.registerOpenPage(aLocation);
|
||||
this.mBrowser.registeredOpenURI = aLocation;
|
||||
}
|
||||
@ -1065,7 +1065,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (title && !isBlankPageURL(title)) {
|
||||
if (title && title != "about:blank") {
|
||||
// At this point, we now have a URI.
|
||||
// Let's try to unescape it using a character set
|
||||
// in case the URI is not ASCII.
|
||||
@ -1589,7 +1589,7 @@
|
||||
aTab.closing = true;
|
||||
this._removingTabs.push(aTab);
|
||||
if (newTab)
|
||||
this.addTab(BROWSER_NEW_TAB_URL, {skipAnimation: true});
|
||||
this.addTab("about:blank", {skipAnimation: true});
|
||||
else
|
||||
this.tabContainer.updateVisibility();
|
||||
|
||||
|
@ -41,23 +41,11 @@
|
||||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
||||
return Services.prefs.getCharPref("browser.newtab.url") || "about:blank";
|
||||
});
|
||||
|
||||
var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
|
||||
|
||||
var gBidiUI = false;
|
||||
|
||||
/**
|
||||
* Determines whether the given url is considered a special URL for new tabs.
|
||||
*/
|
||||
function isBlankPageURL(aURL) {
|
||||
return aURL == "about:blank" || aURL == BROWSER_NEW_TAB_URL;
|
||||
}
|
||||
|
||||
function getBrowserURL()
|
||||
{
|
||||
return "chrome://browser/content/browser.xul";
|
||||
@ -311,7 +299,7 @@ function openLinkIn(url, where, params) {
|
||||
else
|
||||
w.gBrowser.selectedBrowser.focus();
|
||||
|
||||
if (!loadInBackground && isBlankPageURL(url))
|
||||
if (!loadInBackground && url == "about:blank")
|
||||
w.focusAndSelectUrlBar();
|
||||
}
|
||||
|
||||
|
@ -105,8 +105,6 @@ static RedirEntry kRedirMap[] = {
|
||||
{ "home", "chrome://browser/content/aboutHome.xhtml",
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
{ "newtab", "chrome://browser/content/newtab/newTab.xul",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
{ "permissions", "chrome://browser/content/preferences/aboutPermissions.xul",
|
||||
nsIAboutModule::ALLOW_SCRIPT },
|
||||
};
|
||||
|
@ -143,7 +143,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-progress", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#endif
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "newtab", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "permissions", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
|
||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
|
||||
|
Loading…
Reference in New Issue
Block a user