| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. 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 15 matching lines...) Expand all Loading... |
| 26 #include "wtf/text/CharacterNames.h" | 26 #include "wtf/text/CharacterNames.h" |
| 27 #include "wtf/text/WTFString.h" | 27 #include "wtf/text/WTFString.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class PLATFORM_EXPORT UTF16TextIterator { | 31 class PLATFORM_EXPORT UTF16TextIterator { |
| 32 USING_FAST_MALLOC(UTF16TextIterator); | 32 USING_FAST_MALLOC(UTF16TextIterator); |
| 33 WTF_MAKE_NONCOPYABLE(UTF16TextIterator); | 33 WTF_MAKE_NONCOPYABLE(UTF16TextIterator); |
| 34 | 34 |
| 35 public: | 35 public: |
| 36 // The passed in UChar pointer starts at 'offset'. The iterator operates on th
e range [offset, endOffset]. | 36 // The passed in UChar pointer starts at 'offset'. The iterator operates on |
| 37 // 'length' denotes the maximum length of the UChar array, which might exceed
'endOffset'. | 37 // the range [offset, endOffset]. |
| 38 // 'length' denotes the maximum length of the UChar array, which might exceed |
| 39 // 'endOffset'. |
| 38 UTF16TextIterator(const UChar*, int length); | 40 UTF16TextIterator(const UChar*, int length); |
| 39 | 41 |
| 40 // FIXME: The offset/endOffset fields are only used by the SimpleShaper, | 42 // FIXME: The offset/endOffset fields are only used by the SimpleShaper, |
| 41 // remove once HarfBuzz is used for all text. | 43 // remove once HarfBuzz is used for all text. |
| 42 UTF16TextIterator(const UChar*, int offset, int endOffset, int length); | 44 UTF16TextIterator(const UChar*, int offset, int endOffset, int length); |
| 43 | 45 |
| 44 inline bool consume(UChar32& character) { | 46 inline bool consume(UChar32& character) { |
| 45 if (m_offset >= m_endOffset) | 47 if (m_offset >= m_endOffset) |
| 46 return false; | 48 return false; |
| 47 | 49 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 73 const UChar* m_characters; | 75 const UChar* m_characters; |
| 74 const UChar* m_charactersEnd; | 76 const UChar* m_charactersEnd; |
| 75 int m_offset; | 77 int m_offset; |
| 76 int m_endOffset; | 78 int m_endOffset; |
| 77 unsigned m_currentGlyphLength; | 79 unsigned m_currentGlyphLength; |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace blink | 82 } // namespace blink |
| 81 | 83 |
| 82 #endif | 84 #endif |
| OLD | NEW |