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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h

Issue 1683903004: Factor out the <textPath> positioning mapping code into a helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
index bb5ab735877018ddf0c117027752ac9483880ec6..9bafbfc430d495c7b636a133561ca69039330406 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
@@ -25,7 +25,6 @@
#include "core/layout/svg/SVGTextFragment.h"
#include "core/layout/svg/SVGTextLayoutAttributes.h"
#include "core/layout/svg/SVGTextMetrics.h"
-#include "platform/graphics/Path.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
@@ -34,6 +33,7 @@ namespace blink {
class ComputedStyle;
class InlineFlowBox;
class LayoutObject;
+class PathPositionMapper;
class SVGInlineFlowBox;
class SVGInlineTextBox;
@@ -50,6 +50,7 @@ class SVGTextLayoutEngine {
WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngine);
public:
SVGTextLayoutEngine(Vector<SVGTextLayoutAttributes*>&);
+ ~SVGTextLayoutEngine();
Vector<SVGTextLayoutAttributes*>& layoutAttributes() { return m_layoutAttributes; }
@@ -92,8 +93,7 @@ private:
bool m_textLengthSpacingInEffect;
// Text on path layout
- Path::PositionCalculator* m_textPathCalculator;
- float m_textPathLength;
+ OwnPtr<PathPositionMapper> m_textPath;
float m_textPathStartOffset;
float m_textPathCurrentOffset;
float m_textPathSpacing;

Powered by Google App Engine
This is Rietveld 408576698