Index: Source/core/layout/svg/SVGTextChunk.h |
diff --git a/Source/core/layout/svg/SVGTextChunk.h b/Source/core/layout/svg/SVGTextChunk.h |
index 2c6d7f1e3a7ad10d02d65f3af52a31dd810f8051..f34e96e413a41809efb32e77f419174bceb5762a 100644 |
--- a/Source/core/layout/svg/SVGTextChunk.h |
+++ b/Source/core/layout/svg/SVGTextChunk.h |
@@ -20,13 +20,9 @@ |
#ifndef SVGTextChunk_h |
#define SVGTextChunk_h |
-#include "wtf/Vector.h" |
- |
namespace blink { |
-class SVGInlineTextBox; |
- |
-// A SVGTextChunk describes a range of SVGTextFragments, see the SVG spec definition of a "text chunk". |
+// A SVGTextChunk contains properties for a range of SVGTextFragments, see the SVG spec definition of a "text chunk". |
class SVGTextChunk { |
public: |
enum ChunkStyle { |
@@ -39,26 +35,23 @@ public: |
LengthAdjustSpacingAndGlyphs = 1 << 6 |
}; |
- SVGTextChunk(unsigned chunkStyle, float desiredTextLength); |
+ SVGTextChunk(unsigned chunkStyle, float desiredTextLength) |
+ : m_chunkStyle(chunkStyle) |
+ , m_desiredTextLength(desiredTextLength) |
+ { |
+ } |
- void calculateLength(float& length, unsigned& characters) const; |
float calculateTextAnchorShift(float length) const; |
bool isVerticalText() const { return m_chunkStyle & VerticalText; } |
float desiredTextLength() const { return m_desiredTextLength; } |
- Vector<SVGInlineTextBox*>& boxes() { return m_boxes; } |
- const Vector<SVGInlineTextBox*>& boxes() const { return m_boxes; } |
- |
bool hasDesiredTextLength() const { return m_desiredTextLength > 0 && ((m_chunkStyle & LengthAdjustSpacing) || (m_chunkStyle & LengthAdjustSpacingAndGlyphs)); } |
bool hasTextAnchor() const { return m_chunkStyle & RightToLeftText ? !(m_chunkStyle & EndAnchor) : (m_chunkStyle & MiddleAnchor) || (m_chunkStyle & EndAnchor); } |
bool hasLengthAdjustSpacing() const { return m_chunkStyle & LengthAdjustSpacing; } |
bool hasLengthAdjustSpacingAndGlyphs() const { return m_chunkStyle & LengthAdjustSpacingAndGlyphs; } |
private: |
- // Contains all SVGInlineTextBoxes this chunk spans. |
- Vector<SVGInlineTextBox*> m_boxes; |
- |
unsigned m_chunkStyle; |
float m_desiredTextLength; |
}; |