Bug 1480572, r=adw,felipe
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 22 Aug 2018 23:48:14 +0100
changeset 490771 7e7cfbc863e6dd839f31c8d1b4cca3c04b254f5c
parent 490770 a5f23c113987a3e682b2445016709bebca8eb264
child 490772 a0883c99c897122286c6e1711cada83d9889e093
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw, felipe
bugs1480572
milestone63.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 1480572, r=adw,felipe
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -584,21 +584,22 @@ file, You can obtain one at http://mozil
           // the first strong directional character, we set the overflow
           // appropriately.
           this.selectionStart = this.selectionEnd = 0;
           window.requestAnimationFrame(() => {
             // Check for re-entrance. On focus change this formatting code is
             // invoked regardless, thus this should be enough.
             if (this._formattingInstance != instance)
               return;
-            let isDomainRTL = window.windowUtils.getDirectionFromText(domain);
+            let directionality = window.windowUtils.getDirectionFromText(domain);
             // In the future, for example in bug 525831, we may add a forceRTL
             // char just after the domain, and in such a case we should not
             // scroll to the left.
-            if (isDomainRTL && value[preDomain.length + domain.length] != "\u200E") {
+            if (directionality == window.windowUtils.DIRECTION_RTL &&
+                value[preDomain.length + domain.length] != "\u200E") {
               this.inputField.scrollLeft = this.inputField.scrollLeftMax;
             }
           });
 
           if (!this._formattingEnabled)
             return;
 
           this.formatScheme(controller.SELECTION_URLSECONDARY);