Skip to content

Commit

Permalink
Merge r222576 - "Tag" codepoints require the complex text codepath
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=177251
<rdar://problem/34384001>

Reviewed by David Hyatt.

Source/WebCore:

Previously, Tag codepoints (U+E0000 - U+E007F) weren't triggering the
complex text codepath.

Eventually, we should migrate the default from simple to complex. I'll do
that in a separate patch.

Test: fast/text/flag-codepoint.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

* fast/text/flag-codepoint-expected.html: Added.
* fast/text/flag-codepoint.html: Added.
  • Loading branch information
litherum authored and carlosgcampos committed Oct 17, 2017
1 parent 0ea9d6e commit da0c1a8
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
11 changes: 11 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
2017-09-27 Myles C. Maxfield <mmaxfield@apple.com>

"Tag" codepoints require the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=177251
<rdar://problem/34384001>

Reviewed by David Hyatt.

* fast/text/flag-codepoint-expected.html: Added.
* fast/text/flag-codepoint.html: Added.

2017-09-27 Joanmarie Diggs <jdiggs@igalia.com>

[ATK] atk_table_cell_get_position() should return values of aria-rowindex and aria-colindex, if present
Expand Down
8 changes: 8 additions & 0 deletions LayoutTests/fast/text/flag-codepoint-expected.html
@@ -0,0 +1,8 @@
<html>
<head>
<meta charset="utf-8">
</head>
<body>
This test makes sure that combining grapheme clusters with Tag codepoints (U+E0000 - U+E007F) join correctly. The test passes if you don't see anything below.
</body>
</html>
16 changes: 16 additions & 0 deletions LayoutTests/fast/text/flag-codepoint.html
@@ -0,0 +1,16 @@
<html>
<head>
<meta charset="utf-8">
</head>
<body>
This test makes sure that combining grapheme clusters with Tag codepoints (U+E0000 - U+E007F) join correctly. The test passes if you don't see anything below.
<div style="position: relative; font-size: 100px;">
<div style="display: -webkit-box;">
<div style="word-break: break-word;">
🏴󠁧󠁢󠁥󠁮󠁧󠁿
</div>
</div>
<div style="position: absolute; left: 0px; top: 0px; width: 750px; height: 120px; background: white;"></div>
</div>
</body>
</html>
19 changes: 19 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,22 @@
2017-09-27 Myles C. Maxfield <mmaxfield@apple.com>

"Tag" codepoints require the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=177251
<rdar://problem/34384001>

Reviewed by David Hyatt.

Previously, Tag codepoints (U+E0000 - U+E007F) weren't triggering the
complex text codepath.

Eventually, we should migrate the default from simple to complex. I'll do
that in a separate patch.

Test: fast/text/flag-codepoint.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):

2017-09-27 Joanmarie Diggs <jdiggs@igalia.com>

[ATK] atk_table_cell_get_position() should return values of aria-rowindex and aria-colindex, if present
Expand Down
5 changes: 5 additions & 0 deletions Source/WebCore/platform/graphics/FontCascade.cpp
Expand Up @@ -819,6 +819,11 @@ FontCascade::CodePath FontCascade::characterRangeCodePath(const UChar* character
previousCharacterIsEmojiGroupCandidate = true;
continue;
}

if (supplementaryCharacter < 0xE0000)
continue;
if (supplementaryCharacter < 0xE0080) // Tags
return Complex;
if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors.
continue;
if (supplementaryCharacter <= 0xE01EF)
Expand Down

0 comments on commit da0c1a8

Please sign in to comment.