Bug 1389554 - Remove the dropdown icon (triangle) from the URL bar when something is being typed. r?mak
MozReview-Commit-ID: LjPrgr8FwkA
--- 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) {