Index: Source/core/rendering/RenderLayerBacking.cpp |
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp |
index 31ca720fbd028c62cd83bacae880811df8eda3b3..35579d217e280ca73e8e4d2f2b6d1569fea719d9 100644 |
--- a/Source/core/rendering/RenderLayerBacking.cpp |
+++ b/Source/core/rendering/RenderLayerBacking.cpp |
@@ -75,7 +75,7 @@ static IntRect clipBox(RenderBox* renderer); |
static inline bool isAcceleratedCanvas(RenderObject* renderer) |
{ |
if (renderer->isCanvas()) { |
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->node()); |
+ HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); |
if (CanvasRenderingContext* context = canvas->renderingContext()) |
return context->isAccelerated(); |
} |
@@ -407,7 +407,7 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration() |
HTMLMediaElement* mediaElement = toMediaElement(renderer->node()); |
m_graphicsLayer->setContentsToMedia(mediaElement->platformLayer()); |
} else if (isAcceleratedCanvas(renderer)) { |
- HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->node()); |
+ HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); |
if (CanvasRenderingContext* context = canvas->renderingContext()) |
m_graphicsLayer->setContentsToCanvas(context->platformLayer()); |
layerConfigChanged = true; |