author | Ehsan Akhgari <ehsan@mozilla.com> |
Mon, 08 Nov 2010 01:38:25 -0500 | |
changeset 57460 | e716f4ca4f7a0a184af64f62d132959cd57d5f9d |
parent 57459 | 059ffd92444bb7a6192d879549faf2584371dacb |
child 57461 | 3c140d56fd3e6a7038bbe0746696aaec89f72462 |
push id | 16934 |
push user | eakhgari@mozilla.com |
push date | Sat, 13 Nov 2010 22:50:22 +0000 |
treeherder | mozilla-central@674f2ed15cea [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ian, blocking-betaN |
bugs | 587248 |
milestone | 2.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
|
--- a/browser/base/content/tabview/groupitems.js +++ b/browser/base/content/tabview/groupitems.js @@ -1083,23 +1083,26 @@ GroupItem.prototype = Utils.extend(new I // yDensity = (the distance of the bottom of the last tab to the top of the content area) // / (the total available content height) this.yDensity = (rects[rects.length - 1].bottom - bb.top) / (bb.height); // xDensity = (the distance from the left of the content area to the right of the rightmost // tab) / (the total available content width) // first, find the right of the rightmost tab! luckily, they're in order. - // TODO: does this change for rtl? var rightMostRight = 0; - for each (var rect in rects) { - if (rect.right > rightMostRight) - rightMostRight = rect.right; - else - break; + if (UI.rtl) { + rightMostRight = rects[0].right; + } else { + for each (var rect in rects) { + if (rect.right > rightMostRight) + rightMostRight = rect.right; + else + break; + } } this.xDensity = (rightMostRight - bb.left) / (bb.width); this._isStacked = false; } else this._stackArrange(bb, options); } @@ -1174,17 +1177,17 @@ GroupItem.prototype = Utils.extend(new I children.forEach(function(child, index) { if (!child.locked.bounds) { child.setZ(zIndex); zIndex--; child.addClass("stacked"); child.setBounds(box, !animate); - child.setRotation(self._randRotate(maxRotation, index)); + child.setRotation((UI.rtl ? -1 : 1) * self._randRotate(maxRotation, index)); } }); self._isStacked = true; }, // ---------- // Function: _randRotate