Correct the coordinates for selection decoration in right-to-left text. Bug 421042, r+sr=roc, a=beltzner

This commit is contained in:
2008-04-06 01:12:09 -07:00
parent e57c8ed345
commit f034354436
6 changed files with 23 additions and 44 deletions

View File

@@ -4462,8 +4462,7 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext,
const gfxFloat aAscent,
const gfxFloat aOffset,
const PRUint8 aDecoration,
const PRUint8 aStyle,
const PRBool aIsRTL)
const PRUint8 aStyle)
{
gfxRect rect =
GetTextDecorationRectInternal(aPt, aLineSize, aAscent, aOffset,
@@ -4545,13 +4544,8 @@ nsCSSRendering::PaintDecorationLine(gfxContext* aGfxContext,
case NS_STYLE_BORDER_STYLE_DOTTED:
case NS_STYLE_BORDER_STYLE_DASHED:
aGfxContext->NewPath();
if (aIsRTL) {
aGfxContext->MoveTo(rect.TopRight());
aGfxContext->LineTo(rect.TopLeft());
} else {
aGfxContext->MoveTo(rect.TopLeft());
aGfxContext->LineTo(rect.TopRight());
}
aGfxContext->LineTo(rect.TopLeft());
aGfxContext->MoveTo(rect.TopRight());
aGfxContext->Stroke();
break;
default: