Backed out changeset cbb4720dc4d5 (bug 1515307) for bc failures at /browser/browser_UrlbarInput_unit.js. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Thu, 17 Jan 2019 19:16:20 +0200
changeset 511404 a9a828f85c918316db6f21cecff15d5f20275296
parent 511403 cc0ec99ff8b8e36e50f31c257ea9463354c71e83
child 511405 855970c5fa721b829d664f4596df61b5fff8163b
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1515307
milestone66.0a1
backs outcbb4720dc4d5c4f782943a888a4e4ed05320134c
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset cbb4720dc4d5 (bug 1515307) for bc failures at /browser/browser_UrlbarInput_unit.js. CLOSED TREE
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -343,30 +343,33 @@ class UrlbarInput {
       val = this.window.losslessDecodeURI(uri);
     }
     this.value = val;
   }
 
   /**
    * Starts a query based on the user input.
    *
+   * @param {string} [options.searchString]
+   *   The string the user entered in autocomplete.
    * @param {number} [options.lastKey]
    *   The last key the user entered (as a key code).
    */
   startQuery({
+    searchString = "",
     lastKey = null,
   } = {}) {
     this.controller.startQuery(new QueryContext({
       enableAutofill: UrlbarPrefs.get("autoFill"),
       isPrivate: this.isPrivate,
       lastKey,
       maxResults: UrlbarPrefs.get("maxRichResults"),
       muxer: "UnifiedComplete",
       providers: ["UnifiedComplete"],
-      searchString: this.textValue,
+      searchString,
     }));
   }
 
   typeRestrictToken(char) {
     this.inputField.value = char + " ";
 
     let event = this.document.createEvent("UIEvents");
     event.initUIEvent("input", true, false, this.window, 0);
@@ -657,30 +660,31 @@ class UrlbarInput {
       if (this.view.isOpen) {
         this.view.close();
       } else {
         this.startQuery();
       }
     }
   }
 
-  _on_input() {
-    let value = this.textValue;
+  _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.startQuery({
+      searchString: value,
       lastKey: null,
     });
   }
 
   _on_select(event) {
     if (!Services.clipboard.supportsSelectionClipboard()) {
       return;
     }