From 261aa938cfadb1db120b3dac3b8f23bcdf8273fb Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 17 Mar 2016 04:54:26 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 2 +- wp-includes/js/wp-emoji-loader.js | 13 +++++++++---- wp-includes/js/wp-emoji-loader.min.js | 2 +- wp-includes/version.php | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ba196d9ced..ee15ba26bf 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4582,7 +4582,7 @@ function print_emoji_detection_script() { ?> 3e3;case"diversity":return e.fillText(f(55356,57221),0,0),c=e.getImageData(16,16,1,1).data.toString(),e.fillText(f(55356,57221,55356,57343),0,0),c!==e.getImageData(16,16,1,1).data.toString();case"simple":return e.fillText(f(55357,56835),0,0),0!==e.getImageData(16,16,1,1).data[0];case"unicode8":return e.fillText(f(55356,57135),0,0),0!==e.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0},h=0;h3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0},h=0;h