From faac51cad04da7d17fe2211444942e292fb2538b Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 16 Mar 2015 00:06:28 +0000 Subject: [PATCH] Emoji: Move a comment to match the restructure in [31779], and add an extra comment explaining how emoji rendering support is detected. See #31242 Built from https://develop.svn.wordpress.org/trunk@31788 git-svn-id: http://core.svn.wordpress.org/trunk@31768 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/wp-emoji.js | 11 ++++++++--- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-includes/js/wp-emoji.js b/wp-includes/js/wp-emoji.js index 408cdf2d18..34b613b119 100644 --- a/wp-includes/js/wp-emoji.js +++ b/wp-includes/js/wp-emoji.js @@ -82,6 +82,11 @@ return false; } + /* + * Chrome on OS X added native emoji rendering in M41. Unfortunately, + * it doesn't work when the font is bolder than 500 weight. So, we + * check for bold rendering support to avoid invisible emoji in Chrome. + */ context.textBaseline = 'top'; context.font = '600 32px Arial'; @@ -99,9 +104,9 @@ return canvas.toDataURL().length > 3000; } else { /* - * Chrome on OS X added native emoji rendering in M41. Unfortunately, - * it doesn't work when the font is bolder than 500 weight. So, we - * check for bold rendering support to avoid invisible emoji in Chrome. + * This creates a smiling emoji, and checks to see if there is any image data in the + * center pixel. In browsers that don't support emoji, the character will be rendered + * as an empty square, so the center pixel will be blank. */ context.fillText( String.fromCharCode( 55357, 56835 ), 0, 0 ); return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index 0128f63e86..3850097c85 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta1-31787'; +$wp_version = '4.2-beta1-31788'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.