Bug 734381 - Don't clear the background behind menuitems when painting into a context without transparency. r=josh

This commit is contained in:
Markus Stange 2012-03-09 16:17:37 +01:00
parent 4b16c44d01
commit a00a880764

View File

@ -1879,8 +1879,10 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
break;
case NS_THEME_MENUITEM: {
// Clear the background to get correct transparency.
CGContextClearRect(cgContext, macRect);
if (thebesCtx->OriginalSurface()->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA) {
// Clear the background to get correct transparency.
CGContextClearRect(cgContext, macRect);
}
// maybe use kThemeMenuItemHierBackground or PopUpBackground instead of just Plain?
HIThemeMenuItemDrawInfo drawInfo;