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

Unified Diff: Source/core/paint/HTMLCanvasPainter.cpp

Issue 930833003: Move and rename RenderReplaced and RenderHTMLCanvas to Layout{Replaced,HTMLCanvas}. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No need to declare renderName() at all. Created 5 years, 10 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/paint/HTMLCanvasPainter.h ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/HTMLCanvasPainter.cpp
diff --git a/Source/core/paint/HTMLCanvasPainter.cpp b/Source/core/paint/HTMLCanvasPainter.cpp
index 5f2361a08f30f31470a30c7811494d06adfea374..69d4f3c0e37dc51b558ca7e390e3117c5cffb9c3 100644
--- a/Source/core/paint/HTMLCanvasPainter.cpp
+++ b/Source/core/paint/HTMLCanvasPainter.cpp
@@ -6,9 +6,9 @@
#include "core/paint/HTMLCanvasPainter.h"
#include "core/html/HTMLCanvasElement.h"
+#include "core/layout/LayoutHTMLCanvas.h"
#include "core/layout/PaintInfo.h"
#include "core/paint/RenderDrawingRecorder.h"
-#include "core/rendering/RenderHTMLCanvas.h"
#include "platform/geometry/LayoutPoint.h"
#include "platform/graphics/paint/ClipRecorder.h"
@@ -18,9 +18,9 @@ void HTMLCanvasPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPo
{
GraphicsContext* context = paintInfo.context;
- LayoutRect contentRect = m_renderHTMLCanvas.contentBoxRect();
+ LayoutRect contentRect = m_layoutHTMLCanvas.contentBoxRect();
contentRect.moveBy(paintOffset);
- LayoutRect paintRect = m_renderHTMLCanvas.replacedContentRect();
+ LayoutRect paintRect = m_layoutHTMLCanvas.replacedContentRect();
paintRect.moveBy(paintOffset);
bool clip = !contentRect.contains(paintRect);
@@ -31,13 +31,13 @@ void HTMLCanvasPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPo
// FIXME: InterpolationNone should be used if ImageRenderingOptimizeContrast is set.
// See bug for more details: crbug.com/353716.
- InterpolationQuality interpolationQuality = m_renderHTMLCanvas.style()->imageRendering() == ImageRenderingOptimizeContrast ? InterpolationLow : CanvasDefaultInterpolationQuality;
- if (m_renderHTMLCanvas.style()->imageRendering() == ImageRenderingPixelated)
+ InterpolationQuality interpolationQuality = m_layoutHTMLCanvas.style()->imageRendering() == ImageRenderingOptimizeContrast ? InterpolationLow : CanvasDefaultInterpolationQuality;
+ if (m_layoutHTMLCanvas.style()->imageRendering() == ImageRenderingPixelated)
interpolationQuality = InterpolationNone;
InterpolationQuality previousInterpolationQuality = context->imageInterpolationQuality();
context->setImageInterpolationQuality(interpolationQuality);
- toHTMLCanvasElement(m_renderHTMLCanvas.node())->paint(context, paintRect);
+ toHTMLCanvasElement(m_layoutHTMLCanvas.node())->paint(context, paintRect);
context->setImageInterpolationQuality(previousInterpolationQuality);
if (clip)
« no previous file with comments | « Source/core/paint/HTMLCanvasPainter.h ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698