Backed out 2 changesets (bug 1500086, bug 1500080) for bc failures in browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js CLOSED TREE

Backed out changeset 59fed9e69c53 (bug 1500086)
Backed out changeset f6c89db3520c (bug 1500080)
This commit is contained in:
Margareta Eliza Balazs 2018-10-19 17:08:37 +03:00
parent 2a625fa2aa
commit 405c07ddc3

View File

@ -52,7 +52,6 @@ class UrlbarInput {
this.valueIsTyped = false;
this.userInitiatedFocus = false;
this.isPrivate = PrivateBrowsingUtils.isWindowPrivate(this.window);
this._untrimmedValue = "";
// Forward textbox methods and properties.
const METHODS = ["addEventListener", "removeEventListener",
@ -246,12 +245,10 @@ class UrlbarInput {
}
get value() {
return this._untrimmedValue;
return this.inputField.value;
}
set value(val) {
this._untrimmedValue = val;
val = this.trimValue(val);
this.valueIsTyped = false;
@ -430,20 +427,11 @@ class UrlbarInput {
}
_on_input(event) {
let value = event.target.value;
this.valueIsTyped = true;
this._untrimmedValue = value;
this.window.gBrowser.userTypedValue = value;
if (value) {
this.setAttribute("usertyping", "true");
} else {
this.removeAttribute("usertyping");
}
// XXX Fill in lastKey, and add anything else we need.
this.controller.startQuery(new QueryContext({
searchString: value,
searchString: event.target.value,
lastKey: "",
maxResults: UrlbarPrefs.get("maxRichResults"),
isPrivate: this.isPrivate,