Index: Source/core/rendering/RenderHTMLCanvas.cpp |
diff --git a/Source/core/rendering/RenderHTMLCanvas.cpp b/Source/core/rendering/RenderHTMLCanvas.cpp |
index 8a183bf87a7168c2494f33b5103132c2b3ab8f5a..5101e8f9f0c29e3bcaf18cc27e1a0ce0b22a9b17 100644 |
--- a/Source/core/rendering/RenderHTMLCanvas.cpp |
+++ b/Source/core/rendering/RenderHTMLCanvas.cpp |
@@ -49,7 +49,7 @@ bool RenderHTMLCanvas::requiresLayer() const |
if (RenderReplaced::requiresLayer()) |
return true; |
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(node()); |
+ HTMLCanvasElement* canvas = toHTMLCanvasElement(node()); |
return canvas && canvas->renderingContext() && canvas->renderingContext()->isAccelerated(); |
} |
@@ -66,12 +66,12 @@ void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& pa |
} |
bool useLowQualityScale = style()->imageRendering() == ImageRenderingOptimizeContrast; |
- static_cast<HTMLCanvasElement*>(node())->paint(paintInfo.context, rect, useLowQualityScale); |
+ toHTMLCanvasElement(node())->paint(paintInfo.context, rect, useLowQualityScale); |
} |
void RenderHTMLCanvas::canvasSizeChanged() |
{ |
- IntSize canvasSize = static_cast<HTMLCanvasElement*>(node())->size(); |
+ IntSize canvasSize = toHTMLCanvasElement(node())->size(); |
LayoutSize zoomedSize(canvasSize.width() * style()->effectiveZoom(), canvasSize.height() * style()->effectiveZoom()); |
if (zoomedSize == intrinsicSize()) |