Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1185)

Unified Diff: Source/platform/fonts/UTF16TextIterator.h

Issue 1227883003: Handle U+3099/309A Kana Voiced Sound Marks in complex path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Mac fails with 1px diff Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/Character.cpp ('k') | Source/platform/fonts/UTF16TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/platform/fonts/Character.cpp ('k') | Source/platform/fonts/UTF16TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698