Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4029)

Unified Diff: Source/core/rendering/RenderHTMLCanvas.cpp

Issue 19315005: Introduce toHTMLCanvasElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorCanvasAgent.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « Source/core/inspector/InspectorCanvasAgent.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698