Merge f-t to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 01 Jan 2015 14:20:22 -0800
changeset 247637 13fe5ad0364df0d901ebfc32b802e427304dac6a
parent 247634 f9d49449c02d3c46b2fe17a956bed5f02cebe26f (current diff)
parent 247636 f9f2edd5c4ea0632093949edb74ee5bde0d6936d (diff)
child 247638 e7c220d7f8271ced46f8015f52567de095a96f8f
child 247649 50d9b80dd7a8f56272b1c5fe7605c6ede4a80bb9
child 247687 33293793d8b68e4af94a7e81d279250ae91d3b75
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone37.0a1
first release with
nightly linux32
13fe5ad0364d / 37.0a1 / 20150102030211 / files
nightly linux64
13fe5ad0364d / 37.0a1 / 20150102030211 / files
nightly mac
13fe5ad0364d / 37.0a1 / 20150102030211 / files
nightly win32
13fe5ad0364d / 37.0a1 / 20150102030211 / files
nightly win64
13fe5ad0364d / 37.0a1 / 20150102030211 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge f-t to m-c, a=merge
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -963,17 +963,17 @@
     </implementation>
   </binding>
 
   <!-- Note: this binding is applied to the autocomplete popup used in the Search bar -->
   <binding id="browser-search-autocomplete-result-popup" extends="chrome://browser/content/urlbarBindings.xml#browser-autocomplete-result-popup">
     <resources>
       <stylesheet src="chrome://browser/skin/searchbar.css"/>
     </resources>
-    <content ignorekeys="true" level="top" consumeoutsideclicks="false">
+    <content ignorekeys="true" level="top">
       <xul:hbox xbl:inherits="collapsed=showonlysettings" anonid="searchbar-engine"
                 class="search-panel-header search-panel-current-engine">
         <xul:image class="searchbar-engine-image" xbl:inherits="src"/>
         <xul:label anonid="searchbar-engine-name" flex="1" crop="end"
                    role="presentation"/>
       </xul:hbox>
       <xul:tree anonid="tree" flex="1"
                 class="autocomplete-tree plain search-panel-tree"
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -867,16 +867,20 @@
             // in browser.xul) is hidden to avoid impacting startup / new
             // window performance. The base binding's openPopup would normally
             // call the overriden openAutocompletePopup in urlbarBindings.xml's
             // browser-autocomplete-result-popup binding to unhide the popup,
             // but since we're overriding openPopup we need to unhide the panel
             // ourselves.
             popup.hidden = false;
 
+            // showHistoryPopup sets consumeoutsideclicks to true so reset it
+            // here
+            popup.setAttribute("consumeoutsideclicks", "false");
+
             popup.mInput = this;
             popup.view = this.controller.QueryInterface(Components.interfaces.nsITreeView);
             popup.invalidate();
 
             popup.showCommentColumn = this.showCommentColumn;
             popup.showImageColumn = this.showImageColumn;
 
             document.popupNode = null;
--- a/browser/components/search/test/browser_searchbar_openpopup.js
+++ b/browser/components/search/test/browser_searchbar_openpopup.js
@@ -217,16 +217,39 @@ add_no_popup_task(function* tab_doesnt_o
 
   is(Services.focus.focusedElement, textbox.inputField, "Should have focused the search bar");
   is(textbox.selectionStart, 0, "Should have selected all of the text");
   is(textbox.selectionEnd, 3, "Should have selected all of the text");
 
   textbox.value = "";
 });
 
+// Clicks outside the search popup should close the popup but not consume the click.
+add_task(function* dont_consume_clicks() {
+  gURLBar.focus();
+  textbox.value = "foo";
+
+  let promise = promiseEvent(searchPopup, "popupshown");
+  EventUtils.synthesizeMouseAtCenter(textbox, {});
+  yield promise;
+  isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");
+
+  is(Services.focus.focusedElement, textbox.inputField, "Should have focused the search bar");
+  is(textbox.selectionStart, 0, "Should have selected all of the text");
+  is(textbox.selectionEnd, 3, "Should have selected all of the text");
+
+  promise = promiseEvent(searchPopup, "popuphidden");
+  EventUtils.synthesizeMouseAtCenter(gURLBar, {});
+  yield promise;
+
+  is(Services.focus.focusedElement, gURLBar.inputField, "Should have focused the URL bar");
+
+  textbox.value = "";
+});
+
 // Switching back to the window when the search box has focus from mouse should not open the popup.
 add_task(function* refocus_window_doesnt_open_popup_mouse() {
   gURLBar.focus();
   textbox.value = "foo";
 
   let promise = promiseEvent(searchPopup, "popupshown");
   EventUtils.synthesizeMouseAtCenter(searchbar, {});
   yield promise;