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

Side by Side Diff: third_party/WebKit/Source/platform/text/Character.h

Issue 1902553004: Do not break after ZWJ if the trailing character is Emoji. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 || c == objectReplacementCharacter; 105 || c == objectReplacementCharacter;
106 } 106 }
107 static bool canReceiveTextEmphasis(UChar32); 107 static bool canReceiveTextEmphasis(UChar32);
108 108
109 static bool isGraphemeExtended(UChar32 c) 109 static bool isGraphemeExtended(UChar32 c)
110 { 110 {
111 // http://unicode.org/reports/tr29/#Extend 111 // http://unicode.org/reports/tr29/#Extend
112 return u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND); 112 return u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND);
113 } 113 }
114 114
115 static bool isEmoji(UChar32);
tkent 2016/04/20 01:56:28 Need a comment. Difference between isEmoji and fo
Seigo Nonaka 2016/04/20 07:39:41 Done.
115 // Default presentation style according to: 116 // Default presentation style according to:
116 // http://www.unicode.org/reports/tr51/#Presentation_Style 117 // http://www.unicode.org/reports/tr51/#Presentation_Style
117 static bool isEmojiTextDefault(UChar32); 118 static bool isEmojiTextDefault(UChar32);
118 static bool isEmojiEmojiDefault(UChar32); 119 static bool isEmojiEmojiDefault(UChar32);
119 static bool isEmojiModifierBase(UChar32); 120 static bool isEmojiModifierBase(UChar32);
120 static bool isEmojiKeycapBase(UChar32); 121 static bool isEmojiKeycapBase(UChar32);
121 static bool isRegionalIndicator(UChar32); 122 static bool isRegionalIndicator(UChar32);
122 static bool isModifier(UChar32 c) 123 static bool isModifier(UChar32 c)
123 { 124 {
124 return c >= 0x1F3FB && c <= 0x1F3FF; 125 return c >= 0x1F3FB && c <= 0x1F3FF;
(...skipping 24 matching lines...) Expand all
149 150
150 static String normalizeSpaces(const LChar*, unsigned length); 151 static String normalizeSpaces(const LChar*, unsigned length);
151 static String normalizeSpaces(const UChar*, unsigned length); 152 static String normalizeSpaces(const UChar*, unsigned length);
152 153
153 static bool isCommonOrInheritedScript(UChar32); 154 static bool isCommonOrInheritedScript(UChar32);
154 }; 155 };
155 156
156 } // namespace blink 157 } // namespace blink
157 158
158 #endif 159 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698