Commit Graph

13 Commits

Author SHA1 Message Date
Peter Wilson
e73ba84b04 Emoji: Load polyfill responsibly.
Improve performance of Emoji tests and loading of the polyfill.

Reduces the number of tests to determine browser support for emoji to those most likely to fail. Adds the defer flag to the loaded scripts for browsers lacking support.

Props superpoincare for perf testing, peterwilsoncc.
Fixes #37817.

Built from https://develop.svn.wordpress.org/trunk@38869


git-svn-id: http://core.svn.wordpress.org/trunk@38812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 00:00:34 +00:00
Gary Pendergast
84aebb9896 Emoji: Add support for the upcoming Emoji 4 release.
Emoji 4 adds 32 new professions, (with variations for gender and skin tone), and updates 33 existing character for male and female variations.

Fixes #38113 for trunk.


Built from https://develop.svn.wordpress.org/trunk@38717


git-svn-id: http://core.svn.wordpress.org/trunk@38660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 03:24:30 +00:00
Dominik Schilling
ea6e749c71 Emoji: Update the Twemoji loader to include the rainbow flag.
[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.

Props pento.
See #37543.
Fixes #37566.
Built from https://develop.svn.wordpress.org/trunk@38194


git-svn-id: http://core.svn.wordpress.org/trunk@38135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 20:51:31 +00:00
Gary Pendergast
46ac7ac930 Emoji: Update to Unicode 9.0 emoji.
This includes a new test in the emoji loader, to see if the browser supports rendering Unicode 9.0 emoji, as well as an update to `twemoji.js`, to load Unicode 9.0 twemoji images.

The default CDN location for loading Twemoji images has changed, moving to a versioned subdirectory. This allows updates without needing to purge the CDN.

Fixes #37361.


Built from https://develop.svn.wordpress.org/trunk@38087


git-svn-id: http://core.svn.wordpress.org/trunk@38028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 07:35:39 +00:00
Gary Pendergast
b43ee4b8fe Emoji: The diversity support test was incorrectly passing on all browsers.
[37028] missed some logic to capture the base emoji skin tone, to compare to the modified emoji skin tone. This caused all browsers to report that they supported skin tone modifiers, regardless of whether they actually did.

Fixes #36604 for trunk.


Built from https://develop.svn.wordpress.org/trunk@37256


git-svn-id: http://core.svn.wordpress.org/trunk@37222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-20 13:56:28 +00:00
Gary Pendergast
e899cc7ae5 Emoji: The everythingExceptFlag browser support flag, introduced in [36816], wasn't being initialised correctly.
See #35300.


Built from https://develop.svn.wordpress.org/trunk@37029


git-svn-id: http://core.svn.wordpress.org/trunk@36996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-17 05:00:28 +00:00
Gary Pendergast
261aa938cf Emoji: Fix the diversity emoji check in Safari.
When the browser test for diversity emoji was added in [36160], it included a workaround for Chrome not being able to compare `Uint8ClampedArray` objects directly, by converting them to a string. Unfortunately, Safari doesn't support the `Uint8ClampedArray.toString()` method correctly, so the test was incorrectly failing in Safari.

Fixes #36266 for trunk.


Built from https://develop.svn.wordpress.org/trunk@37028


git-svn-id: http://core.svn.wordpress.org/trunk@36995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-17 04:54:26 +00:00
Gary Pendergast
2c277e3952 Emoji: Clean up the emoji browser support tests.
As new sets of emoji are added to Unicode, and browsers add support for them at random intervals, we'll inevitably need to add new tests to the emoji loader. This change makes it much easier to add new tests as they're needed.

Fixes #35300.


Built from https://develop.svn.wordpress.org/trunk@36816


git-svn-id: http://core.svn.wordpress.org/trunk@36783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 05:17:26 +00:00
Dion Hulse
dddfbfa1d3 Emoji: Work around a mod_security rule which prevents pages with 4 or more instances of String.fromCharCode( from being served.
Fixes #35412 for trunk.

Built from https://develop.svn.wordpress.org/trunk@36359


git-svn-id: http://core.svn.wordpress.org/trunk@36326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 07:40:28 +00:00
Gary Pendergast
5a0f8ca847 Emoji: Add a test to the emoji loader, to see if the browser supports emoji diversity. If it doesn't, fall back to twemoji.
See #33592.


Built from https://develop.svn.wordpress.org/trunk@36160


git-svn-id: http://core.svn.wordpress.org/trunk@36126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-03 04:26:27 +00:00
Gary Pendergast
d3f30288e9 Emoji: Use twemoji in browsers that don't support Unicode 8 emoji.
Some less advanced browsers are yet to add support for the important advances made in Unicode 8. Let's make ensure that their users can experience emoji in their full glory.

See #33592.


Built from https://develop.svn.wordpress.org/trunk@35606


git-svn-id: http://core.svn.wordpress.org/trunk@35570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 02:25:25 +00:00
Andrew Ozz
4e971bea9f Emoji:
- Fix loading errors in IE9 and IE10.
- Add fallbacks for the loading events.
Fixes #32109 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32334


git-svn-id: http://core.svn.wordpress.org/trunk@32305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 18:45:29 +00:00
Gary Pendergast
b53b12ff8c Emoji: Instead of loading the emoji JS files automatically, we now include a small JS shim in the header, to test if the user's browser needs Twemoji. It then loads the emoji JS files only if they're needed.
Props pento, azaozz.

Fixes #31701.


Built from https://develop.svn.wordpress.org/trunk@31875


git-svn-id: http://core.svn.wordpress.org/trunk@31854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 23:33:32 +00:00