Bug 1478489 - Ensure to not apply the textoverflow attribute if overflow changed while waiting for a flush. r=Gijs
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 27 Jul 2018 20:02:37 +0000
changeset 428800 57adf58922e0bcaccdde06aa739a0d290cce9f98
parent 428799 c03547ff07973aa3f3c6b46903d914a585f39f1b
child 428801 ff16973184c057c56849ec0bba80742205ea05df
push id34345
push userrgurzau@mozilla.com
push dateSat, 28 Jul 2018 09:44:50 +0000
treeherdermozilla-central@8a1379826329 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1478489
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 1478489 - Ensure to not apply the textoverflow attribute if overflow changed while waiting for a flush. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D2477
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1424,18 +1424,19 @@ file, You can obtain one at http://mozil
           }
         ]]></body>
       </method>
 
       <method name="updateTextOverflow">
         <body><![CDATA[
           if (this._inOverflow) {
             window.promiseDocumentFlushed(() => {
+              // Check overflow again to ensure it didn't change in the meanwhile.
               let input = this.inputField;
-              if (input) {
+              if (input && this._inOverflow) {
                 let side = input.scrollLeft &&
                            input.scrollLeft == input.scrollLeftMax ? "start" : "end";
                 this.setAttribute("textoverflow", side);
               }
             });
           } else {
             this.removeAttribute("textoverflow");
           }