Bug 456330. Fix translation to account for top/left padding. r=vlad

This commit is contained in:
Robert O'Callahan 2008-11-07 13:56:57 +13:00
parent 58f4661b50
commit ee00d290e8
4 changed files with 2 additions and 1 deletions

View File

@ -495,7 +495,7 @@ nsThebesImage::Draw(gfxContext* aContext,
format = mFormat;
subimage = subimage.Intersect(available) - gfxPoint(aPadding.left, aPadding.top);
userSpaceToImageSpace.Multiply(
gfxMatrix().Translate(gfxPoint(aPadding.left, aPadding.top)));
gfxMatrix().Translate(-gfxPoint(aPadding.left, aPadding.top)));
sourceRect = sourceRect - gfxPoint(aPadding.left, aPadding.top);
imageRect = gfxRect(0, 0, mWidth, mHeight);
} else {

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

View File

@ -939,6 +939,7 @@ fails == 441259-2.html 441259-2-ref.html # bug 441400
== 455105-2.html 455105-ref.html
== 455280-1.xhtml 455280-1-ref.xhtml
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 456147.xul 456147-ref.html # bug 456147, but not caused by it
== 456330-1.gif 456330-1-ref.png
== 456484-1.html 456484-1-ref.html
== 458487-1a.html 458487-1-ref.html
== 458487-1b.html 458487-1-ref.html