From 808e8c572231223f95942fdd8af765dd565edfa5 Mon Sep 17 00:00:00 2001 From: Tim Abraldes Date: Mon, 5 Aug 2013 23:29:55 -0700 Subject: [PATCH] bug 866304 DialogUI dialogs cleanup patch. Removes unused/obsolete code from DialogUI. r=mbrubeck The "dialog" concept is unused (the last consumer was the sync setup UI which is now a flyout) and is obsolete since we have prompts. --- browser/metro/base/content/browser-ui.js | 42 ------------------------ 1 file changed, 42 deletions(-) diff --git a/browser/metro/base/content/browser-ui.js b/browser/metro/base/content/browser-ui.js index 44735d995471..e30d776c4924 100644 --- a/browser/metro/base/content/browser-ui.js +++ b/browser/metro/base/content/browser-ui.js @@ -231,7 +231,6 @@ var BrowserUI = { }, showContent: function showContent(aURI) { - DialogUI.closeAllDialogs(); StartUI.update(aURI); ContextUI.dismissTabs(); ContextUI.dismissContextAppbar(); @@ -735,13 +734,6 @@ var BrowserUI = { return; } - // Check open dialogs - let dialog = DialogUI.activeDialog; - if (dialog) { - dialog.close(); - return; - } - // Check open modal elements if (DialogUI.modals.length > 0) { return; @@ -1317,7 +1309,6 @@ var PanelUI = { }; var DialogUI = { - _dialogs: [], _popup: null, init: function() { @@ -1384,39 +1375,6 @@ var DialogUI = { return dialog; }, - /******************************************* - * Dialogs - */ - - get activeDialog() { - // Return the topmost dialog - if (this._dialogs.length) - return this._dialogs[this._dialogs.length - 1]; - return null; - }, - - closeAllDialogs: function closeAllDialogs() { - while (this.activeDialog) - this.activeDialog.close(); - }, - - pushDialog: function pushDialog(aDialog) { - // If we have a dialog push it on the stack and set the attr for CSS - if (aDialog) { - this._dialogs.push(aDialog); - Elements.contentShowing.setAttribute("disabled", "true"); - } - }, - - popDialog: function popDialog() { - if (this._dialogs.length) - this._dialogs.pop(); - - // If no more dialogs are being displayed, remove the attr for CSS - if (!this._dialogs.length) - Elements.contentShowing.removeAttribute("disabled"); - }, - /******************************************* * Popups */