From acb301bdd2e274a00a5a1cd088517669849a3c7e Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Thu, 8 Apr 2010 09:11:14 -0700 Subject: [PATCH] Make the scroll bar and resizer always be on the left of right-to-left widgets. Bug 556363, r=Enn --- layout/generic/nsGfxScrollFrame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 96425358af9..36a01a21e06 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2694,6 +2694,12 @@ PRBool nsGfxScrollFrameInner::IsScrollbarOnRight() const { nsPresContext *presContext = mOuter->PresContext(); + + // The position of the scrollbar in top-level windows depends on the pref + // layout.scrollbar.side. For non-top-level elements, it depends only on the + // directionaliy of the element (equivalent to a value of "1" for the pref). + if (!mIsRoot) + return IsLTR(); switch (presContext->GetCachedIntPref(kPresContext_ScrollbarSide)) { default: case 0: // UI directionality