merge m-c to fx-team

This commit is contained in:
Tim Taubert 2012-07-25 09:28:29 +02:00
commit 857657b7ff
11 changed files with 25 additions and 18 deletions

View File

@ -1214,9 +1214,10 @@
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
var blank = !aURI || (aURI == "about:blank");
var uriIsBlankPage = !aURI || isBlankPageURL(aURI);
var uriIsNotAboutBlank = aURI && aURI != "about:blank";
if (blank)
if (uriIsBlankPage)
t.setAttribute("label", this.mStringBundle.getString("tabs.emptyTabTitle"));
else
t.setAttribute("label", aURI);
@ -1328,8 +1329,15 @@
this.tabContainer.updateVisibility();
if (uriIsNotAboutBlank) {
// Stop the existing about:blank load. Otherwise, if aURI
// doesn't stop in-progress loads on its own, we'll get into
// trouble with multiple parallel loads running at once.
b.stop();
}
// wire up a progress listener for the new browser object.
var tabListener = this.mTabProgressListener(t, b, blank);
var tabListener = this.mTabProgressListener(t, b, uriIsBlankPage);
const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
.createInstance(Components.interfaces.nsIWebProgress);
filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
@ -1351,15 +1359,10 @@
evt.initEvent("TabOpen", true, false);
t.dispatchEvent(evt);
if (!blank) {
// Stop the existing about:blank load. Otherwise, if aURI
// doesn't stop in-progress loads on its own, we'll get into
// trouble with multiple parallel loads running at once.
b.stop();
if (uriIsNotAboutBlank) {
// pretend the user typed this so it'll be available till
// the document successfully loads
if (!isBlankPageURL(aURI))
if (!uriIsBlankPage)
b.userTypedValue = aURI;
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;

View File

@ -26,7 +26,7 @@
var EXPORTED_SYMBOLS = [ "gcli" ];
Components.utils.import("resource:///modules/devtools/Require.jsm");
Components.utils.import("resource://gre/modules/Require.jsm");
Components.utils.import("resource:///modules/devtools/Console.jsm");
Components.utils.import("resource:///modules/devtools/Browser.jsm");

View File

@ -11,7 +11,7 @@ function test() {
let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

View File

@ -42,7 +42,7 @@ let tabSizeOrig = undefined;
let remoteHostOrig = undefined;
function setup() {
Components.utils.import("resource:///modules/devtools/Require.jsm", imports);
Components.utils.import("resource://gre/modules/Require.jsm", imports);
imports.settings = imports.require("gcli/settings");
tiltEnabledOrig = imports.prefBranch.getBoolPref("devtools.tilt.enabled");

View File

@ -41,7 +41,7 @@ let tabSizeOrig = undefined;
let remoteHostOrig = undefined;
function setup() {
Components.utils.import("resource:///modules/devtools/Require.jsm", imports);
Components.utils.import("resource://gre/modules/Require.jsm", imports);
imports.settings = imports.require("gcli/settings");
tiltEnabled = imports.settings.getSetting("devtools.tilt.enabled");

View File

@ -54,7 +54,7 @@
let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

View File

@ -6,7 +6,7 @@
let [ define, require ] = (function() {
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Require.jsm", tempScope);
Components.utils.import("resource://gre/modules/Require.jsm", tempScope);
return [ tempScope.define, tempScope.require ];
})();

View File

@ -14,4 +14,8 @@ PARALLEL_DIRS += \
sourcemap \
$(NULL)
EXTRA_JS_MODULES = \
Require.jsm \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -17,7 +17,7 @@
var EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ];
Components.utils.import('resource:///modules/devtools/Require.jsm');
Components.utils.import('resource://gre/modules/Require.jsm');
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors

View File

@ -12,7 +12,7 @@
* https://github.com/mozilla/source-map/
*/
Components.utils.import('resource:///modules/devtools/Require.jsm');
Components.utils.import('resource://gre/modules/Require.jsm');
Components.utils.import('resource:///modules/devtools/SourceMap.jsm');
let EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ];