Changeset 179730 in webkit
- Timestamp:
- Feb 5, 2015, 5:15:51 PM (11 years ago)
- Location:
- branches/safari-600.1.4.15-branch
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog
r179724 r179730 1 2015-02-05 Lucas Forschler <lforschler@apple.com> 2 3 Rollout r179711 4 1 5 2015-02-05 Lucas Forschler <lforschler@apple.com> 2 6 -
branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog
r179724 r179730 1 2015-02-05 Lucas Forschler <lforschler@apple.com> 2 3 Rollout r179711 4 1 5 2015-02-05 Lucas Forschler <lforschler@apple.com> 2 6 -
branches/safari-600.1.4.15-branch/Source/WebCore/platform/graphics/Font.cpp
r179711 r179730 621 621 // list of ranges. 622 622 CodePath result = Simple; 623 bool previousCharacterIsEmojiGroupCandidate = false;624 623 for (unsigned i = 0; i < len; i++) { 625 624 const UChar c = characters[i]; 626 if (c == zeroWidthJoiner && previousCharacterIsEmojiGroupCandidate)627 return Complex;628 629 previousCharacterIsEmojiGroupCandidate = false;630 625 if (c < 0x2E5) // U+02E5 through U+02E9 (Modifier Letters : Tone letters) 631 626 continue; … … 747 742 if (supplementaryCharacter <= 0x1F1FF) 748 743 return Complex; 749 750 if (supplementaryCharacter >= 0x1F466 && supplementaryCharacter <= 0x1F469) { 751 previousCharacterIsEmojiGroupCandidate = true; 752 continue; 753 } 744 754 745 if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors. 755 746 continue; -
branches/safari-600.1.4.15-branch/Source/WebCore/platform/text/TextBreakIterator.cpp
r179711 r179730 208 208 "$Mal1 = [\\u0D15-\\u0D39];" // Malayalam Letter A,...,Ha 209 209 "$RI = [\\U0001F1E6-\\U0001F1FF];" // Emoji regional indicators 210 "$ZWJ = \\u200D;" // Zero width joiner211 "$EmojiForModsAndSeqs = [\\U0001F466-\\U0001F469];" // Emoji that take Fitzpatrick modifiers AND participate in ZWJ sequences212 "$EmojiForModsOnly = [\\u261D \\u270A-\\u270C \\U0001F385 \\U0001F3C3-\\U0001F3C4 \\U0001F3C7 \\U0001F3CA \\U0001F442-\\U0001F443 \\U0001F446-\\U0001F450 \\U0001F46E-\\U0001F478 \\U0001F47C \\U0001F481-\\U0001F483 \\U0001F485-\\U0001F487 \\U0001F4AA \\U0001F645-\\U0001F647 \\U0001F64B-\\U0001F64F \\U0001F6B4-\\U0001F6B6 \\U0001F6C0];" // Emoji that take Fitzpatrick modifiers213 "$EmojiMods = [\\U0001F3FB-\\U0001F3FF];" // Fitzpatrick modifiers214 210 "!!chain;" 215 211 "!!forward;" … … 230 226 "$Kan0 $KanV $Kan1;" // Kannada Virama (forward) 231 227 "$Mal0 $MalV $Mal1;" // Malayalam Virama (forward) 232 "$ZWJ $EmojiForModsAndSeqs;" // Don't break in emoji ZWJ sequences233 "[$EmojiForModsAndSeqs $EmojiForModsOnly] $EmojiMods;" // Don't break between relevant emoji and Fitzpatrick modifier234 228 "!!reverse;" 235 229 "$LF $CR;" … … 249 243 "$Kan1 $KanV $Kan0;" // Kannada Virama (backward) 250 244 "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward) 251 "$EmojiForModsAndSeqs $ZWJ;" // Don't break in emoji ZWJ sequences252 "$EmojiMods [$EmojiForModsAndSeqs $EmojiForModsOnly];" // Don't break between relevant emoji and Fitzpatrick modifier253 245 "!!safe_reverse;" 254 246 "!!safe_forward;"; -
branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.cpp
r179711 r179730 1381 1381 }; 1382 1382 1383 staticinline bool isHangulLVT(UChar32 character)1383 inline bool isHangulLVT(UChar32 character) 1384 1384 { 1385 1385 return (character - HANGUL_SYLLABLE_START) % HANGUL_JONGSEONG_COUNT; 1386 1386 } 1387 1387 1388 static inline bool isMark(UChar32 character)1389 { 1390 int8_t charType = u_charType(c haracter);1388 inline bool isMark(UChar32 c) 1389 { 1390 int8_t charType = u_charType(c); 1391 1391 return charType == U_NON_SPACING_MARK || charType == U_ENCLOSING_MARK || charType == U_COMBINING_SPACING_MARK; 1392 1392 } 1393 1393 1394 static inline bool isRegionalIndicator(UChar32 character)1394 inline bool isRegionalIndicator(UChar32 c) 1395 1395 { 1396 1396 // National flag emoji each consists of a pair of regional indicator symbols. 1397 return 0x1F1E6 <= character && character <= 0x1F1FF; 1398 } 1399 1400 static inline bool isEmojiGroupCandidate(UChar32 character) 1401 { 1402 return character >= 0x1F466 && character <= 0x1F469; 1403 } 1404 1405 static inline bool isEmojiModifier(UChar32 character) 1406 { 1407 return character >= 0x1F3FB && character <= 0x1F3FF; 1397 return 0x1F1E6 <= c && c <= 0x1F1FF; 1408 1398 } 1409 1399 … … 1417 1407 UChar32 character; 1418 1408 bool sawRegionalIndicator = false; 1419 bool sawEmojiGroupCandidate = false;1420 bool sawEmojiModifier = false;1421 1422 1409 while (current > 0) { 1423 1410 if (U16_IS_TRAIL(text[--current])) … … 1427 1414 1428 1415 UChar32 character = text.characterStartingAt(current); 1429 1430 if (sawEmojiGroupCandidate) {1431 sawEmojiGroupCandidate = false;1432 if (character == zeroWidthJoiner)1433 continue;1434 // We could have two emoji group candidates without a joiner in between.1435 // Those should not be treated as a group.1436 U16_FWD_1_UNSAFE(text, current);1437 break;1438 }1439 1440 if (sawEmojiModifier) {1441 if (isEmojiModifier(character))1442 U16_FWD_1_UNSAFE(text, current);1443 break;1444 }1445 1416 1446 1417 if (sawRegionalIndicator) { … … 1460 1431 if (isRegionalIndicator(character)) { 1461 1432 sawRegionalIndicator = true; 1462 continue;1463 }1464 1465 if (isEmojiModifier(character)) {1466 sawEmojiModifier = true;1467 continue;1468 }1469 1470 if (isEmojiGroupCandidate(character)) {1471 sawEmojiGroupCandidate = true;1472 1433 continue; 1473 1434 }
Note:
See TracChangeset
for help on using the changeset viewer.