b=403296, fix bogus warning from Cocoa native theme painting, r=stuart

This commit is contained in:
vladimir@pobox.com 2008-01-25 16:26:48 -08:00
Родитель 887e5c650b
Коммит 27a315c2c4
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -868,8 +868,11 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
//fprintf (stderr, "surface: %p cgContext: %p\n", quartzSurf, cgContext);
if (cgContext == nsnull) {
NS_WARNING("Invalid CGContext!");
return NS_ERROR_FAILURE;
// The Quartz surface handles 0x0 surfaces by internally
// making all operations no-ops; there's no cgcontext created for them.
// Unfortunately, this means that callers that want to render
// directly to the CGContext need to be aware of this quirk.
return NS_OK;
}
// Eventually we can just do a GetCTM and restore it with SetCTM,