Bug 1389554 - Remove the dropdown icon (triangle) from the URL bar when something is being typed. r?mak draft
authorDrew Willcoxon <adw@mozilla.com>
Wed, 30 Aug 2017 10:02:25 -0700
changeset 656030 70af43c39dcf3aedb7602e55bd3fb54f9287192e
parent 655774 ab2d700fda2b4934d24227216972dce9fac19b74
child 728980 fc8c5542832acf8498bc32983506ec4d8076afb3
push id77033
push userdwillcoxon@mozilla.com
push dateWed, 30 Aug 2017 17:02:39 +0000
reviewersmak
bugs1389554
milestone57.0a1
Bug 1389554 - Remove the dropdown icon (triangle) from the URL bar when something is being typed. r?mak MozReview-Commit-ID: LjPrgr8FwkA
browser/base/content/browser.css
browser/base/content/browser.js
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -662,16 +662,17 @@ html|input.urlbar-input[textoverflow]:no
 }
 
 #DateTimePickerPanel[active="true"] {
   -moz-binding: url("chrome://global/content/bindings/datetimepopup.xml#datetime-popup");
 }
 
 #urlbar[pageproxystate=invalid] > #page-action-buttons > .urlbar-page-action,
 #identity-box.chromeUI ~ #page-action-buttons > .urlbar-page-action,
+#urlbar[usertyping] > .urlbar-textbox-container > .urlbar-history-dropmarker,
 .urlbar-go-button[pageproxystate="valid"],
 .urlbar-go-button:not([parentfocused="true"]),
 #urlbar[pageproxystate="invalid"] > #identity-box > #blocked-permissions-container,
 #urlbar[pageproxystate="invalid"] > #identity-box > #notification-popup-box,
 #urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon-labels {
   visibility: collapse;
 }
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2770,16 +2770,17 @@ function URLBarSetURI(aURI) {
     }
 
     valid = !isBlankPageURL(uri.spec);
   }
 
   let isDifferentValidValue = valid && value != gURLBar.value;
   gURLBar.value = value;
   gURLBar.valueIsTyped = !valid;
+  gURLBar.removeAttribute("usertyping");
   if (isDifferentValidValue) {
     gURLBar.selectionStart = gURLBar.selectionEnd = 0;
   }
 
   SetPageProxyState(valid ? "valid" : "invalid");
 }
 
 function losslessDecodeURI(aURI) {
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1295,16 +1295,21 @@ file, You can obtain one at http://mozil
 
       <method name="onInput">
         <parameter name="aEvent"/>
         <body><![CDATA[
           if (!this.mIgnoreInput && this.mController.input == this) {
             this._value = this.inputField.value;
             gBrowser.userTypedValue = this.value;
             this.valueIsTyped = true;
+            if (this.inputField.value) {
+              this.setAttribute("usertyping", "true");
+            } else {
+              this.removeAttribute("usertyping");
+            }
             // Only wait for a result when we are sure to get one.  In some
             // cases, like when pasting the same exact text, we may not fire
             // a new search and we won't get a result.
             if (this.mController.handleText()) {
               this.gotResultForCurrentQuery = false;
               this._searchStartDate = Date.now();
               this._deferredKeyEventQueue = [];
               if (this._deferredKeyEventTimeout) {