Title: [185266] trunk
Revision
185266
Author
[email protected]
Date
2015-06-05 14:46:25 -0700 (Fri, 05 Jun 2015)

Log Message

[iOS] Emoji overlap preceeding lines
https://bugs.webkit.org/show_bug.cgi?id=145678
<rdar://problem/10684914>

Reviewed by Enrica Casucci.

Source/WebCore:

In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
its containing line. If the author has not specified a particular line-height, the height of a line comes from
the font metrics for the primary font of the line.

In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
overlaps the preceeding line.

I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
to review this patch; hopefully she knows the answer.

Test: fast/text/emoji.html

* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformInit):

LayoutTests:

* fast/text/emoji.html:
* platform/mac/TestExpectations: Removed unnecessary line.
* platform/mac-mavericks/fast/text/emoji-expected.html:
* platform/mac/fast/text/emoji-expected.html:
* platform/ios-simulator/fast/text/emoji-expected.html:
* TestExpectations: Removed unnecessary line.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (185265 => 185266)


--- trunk/LayoutTests/ChangeLog	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/LayoutTests/ChangeLog	2015-06-05 21:46:25 UTC (rev 185266)
@@ -1,3 +1,18 @@
+2015-06-05  Myles C. Maxfield  <[email protected]>
+
+        [iOS] Emoji overlap preceeding lines
+        https://bugs.webkit.org/show_bug.cgi?id=145678
+        <rdar://problem/10684914>
+
+        Reviewed by Enrica Casucci.
+
+        * fast/text/emoji.html:
+        * platform/mac/TestExpectations: Removed unnecessary line.
+        * platform/mac-mavericks/fast/text/emoji-expected.html:
+        * platform/mac/fast/text/emoji-expected.html:
+        * platform/ios-simulator/fast/text/emoji-expected.html:
+        * TestExpectations: Removed unnecessary line.
+
 2015-06-05  Mark Lam  <[email protected]>
 
         finally blocks should not set the exception stack trace when re-throwing the exception.

Modified: trunk/LayoutTests/TestExpectations (185265 => 185266)


--- trunk/LayoutTests/TestExpectations	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/LayoutTests/TestExpectations	2015-06-05 21:46:25 UTC (rev 185266)
@@ -120,7 +120,6 @@
 
 webkit.org/b/133057 fast/table/border-collapsing/collapsed-borders-adjoining-sections.html [ ImageOnlyFailure ]
 
-webkit.org/b/141661 fast/text/emoji.html [ Failure ]
 webkit.org/b/142548 editing/selection/extend-by-character-007.html [ Failure ]
 
 webkit.org/b/128736 inspector-protocol/debugger/setBreakpoint-dfg.html [ Failure Pass ]

Deleted: trunk/LayoutTests/fast/text/emoji-expected.txt (185265 => 185266)


--- trunk/LayoutTests/fast/text/emoji-expected.txt	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/LayoutTests/fast/text/emoji-expected.txt	2015-06-05 21:46:25 UTC (rev 185266)
@@ -1,23 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock (anonymous) at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 470x18
-          text run at (0,0) width 470: "This test validate rendering of emoji sequences and emoji with modifiers."
-      RenderBlock {DIV} at (0,18) size 784x235
-        RenderText {#text} at (0,4) size 180x41
-          text run at (0,4) width 180: "\x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}\x{2764}\x{FE0F}\x{D83D}\x{DC8B}"
-        RenderBR {BR} at (180,36) size 0x0
-        RenderText {#text} at (0,51) size 243x41
-          text run at (0,51) width 243: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC6A} \x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}"
-        RenderBR {BR} at (243,83) size 0x0
-        RenderText {#text} at (0,98) size 216x41
-          text run at (0,98) width 216: "\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
-        RenderBR {BR} at (216,130) size 0x0
-        RenderText {#text} at (0,145) size 216x41
-          text run at (0,145) width 216: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
-        RenderBR {BR} at (216,177) size 0x0
-        RenderText {#text} at (0,192) size 216x41
-          text run at (0,192) width 216: "\x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69}"

Modified: trunk/LayoutTests/fast/text/emoji.html (185265 => 185266)


--- trunk/LayoutTests/fast/text/emoji.html	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/LayoutTests/fast/text/emoji.html	2015-06-05 21:46:25 UTC (rev 185266)
@@ -1,6 +1,7 @@
 <html>
 <body>
     This test validate rendering of emoji sequences and emoji with modifiers.
+<div style="font-family: 'Apple Color Emoji';">&#x1f601;</div>
 <div style='font-size: 36px'>
 &#x1F466;&#x1F3FB;&#x1F469;&#x1F3FC;&#x1F466;&#x1F3FE;&#x2764;&#xFE0F;&#x1F48B;<br>
 &#x1F468;&#x200D;&#x1F469;&#x200D;&#x1F466; &#x1F468;&#x200D;&#x1F469;&#x200D;&#x1F467; &#x1F46A; &#x1F466;&#x1F3FB;&#x1F469;&#x1F3FC;&#x1F466;&#x1F3FE;<br>

Added: trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt (0 => 185266)


--- trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt	2015-06-05 21:46:25 UTC (rev 185266)
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 471x19
+          text run at (0,0) width 471: "This test validate rendering of emoji sequences and emoji with modifiers."
+      RenderBlock {DIV} at (0,20) size 784x27
+        RenderText {#text} at (0,8) size 21x10
+          text run at (0,8) width 21: "\x{D83D}\x{DE01}"
+      RenderBlock {DIV} at (0,47) size 784x295
+        RenderText {#text} at (0,1) size 105x41
+          text run at (0,1) width 105: "\x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}\x{2764}\x{FE0F}\x{D83D}\x{DC8B}"
+        RenderBR {BR} at (105,34) size 0x0
+        RenderText {#text} at (0,60) size 153x41
+          text run at (0,60) width 153: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC6A} \x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}"
+        RenderBR {BR} at (153,93) size 0x0
+        RenderText {#text} at (0,119) size 141x41
+          text run at (0,119) width 141: "\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (141,152) size 0x0
+        RenderText {#text} at (0,178) size 141x41
+          text run at (0,178) width 141: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (141,211) size 0x0
+        RenderText {#text} at (0,237) size 141x41
+          text run at (0,237) width 141: "\x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69}"

Modified: trunk/LayoutTests/platform/mac/TestExpectations (185265 => 185266)


--- trunk/LayoutTests/platform/mac/TestExpectations	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2015-06-05 21:46:25 UTC (rev 185266)
@@ -1260,6 +1260,5 @@
 
 # OS X 10.10.3+ has the necessary glyphs.
 webkit.org/b/142548 [ Yosemite+ ] editing/selection/extend-by-character-007.html [ Pass ]
-webkit.org/b/141661 [ Yosemite+ ] fast/text/emoji.html [ Pass ]
 
 media/accessiblity-describes-video.html [ Pass Failure ]

Copied: trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt (from rev 185265, trunk/LayoutTests/fast/text/emoji-expected.txt) (0 => 185266)


--- trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/text/emoji-expected.txt	2015-06-05 21:46:25 UTC (rev 185266)
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 470x18
+          text run at (0,0) width 470: "This test validate rendering of emoji sequences and emoji with modifiers."
+      RenderBlock {DIV} at (0,18) size 784x21
+        RenderText {#text} at (0,0) size 21x21
+          text run at (0,0) width 21: "\x{D83D}\x{DE01}"
+      RenderBlock {DIV} at (0,39) size 784x235
+        RenderText {#text} at (0,4) size 180x41
+          text run at (0,4) width 180: "\x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}\x{2764}\x{FE0F}\x{D83D}\x{DC8B}"
+        RenderBR {BR} at (180,36) size 0x0
+        RenderText {#text} at (0,51) size 243x41
+          text run at (0,51) width 243: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC6A} \x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}"
+        RenderBR {BR} at (243,83) size 0x0
+        RenderText {#text} at (0,98) size 216x41
+          text run at (0,98) width 216: "\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (216,130) size 0x0
+        RenderText {#text} at (0,145) size 216x41
+          text run at (0,145) width 216: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (216,177) size 0x0
+        RenderText {#text} at (0,192) size 216x41
+          text run at (0,192) width 216: "\x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69}"

Copied: trunk/LayoutTests/platform/mac-mavericks/fast/text/emoji-expected.txt (from rev 185265, trunk/LayoutTests/fast/text/emoji-expected.txt) (0 => 185266)


--- trunk/LayoutTests/platform/mac-mavericks/fast/text/emoji-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/text/emoji-expected.txt	2015-06-05 21:46:25 UTC (rev 185266)
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 470x18
+          text run at (0,0) width 470: "This test validate rendering of emoji sequences and emoji with modifiers."
+      RenderBlock {DIV} at (0,18) size 784x21
+        RenderText {#text} at (0,0) size 20x21
+          text run at (0,0) width 20: "\x{D83D}\x{DE01}"
+      RenderBlock {DIV} at (0,39) size 784x235
+        RenderText {#text} at (0,4) size 258x41
+          text run at (0,4) width 258: "\x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}\x{2764}\x{FE0F}\x{D83D}\x{DC8B}"
+        RenderBR {BR} at (257,36) size 1x0
+        RenderText {#text} at (0,51) size 465x41
+          text run at (0,51) width 465: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC6A} \x{D83D}\x{DC66}\x{D83C}\x{DFFB}\x{D83D}\x{DC69}\x{D83C}\x{DFFC}\x{D83D}\x{DC66}\x{D83C}\x{DFFE}"
+        RenderBR {BR} at (464,83) size 1x0
+        RenderText {#text} at (0,98) size 685x41
+          text run at (0,98) width 685: "\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC69}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (684,130) size 1x0
+        RenderText {#text} at (0,145) size 685x41
+          text run at (0,145) width 685: "\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC66}\x{200D}\x{D83D}\x{DC66} \x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC68}\x{200D}\x{D83D}\x{DC67}\x{200D}\x{D83D}\x{DC67}"
+        RenderBR {BR} at (684,177) size 1x0
+        RenderText {#text} at (0,192) size 649x41
+          text run at (0,192) width 649: "\x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC69} \x{D83D}\x{DC68}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC8B}\x{200D}\x{D83D}\x{DC68} \x{D83D}\x{DC69}\x{200D}\x{2764}\x{FE0F}\x{200D}\x{D83D}\x{DC69}"

Modified: trunk/Source/WebCore/ChangeLog (185265 => 185266)


--- trunk/Source/WebCore/ChangeLog	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/Source/WebCore/ChangeLog	2015-06-05 21:46:25 UTC (rev 185266)
@@ -1,3 +1,28 @@
+2015-06-05  Myles C. Maxfield  <[email protected]>
+
+        [iOS] Emoji overlap preceeding lines
+        https://bugs.webkit.org/show_bug.cgi?id=145678
+        <rdar://problem/10684914>
+
+        Reviewed by Enrica Casucci.
+
+        In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
+        its containing line. If the author has not specified a particular line-height, the height of a line comes from
+        the font metrics for the primary font of the line.
+
+        In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
+        if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
+        are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
+        overlaps the preceeding line.
+
+        I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
+        to review this patch; hopefully she knows the answer.
+
+        Test: fast/text/emoji.html
+
+        * platform/graphics/cocoa/FontCocoa.mm:
+        (WebCore::Font::platformInit):
+
 2015-06-05  Alex Christensen  <[email protected]>
 
         [Web Timing] Use new SPI to enable data collection.

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (185265 => 185266)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm	2015-06-05 21:42:22 UTC (rev 185265)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm	2015-06-05 21:46:25 UTC (rev 185266)
@@ -272,7 +272,6 @@
         m_fontMetrics.setAscent(thirdOfSize);
         m_fontMetrics.setDescent(thirdOfSize);
         m_fontMetrics.setLineGap(thirdOfSize);
-        m_fontMetrics.setLineSpacing(0);
     }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to