summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/cairo/ImageCairo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/cairo/ImageCairo.cpp')
-rw-r--r--WebCore/platform/graphics/cairo/ImageCairo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/cairo/ImageCairo.cpp b/WebCore/platform/graphics/cairo/ImageCairo.cpp
index 7c34e6f..c8c992e 100644
--- a/WebCore/platform/graphics/cairo/ImageCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageCairo.cpp
@@ -157,11 +157,15 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, con
if (!image) // If it's too early we won't have an image yet.
return;
+ // Avoid NaN
+ if (!isfinite(phase.x()) || !isfinite(phase.y()))
+ return;
+
cairo_t* cr = context->platformContext();
context->save();
IntRect imageSize = enclosingIntRect(tileRect);
- OwnPtr<ImageBuffer> imageSurface = ImageBuffer::create(imageSize.size(), false);
+ OwnPtr<ImageBuffer> imageSurface = ImageBuffer::create(imageSize.size());
if (!imageSurface)
return;