Bug 1371962 - Rename the dir attribute added in bug 1357656 to labeldirection. r=mconley, a=gchang FENNEC_54_0_1_BUILD1 FENNEC_54_0_1_RELEASE FIREFOX_54_0_1_BUILD1 FIREFOX_54_0_1_RELEASE
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 28 Jun 2017 07:53:00 -0400
changeset 396520 90f18f9c15f7c71c755e387cfc193974fcf8b29c
parent 396519 6dcfa5094a4b64716e5ddb908e6d52a6720ef130
child 396521 b161c418db401df2f0ff63594a83c3803513bd99
push id1482
push userryanvm@gmail.com
push dateWed, 28 Jun 2017 14:56:05 +0000
treeherdermozilla-release@90f18f9c15f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, gchang
bugs1371962, 1357656
milestone54.0.1
Bug 1371962 - Rename the dir attribute added in bug 1357656 to labeldirection. r=mconley, a=gchang This avoids using a reserved XUL attribute name.
browser/base/content/tabbrowser.css
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.css
+++ b/browser/base/content/tabbrowser.css
@@ -46,24 +46,24 @@
 .tab-label-container {
   overflow: hidden;
 }
 
 .tab-label-container[pinned] {
   width: 0;
 }
 
-.tab-label-container[textoverflow][dir=ltr]:not([pinned]),
-.tab-label-container[textoverflow]:not([dir]):not([pinned]):-moz-locale-dir(ltr) {
+.tab-label-container[textoverflow][labeldirection=ltr]:not([pinned]),
+.tab-label-container[textoverflow]:not([labeldirection]):not([pinned]):-moz-locale-dir(ltr) {
   direction: ltr;
   mask-image: linear-gradient(to left, transparent, black 1em);
 }
 
-.tab-label-container[textoverflow][dir=rtl]:not([pinned]),
-.tab-label-container[textoverflow]:not([dir]):not([pinned]):-moz-locale-dir(rtl) {
+.tab-label-container[textoverflow][labeldirection=rtl]:not([pinned]),
+.tab-label-container[textoverflow]:not([labeldirection]):not([pinned]):-moz-locale-dir(rtl) {
   direction: rtl;
   mask-image: linear-gradient(to right, transparent, black 1em);
 }
 
 .tab-stack {
   vertical-align: top; /* for pinned tabs */
 }
 
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1491,17 +1491,17 @@
             if (aTab.label == title)
               return false;
 
             let dwu = window.QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIDOMWindowUtils);
             let isRTL = dwu.getDirectionFromText(title) == Ci.nsIDOMWindowUtils.DIRECTION_RTL;
 
             aTab.label = title;
-            aTab.setAttribute("dir", isRTL ? "rtl" : "ltr");
+            aTab.setAttribute("labeldirection", isRTL ? "rtl" : "ltr");
             this._tabAttrModified(aTab, ["label"]);
 
             if (aTab.selected)
               this.updateTitlebar();
 
             return true;
           ]]>
         </body>
@@ -6994,17 +6994,17 @@
                      anonid="sharing-icon"
                      class="tab-sharing-icon-overlay"
                      role="presentation"/>
           <xul:image xbl:inherits="crashed,busy,soundplaying,soundplaying-scheduledremoval,pinned,muted,blocked,selected=visuallyselected"
                      anonid="overlay-icon"
                      class="tab-icon-overlay"
                      role="presentation"/>
           <xul:hbox class="tab-label-container"
-                    xbl:inherits="pinned,selected=visuallyselected,dir"
+                    xbl:inherits="pinned,selected=visuallyselected,labeldirection"
                     onoverflow="this.setAttribute('textoverflow', 'true');"
                     onunderflow="this.removeAttribute('textoverflow');"
                     flex="1">
             <xul:label class="tab-text tab-label"
                        xbl:inherits="xbl:text=label,accesskey,fadein,pinned,selected=visuallyselected,attention"
                        role="presentation"/>
           </xul:hbox>
           <xul:image xbl:inherits="soundplaying,soundplaying-scheduledremoval,pinned,muted,blocked,selected=visuallyselected"