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

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: Add comment to isEmoji method 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 // Returns true if the character has a Emoji property.
116 // See http://www.unicode.org/Public/emoji/3.0/emoji-data.txt
117 static bool isEmoji(UChar32);
115 // Default presentation style according to: 118 // Default presentation style according to:
116 // http://www.unicode.org/reports/tr51/#Presentation_Style 119 // http://www.unicode.org/reports/tr51/#Presentation_Style
117 static bool isEmojiTextDefault(UChar32); 120 static bool isEmojiTextDefault(UChar32);
118 static bool isEmojiEmojiDefault(UChar32); 121 static bool isEmojiEmojiDefault(UChar32);
119 static bool isEmojiModifierBase(UChar32); 122 static bool isEmojiModifierBase(UChar32);
120 static bool isEmojiKeycapBase(UChar32); 123 static bool isEmojiKeycapBase(UChar32);
121 static bool isRegionalIndicator(UChar32); 124 static bool isRegionalIndicator(UChar32);
122 static bool isModifier(UChar32 c) 125 static bool isModifier(UChar32 c)
123 { 126 {
124 return c >= 0x1F3FB && c <= 0x1F3FF; 127 return c >= 0x1F3FB && c <= 0x1F3FF;
(...skipping 24 matching lines...) Expand all
149 152
150 static String normalizeSpaces(const LChar*, unsigned length); 153 static String normalizeSpaces(const LChar*, unsigned length);
151 static String normalizeSpaces(const UChar*, unsigned length); 154 static String normalizeSpaces(const UChar*, unsigned length);
152 155
153 static bool isCommonOrInheritedScript(UChar32); 156 static bool isCommonOrInheritedScript(UChar32);
154 }; 157 };
155 158
156 } // namespace blink 159 } // namespace blink
157 160
158 #endif 161 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698