try: -b do -p linux,linux64,macosx,macosx64,win32 -u all -t none diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1226,15 +1226,6 @@ this.tabContainer.appendChild(t); - if (this.tabContainer.mTabstrip._isRTLScrollbox) { - /* In RTL UI, the tab is visually added to the left side of the - * tabstrip. This means the tabstip has to be scrolled back in - * order to make sure the same set of tabs is visible before and - * after the new tab is added. See bug 508816. */ - - this.tabContainer.mTabstrip.scrollByPixels(t.clientWidth); - } - // invalidate cache, because tabContainer is about to change this._browsers = null; diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js --- a/browser/components/places/content/browserPlacesViews.js +++ b/browser/components/places/content/browserPlacesViews.js @@ -1035,11 +1035,6 @@ PlacesToolbar.prototype = { if (this._chevron.collapsed) return; - // XXX (bug 508816) Scrollbox does not handle correctly RTL mode. - // This workarounds the issue scrolling the box to the right. - if (this.isRTL) - this._rootElt.scrollLeft = this._rootElt.scrollWidth; - // Update the chevron on a timer. This will avoid repeated work when // lot of changes happen in a small timeframe. if (this._updateChevronTimer) diff --git a/toolkit/content/widgets/scrollbox.xml b/toolkit/content/widgets/scrollbox.xml --- a/toolkit/content/widgets/scrollbox.xml +++ b/toolkit/content/widgets/scrollbox.xml @@ -143,9 +143,15 @@ // This assumes that this._scrollbox doesn't have any border. var outerRect = this.scrollClientRect; var innerRect = {}; - innerRect.left = outerRect.left - this._scrollbox.scrollLeft; + var ltr = (window.getComputedStyle(this, null).direction == "ltr"); + if (true || ltr) { + innerRect.left = outerRect.left - this._scrollbox.scrollLeft; + innerRect.right = innerRect.left + this._scrollbox.scrollWidth; + } else { + innerRect.right = outerRect.right - this._scrollbox.scrollLeft; + innerRect.left = innerRect.right - this._scrollbox.scrollWidth; + } innerRect.top = outerRect.top - this._scrollbox.scrollTop; - innerRect.right = innerRect.left + this._scrollbox.scrollWidth; innerRect.bottom = innerRect.top + this._scrollbox.scrollHeight; return innerRect; ]]>