| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void collectGlyphsForIterator(Iterator& textIterator, Vector<SVGGlyph>& glyp
hs) | 167 void collectGlyphsForIterator(Iterator& textIterator, Vector<SVGGlyph>& glyp
hs) |
| 168 { | 168 { |
| 169 GlyphMapLayer* currentLayer = &m_rootLayer; | 169 GlyphMapLayer* currentLayer = &m_rootLayer; |
| 170 | 170 |
| 171 UChar32 character = 0; | 171 UChar32 character = 0; |
| 172 unsigned clusterLength = 0; | 172 unsigned clusterLength = 0; |
| 173 while (textIterator.consume(character, clusterLength)) { | 173 while (textIterator.consume(character, clusterLength)) { |
| 174 RefPtr<GlyphMapNode> node = currentLayer->get(character); | 174 RefPtr<GlyphMapNode> node = currentLayer->get(character); |
| 175 if (!node) | 175 if (!node) |
| 176 break; | 176 break; |
| 177 glyphs.append(node->glyphs); | 177 glyphs.appendVector(node->glyphs); |
| 178 currentLayer = &node->children; | 178 currentLayer = &node->children; |
| 179 textIterator.advance(clusterLength); | 179 textIterator.advance(clusterLength); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 GlyphMapLayer m_rootLayer; | 183 GlyphMapLayer m_rootLayer; |
| 184 Vector<SVGGlyph> m_glyphTable; | 184 Vector<SVGGlyph> m_glyphTable; |
| 185 HashMap<String, Glyph> m_namedGlyphs; | 185 HashMap<String, Glyph> m_namedGlyphs; |
| 186 int m_currentPriority; | 186 int m_currentPriority; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 } | 189 } |
| 190 | 190 |
| 191 #endif // ENABLE(SVG_FONTS) | 191 #endif // ENABLE(SVG_FONTS) |
| 192 #endif // SVGGlyphMap_h | 192 #endif // SVGGlyphMap_h |
| OLD | NEW |