From 78dfb21478764dc579a7ac54fffa3dc2c44e7ca3 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Fri, 9 Nov 2007 07:49:56 +0000 Subject: [PATCH] Bug 400369 - "List markers (bullets) positioned incorrectly for left- and center-aligned list items in RTL lists" [p=uriber@gmail.com (Uri Bernstein) r=smontagu sr+a1.9=roc] git-svn-id: svn://10.0.0.236/trunk@239033 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsLineLayout.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 0e728ec4cfe..3fc2bd26d80 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -2515,13 +2515,15 @@ nsLineLayout::HorizontalAlignFrames(nsRect& aLineBounds, PRBool isRTL = ( (NS_STYLE_DIRECTION_RTL == psd->mDirection) && (!psd->mChangedFrameDirection) ); if (dx || isRTL) { - PerFrameData* bulletPfd = nsnull; nscoord maxX = aLineBounds.XMost() + dx; PRBool isVisualRTL = PR_FALSE; if (isRTL) { - if (psd->mLastFrame->GetFlag(PFD_ISBULLET) ) - bulletPfd = psd->mLastFrame; + if (psd->mLastFrame->GetFlag(PFD_ISBULLET) ) { + PerFrameData* bulletPfd = psd->mLastFrame; + bulletPfd->mBounds.x -= remainingWidth; + bulletPfd->mFrame->SetRect(bulletPfd->mBounds); + } psd->mChangedFrameDirection = PR_TRUE; @@ -2532,11 +2534,7 @@ nsLineLayout::HorizontalAlignFrames(nsRect& aLineBounds, if (0 != dx) #endif { - for (PerFrameData* pfd = psd->mFirstFrame; pfd -#ifdef IBMBIDI - && bulletPfd != pfd -#endif - ; pfd = pfd->mNext) { + for (PerFrameData* pfd = psd->mFirstFrame; pfd; pfd = pfd->mNext) { #ifdef IBMBIDI if (isVisualRTL) { // XXXldb Ugh. Could we handle this earlier so we don't get here?