Reviewed by Oliver Hunt.
Set paintingDisabled to true in Cairo's GraphicsContext constructor
when passed a null PlatformGraphicsContext.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25237
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-08-25 Jasper Bryant-Greene <m@ni.ac.nz>
+
+ Reviewed by Oliver Hunt.
+
+ Set paintingDisabled to true in Cairo's GraphicsContext constructor
+ when passed a null PlatformGraphicsContext.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::GraphicsContext):
+
2007-08-25 Mitz Pettel <mitz@webkit.org>
Reviewed by Dave Hyatt.
: m_common(createGraphicsContextPrivate())
, m_data(new GraphicsContextPlatformPrivate)
{
- cairo_surface_t* surface = cairo_win32_surface_create(dc);
- m_data->cr = cairo_create(surface);
+ if (dc) {
+ cairo_surface_t* surface = cairo_win32_surface_create(dc);
+ m_data->cr = cairo_create(surface);
+ } else {
+ setPaintingDisabled(true);
+ m_data->cr = 0;
+ }
}
#endif
, m_data(new GraphicsContextPlatformPrivate)
{
m_data->cr = cairo_reference(cr);
+ setPaintingDisabled(!cr);
}
GraphicsContext::~GraphicsContext()