Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index d6f0566040625389845326fd41e6def0605ba1f6..54f25ea62e6ae151385ddb556821a6cb4390dd09 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -326,6 +326,10 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const LayoutRect& r) |
else |
context->drawImageBuffer(imageBuffer, pixelSnappedIntRect(r), compositeOperator, blink::WebBlendModeNormal); |
} |
+ } else { |
+ // When alpha is false, we should draw to opaque black. |
+ if (m_context && !m_context->hasAlpha()) |
+ context->fillRect(FloatRect(0, 0, width(), height()), Color(0, 0, 0)); |
} |
if (is3D()) |