Backout e8a507a0a1a8 (bug 767813) due to mochitest-browser-chrome orange.
authorRyan VanderMeulen <ryanvm@gmail.com>
Sun, 24 Jun 2012 16:27:20 -0400
changeset 106440 fcf71225f962c45bd1b8270db776efc214556abe
parent 106439 b545493218fa6713509522b8f5ff9010589378d8
child 106441 03f3f300350c0e4b2ff3a6cdc18a3d718d39978b
push id23447
push userdanderson@mozilla.com
push dateTue, 11 Sep 2012 17:34:27 +0000
treeherdermozilla-central@fdfaef738a00 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs767813
milestone16.0a1
backs oute8a507a0a1a87a5cc4b221bf1cc5b9769a2d85d9
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout e8a507a0a1a8 (bug 767813) due to mochitest-browser-chrome orange.
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/base/content/browser.xul
browser/components/downloads/content/downloads.js
browser/components/downloads/content/downloadsOverlay.xul
content/base/src/nsINode.cpp
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -182,16 +182,19 @@ var StarUI = {
     this._element("editBookmarkPanelRemoveButton").label = label;
 
     // unset the unstarred state, if set
     this._element("editBookmarkPanelStarIcon").removeAttribute("unstarred");
 
     this._itemId = aItemId !== undefined ? aItemId : this._itemId;
     this.beginBatch();
 
+    // Consume dismiss clicks, see bug 400924
+    this.panel.popupBoxObject
+        .setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
     this.panel.openPopup(aAnchorElement, aPosition);
 
     gEditItemOverlay.initPanel(this._itemId,
                                { hiddenRows: ["description", "location",
                                               "loadInSidebar", "keyword"] });
   },
 
   panelShown:
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6702,16 +6702,20 @@ var gIdentityHandler = {
     if (this._mode == this.IDENTITY_MODE_CHROMEUI ||
         gURLBar.getAttribute("pageproxystate") != "valid")
       return;
 
     // Make sure that the display:none style we set in xul is removed now that
     // the popup is actually needed
     this._identityPopup.hidden = false;
 
+    // Tell the popup to consume dismiss clicks, to avoid bug 395314
+    this._identityPopup.popupBoxObject
+        .setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
+
     // Update the popup strings
     this.setPopupMessages(this._identityBox.className);
 
     // Add the "open" attribute to the identity box for styling
     this._identityBox.setAttribute("open", "true");
     var self = this;
     this._identityPopup.addEventListener("popuphidden", function onPopupHidden(e) {
       e.currentTarget.removeEventListener("popuphidden", onPopupHidden, false);
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -132,17 +132,16 @@
       <description/>
     </panel>
 
     <panel id="editBookmarkPanel"
            type="arrow"
            footertype="promobox"
            orient="vertical"
            ignorekeys="true"
-           consumeoutsideclicks="true"
            hidden="true"
            onpopupshown="StarUI.panelShown(event);"
            aria-labelledby="editBookmarkPanelTitle">
       <row id="editBookmarkPanelHeader" align="center" hidden="true">
         <vbox align="center">
           <image id="editBookmarkPanelStarIcon"/>
         </vbox>
         <vbox>
@@ -255,17 +254,16 @@
            orient="vertical"
            role="alert"/>
 
     <!-- Popup for site identity information -->
     <panel id="identity-popup"
            type="arrow"
            hidden="true"
            noautofocus="true"
-           consumeoutsideclicks="true"
            onpopupshown="gIdentityHandler.onPopupShown(event);"
            level="top">
       <hbox id="identity-popup-container" align="top">
         <image id="identity-popup-icon"/>
         <vbox id="identity-popup-content-box">
           <label id="identity-popup-connectedToLabel"
                  class="identity-popup-label"
                  value="&identity.connectedTo;"/>
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -297,16 +297,20 @@ const DownloadsPanel = {
   _openPopupIfDataReady: function DP_openPopupIfDataReady()
   {
     // We don't want to open the popup if we already displayed it, or if we are
     // still loading data.
     if (this._state != this.kStateShowing || DownloadsView.loading) {
       return;
     }
 
+    // Make sure that clicking outside the popup cannot reopen it accidentally.
+    this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject
+                                                      .ROLLUP_CONSUME);
+
     // Ensure the anchor is visible.  If that is not possible, show the panel
     // anchored to the top area of the window, near the default anchor position.
     DownloadsButton.getAnchor(function DP_OPIDR_callback(aAnchor) {
       // At this point, if the window is minimized, opening the panel could fail
       // without any notification, and there would be no way to either open or
       // close the panel anymore.  To prevent this, check if the window is
       // minimized and in that case force the panel to the closed state.
       if (window.windowState == Ci.nsIDOMChromeWindow.STATE_MINIMIZED) {
--- a/browser/components/downloads/content/downloadsOverlay.xul
+++ b/browser/components/downloads/content/downloadsOverlay.xul
@@ -41,17 +41,16 @@
          readers, we use a label on the panel instead of the anchor because the
          panel can also be displayed without an anchor. -->
     <panel id="downloadsPanel"
            aria-label="&downloads.title;"
            role="group"
            type="arrow"
            orient="vertical"
            level="top"
-           consumeoutsideclicks="true"
            onpopupshown="DownloadsPanel.onPopupShown(event);"
            onpopuphidden="DownloadsPanel.onPopupHidden(event);">
       <!-- The following popup menu should be a child of the panel element,
            otherwise flickering may occur when the cursor is moved over the area
            of a disabled menu item that overlaps the panel.  See bug 492960. -->
       <menupopup id="downloadsContextMenu"
                  class="download-state">
         <menuitem command="downloadsCmd_pauseResume"