зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changesets d864c70c64c9 and e4d7f9580e5a (bug 883953) for mochitest-mc orange.
This commit is contained in:
Родитель
be8d4a0e28
Коммит
a3cadb0a2d
|
@ -133,17 +133,6 @@ var ContentAreaObserver = {
|
|||
let newWidth = width || this.width;
|
||||
let newHeight = height || this.contentHeight;
|
||||
|
||||
if (Browser.selectedBrowser) {
|
||||
let notificationBox = Browser.getNotificationBox();
|
||||
|
||||
// If a notification and navbar are visible together,
|
||||
// make the notification appear above the navbar.
|
||||
if (ContextUI.navbarVisible && !notificationBox.notificationsHidden &&
|
||||
notificationBox.allNotifications.length != 0) {
|
||||
newHeight -= Elements.navbar.getBoundingClientRect().height;
|
||||
}
|
||||
}
|
||||
|
||||
if (newHeight == oldHeight && newWidth == oldWidth)
|
||||
return;
|
||||
|
||||
|
@ -198,9 +187,8 @@ var ContentAreaObserver = {
|
|||
},
|
||||
|
||||
onBrowserCreated: function onBrowserCreated(aBrowser) {
|
||||
let notificationBox = aBrowser.parentNode.parentNode;
|
||||
notificationBox.classList.add("content-width");
|
||||
notificationBox.classList.add("content-height");
|
||||
aBrowser.classList.add("content-width");
|
||||
aBrowser.classList.add("content-height");
|
||||
},
|
||||
|
||||
/*
|
||||
|
|
|
@ -21,6 +21,7 @@ var ContextUI = {
|
|||
init: function init() {
|
||||
Elements.browsers.addEventListener("mousedown", this, true);
|
||||
Elements.browsers.addEventListener("touchstart", this, true);
|
||||
Elements.browsers.addEventListener("AlertActive", this, true);
|
||||
|
||||
Elements.browsers.addEventListener('URLChanged', this, true);
|
||||
Elements.tabList.addEventListener('TabSelect', this, true);
|
||||
|
@ -169,7 +170,6 @@ var ContextUI = {
|
|||
// Display the nav bar
|
||||
displayNavbar: function () {
|
||||
Elements.navbar.show();
|
||||
ContentAreaObserver.updateContentArea();
|
||||
},
|
||||
|
||||
// Display the tab tray
|
||||
|
@ -182,7 +182,6 @@ var ContextUI = {
|
|||
dismissNavbar: function dismissNavbar() {
|
||||
if (!BrowserUI.isStartTabVisible) {
|
||||
Elements.navbar.dismiss();
|
||||
ContentAreaObserver.updateContentArea();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -275,14 +274,12 @@ var ContextUI = {
|
|||
case "mousedown":
|
||||
if (BrowserUI.isStartTabVisible)
|
||||
break;
|
||||
let box = Browser.getNotificationBox();
|
||||
if (!box.contains(aEvent.target) &&
|
||||
aEvent.button == 0 && this.isVisible) {
|
||||
if (aEvent.button == 0 && this.isVisible)
|
||||
this.dismiss();
|
||||
}
|
||||
break;
|
||||
case "ToolPanelShown":
|
||||
case "ToolPanelHidden":
|
||||
case "AlertActive":
|
||||
this.dismiss();
|
||||
break;
|
||||
case "touchstart":
|
||||
|
|
|
@ -1718,6 +1718,9 @@ Tab.prototype = {
|
|||
browser.id = "browser-" + this._id;
|
||||
this._chromeTab.linkedBrowser = browser;
|
||||
|
||||
// let the content area manager know about this browser.
|
||||
ContentAreaObserver.onBrowserCreated(browser);
|
||||
|
||||
browser.setAttribute("type", "content");
|
||||
|
||||
let useRemote = Services.prefs.getBoolPref("browser.tabs.remote");
|
||||
|
@ -1732,11 +1735,6 @@ Tab.prototype = {
|
|||
notification.appendChild(stack);
|
||||
Elements.browsers.insertBefore(notification, aInsertBefore);
|
||||
|
||||
notification.dir = "reverse";
|
||||
|
||||
// let the content area manager know about this browser.
|
||||
ContentAreaObserver.onBrowserCreated(browser);
|
||||
|
||||
// stop about:blank from loading
|
||||
browser.stop();
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@ var Downloads = {
|
|||
Services.obs.addObserver(this, "dl-done", true);
|
||||
Services.obs.addObserver(this, "dl-run", true);
|
||||
Services.obs.addObserver(this, "dl-failed", true);
|
||||
Services.obs.addObserver(this, "dl-request", true);
|
||||
|
||||
this._notificationBox = Browser.getNotificationBox();
|
||||
|
||||
|
@ -70,7 +69,6 @@ var Downloads = {
|
|||
Services.obs.removeObserver(this, "dl-done");
|
||||
Services.obs.removeObserver(this, "dl-run");
|
||||
Services.obs.removeObserver(this, "dl-failed");
|
||||
Services.obs.removeObserver(this, "dl-request");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -446,11 +444,6 @@ var Downloads = {
|
|||
download = aSubject.QueryInterface(Ci.nsIDownload);
|
||||
this._showDownloadFailedNotification(download);
|
||||
break;
|
||||
case "dl-request":
|
||||
setTimeout(function() {
|
||||
ContextUI.displayNavbar();
|
||||
}, 1000);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ HelperAppLauncherDialog.prototype = {
|
|||
},
|
||||
|
||||
_showDownloadInfobar: function do_showDownloadInfobar(aLauncher) {
|
||||
Services.obs.notifyObservers(null, "dl-request", "");
|
||||
let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
|
||||
let runButtonText =
|
||||
|
|
Загрузка…
Ссылка в новой задаче