Bug 168198 - Update isEmojiGroupCandidate() to the latest version of Unicode
Summary: Update isEmojiGroupCandidate() to the latest version of Unicode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 168207
  Show dependency treegraph
 
Reported: 2017-02-12 13:46 PST by Myles C. Maxfield
Modified: 2017-03-08 18:06 PST (History)
11 users (show)

See Also:


Attachments
Patch (3.52 KB, patch)
2017-02-13 12:03 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.67 KB, patch)
2017-02-13 12:14 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (148.99 KB, patch)
2017-02-13 17:27 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (1.11 MB, application/zip)
2017-02-13 18:23 PST, Build Bot
no flags Details
Patch (286.51 KB, patch)
2017-02-13 23:13 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (1.52 KB, patch)
2017-03-08 10:18 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-02-12 13:46:01 PST
In the latest version of Unicode, many more emoji are allowed to join. Instead of checking each individual range, we should just check to see if the character is:

U+2640 FEMALE SIGN
U+2642 MALE SIGN
U+26F9 PERSON WITH BALL
U+2695 STAFF OF AESCULAPIUS
U+2696 SCALES
U+2708 AIRPLANE
U+2764 HEAVY BLACK HEART
The Unicode block is UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS
The Unicode block is UBLOCK_EMOTICONS
The Unicode block is UBLOCK_TRANSPORT_AND_MAP_SYMBOLS
The Unicode block is UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS

Alternatively, instead of checking individual code points at all, we may wish to simply check if the block is UBLOCK_MISCELLANEOUS_SYMBOLS or UBLOCK_DINGBATS
Comment 1 Radar WebKit Bug Importer 2017-02-12 13:46:26 PST
<rdar://problem/30484020>
Comment 2 Myles C. Maxfield 2017-02-13 12:03:29 PST
Created attachment 301369 [details]
Patch
Comment 3 Myles C. Maxfield 2017-02-13 12:14:25 PST
Created attachment 301370 [details]
Patch
Comment 4 Myles C. Maxfield 2017-02-13 17:27:34 PST
Created attachment 301423 [details]
Patch
Comment 5 Build Bot 2017-02-13 18:23:16 PST
Comment on attachment 301423 [details]
Patch

Attachment 301423 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3082376

New failing tests:
editing/deleting/delete-emoji.html
Comment 6 Build Bot 2017-02-13 18:23:19 PST
Created attachment 301432 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 7 Myles C. Maxfield 2017-02-13 23:13:37 PST
Created attachment 301467 [details]
Patch
Comment 8 WebKit Commit Bot 2017-03-06 21:37:39 PST
Comment on attachment 301467 [details]
Patch

Clearing flags on attachment: 301467

Committed r213499: <http://trac.webkit.org/changeset/213499>
Comment 9 WebKit Commit Bot 2017-03-06 21:37:46 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Michael Catanzaro 2017-03-07 14:08:25 PST
Hey Myles, the ICU_HEADERS_UNDERSTAND_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS case is missing a return statement when if (useSupplementalSymbolsAndPictographs) is false! Bad!

[3479/5652] Building CXX object Source...ir/platform/graphics/FontCascade.cpp.o
In file included from ../../Source/WebCore/platform/graphics/FontCascade.cpp:27:0:
../../Source/WebCore/platform/text/CharacterProperties.h: In function ‘bool WebCore::isEmojiGroupCandidate(UChar32)’:
../../Source/WebCore/platform/text/CharacterProperties.h:62:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[3483/5652] Building CXX object Source...m/graphics/ComplexTextController.cpp.o
In file included from ../../Source/WebCore/platform/graphics/ComplexTextController.cpp:28:0:
../../Source/WebCore/platform/text/CharacterProperties.h: In function ‘bool WebCore::isEmojiGroupCandidate(UChar32)’:
../../Source/WebCore/platform/text/CharacterProperties.h:62:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[3746/5652] Building CXX object Source...WebCore.dir/rendering/RenderText.cpp.o
In file included from ../../Source/WebCore/rendering/RenderText.cpp:31:0:
../../Source/WebCore/platform/text/CharacterProperties.h: In function ‘bool WebCore::isEmojiGroupCandidate(UChar32)’:
../../Source/WebCore/platform/text/CharacterProperties.h:62:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Problem is... they seem bogus.
Comment 11 Michael Catanzaro 2017-03-07 14:09:11 PST
(In reply to comment #10)
> Problem is... they seem bogus.

Whoops, I meant to delete that bit of the comment. I at first got confused and didn't notice the problem.
Comment 12 Michael Catanzaro 2017-03-08 10:17:05 PST
litherum:  mcatanzaro: the #else should be changed to an #endif
Comment 13 Michael Catanzaro 2017-03-08 10:18:27 PST
Created attachment 303819 [details]
Patch
Comment 14 WebKit Commit Bot 2017-03-08 18:06:27 PST
Comment on attachment 303819 [details]
Patch

Clearing flags on attachment: 303819

Committed r213616: <http://trac.webkit.org/changeset/213616>
Comment 15 WebKit Commit Bot 2017-03-08 18:06:33 PST
All reviewed patches have been landed.  Closing bug.