Bug 1562691 - Make gURLBarHandler.formatValue() work with the quantumbar enabled. r=mak, a=jcristau
authorDão Gottwald <dao@mozilla.com>
Mon, 01 Jul 2019 20:10:10 +0000
changeset 537202 a2caf98462778a9308dd7a45ee76e46b440bbc81
parent 537201 1beed057d96243ba0a9a8c0d5b90571900a85e32
child 537203 6a1981c7a25745760e9f23b0469bcd6f9e208343
push id2090
push userjcristau@mozilla.com
push dateThu, 04 Jul 2019 14:39:11 +0000
treeherdermozilla-release@59f950e84180 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, jcristau
bugs1562691
milestone68.0
Bug 1562691 - Make gURLBarHandler.formatValue() work with the quantumbar enabled. r=mak, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D36512
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -223,17 +223,19 @@ var gURLBarHandler = {
 
   /**
    * Forwards to gURLBar.formatValue(), if the binding has been applied already.
    * This is necessary until the Quantum Bar is not the default and we allow
    * to dynamically switch between it and the legacy implementation, because the
    * binding is only applied before the initial xul layout.
    */
   formatValue() {
-    if (typeof this.textbox.formatValue == "function") {
+    if (this.quantumbar) {
+      this.urlbar.formatValue();
+    } else if (typeof this.textbox.formatValue == "function") {
       this.textbox.formatValue();
     }
   },
 
   /**
    * Invoked when the quantumbar pref changes.
    */
   handlePrefChange() {