OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 | 100 |
101 const SVGTextMetrics& metrics() const | 101 const SVGTextMetrics& metrics() const |
102 { | 102 { |
103 ASSERT(m_textLayoutObject && m_metricsListOffset < metricsList().size())
; | 103 ASSERT(m_textLayoutObject && m_metricsListOffset < metricsList().size())
; |
104 return metricsList()[m_metricsListOffset]; | 104 return metricsList()[m_metricsListOffset]; |
105 } | 105 } |
106 const Vector<SVGTextMetrics>& metricsList() const { return m_textLayoutObjec
t->layoutAttributes()->textMetricsValues(); } | 106 const Vector<SVGTextMetrics>& metricsList() const { return m_textLayoutObjec
t->layoutAttributes()->textMetricsValues(); } |
107 unsigned metricsListOffset() const { return m_metricsListOffset; } | 107 unsigned metricsListOffset() const { return m_metricsListOffset; } |
108 unsigned characterOffset() const { return m_characterOffset; } | 108 unsigned characterOffset() const { return m_characterOffset; } |
| 109 bool isAtEnd() const { return m_metricsListOffset == metricsList().size(); } |
109 | 110 |
110 private: | 111 private: |
111 void reset(const LayoutSVGInlineText* textLayoutObject) | 112 void reset(const LayoutSVGInlineText* textLayoutObject) |
112 { | 113 { |
113 m_textLayoutObject = textLayoutObject; | 114 m_textLayoutObject = textLayoutObject; |
114 m_characterOffset = 0; | 115 m_characterOffset = 0; |
115 m_metricsListOffset = 0; | 116 m_metricsListOffset = 0; |
116 } | 117 } |
117 | 118 |
118 const LayoutSVGInlineText* m_textLayoutObject; | 119 const LayoutSVGInlineText* m_textLayoutObject; |
119 unsigned m_metricsListOffset; | 120 unsigned m_metricsListOffset; |
120 unsigned m_characterOffset; | 121 unsigned m_characterOffset; |
121 }; | 122 }; |
122 | 123 |
123 } | 124 } |
124 | 125 |
125 #endif // LayoutSVGInlineText_h | 126 #endif // LayoutSVGInlineText_h |
OLD | NEW |