WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145678
[iOS] Emoji overlap preceding lines
https://bugs.webkit.org/show_bug.cgi?id=145678
Summary
[iOS] Emoji overlap preceding lines
Myles C. Maxfield
Reported
2015-06-04 18:14:58 PDT
[iOS] Emoji overlap preceeding lines
Attachments
Patch
(3.59 KB, patch)
2015-06-04 18:37 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(13.85 KB, patch)
2015-06-04 19:23 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-mavericks
(598.90 KB, application/zip)
2015-06-04 19:57 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(680.26 KB, application/zip)
2015-06-04 20:01 PDT
,
Build Bot
no flags
Details
Patch
(17.04 KB, patch)
2015-06-04 20:30 PDT
,
Myles C. Maxfield
enrica
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2015-06-04 18:37:09 PDT
Created
attachment 254329
[details]
Patch
Myles C. Maxfield
Comment 2
2015-06-04 18:37:39 PDT
<
rdar://problem/10684914
>
Myles C. Maxfield
Comment 3
2015-06-04 19:23:06 PDT
Created
attachment 254331
[details]
Patch
Build Bot
Comment 4
2015-06-04 19:57:05 PDT
Comment on
attachment 254331
[details]
Patch
Attachment 254331
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/6167040318504960
New failing tests: fast/text/emoji.html
Build Bot
Comment 5
2015-06-04 19:57:09 PDT
Created
attachment 254332
[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
Build Bot
Comment 6
2015-06-04 20:01:45 PDT
Comment on
attachment 254331
[details]
Patch
Attachment 254331
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/5770894412611584
New failing tests: fast/text/emoji.html
Build Bot
Comment 7
2015-06-04 20:01:50 PDT
Created
attachment 254333
[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
Myles C. Maxfield
Comment 8
2015-06-04 20:30:02 PDT
Created
attachment 254336
[details]
Patch
Darin Adler
Comment 9
2015-06-05 11:05:00 PDT
Comment on
attachment 254336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254336&action=review
> Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:-275 > - m_fontMetrics.setLineSpacing(0);
Maybe the real intention here was to set the line spacing to m_platformData.size()?
Myles C. Maxfield
Comment 10
2015-06-05 11:26:04 PDT
Comment on
attachment 254336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254336&action=review
>> Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:-275 >> - m_fontMetrics.setLineSpacing(0); > > Maybe the real intention here was to set the line spacing to m_platformData.size()?
I tried that, but that value was too low to actually solve the problem.
Myles C. Maxfield
Comment 11
2015-06-05 11:39:53 PDT
I talked with Enrica, and we came up with some interesting points. 1. The line-height of the lines inside a block is calculated to be the maximum of the line-heights of the constituent fonts. This means that, if the emoji's line height is 0, emoji won't affect the line spacing of a paragraph that it's within. 2. It is possible to trigger this bug if the natural line-height of the font used for the surrounding text is significantly smaller than the natural line height of the emoji font, but in practice, this seems rare. 2. Assuming #2 does not occur, the bug does not present itself if there are any non-emoji characters which are siblings of the emoji (because of the maximum line-height rule described in #1). 3. Assuming #2 does not occur, the bug only presents itself if the block is styled with "font-family: 'Apple Color Emoji' (, other fallback fonts)". This is a structure which Apple's Mail client should never emit.
Myles C. Maxfield
Comment 12
2015-06-05 11:57:39 PDT
(In reply to
comment #11
)
> I talked with Enrica, and we came up with some interesting points. > > 1. The line-height of the lines inside a block is calculated to be the > maximum of the line-heights of the constituent fonts. This means that, if > the emoji's line height is 0, emoji won't affect the line spacing of a > paragraph that it's within. > > 2. It is possible to trigger this bug if the natural line-height of the font > used for the surrounding text is significantly smaller than the natural line > height of the emoji font, but in practice, this seems rare. > > 2. Assuming #2 does not occur, the bug does not present itself if there are > any non-emoji characters which are siblings of the emoji (because of the > maximum line-height rule described in #1). > > 3. Assuming #2 does not occur, the bug only presents itself if the block is > styled with "font-family: 'Apple Color Emoji' (, other fallback fonts)". > This is a structure which Apple's Mail client should never emit.
Note that, related to the last item, the font that causes this bug is Apple-specific, yet Apple's mail client won't emit markup which triggers this. This means that the bug is rare.
Myles C. Maxfield
Comment 13
2015-06-05 11:58:04 PDT
<
rdar://problem/21263287
>
Enrica Casucci
Comment 14
2015-06-05 14:36:11 PDT
Comment on
attachment 254336
[details]
Patch I discussed this with Myles at length. Setting lineSpacing to 0 was used in earlier versions of WebKit for iOS and it is no longer needed.
Myles C. Maxfield
Comment 15
2015-06-05 14:43:54 PDT
(In reply to
comment #14
)
> Comment on
attachment 254336
[details]
> Patch > > I discussed this with Myles at length. Setting lineSpacing to 0 was used in > earlier versions of WebKit for iOS and it is no longer needed.
And Dan chimed in!
Myles C. Maxfield
Comment 16
2015-06-05 14:46:53 PDT
Committed
r185266
: <
http://trac.webkit.org/changeset/185266
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug