Bug 1107256 - Correct the position of text decoration lines on vertical text. r=smontagu

This commit is contained in:
Jonathan Kew 2014-12-04 00:57:18 -08:00
Родитель 7c0a02e599
Коммит 68085e20cf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -4202,7 +4202,7 @@ nsCSSRendering::PaintDecorationLine(nsIFrame* aFrame,
// The block-direction position should be set to the middle of the line.
if (aVertical) {
rect.x -= lineThickness / 2;
rect.x += lineThickness / 2;
} else {
rect.y += lineThickness / 2;
}
@ -4404,7 +4404,7 @@ nsCSSRendering::DecorationLineToPath(nsIFrame* aFrame,
// The block-direction position should be set to the middle of the line.
if (aVertical) {
rect.x -= lineThickness / 2;
rect.x += lineThickness / 2;
aGfxContext->Rectangle
(gfxRect(gfxPoint(rect.TopLeft() - gfxPoint(lineThickness / 2, 0.0)),
gfxSize(lineThickness, rect.Height())));