Backed out 2 changesets (bug 1500086, bug 1500080) for bc failures in browser/components/urlbar/tests/browser/browser_UrlbarInput_unit.js CLOSED TREE
authorMargareta Eliza Balazs <ebalazs@mozilla.com>
Fri, 19 Oct 2018 17:08:37 +0300
changeset 490497 8b9c8d77185a1eafcf79046782d4ee6c47d84f1d
parent 490496 0cb99356070d3f79a1ff20c64970d092b7d908c5
child 490498 5a25082188fdf172bcfbf143087c5db62a16c714
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
bugs1500086, 1500080
milestone64.0a1
backs out59fed9e69c53f229e240d0bdfb0b5ca2d3afeb67
f6c89db3520cca62fc39ec0915beecf5e9a22278
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)
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -47,17 +47,16 @@ class UrlbarInput {
     this.document = this.window.document;
     this.controller = options.controller || new UrlbarController({
       window: this.window,
     });
     this.view = new UrlbarView(this);
     this.valueIsTyped = false;
     this.userInitiatedFocus = false;
     this.isPrivate = PrivateBrowsingUtils.isWindowPrivate(this.window);
-    this._untrimmedValue = "";
 
     // Forward textbox methods and properties.
     const METHODS = ["addEventListener", "removeEventListener",
       "setAttribute", "hasAttribute", "removeAttribute", "getAttribute",
       "focus", "blur", "select"];
     const READ_ONLY_PROPERTIES = ["inputField", "editor"];
     const READ_WRITE_PROPERTIES = ["placeholder", "readOnly",
       "selectionStart", "selectionEnd"];
@@ -241,22 +240,20 @@ class UrlbarInput {
   }
 
   get goButton() {
     return this.document.getAnonymousElementByAttribute(this.textbox, "anonid",
       "urlbar-go-button");
   }
 
   get value() {
-    return this._untrimmedValue;
+    return this.inputField.value;
   }
 
   set value(val) {
-    this._untrimmedValue = val;
-
     val = this.trimValue(val);
 
     this.valueIsTyped = false;
     this.inputField.value = val;
     this.formatValue();
 
     // Dispatch ValueChange event for accessibility.
     let event = this.document.createEvent("Events");
@@ -425,30 +422,21 @@ class UrlbarInput {
         event.detail == 2 &&
         UrlbarPrefs.get("doubleClickSelectsAll")) {
       this.editor.selectAll();
       event.preventDefault();
     }
   }
 
   _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,
     }));
   }
 
   _on_select(event) {
     if (!Services.clipboard.supportsSelectionClipboard()) {