Chromium Code Reviews| Index: Source/platform/fonts/UTF16TextIterator.h |
| diff --git a/Source/platform/fonts/UTF16TextIterator.h b/Source/platform/fonts/UTF16TextIterator.h |
| index c988cd9f900c5241c3fed25d3633e9955b0923da..4aabdbbb85690cd4057e4f9683b35fff9917c906 100644 |
| --- a/Source/platform/fonts/UTF16TextIterator.h |
| +++ b/Source/platform/fonts/UTF16TextIterator.h |
| @@ -45,7 +45,11 @@ public: |
| character = *m_characters; |
| m_currentGlyphLength = 1; |
| - if (character < hiraganaLetterSmallACharacter || consumeSlowCase(character)) { |
| + if (!U16_IS_SURROGATE(character) || consumeSurrogatePair(character)) { |
| + // TODO(kojii): This looks broken, we should actually check whether |
|
drott
2015/07/17 15:15:58
Minor: I'd suggest to move this comment to a bug r
kojii
2015/07/17 16:32:58
Moved to crbug.com/511306, thanks for the advice!
|
| + // the *next* character is U_GC_M_MASK or not. |
| + // Also this is redundant with what HarfBuzzShaper does. Either one |
| + // should be removed once the simple path is gone: crbug.com/404597 |
| if (U_GET_GC_MASK(character) & U_GC_M_MASK) |
| consumeMultipleUChar(); |
| return true; |
| @@ -68,9 +72,8 @@ public: |
| unsigned glyphLength() const { return m_currentGlyphLength; } |
| private: |
| - bool consumeSlowCase(UChar32&); |
| + bool consumeSurrogatePair(UChar32&); |
| void consumeMultipleUChar(); |
| - UChar32 normalizeVoicingMarks(); |
| const UChar* m_characters; |
| const UChar* m_charactersEnd; |