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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SymbolsIterator.cpp

Issue 2603343002: Emoji fixes: Two professions and digits with VS16 (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/SymbolsIteratorTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "SymbolsIterator.h" 5 #include "SymbolsIterator.h"
6 6
7 #include "wtf/PtrUtil.h" 7 #include "wtf/PtrUtil.h"
8 #include <unicode/uchar.h> 8 #include <unicode/uchar.h>
9 #include <unicode/uniset.h> 9 #include <unicode/uniset.h>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 UChar32 peekChar = 0; 81 UChar32 peekChar = 0;
82 if (m_utf16Iterator->consume(peekChar) && peekChar != 0) { 82 if (m_utf16Iterator->consume(peekChar) && peekChar != 0) {
83 // Variation Selectors 83 // Variation Selectors
84 if (m_currentFontFallbackPriority == FontFallbackPriority::EmojiEmoji && 84 if (m_currentFontFallbackPriority == FontFallbackPriority::EmojiEmoji &&
85 peekChar == variationSelector15Character) { 85 peekChar == variationSelector15Character) {
86 m_currentFontFallbackPriority = FontFallbackPriority::EmojiText; 86 m_currentFontFallbackPriority = FontFallbackPriority::EmojiText;
87 } 87 }
88 88
89 if (m_currentFontFallbackPriority == FontFallbackPriority::EmojiText && 89 if ((m_currentFontFallbackPriority == FontFallbackPriority::EmojiText ||
90 Character::isEmojiKeycapBase(m_nextChar)) &&
90 peekChar == variationSelector16Character) { 91 peekChar == variationSelector16Character) {
91 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji; 92 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji;
92 } 93 }
93 94
94 // Combining characters Keycap... 95 // Combining characters Keycap...
95 if (Character::isEmojiKeycapBase(m_nextChar) && 96 if (Character::isEmojiKeycapBase(m_nextChar) &&
96 peekChar == combiningEnclosingKeycapCharacter) { 97 peekChar == combiningEnclosingKeycapCharacter) {
97 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji; 98 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji;
98 }; 99 };
99 100
(...skipping 25 matching lines...) Expand all
125 return true; 126 return true;
126 } 127 }
127 } 128 }
128 *symbolsLimit = m_bufferSize; 129 *symbolsLimit = m_bufferSize;
129 *fontFallbackPriority = m_currentFontFallbackPriority; 130 *fontFallbackPriority = m_currentFontFallbackPriority;
130 m_atEnd = true; 131 m_atEnd = true;
131 return true; 132 return true;
132 } 133 }
133 134
134 } // namespace blink 135 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/SymbolsIteratorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698