Index: Source/core/layout/svg/SVGTextChunkBuilder.h |
diff --git a/Source/core/layout/svg/SVGTextChunkBuilder.h b/Source/core/layout/svg/SVGTextChunkBuilder.h |
index 99808a8f3e043a17a656a49b574359de66a0a4d0..8df60862dd6876ea5acd8c2156b699bfa4b1250e 100644 |
--- a/Source/core/layout/svg/SVGTextChunkBuilder.h |
+++ b/Source/core/layout/svg/SVGTextChunkBuilder.h |
@@ -20,7 +20,6 @@ |
#ifndef SVGTextChunkBuilder_h |
#define SVGTextChunkBuilder_h |
-#include "core/layout/svg/SVGTextChunk.h" |
#include "platform/transforms/AffineTransform.h" |
#include "wtf/HashMap.h" |
#include "wtf/Vector.h" |
@@ -41,25 +40,36 @@ class SVGTextChunkBuilder { |
public: |
SVGTextChunkBuilder(); |
- const Vector<SVGTextChunk>& textChunks() const { return m_textChunks; } |
void processTextChunks(const Vector<SVGInlineTextBox*>&); |
void finalizeTransformMatrices(const Vector<SVGInlineTextBox*>&) const; |
- void buildTextChunks(Vector<SVGInlineTextBox*>& lineLayoutBoxes); |
- void layoutTextChunks(Vector<SVGInlineTextBox*>& lineLayoutBoxes); |
+protected: |
+ virtual void handleTextChunk(const Vector<SVGInlineTextBox*>&, unsigned boxStart, unsigned boxEnd); |
f(malita)
2015/05/27 15:19:13
The first thing both impls do is create a chunk ba
fs
2015/05/27 15:28:07
I should probably have mentioned this somewhere, b
|
private: |
- void addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxes, unsigned boxPosition, unsigned boxCount); |
- void processTextChunk(const SVGTextChunk&); |
- |
void processTextLengthSpacingCorrection(bool isVerticalText, float textLengthShift, Vector<SVGTextFragment>&, unsigned& atCharacter); |
void processTextAnchorCorrection(bool isVerticalText, float textAnchorShift, Vector<SVGTextFragment>&); |
-private: |
- Vector<SVGTextChunk> m_textChunks; |
HashMap<SVGInlineTextBox*, AffineTransform> m_textBoxTransformations; |
}; |
+class SVGTextPathChunkBuilder final : public SVGTextChunkBuilder { |
+ WTF_MAKE_NONCOPYABLE(SVGTextPathChunkBuilder); |
+public: |
+ SVGTextPathChunkBuilder(); |
+ |
+ float totalLength() const { return m_totalLength; } |
+ unsigned totalCharacters() const { return m_totalCharacters; } |
+ float totalTextAnchorShift() const { return m_totalTextAnchorShift; } |
+ |
+private: |
+ void handleTextChunk(const Vector<SVGInlineTextBox*>&, unsigned boxStart, unsigned boxEnd) override; |
+ |
+ float m_totalLength; |
+ unsigned m_totalCharacters; |
+ float m_totalTextAnchorShift; |
+}; |
+ |
} // namespace blink |
#endif |