Backed out changeset 413f4d055ade (bug 1449338) for ES Linting opt failure in /builds/worker/checkouts/gecko/browser/base/content/contentSearchUI.js on a CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Thu, 19 Apr 2018 11:35:30 +0300
changeset 467990 22561999866358c9d283cfbb6b283551ed94d585
parent 467989 80d84e895939046bb9db9a693064b503b70c10ee
child 467991 34a41ccd3a2e1590cbe2d2c7adc9d19e1e2f969a
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1449338
milestone61.0a1
backs out413f4d055adea81294a1db6a2bb842a7e4e47dae
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 413f4d055ade (bug 1449338) for ES Linting opt failure in /builds/worker/checkouts/gecko/browser/base/content/contentSearchUI.js on a CLOSED TREE
browser/base/content/contentSearchUI.js
browser/modules/ContentSearch.jsm
browser/modules/test/browser/browser_ContentSearch.js
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -4,17 +4,16 @@
 
 "use strict";
 
 this.ContentSearchUIController = (function() {
 
 const MAX_DISPLAYED_SUGGESTIONS = 6;
 const SUGGESTION_ID_PREFIX = "searchSuggestion";
 const ONE_OFF_ID_PREFIX = "oneOff";
-const DEFAULT_INPUT_ICON = "chrome://browser/skin/search-glass.svg";
 
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 
 /**
  * Creates a new object that manages search suggestions and their UI for a text
  * box.
  *
  * The UI consists of an html:table that's inserted into the DOM after the given
@@ -87,17 +86,16 @@ ContentSearchUIController.prototype = {
     } else {
       icon = "chrome://mozapps/skin/places/defaultFavicon.svg";
     }
     this._defaultEngine = {
       name: engine.name,
       icon,
     };
     this._updateDefaultEngineHeader();
-    this._updateDefaultEngineIcon();
 
     if (engine && document.activeElement == this.input) {
       this._speculativeConnect();
     }
   },
 
   get engines() {
     return this._engines;
@@ -606,24 +604,16 @@ ContentSearchUIController.prototype = {
   _onMsgStrings(strings) {
     this._strings = strings;
     this._updateDefaultEngineHeader();
     this._updateSearchWithHeader();
     document.getElementById("contentSearchSettingsButton").textContent =
       this._strings.searchSettings;
   },
 
-  _updateDefaultEngineIcon() {
-    let engine = this._engines.find(engine => engine.name === this.defaultEngine.name);
-    // We only show the engines icon for default engines, otherwise show
-    // a default; default engines have an identifier
-    let icon = engine.identifier ? this.defaultEngine.icon : DEFAULT_INPUT_ICON;
-    document.body.style.setProperty("--newtab-search-icon", "url(" + icon + ")");
-  },
-
   _updateDefaultEngineHeader() {
     let header = document.getElementById("contentSearchDefaultEngineHeader");
     header.firstChild.setAttribute("src", this.defaultEngine.icon);
     if (!this._strings) {
       return;
     }
     while (header.firstChild.nextSibling) {
       header.firstChild.nextSibling.remove();
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -334,17 +334,16 @@ var ContentSearch = {
       let iconBuffer = uri;
       if (!uriFlag) {
         iconBuffer = await this._arrayBufferFromDataURI(uri);
       }
       state.engines.push({
         name: engine.name,
         iconBuffer,
         hidden: hiddenList.includes(engine.name),
-        identifier: engine.identifier
       });
     }
     return state;
   },
 
   _processEventQueue() {
     if (this._currentEventPromise || !this._eventQueue.length) {
       return;
--- a/browser/modules/test/browser/browser_ContentSearch.js
+++ b/browser/modules/test/browser/browser_ContentSearch.js
@@ -367,17 +367,16 @@ var currentStateObj = async function() {
     currentEngine: await currentEngineObj(),
   };
   for (let engine of Services.search.getVisibleEngines()) {
     let uri = engine.getIconURLBySize(16, 16);
     state.engines.push({
       name: engine.name,
       iconBuffer: await arrayBufferFromDataURI(uri),
       hidden: false,
-      identifier: engine.identifier,
     });
   }
   return state;
 };
 
 var currentEngineObj = async function() {
   let engine = Services.search.currentEngine;
   let uriFavicon = engine.getIconURLBySize(16, 16);