Bug 1023190 - Fix extra horizontal line when draw background image with repeat-x mode, r=roc

This commit is contained in:
pchang 2015-02-17 14:16:13 +08:00
Родитель 20b088062d
Коммит 052ba27385
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -5864,6 +5864,20 @@ ComputeSnappedImageDrawingParameters(gfxContext* aCtx,
gfxRect anchoredDestRect(anchorPoint, scaledDest);
gfxRect anchoredImageRect(imageSpaceAnchorPoint, imageSize);
// Calculate anchoredDestRect with snapped fill rect when the devPixelFill rect
// corresponds to just a single tile in that direction
if (fill.Width() != devPixelFill.Width() &&
devPixelDest.x == devPixelFill.x &&
devPixelDest.XMost() == devPixelFill.XMost()) {
anchoredDestRect.width = fill.width;
}
if (fill.Height() != devPixelFill.Height() &&
devPixelDest.y == devPixelFill.y &&
devPixelDest.YMost() == devPixelFill.YMost()) {
anchoredDestRect.height = fill.height;
}
transform = TransformBetweenRects(anchoredImageRect, anchoredDestRect);
invTransform = TransformBetweenRects(anchoredDestRect, anchoredImageRect);
}