Bug 931305 - Avoid bailing out half way through a gradient fill. r=jmuizelaar

This commit is contained in:
Andreas Gal 2013-10-30 15:29:22 -04:00
Родитель 240d85fb1d
Коммит 831d5edc75
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -2497,7 +2497,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
// tile with the overall area we're supposed to be filling
gfxRect fillRect =
forceRepeatToCoverTiles ? areaToFill : tileRect.Intersect(areaToFill);
ctx->NewPath();
// Try snapping the fill rect. Snap its top-left and bottom-right
// independently to preserve the orientation.
gfxPoint snappedFillRectTopLeft = fillRect.TopLeft();
@ -2523,6 +2522,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
snappedFillRectBottomRight);
ctx->SetMatrix(transform);
}
ctx->NewPath();
ctx->Rectangle(fillRect);
ctx->Translate(tileRect.TopLeft());
ctx->SetPattern(gradientPattern);