Changeset 216331 in webkit


Ignore:
Timestamp:
May 6, 2017 10:54:16 AM (7 years ago)
Author:
mmaxfield@apple.com
Message:

REGERSSION(r213499): Emoji with Fitzpatrick modifiers are drawn as two separate glyphs
https://bugs.webkit.org/show_bug.cgi?id=171750
<rdar://problem/31122612>

Reviewed by Zalan Bujtas.

Source/WebCore:

Emoji with Fitzpatrick modifiers need to take our complex text codepath. When looking through
the string to determine which code path to use, we ask if a particular codepoint is an emoji
group candidate. r213499 expanded the set of these candidates to include Fitzpatrick modifiers,
which means the next "if" statement would never be hit. Instead, we should check that "if"
statement first (because order is not important here). The next checks do not intersect with
any emoji group candidates.

Test: fast/text/fitzpatrick-combination.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

  • fast/text/fitzpatrick-combination-expected.html: Added.
  • fast/text/fitzpatrick-combination.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r216307 r216331  
     12017-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGERSSION(r213499): Emoji with Fitzpatrick modifiers are drawn as two separate glyphs
     4        https://bugs.webkit.org/show_bug.cgi?id=171750
     5        <rdar://problem/31122612>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * fast/text/fitzpatrick-combination-expected.html: Added.
     10        * fast/text/fitzpatrick-combination.html: Added.
     11
    1122017-05-05  Zalan Bujtas  <zalan@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r216323 r216331  
     12017-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGERSSION(r213499): Emoji with Fitzpatrick modifiers are drawn as two separate glyphs
     4        https://bugs.webkit.org/show_bug.cgi?id=171750
     5        <rdar://problem/31122612>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Emoji with Fitzpatrick modifiers need to take our complex text codepath. When looking through
     10        the string to determine which code path to use, we ask if a particular codepoint is an emoji
     11        group candidate. r213499 expanded the set of these candidates to include Fitzpatrick modifiers,
     12        which means the next "if" statement would never be hit. Instead, we should check that "if"
     13        statement first (because order is not important here). The next checks do not intersect with
     14        any emoji group candidates.
     15
     16        Test: fast/text/fitzpatrick-combination.html
     17
     18        * platform/graphics/FontCascade.cpp:
     19        (WebCore::FontCascade::characterRangeCodePath):
     20
    1212017-05-06  Youenn Fablet  <youenn@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/FontCascade.cpp

    r215756 r216331  
    847847                return Complex;
    848848
     849            if (isEmojiFitzpatrickModifier(supplementaryCharacter))
     850                return Complex;
    849851            if (isEmojiGroupCandidate(supplementaryCharacter)) {
    850852                previousCharacterIsEmojiGroupCandidate = true;
    851853                continue;
    852854            }
    853             if (isEmojiFitzpatrickModifier(supplementaryCharacter))
    854                 return Complex;
    855855            if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors.
    856856                continue;
Note: See TracChangeset for help on using the changeset viewer.