Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h |
index 5bdb876dd21f7666dd106d65b739fc036dfcecb0..0825c8ed679965cfd10add7fc84e302339a44234 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h |
@@ -69,59 +69,6 @@ private: |
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInlineText, isSVGInlineText()); |
-class SVGInlineTextMetricsIterator { |
- DISALLOW_NEW(); |
-public: |
- SVGInlineTextMetricsIterator() { reset(nullptr); } |
- |
- void advanceToTextStart(const LayoutSVGInlineText* textLayoutObject, unsigned startCharacterOffset) |
- { |
- ASSERT(textLayoutObject); |
- if (m_textLayoutObject != textLayoutObject) { |
- reset(textLayoutObject); |
- ASSERT(!metricsList().isEmpty()); |
- } |
- |
- if (m_characterOffset == startCharacterOffset) |
- return; |
- |
- // TODO(fs): We could walk backwards through the metrics list in these cases. |
- if (m_characterOffset > startCharacterOffset) |
- reset(textLayoutObject); |
- |
- while (m_characterOffset < startCharacterOffset) |
- next(); |
- } |
- |
- void next() |
- { |
- m_characterOffset += metrics().length(); |
- ++m_metricsListOffset; |
- } |
- |
- const SVGTextMetrics& metrics() const |
- { |
- ASSERT(m_textLayoutObject && m_metricsListOffset < metricsList().size()); |
- return metricsList()[m_metricsListOffset]; |
- } |
- const Vector<SVGTextMetrics>& metricsList() const { return m_textLayoutObject->layoutAttributes()->textMetricsValues(); } |
- unsigned metricsListOffset() const { return m_metricsListOffset; } |
- unsigned characterOffset() const { return m_characterOffset; } |
- bool isAtEnd() const { return m_metricsListOffset == metricsList().size(); } |
- |
-private: |
- void reset(const LayoutSVGInlineText* textLayoutObject) |
- { |
- m_textLayoutObject = textLayoutObject; |
- m_characterOffset = 0; |
- m_metricsListOffset = 0; |
- } |
- |
- const LayoutSVGInlineText* m_textLayoutObject; |
- unsigned m_metricsListOffset; |
- unsigned m_characterOffset; |
-}; |
- |
} |
#endif // LayoutSVGInlineText_h |