Takes two delete key presses to delete pasted emoji up-pointing index finger with...
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 23:49:49 +0000 (23:49 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 23:49:49 +0000 (23:49 +0000)
commite1b78326aa1f5eb3b217fe53404b0b180a3c26a7
tree2d4947bac258c2c5bceb0cd7ceb872a6cbc0b6f2
parent9f2ab04817859c47d6353a591bc42fcfe97c66aa
Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
https://bugs.webkit.org/show_bug.cgi?id=145823

Reviewed by Anders Carlsson.

Source/WebCore:

Tests: editing/deleting/delete-emoji.html

* rendering/RenderText.cpp:
(WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
surrogate pairs.
(WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
(WebCore::isInArmenianToLimbuRange): Added.
(WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
code unit at a time, since it can, to use an enum class, and to use constants rather than
all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.

LayoutTests:

* editing/deleting/delete-emoji-expected.txt: Updated to expect a little more testing.
* editing/deleting/delete-emoji.html: Added a test case and streamlined the test a bit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-emoji-expected.txt
LayoutTests/editing/deleting/delete-emoji.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderText.cpp