Emoji: Update Twemoji to version 12.0.0.

Props pento, superpoincare.
Fixes #46404, #46805.


git-svn-id: https://develop.svn.wordpress.org/trunk@45134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2019-04-08 05:21:49 +00:00
parent 65e057daa2
commit 11e97aae1e
6 changed files with 32 additions and 22 deletions

14
package-lock.json generated
View File

@ -15366,9 +15366,17 @@
"dev": true
},
"twemoji": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/twemoji/-/twemoji-11.2.0.tgz",
"integrity": "sha512-DgTadXkRHugun6mjUf1k3ni04WC4jHOX1bN5MjuCM3nwRyIMdXIr8FmWzW5mEIZjht5jD3NaEyXC4j3POdQwyQ=="
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.0.0.tgz",
"integrity": "sha512-WX7ItaFagsZW9YEPNlVf9w50FdwxZK2Bdj3Y0XcDjZ4uLhr3qt/iUoRaLO2/getMhqumhFLR2gVoPLpSBtamJg==",
"requires": {
"twemoji-parser": "12.0.0"
}
},
"twemoji-parser": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.0.0.tgz",
"integrity": "sha512-JWZHBY32zKXo6GQ/JIQGLbbSQ5a3k+NHh5VkQ5AJFA++6cr+EtErj1aG8H4K7x8GwQ9/YzArNBQ06ryvKZL+WQ=="
},
"type-is": {
"version": "1.6.16",

View File

@ -109,7 +109,7 @@
"polyfill-library": "3.27.4",
"react": "16.8.4",
"react-dom": "16.8.4",
"twemoji": "11.2.0",
"twemoji": "12.0.0",
"underscore": "1.8.3",
"whatwg-fetch": "3.0.0"
},

View File

@ -76,8 +76,8 @@
* the browser doesn't render it correctly ([U] + [N]).
*/
isIdentical = emojiSetsRenderIdentically(
[ 55356, 56826, 55356, 56819 ],
[ 55356, 56826, 8203, 55356, 56819 ]
[ 0xD83C, 0xDDFA, 0xD83C, 0xDDF3 ],
[ 0xD83C, 0xDDFA, 0x200B, 0xD83C, 0xDDF3 ]
);
if ( isIdentical ) {
@ -92,22 +92,24 @@
* the browser doesn't render it correctly (black flag emoji + [G] + [B] + [E] + [N] + [G]).
*/
isIdentical = emojiSetsRenderIdentically(
[ 55356, 57332, 56128, 56423, 56128, 56418, 56128, 56421, 56128, 56430, 56128, 56423, 56128, 56447 ],
[ 55356, 57332, 8203, 56128, 56423, 8203, 56128, 56418, 8203, 56128, 56421, 8203, 56128, 56430, 8203, 56128, 56423, 8203, 56128, 56447 ]
[ 0xD83C, 0xDFF4, 0xDB40, 0xDC67, 0xDB40, 0xDC62, 0xDB40, 0xDC65, 0xDB40, 0xDC6E, 0xDB40, 0xDC67, 0xDB40, 0xDC7F ],
[ 0xD83C, 0xDFF4, 0x200B, 0xDB40, 0xDC67, 0x200B, 0xDB40, 0xDC62, 0x200B, 0xDB40, 0xDC65, 0x200B, 0xDB40, 0xDC6E, 0x200B, 0xDB40, 0xDC67, 0x200B, 0xDB40, 0xDC7F ]
);
return ! isIdentical;
case 'emoji':
/*
* She's the hero Emoji deserves, but not the one it needs right now.
* Love is love.
*
* To test for support, try to render a new emoji (female superhero),
* then compare it to how it would look if the browser doesn't render it correctly
* (superhero + female sign) .
* To test for Emoji 12 support, try to render a new emoji: men holding hands, with different skin
* tone modifiers.
*
* When updating this test for future Emoji releases, ensure that individual emoji that make up the
* sequence come from older emoji standards.
*/
isIdentical = emojiSetsRenderIdentically(
[55358, 56760, 9792, 65039],
[55358, 56760, 8203, 9792, 65039]
[0xD83D, 0xDC68, 0xD83C, 0xDFFE, 0x200D, 0xD83E, 0xDD1D, 0x200D, 0xD83D, 0xDC68, 0xD83C, 0xDFFC],
[0xD83D, 0xDC68, 0xD83C, 0xDFFE, 0x200B, 0xD83E, 0xDD1D, 0x200B, 0xD83D, 0xDC68, 0xD83C, 0xDFFC]
);
return ! isIdentical;

File diff suppressed because one or more lines are too long

View File

@ -3056,7 +3056,7 @@ function wp_resource_hints() {
* The path is removed in the foreach loop below.
*/
/** This filter is documented in wp-includes/formatting.php */
$hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/11.2.0/svg/' );
$hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/12.0.0-1/svg/' );
foreach ( $hints as $relation_type => $urls ) {
$unique_urls = array();

View File

@ -6,8 +6,8 @@
*/
class Tests_Formatting_Emoji extends WP_UnitTestCase {
private $png_cdn = 'https://s.w.org/images/core/emoji/11.2.0/72x72/';
private $svn_cdn = 'https://s.w.org/images/core/emoji/11.2.0/svg/';
private $png_cdn = 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/';
private $svn_cdn = 'https://s.w.org/images/core/emoji/12.0.0-1/svg/';
/**
* @ticket 36525