| Index: Source/core/paint/SVGTextPainter.cpp
|
| diff --git a/Source/core/paint/SVGTextPainter.cpp b/Source/core/paint/SVGTextPainter.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..72c79c470f820a56bf21aedfc4069677287fc178
|
| --- /dev/null
|
| +++ b/Source/core/paint/SVGTextPainter.cpp
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "core/paint/SVGTextPainter.h"
|
| +
|
| +#include "core/paint/BlockPainter.h"
|
| +#include "core/rendering/PaintInfo.h"
|
| +#include "core/rendering/svg/RenderSVGText.h"
|
| +#include "platform/graphics/GraphicsContextStateSaver.h"
|
| +
|
| +namespace blink {
|
| +
|
| +void SVGTextPainter::paint(PaintInfo& paintInfo)
|
| +{
|
| + if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
|
| + return;
|
| +
|
| + PaintInfo blockInfo(paintInfo);
|
| + GraphicsContextStateSaver stateSaver(*blockInfo.context, false);
|
| + const AffineTransform& localTransform = m_renderSVGText.localToParentTransform();
|
| + if (!localTransform.isIdentity()) {
|
| + stateSaver.save();
|
| + blockInfo.applyTransform(localTransform, false);
|
| + }
|
| + BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint());
|
| +
|
| + // Paint the outlines, if any
|
| + if (paintInfo.phase == PaintPhaseForeground) {
|
| + blockInfo.phase = PaintPhaseSelfOutline;
|
| + BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint());
|
| + }
|
| +}
|
| +
|
| +} // namespace blink
|
|
|