Bug 398471 - Translate widgets correctly when there is a complex transform. r+a1.9=vlad

git-svn-id: svn://10.0.0.236/trunk@237272 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbarrett%mozilla.com
2007-10-04 18:16:55 +00:00
parent 74f9ae8cc1
commit 3ee60aa7ea

View File

@@ -561,6 +561,10 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
CGContextSaveGState(cgContext);
//CGContextSetCTM(cgContext, CGAffineTransformIdentity);
// Apply any origin offset we have first, so it gets picked up by any other
// transforms we have.
CGContextTranslateCTM(cgContext, offsetX, offsetY);
// I -think- that this context will always have an identity
// transform (since we don't maintain a transform on it in
// cairo-land, and instead push/pop as needed)
@@ -599,8 +603,6 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
NSAppUnitsToIntPixels(aRect.y, p2a),
NSAppUnitsToIntPixels(aRect.width, p2a),
NSAppUnitsToIntPixels(aRect.height, p2a));
macRect.origin.x += offsetX;
macRect.origin.y += offsetY;
// 382049 - need to explicitly set the composite operation to sourceOver
CGContextSetCompositeOperation(cgContext, kPrivateCGCompositeSourceOver);