Bug 612353 - Account for the width of the app tab tray if present in RTL mode; r=ian.gilman a=gavin
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Nov 2010 15:07:02 -0500
changeset 57968 baa51e6d4a1540cfa4139cd4777f413d4f8bf755
parent 57967 06e04efa46d61af7febc0dba12241c591f2cff5e
child 57969 be4b69a4babfb0a62fe0d6de850dc8df9a5ba020
push idunknown
push userunknown
push dateunknown
reviewersian.gilman, gavin
bugs612353
milestone2.0b8pre
Bug 612353 - Account for the width of the app tab tray if present in RTL mode; r=ian.gilman a=gavin
browser/base/content/tabview/groupitems.js
--- a/browser/base/content/tabview/groupitems.js
+++ b/browser/base/content/tabview/groupitems.js
@@ -423,17 +423,21 @@ GroupItem.prototype = Utils.extend(new I
   // Function: getContentBounds
   // Returns a <Rect> for the groupItem's content area (which doesn't include the title, etc).
   getContentBounds: function GroupItem_getContentBounds() {
     var box = this.getBounds();
     var titleHeight = this.$titlebar.height();
     box.top += titleHeight;
     box.height -= titleHeight;
 
-    box.width -= this.$appTabTray.width();
+    var appTabTrayWidth = this.$appTabTray.width();
+    box.width -= appTabTrayWidth;
+    if (UI.rtl) {
+      box.left += appTabTrayWidth;
+    }
 
     // Make the computed bounds' "padding" and new tab button margin actually be
     // themeable --OR-- compute this from actual bounds. Bug 586546
     box.inset(6, 6);
     box.height -= 33; // For new tab button
 
     return box;
   },