Bug 397792 - Widgets rotate in the wrong direction on Mac OS X. r=vlad a1.9=vlad

This commit is contained in:
cbarrett@mozilla.com 2007-09-28 23:12:39 -07:00
Родитель dcf03827a0
Коммит df3f2cb363
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -568,15 +568,15 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
// If we have a scale, I think we've already lost; so don't round // If we have a scale, I think we've already lost; so don't round
// anything here // anything here
CGContextConcatCTM(cgContext, CGContextConcatCTM(cgContext,
CGAffineTransformMake(mat.xx, mat.xy, CGAffineTransformMake(mat.xx, mat.yx,
mat.yx, mat.yy, mat.xy, mat.yy,
mat.x0, mat.y0)); mat.x0, mat.y0));
} else { } else {
// Otherwise, we round the x0/y0, because otherwise things get rendered badly // Otherwise, we round the x0/y0, because otherwise things get rendered badly
// XXX how should we be rounding the x0/y0? // XXX how should we be rounding the x0/y0?
CGContextConcatCTM(cgContext, CGContextConcatCTM(cgContext,
CGAffineTransformMake(mat.xx, mat.xy, CGAffineTransformMake(mat.xx, mat.yx,
mat.yx, mat.yy, mat.xy, mat.yy,
floor(mat.x0 + 0.5), floor(mat.x0 + 0.5),
floor(mat.y0 + 0.5))); floor(mat.y0 + 0.5)));
} }
@ -585,6 +585,8 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
if (1 /*aWidgetType == NS_THEME_TEXTFIELD*/) { if (1 /*aWidgetType == NS_THEME_TEXTFIELD*/) {
fprintf(stderr, "Native theme drawing widget %d [%p] dis:%d in rect [%d %d %d %d]\n", fprintf(stderr, "Native theme drawing widget %d [%p] dis:%d in rect [%d %d %d %d]\n",
aWidgetType, aFrame, IsDisabled(aFrame), aRect.x, aRect.y, aRect.width, aRect.height); aWidgetType, aFrame, IsDisabled(aFrame), aRect.x, aRect.y, aRect.width, aRect.height);
fprintf(stderr, "Cairo matrix: [%f %f %f %f %f %f]\n",
mat.xx, mat.yx, mat.xy, mat.yy, mat.x0, mat.y0);
fprintf(stderr, "Native theme xform[0]: [%f %f %f %f %f %f]\n", fprintf(stderr, "Native theme xform[0]: [%f %f %f %f %f %f]\n",
mm0.a, mm0.b, mm0.c, mm0.d, mm0.tx, mm0.ty); mm0.a, mm0.b, mm0.c, mm0.d, mm0.tx, mm0.ty);
CGAffineTransform mm = CGContextGetCTM(cgContext); CGAffineTransform mm = CGContextGetCTM(cgContext);