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

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

Issue 2386333002: reflow comments in platform/fonts (Closed)
Patch Set: comments Created 4 years, 2 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 peekChar == combiningEnclosingCircleBackslashCharacter) { 102 peekChar == combiningEnclosingCircleBackslashCharacter) {
103 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji; 103 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji;
104 } 104 }
105 105
106 // Regional indicators 106 // Regional indicators
107 if (Character::isRegionalIndicator(m_nextChar) && 107 if (Character::isRegionalIndicator(m_nextChar) &&
108 Character::isRegionalIndicator(peekChar)) { 108 Character::isRegionalIndicator(peekChar)) {
109 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji; 109 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji;
110 } 110 }
111 111
112 // Upgrade text presentation emoji to emoji presentation when followed by ZWJ, 112 // Upgrade text presentation emoji to emoji presentation when followed by
113 // Example U+1F441 U+200D U+1F5E8, eye + ZWJ + left speech bubble. 113 // ZWJ, Example U+1F441 U+200D U+1F5E8, eye + ZWJ + left speech bubble.
114 if ((m_nextChar == eyeCharacter || 114 if ((m_nextChar == eyeCharacter ||
115 m_nextChar == wavingWhiteFlagCharacter) && 115 m_nextChar == wavingWhiteFlagCharacter) &&
116 peekChar == zeroWidthJoinerCharacter) { 116 peekChar == zeroWidthJoinerCharacter) {
117 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji; 117 m_currentFontFallbackPriority = FontFallbackPriority::EmojiEmoji;
118 } 118 }
119 } 119 }
120 120
121 if (m_previousFontFallbackPriority != m_currentFontFallbackPriority && 121 if (m_previousFontFallbackPriority != m_currentFontFallbackPriority &&
122 (m_previousFontFallbackPriority != FontFallbackPriority::Invalid)) { 122 (m_previousFontFallbackPriority != FontFallbackPriority::Invalid)) {
123 *symbolsLimit = iteratorOffset; 123 *symbolsLimit = iteratorOffset;
124 *fontFallbackPriority = m_previousFontFallbackPriority; 124 *fontFallbackPriority = m_previousFontFallbackPriority;
125 return true; 125 return true;
126 } 126 }
127 } 127 }
128 *symbolsLimit = m_bufferSize; 128 *symbolsLimit = m_bufferSize;
129 *fontFallbackPriority = m_currentFontFallbackPriority; 129 *fontFallbackPriority = m_currentFontFallbackPriority;
130 m_atEnd = true; 130 m_atEnd = true;
131 return true; 131 return true;
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698