Emoji sequences do not render properly.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 01:05:28 +0000 (01:05 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 01:05:28 +0000 (01:05 +0000)
commit752ee4c583f9cc567f89bd7edf4683d280a9f751
tree695ac6b611d3cef04e4f92e57400df51b35b7ef9
parenta3c4fb9f23263e1d65a7324503444d85843e088f
Emoji sequences do not render properly.
https://bugs.webkit.org/show_bug.cgi?id=141661
rdar://problem/19820463

Reviewed by Sam Weinig.

Source/WebCore:

Emoji sequences and emoji with variations should be rendered
using the Complex code path and should be treated as graphemes.
This change modifies advanceByCombiningCharacterSequence to add
this logic.

Test: fast/text/emoji.html

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::advanceByCombiningCharacterSequence): Implements a simple
logic to treat emoji sequences and emoji with variations as graphemes.
* platform/text/CharacterProperties.h: Added.
(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiModifier):
(WebCore::isVariationSelector):
* rendering/RenderText.cpp:
(WebCore::isEmojiGroupCandidate): Deleted.
(WebCore::isEmojiModifier): Deleted.

LayoutTests:

* TestExpectations:
* fast/text/emoji-expected.txt: Added.
* fast/text/emoji.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/text/emoji-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/emoji.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/FontCascade.cpp
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
Source/WebCore/platform/text/CharacterProperties.h [new file with mode: 0644]
Source/WebCore/rendering/RenderText.cpp