Bug 1238777: Bail early from ComputeSnappedImageDrawingParameters if we're somehow drawing from a 0-sized subimage. r=tn

This commit is contained in:
Daniel Holbert 2016-01-11 17:56:41 -08:00
Родитель 2712f6a1e1
Коммит 2c0dc8a8a0
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -6229,6 +6229,11 @@ ComputeSnappedImageDrawingParameters(gfxContext* aCtx,
subimage.SizeTo(NSToIntCeil(subimageBottomRight.x) - subimage.x,
NSToIntCeil(subimageBottomRight.y) - subimage.y);
if (subimage.IsEmpty()) {
// Bail if the subimage is empty (we're not going to be drawing anything).
return SnappedImageDrawingParameters();
}
gfxMatrix transform;
gfxMatrix invTransform;