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
This commit is contained in:
reed%reedloden.com
2007-11-09 07:49:56 +00:00
parent 0acb50371e
commit 78dfb21478

View File

@@ -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?