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

Unified Diff: Source/core/rendering/svg/RenderSVGText.cpp

Issue 599283002: Move paint code from RenderSVGText to SVGTextPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/rendering/svg/RenderSVGText.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGText.cpp
diff --git a/Source/core/rendering/svg/RenderSVGText.cpp b/Source/core/rendering/svg/RenderSVGText.cpp
index 720966329a093b51b6c5cebac0b4e98b739a5bb0..697cc3a1c0c801bfce74130fa86883ac963d5372 100644
--- a/Source/core/rendering/svg/RenderSVGText.cpp
+++ b/Source/core/rendering/svg/RenderSVGText.cpp
@@ -29,6 +29,7 @@
#include "core/rendering/svg/RenderSVGText.h"
#include "core/editing/PositionWithAffinity.h"
+#include "core/paint/SVGTextPainter.h"
#include "core/rendering/HitTestRequest.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/PaintInfo.h"
@@ -51,7 +52,6 @@
#include "platform/fonts/SimpleFontData.h"
#include "platform/geometry/FloatQuad.h"
#include "platform/geometry/TransformState.h"
-#include "platform/graphics/GraphicsContextStateSaver.h"
namespace blink {
@@ -467,24 +467,7 @@ void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) cons
void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
- if (paintInfo.phase != PaintPhaseForeground
- && paintInfo.phase != PaintPhaseSelection)
- return;
-
- PaintInfo blockInfo(paintInfo);
- GraphicsContextStateSaver stateSaver(*blockInfo.context, false);
- const AffineTransform& localTransform = localToParentTransform();
- if (!localTransform.isIdentity()) {
- stateSaver.save();
- blockInfo.applyTransform(localTransform, false);
- }
- RenderBlock::paint(blockInfo, LayoutPoint());
-
- // Paint the outlines, if any
- if (paintInfo.phase == PaintPhaseForeground) {
- blockInfo.phase = PaintPhaseSelfOutline;
- RenderBlock::paint(blockInfo, LayoutPoint());
- }
+ SVGTextPainter(*this).paint(paintInfo);
}
FloatRect RenderSVGText::strokeBoundingBox() const
« no previous file with comments | « Source/core/rendering/svg/RenderSVGText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698