Bug 587248 - Part 7: Correct some direction dependent CSS code in tabitems.js; r=ian a=blocking-betaN+
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 08 Nov 2010 01:38:24 -0500
changeset 57456 238b879aec66c2fb491cbefe38a7e98406b67c99
parent 57455 e902872c33b08353285455fcec134b0f0450bce8
child 57457 d67887a20f717c40131f652f9f6c328c42f680a7
push id16934
push usereakhgari@mozilla.com
push dateSat, 13 Nov 2010 22:50:22 +0000
treeherdermozilla-central@674f2ed15cea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersian, blocking-betaN
bugs587248
milestone2.0b8pre
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 587248 - Part 7: Correct some direction dependent CSS code in tabitems.js; r=ian a=blocking-betaN+
browser/base/content/tabview/tabitems.js
--- a/browser/base/content/tabview/tabitems.js
+++ b/browser/base/content/tabview/tabitems.js
@@ -377,35 +377,43 @@ TabItem.prototype = Utils.extend(new Ite
       }
 
       if (css.width) {
         TabItems.update(this.tab);
 
         let widthRange, proportion;
 
         if (this.inStack()) {
-          $fav.css({top:0, left:0});
+          if (UI.rtl) {
+            $fav.css({top:0, right:0});
+          } else {
+            $fav.css({top:0, left:0});
+          }
           widthRange = new Range(70, 90);
           proportion = widthRange.proportion(css.width); // between 0 and 1
         } else {
-          $fav.css({top:4,left:4});
+          if (UI.rtl) {
+            $fav.css({top:4, right:2});
+          } else {
+            $fav.css({top:4, left:4});
+          }
           widthRange = new Range(40, 45);
           proportion = widthRange.proportion(css.width); // between 0 and 1
         }
 
         if (proportion <= .1)
           $close.hide();
         else
           $close.show().css({opacity:proportion});
 
         var pad = 1 + 5 * proportion;
         var alphaRange = new Range(0.1,0.2);
         $fav.css({
-         "padding-left": pad + "px",
-         "padding-right": pad + 2 + "px",
+         "-moz-padding-start": pad + "px",
+         "-moz-padding-end": pad + 2 + "px",
          "padding-top": pad + "px",
          "padding-bottom": pad + "px",
          "border-color": "rgba(0,0,0,"+ alphaRange.scale(proportion) +")",
         });
       }
 
       this._hasBeenDrawn = true;
     }