Bug 1073692 - Display each search suggestion row with the correct text direction on about:home/about:newtab. r=ehsan
authorDrew Willcoxon <adw@mozilla.com>
Sat, 11 Oct 2014 19:07:52 -0700
changeset 234527 41085ca48e5ad955fd7b45b808fa879603ba2f22
parent 234526 8c0b4dfe1da4456b21cbd2bdc685154f6b549035
child 234528 1278a4bf957cd5eae5c74e7eafff39ab128b7ac1
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1073692
milestone35.0a1
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
Bug 1073692 - Display each search suggestion row with the correct text direction on about:home/about:newtab. r=ehsan
browser/base/content/searchSuggestionUI.js
--- a/browser/base/content/searchSuggestionUI.js
+++ b/browser/base/content/searchSuggestionUI.js
@@ -296,16 +296,17 @@ SearchSuggestionUIController.prototype =
   _speculativeConnect: function () {
     if (this.engineName) {
       this._sendMsg("SpeculativeConnect", this.engineName);
     }
   },
 
   _makeTableRow: function (type, suggestionStr, currentRow, searchWords) {
     let row = document.createElementNS(HTML_NS, "tr");
+    row.dir = "auto";
     row.classList.add("searchSuggestionRow");
     row.classList.add(type);
     row.setAttribute("role", "presentation");
     row.addEventListener("mousemove", this);
     row.addEventListener("mousedown", this);
 
     let entry = document.createElementNS(HTML_NS, "td");
     entry.classList.add("searchSuggestionEntry");
@@ -360,17 +361,16 @@ SearchSuggestionUIController.prototype =
     }
     return row.rowIndex;
   },
 
   _makeTable: function (id) {
     this._table = document.createElementNS(HTML_NS, "table");
     this._table.id = id;
     this._table.hidden = true;
-    this._table.dir = "auto";
     this._table.classList.add("searchSuggestionTable");
     this._table.setAttribute("role", "listbox");
     return this._table;
   },
 
   _sendMsg: function (type, data=null) {
     dispatchEvent(new CustomEvent("ContentSearchClient", {
       detail: {