Support new emoji group candidates
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2016 03:11:15 +0000 (03:11 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2016 03:11:15 +0000 (03:11 +0000)
commit2e75aa2790467fe613405bce74517a2340e6181e
tree7895243bea357a867a048267384644af23d0f323
parentc6d6209ee6f5f618f82fe27910b89da7cc062806
Support new emoji group candidates
https://bugs.webkit.org/show_bug.cgi?id=159755
<rdar://problem/27325521>

Reviewed by Dean Jackson.

Source/WebCore:

There are a few code points which should be able to be joined (with ZWJ) to
either U+2640 or U+2642 to change the gender of the emoji. These patterns
should also work with an additional 0xFE0F variation selector. This patch
adds these new patterns to our existing emoji group candidate infrastructure.

Tests: fast/text/emoji-gender-2-3.html
       fast/text/emoji-gender-2-4.html
       fast/text/emoji-gender-2-5.html
       fast/text/emoji-gender-2-6.html
       fast/text/emoji-gender-2-7.html
       fast/text/emoji-gender-2-8.html
       fast/text/emoji-gender-2-9.html
       fast/text/emoji-gender-2.html
       fast/text/emoji-gender-3.html
       fast/text/emoji-gender-4.html
       fast/text/emoji-gender-5.html
       fast/text/emoji-gender-6.html
       fast/text/emoji-gender-7.html
       fast/text/emoji-gender-8.html
       fast/text/emoji-gender-9.html
       fast/text/emoji-gender-fe0f-3.html
       fast/text/emoji-gender-fe0f-4.html
       fast/text/emoji-gender-fe0f-5.html
       fast/text/emoji-gender-fe0f-6.html
       fast/text/emoji-gender-fe0f-7.html
       fast/text/emoji-gender-fe0f-8.html
       fast/text/emoji-gender-fe0f-9.html
       fast/text/emoji-gender.html
       fast/text/emoji-num-glyphs.html
       fast/text/emoji-single-parent-family-2.html
       fast/text/emoji-single-parent-family.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Removed incorrect ASSERT()s.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
* platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):

Source/WTF:

This patch doesn't update the rules for our cursor movement iterator, because
I don't know the language used for implementing these rules. These rules will
be updated in the near future. When they do,
editing/deleting/delete-emoji-expected.txt will need to be updated.

* wtf/text/TextBreakIterator.cpp:
(WTF::cursorMovementIterator):

LayoutTests:

Because this patch doesn't update the rules for our cursor movement
iterator, the new expected result for editing/deleting/delete-emoji.html
expects incorrect results. In the patch where we update these rules,
the expected result should also be updated.

Because these new emoji require system support, TestExpectations has
been updated to mark the tests as failing until the system support has
been added.

* TestExpectations:
* editing/deleting/delete-emoji-expected.txt:
* editing/deleting/delete-emoji.html:
* fast/text/emoji-gender-2-3-expected.html: Added.
* fast/text/emoji-gender-2-3.html: Added.
* fast/text/emoji-gender-2-4-expected.html: Added.
* fast/text/emoji-gender-2-4.html: Added.
* fast/text/emoji-gender-2-5-expected.html: Added.
* fast/text/emoji-gender-2-5.html: Added.
* fast/text/emoji-gender-2-6-expected.html: Added.
* fast/text/emoji-gender-2-6.html: Added.
* fast/text/emoji-gender-2-7-expected.html: Added.
* fast/text/emoji-gender-2-7.html: Added.
* fast/text/emoji-gender-2-8-expected.html: Added.
* fast/text/emoji-gender-2-8.html: Added.
* fast/text/emoji-gender-2-9-expected.html: Added.
* fast/text/emoji-gender-2-9.html: Added.
* fast/text/emoji-gender-2-expected-mismatch.html: Added.
* fast/text/emoji-gender-2.html: Added.
* fast/text/emoji-gender-3-expected.html: Added.
* fast/text/emoji-gender-3.html: Added.
* fast/text/emoji-gender-4-expected.html: Added.
* fast/text/emoji-gender-4.html: Added.
* fast/text/emoji-gender-5-expected.html: Added.
* fast/text/emoji-gender-5.html: Added.
* fast/text/emoji-gender-6-expected.html: Added.
* fast/text/emoji-gender-6.html: Added.
* fast/text/emoji-gender-7-expected.html: Added.
* fast/text/emoji-gender-7.html: Added.
* fast/text/emoji-gender-8-expected.html: Added.
* fast/text/emoji-gender-8.html: Added.
* fast/text/emoji-gender-9-expected.html: Added.
* fast/text/emoji-gender-9.html: Added.
* fast/text/emoji-gender-expected-mismatch.html: Added.
* fast/text/emoji-gender-fe0f-3-expected.html: Added.
* fast/text/emoji-gender-fe0f-3.html: Added.
* fast/text/emoji-gender-fe0f-4-expected.html: Added.
* fast/text/emoji-gender-fe0f-4.html: Added.
* fast/text/emoji-gender-fe0f-5-expected.html: Added.
* fast/text/emoji-gender-fe0f-5.html: Added.
* fast/text/emoji-gender-fe0f-6-expected.html: Added.
* fast/text/emoji-gender-fe0f-6.html: Added.
* fast/text/emoji-gender-fe0f-7-expected.html: Added.
* fast/text/emoji-gender-fe0f-7.html: Added.
* fast/text/emoji-gender-fe0f-8-expected.html: Added.
* fast/text/emoji-gender-fe0f-8.html: Added.
* fast/text/emoji-gender-fe0f-9-expected.html: Added.
* fast/text/emoji-gender-fe0f-9.html: Added.
* fast/text/emoji-gender.html: Added.
* fast/text/emoji-num-glyphs-expected.txt: Added.
* fast/text/emoji-num-glyphs.html: Added.
* fast/text/emoji-single-parent-family-2-expected-mismatch.html: Added.
* fast/text/emoji-single-parent-family-2.html: Added.
* fast/text/emoji-single-parent-family-expected-mismatch.html: Added.
* fast/text/emoji-single-parent-family.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
62 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/editing/deleting/delete-emoji-expected.txt
LayoutTests/editing/deleting/delete-emoji.html
LayoutTests/fast/text/emoji-gender-2-3-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-3.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-4-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-4.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-5-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-5.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-6-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-6.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-7-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-7.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-8-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-8.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-9-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-9.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-2.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-3-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-3.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-4-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-4.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-5-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-5.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-6-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-6.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-7-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-7.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-8-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-8.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-9-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-9.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-3-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-3.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-4-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-4.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-5-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-5.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-6-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-6.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-7-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-7.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-8-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-8.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-9-expected.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender-fe0f-9.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-gender.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-num-glyphs-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/emoji-num-glyphs.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-single-parent-family-2-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-single-parent-family-2.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-single-parent-family-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/emoji-single-parent-family.html [new file with mode: 0644]
Source/WTF/ChangeLog
Source/WTF/wtf/text/TextBreakIterator.cpp
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FontCascade.cpp
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
Source/WebCore/platform/text/CharacterProperties.h