WordPress.org

Make WordPress Core

Changeset 31788


Ignore:
Timestamp:
03/16/2015 12:05:05 AM (7 years ago)
Author:
pento
Message:

Emoji: Move a comment to match the restructure in [31779], and add an extra comment explaining how emoji rendering support is detected.

See #31242

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wp-emoji.js

    r31787 r31788  
    8383            }
    8484
     85            /*
     86             * Chrome on OS X added native emoji rendering in M41. Unfortunately,
     87             * it doesn't work when the font is bolder than 500 weight. So, we
     88             * check for bold rendering support to avoid invisible emoji in Chrome.
     89             */
    8590            context.textBaseline = 'top';
    8691            context.font = '600 32px Arial';
     
    100105            } else {
    101106                /*
    102                  * Chrome on OS X added native emoji rendering in M41. Unfortunately,
    103                  * it doesn't work when the font is bolder than 500 weight. So, we
    104                  * check for bold rendering support to avoid invisible emoji in Chrome.
     107                 * This creates a smiling emoji, and checks to see if there is any image data in the
     108                 * center pixel. In browsers that don't support emoji, the character will be rendered
     109                 * as an empty square, so the center pixel will be blank.
    105110                 */
    106111                context.fillText( String.fromCharCode( 55357, 56835 ), 0, 0 );
Note: See TracChangeset for help on using the changeset viewer.