Bug 145569 - SoftBank Emoji are not transformed by shaping when in a run of their own
Summary: SoftBank Emoji are not transformed by shaping when in a run of their own
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-02 14:44 PDT by Myles C. Maxfield
Modified: 2015-06-03 15:51 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.67 KB, patch)
2015-06-02 14:46 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (1.70 KB, patch)
2015-06-02 14:47 PDT, Myles C. Maxfield
enrica: review+
Details | Formatted Diff | Diff
Patch (1.80 KB, patch)
2015-06-02 15:40 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch for landing (1.78 KB, patch)
2015-06-02 15:41 PDT, Myles C. Maxfield
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch (8.65 KB, patch)
2015-06-02 20:50 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.10 KB, patch)
2015-06-02 21:26 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-mavericks (676.44 KB, application/zip)
2015-06-02 21:49 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-mavericks-wk2 (701.18 KB, application/zip)
2015-06-02 22:13 PDT, Build Bot
no flags Details
Patch (11.37 KB, patch)
2015-06-03 12:44 PDT, Myles C. Maxfield
dino: review+
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 2015-06-02 14:44:15 PDT
SoftBank Emoji don't render using our complex text codepath
Comment 1 Myles C. Maxfield 2015-06-02 14:46:23 PDT
Created attachment 254105 [details]
Patch
Comment 2 Myles C. Maxfield 2015-06-02 14:47:11 PDT
Created attachment 254106 [details]
Patch
Comment 3 Enrica Casucci 2015-06-02 15:15:28 PDT
Comment on attachment 254106 [details]
Patch

The title of the bug is inconsistent with the implementation. I believe you want to use the complex path. You can write a test case or simply add this character to one of the existing tests. The layout information should be enough to show that this is actually drawing correctly. Please add the test before submitting and fix the bug title.
Comment 4 Myles C. Maxfield 2015-06-02 15:40:03 PDT
Created attachment 254115 [details]
Patch
Comment 5 Myles C. Maxfield 2015-06-02 15:41:19 PDT
Created attachment 254116 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2015-06-02 18:09:32 PDT
Comment on attachment 254116 [details]
Patch for landing

Rejecting attachment 254116 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 254116, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/6241245944872960
Comment 7 Myles C. Maxfield 2015-06-02 20:50:21 PDT
Created attachment 254138 [details]
Patch
Comment 8 Myles C. Maxfield 2015-06-02 21:08:09 PDT
Comment on attachment 254138 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254138&action=review

> Source/WebCore/platform/graphics/WidthIterator.cpp:196
> +        || (glyphBufferSize > lastGlyphCount + 1 && m_run.length() > 1 && (m_typesettingFeatures & (Kerning | Ligatures)));

This is not correct. We need to update lastGlyphCount in this case.
Comment 9 Myles C. Maxfield 2015-06-02 21:11:23 PDT
Comment on attachment 254138 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254138&action=review

> Source/WebCore/platform/graphics/WidthIterator.cpp:258
> +            if (shouldApplyFontTransforms(glyphBuffer->size(), lastGlyphCount, previousCharacter)) {

This is going to crash a lot.
Comment 10 Myles C. Maxfield 2015-06-02 21:26:20 PDT
Created attachment 254141 [details]
Patch
Comment 11 Build Bot 2015-06-02 21:49:28 PDT
Comment on attachment 254141 [details]
Patch

Attachment 254141 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6148784962666496

Number of test failures exceeded the failure limit.
Comment 12 Build Bot 2015-06-02 21:49:32 PDT
Created attachment 254143 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 13 Build Bot 2015-06-02 22:12:59 PDT
Comment on attachment 254141 [details]
Patch

Attachment 254141 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6050187143282688

Number of test failures exceeded the failure limit.
Comment 14 Build Bot 2015-06-02 22:13:03 PDT
Created attachment 254147 [details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 15 Myles C. Maxfield 2015-06-03 12:24:01 PDT
Comment on attachment 254141 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254141&action=review

> Source/WebCore/platform/graphics/WidthIterator.cpp:357
> +        if (shouldApplyFontTransforms(glyphBuffer, lastGlyphCount, previousCharacter) && glyphBuffer && FontCascade::treatAsSpace(character)) {

This screwed everything up :(
Comment 16 Myles C. Maxfield 2015-06-03 12:44:52 PDT
Created attachment 254198 [details]
Patch
Comment 17 Dean Jackson 2015-06-03 14:18:50 PDT
Comment on attachment 254198 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254198&action=review

> Source/WebCore/platform/graphics/WidthIterator.cpp:199
> +    if (m_run.length() <= 1 || !(m_typesettingFeatures & (Kerning | Ligatures)))

I probably forget this, but you didn't mean < 1 here right?
Comment 18 Darin Adler 2015-06-03 14:24:23 PDT
Comment on attachment 254198 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254198&action=review

> Source/WTF/wtf/unicode/CharacterNames.h:95
> +const UChar softBankEmojiStart = 0xE001;
> +const UChar softBankEmojiEnd = 0xE537;

This file is kept in alphabetical order, so these are misplaced.

This file currently only includes names that are taken directly from the Unicode specification and names of actual characters, not range boundaries. So Iā€™m not sure these constants belong in this file and even if we do put them in this file I suggest we put them in a separate paragraph.

I think this would probably be better as an inline function isSoftBankEmoji rather than two constants.

> Source/WebCore/platform/graphics/WidthIterator.h:93
> +    // The returned optional represents whether or not we should apply font transforms, and the returned bool represents whether or not
> +    // we should force shaping to occur (even if guards in applyFontTransforms() say it's unnecessary)

That is super confusing. Can we return a struct with named booleans or an enum rather than this strange tri-state thing?
Comment 19 Dean Jackson 2015-06-03 14:25:37 PDT
Comment on attachment 254198 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254198&action=review

>> Source/WebCore/platform/graphics/WidthIterator.cpp:199
>> +    if (m_run.length() <= 1 || !(m_typesettingFeatures & (Kerning | Ligatures)))
> 
> I probably forget this, but you didn't mean < 1 here right?

After chatting, we think it maybe should be > 1
Comment 20 Myles C. Maxfield 2015-06-03 15:48:00 PDT
<rdar://problem/20671711>
Comment 21 Myles C. Maxfield 2015-06-03 15:48:56 PDT
Committed r185175: <http://trac.webkit.org/changeset/185175>
Comment 22 Myles C. Maxfield 2015-06-03 15:51:01 PDT
Committed r185176: <http://trac.webkit.org/changeset/185176>