Bug 532120: Download Pop-Up Dialog does not block accessing content [r=gavin.sharp]
authorMark Finkle <mfinkle@mozilla.com>
Wed, 02 Dec 2009 00:28:43 -0500
changeset 65879 67603a5a52dec31045ab24c2a19dbc1fc248b9fe
parent 65878 f9886d1651aeea4ec39dea93414bfd931e8c370e
child 65880 6c51a10c7decab86b76e7c164fe8dfff5a5a21e9
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs532120
Bug 532120: Download Pop-Up Dialog does not block accessing content [r=gavin.sharp]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2359,46 +2359,50 @@ var AlertsHelper = {
       clearTimeout(this._timeoutID);
       this._timeoutAlert();
     }
   }
 };
 
 var HelperAppDialog = {
   _launcher: null,
+  _container: null,
 
   show: function had_show(aLauncher) {
     this._launcher = aLauncher;
     document.getElementById("helperapp-target").value = this._launcher.suggestedFileName;
 
     if (!this._launcher.MIMEInfo.hasDefaultHandler)
       document.getElementById("helperapp-open").disabled = true;
 
-    let container = document.getElementById("helperapp-container");
-    container.hidden = false;
-
-    let rect = container.getBoundingClientRect();
-    container.top = (window.innerHeight - rect.height) / 2;
-    container.left = (window.innerWidth - rect.width) / 2;
+    this._container = document.getElementById("helperapp-container");
+    this._container.hidden = false;
+
+    let rect = this._container.getBoundingClientRect();
+    this._container.top = (window.innerHeight - rect.height) / 2;
+    this._container.left = (window.innerWidth - rect.width) / 2;
+
+    BrowserUI.pushPopup(this, this._container);
   },
 
   save: function had_save() {
     this._launcher.saveToDisk(null, false);
-    this.close();
+    this.hide();
   },
 
   open: function had_open() {
     this._launcher.launchWithApplication(null, false);
-    this.close();
+    this.hide();
   },
 
-  close: function had_close() {
+  hide: function had_hide() {
     document.getElementById("helperapp-target").value = "";
-    let container = document.getElementById("helperapp-container");
-    container.hidden = true;
+    this._container.hidden = true;
+
+    BrowserUI.popPopup();
   }
 };
 
 function ProgressController(tab) {
   this._tab = tab;
 
   // Properties used to cache security state used to update the UI
   this.state = null;