Backed out changeset 85a89a0a4c1c (bug 1110069)

This commit is contained in:
Carsten "Tomcat" Book 2014-12-12 13:14:57 +01:00
Родитель 908c8f81e1
Коммит e82e89c4ce
6 изменённых файлов: 17 добавлений и 17 удалений

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

@ -7,7 +7,7 @@ var gSafeBrowsing = {
setReportPhishingMenu: function() {
// A phishing page will have a specific about:blocked content documentURI
var uri = gBrowser.currentURI;
var uri = getBrowser().currentURI;
var isPhishingPage = uri && uri.spec.startsWith("about:blocked?e=phishingBlocked");
// Show/hide the appropriate menu item.

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

@ -1058,7 +1058,7 @@
const kXULNS =
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
let addEngines = gBrowser.mCurrentBrowser.engines;
let addEngines = getBrowser().mCurrentBrowser.engines;
if (addEngines && addEngines.length > 0) {
const kBundleURI = "chrome://browser/locale/search.properties";
let bundle = Services.strings.createBundle(kBundleURI);

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

@ -452,7 +452,7 @@ WebContentConverterRegistrar.prototype = {
}
};
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
var notificationBox = browserWindow.getBrowser().getNotificationBox(browserElement);
notificationBox.appendNotification(message,
notificationValue,
notificationIcon,
@ -481,7 +481,7 @@ WebContentConverterRegistrar.prototype = {
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
var notificationBox = browserWindow.getBrowser().getNotificationBox(browserElement);
this._appendFeedReaderNotification(uri, aTitle, notificationBox);
}
else
@ -516,7 +516,7 @@ WebContentConverterRegistrar.prototype = {
function WCCR__getBrowserForContentWindow(aBrowserWindow, aContentWindow) {
// This depends on pseudo APIs of browser.js and tabbrowser.xml
aContentWindow = aContentWindow.top;
var browsers = aBrowserWindow.gBrowser.browsers;
var browsers = aBrowserWindow.getBrowser().browsers;
for (var i = 0; i < browsers.length; ++i) {
if (browsers[i].contentWindow == aContentWindow)
return browsers[i];

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

@ -349,7 +349,7 @@
popup.removeChild(items[i]);
}
var addengines = gBrowser.mCurrentBrowser.engines;
var addengines = getBrowser().mCurrentBrowser.engines;
if (addengines && addengines.length > 0) {
const kXULNS =
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

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

@ -217,7 +217,7 @@ let CommandUtils = {
},
get window() {
return this.chromeWindow.gBrowser.selectedTab.linkedBrowser.contentWindow;
return this.chromeWindow.getBrowser().selectedTab.linkedBrowser.contentWindow;
},
get document() {
@ -296,7 +296,7 @@ DeveloperToolbar.prototype.NOTIFICATIONS = NOTIFICATIONS;
*/
Object.defineProperty(DeveloperToolbar.prototype, "target", {
get: function() {
return TargetFactory.forTab(this._chromeWindow.gBrowser.selectedTab);
return TargetFactory.forTab(this._chromeWindow.getBrowser().selectedTab);
},
enumerable: true
});
@ -410,7 +410,7 @@ DeveloperToolbar.prototype.show = function(focus) {
return gcli.load().then(() => {
this.display = gcli.createDisplay({
contentDocument: this._chromeWindow.gBrowser.contentDocument,
contentDocument: this._chromeWindow.getBrowser().contentDocument,
chromeDocument: this._doc,
chromeWindow: this._chromeWindow,
hintElement: this.tooltipPanel.hintElement,
@ -433,7 +433,7 @@ DeveloperToolbar.prototype.show = function(focus) {
this.tooltipPanel);
this.display.onOutput.add(this.outputPanel._outputChanged, this.outputPanel);
let tabbrowser = this._chromeWindow.gBrowser;
let tabbrowser = this._chromeWindow.getBrowser();
tabbrowser.tabContainer.addEventListener("TabSelect", this, false);
tabbrowser.tabContainer.addEventListener("TabClose", this, false);
tabbrowser.addEventListener("load", this, true);
@ -500,7 +500,7 @@ DeveloperToolbar.prototype.hide = function() {
* @private
*/
DeveloperToolbar.prototype._devtoolsUnloaded = function() {
let tabbrowser = this._chromeWindow.gBrowser;
let tabbrowser = this._chromeWindow.getBrowser();
Array.prototype.forEach.call(tabbrowser.tabs, this._stopErrorsCount, this);
};
@ -509,7 +509,7 @@ DeveloperToolbar.prototype._devtoolsUnloaded = function() {
* @private
*/
DeveloperToolbar.prototype._devtoolsLoaded = function() {
let tabbrowser = this._chromeWindow.gBrowser;
let tabbrowser = this._chromeWindow.getBrowser();
this._initErrorsCount(tabbrowser.selectedTab);
};
@ -575,7 +575,7 @@ DeveloperToolbar.prototype.destroy = function() {
return; // Already destroyed
}
let tabbrowser = this._chromeWindow.gBrowser;
let tabbrowser = this._chromeWindow.getBrowser();
tabbrowser.tabContainer.removeEventListener("TabSelect", this, false);
tabbrowser.tabContainer.removeEventListener("TabClose", this, false);
tabbrowser.removeEventListener("load", this, true);
@ -624,7 +624,7 @@ DeveloperToolbar.prototype.handleEvent = function(ev) {
if (ev.type == "TabSelect" || ev.type == "load") {
if (this.visible) {
this.display.reattach({
contentDocument: this._chromeWindow.gBrowser.contentDocument
contentDocument: this._chromeWindow.getBrowser().contentDocument
});
if (ev.type == "TabSelect") {
@ -676,7 +676,7 @@ DeveloperToolbar.prototype._onPageBeforeUnload = function(ev) {
return;
}
let tabs = this._chromeWindow.gBrowser.tabs;
let tabs = this._chromeWindow.getBrowser().tabs;
Array.prototype.some.call(tabs, function(tab) {
if (tab.linkedBrowser.contentWindow === window) {
let tabId = tab.linkedPanel;
@ -701,7 +701,7 @@ DeveloperToolbar.prototype._onPageBeforeUnload = function(ev) {
* selected tab, then the button is not updated.
*/
DeveloperToolbar.prototype._updateErrorsCount = function(changedTabId) {
let tabId = this._chromeWindow.gBrowser.selectedTab.linkedPanel;
let tabId = this._chromeWindow.getBrowser().selectedTab.linkedPanel;
if (changedTabId && tabId != changedTabId) {
return;
}

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

@ -94,7 +94,7 @@ Window.prototype = {
},
get _tabbrowser() {
return this._window.gBrowser;
return this._window.getBrowser();
},
/*