From 4af31da26f816a7abc06924253f7924dbad15991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 17 Sep 2013 15:31:35 +0200 Subject: Correct range used for Emoji checks. https://bugs.webkit.org/show_bug.cgi?id=121486 Reviewed by Allan Sandfeld Jensen. Found and reported by David Binderman via Qt bug tracker. The check if a character was in the Emoji range always evaluated to false due to the upper range limit being lower than the lower limit. Changed the upper limit to the highest assigned character from the "Transport and Map Symbols" (0x1F6C5) as that seems to have been the intended upper range limit of this check. * platform/graphics/Font.cpp: (WebCore::Font::isCJKIdeographOrSymbol): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155951 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: Ie62aceb17bba170b0191ba64434e17d445cf7779 Task-number: QTBUG-33206 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/platform/graphics/Font.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/platform/graphics/Font.cpp b/Source/WebCore/platform/graphics/Font.cpp index 42dd14a6b..83a800d9b 100644 --- a/Source/WebCore/platform/graphics/Font.cpp +++ b/Source/WebCore/platform/graphics/Font.cpp @@ -595,7 +595,22 @@ bool Font::isCJKIdeographOrSymbol(UChar32 c) return true; // Emoji. - if (c >= 0x1F200 && c <= 0x1F6F) + if (c == 0x1F100) + return true; + + if (c >= 0x1F110 && c <= 0x1F129) + return true; + + if (c >= 0x1F130 && c <= 0x1F149) + return true; + + if (c >= 0x1F150 && c <= 0x1F169) + return true; + + if (c >= 0x1F170 && c <= 0x1F189) + return true; + + if (c >= 0x1F200 && c <= 0x1F6C5) return true; return isCJKIdeograph(c); -- cgit v1.2.3