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

git-svn-id: svn://10.0.0.236/trunk@249680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
smontagu%smontagu.org
2008-04-06 08:12:09 +00:00
parent 79bdfd8a9a
commit a64cd011a7
6 changed files with 23 additions and 44 deletions

View File

@@ -221,16 +221,13 @@ nsHTMLContainerFrame::PaintTextDecorationLine(
bp.side(side) = 0;
}
}
const nsStyleVisibility* visibility = GetStyleVisibility();
PRBool isRTL = visibility->mDirection == NS_STYLE_DIRECTION_RTL;
nscoord innerWidth = mRect.width - bp.left - bp.right;
nsRefPtr<gfxContext> ctx = aRenderingContext.ThebesContext();
gfxPoint pt(PresContext()->AppUnitsToGfxUnits(bp.left + aPt.x),
PresContext()->AppUnitsToGfxUnits(bp.top + aPt.y));
gfxSize size(PresContext()->AppUnitsToGfxUnits(innerWidth), aSize);
nsCSSRendering::PaintDecorationLine(ctx, aColor, pt, size, aAscent, aOffset,
aDecoration, NS_STYLE_BORDER_STYLE_SOLID,
isRTL);
aDecoration, NS_STYLE_BORDER_STYLE_SOLID);
}
void