<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[188737] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/188737">188737</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-08-20 19:12:01 -0700 (Thu, 20 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Source/WebCore:
[iOS] Adopt OS X's emoji behavior.
https://bugs.webkit.org/show_bug.cgi?id=148265
Reviewed by Simon Fraser.
Remove our hardcoded hacks which limit the sizes of emoji. This is how
OS X behaves with emoji.
Test: fast/text/emoji.html
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::isEmoji): Deleted.
(WebCore::FontPlatformData::setIsEmoji): Deleted.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
(WebCore::isOnOrAfterIOS6): Deleted.
(WebCore::pointAdjustedForEmoji): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::canUseFastGlyphAdvanceGetter):
(WebCore::Font::platformInit): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont):
(WebCore::FontPlatformData::platformDataInit): Deleted.
(WebCore::FontPlatformData::platformDataAssign): Deleted.
(WebCore::FontPlatformData::platformIsEqual): Deleted.
(WebCore::FontPlatformData::ctFontSize): Deleted.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
(WebCore::FontCache::createFontPlatformData): Deleted.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Deleted.
LayoutTests:
[iOS] Adopt OS X's emoji behavior
https://bugs.webkit.org/show_bug.cgi?id=148265
Reviewed by Simon Fraser.
* platform/ios-simulator/fast/text/emoji-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfasttextemojiexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontPlatformDatah">trunk/Source/WebCore/platform/graphics/FontPlatformData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontPlatformDataCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm">trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp">trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/LayoutTests/ChangeLog        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-08-20 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Adopt OS X's emoji behavior
+ https://bugs.webkit.org/show_bug.cgi?id=148265
+
+ Reviewed by Simon Fraser.
+
+ * platform/ios-simulator/fast/text/emoji-expected.txt:
+
</ins><span class="cx"> 2015-08-20 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> getElementsByClassName() should return an HTMLCollection
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfasttextemojiexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/LayoutTests/platform/ios-simulator/fast/text/emoji-expected.txt        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -7,20 +7,20 @@
</span><span class="cx"> RenderText {#text} at (0,0) size 471x19
</span><span class="cx"> text run at (0,0) width 471: "This test validate rendering of emoji sequences and emoji with modifiers."
</span><span class="cx"> RenderBlock {DIV} at (0,20) size 784x27
</span><del>- 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}"
</del><ins>+ RenderText {#text} at (0,0) size 16x27
+ text run at (0,0) width 16: "\x{D83D}\x{DE01}"
+ RenderBlock {DIV} at (0,47) size 784x245
+ 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,37) size 0x0
+ RenderText {#text} at (0,53) size 243x41
+ text run at (0,53) 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,86) size 0x0
+ RenderText {#text} at (0,102) size 216x41
+ text run at (0,102) 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,135) size 0x0
+ RenderText {#text} at (0,151) size 216x41
+ text run at (0,151) 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,184) size 0x0
+ RenderText {#text} at (0,200) size 216x41
+ text run at (0,200) 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}"
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/ChangeLog        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-08-20 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Adopt OS X's emoji behavior.
+ https://bugs.webkit.org/show_bug.cgi?id=148265
+
+ Reviewed by Simon Fraser.
+
+ Remove our hardcoded hacks which limit the sizes of emoji. This is how
+ OS X behaves with emoji.
+
+ Test: fast/text/emoji.html
+
+ * platform/graphics/FontPlatformData.h:
+ (WebCore::FontPlatformData::hash):
+ (WebCore::FontPlatformData::isEmoji): Deleted.
+ (WebCore::FontPlatformData::setIsEmoji): Deleted.
+ * platform/graphics/cocoa/FontCascadeCocoa.mm:
+ (WebCore::FontCascade::drawGlyphs):
+ (WebCore::isOnOrAfterIOS6): Deleted.
+ (WebCore::pointAdjustedForEmoji): Deleted.
+ * platform/graphics/cocoa/FontCocoa.mm:
+ (WebCore::canUseFastGlyphAdvanceGetter):
+ (WebCore::Font::platformInit): Deleted.
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+ (WebCore::FontPlatformData::ctFont):
+ (WebCore::FontPlatformData::platformDataInit): Deleted.
+ (WebCore::FontPlatformData::platformDataAssign): Deleted.
+ (WebCore::FontPlatformData::platformIsEqual): Deleted.
+ (WebCore::FontPlatformData::ctFontSize): Deleted.
+ * platform/graphics/ios/FontCacheIOS.mm:
+ (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
+ (WebCore::FontCache::createFontPlatformData): Deleted.
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Deleted.
+
</ins><span class="cx"> 2015-08-20 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> getElementsByClassName() should return an HTMLCollection
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontPlatformDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -151,8 +151,7 @@
</span><span class="cx"> #if PLATFORM(WIN) && !USE(CAIRO)
</span><span class="cx"> return m_font ? m_font->hash() : 0;
</span><span class="cx"> #elif OS(DARWIN)
</span><del>- ASSERT(m_font || !m_cgFont || isEmoji());
- uintptr_t flags = static_cast<uintptr_t>(m_isHashTableDeletedValue << 6 | m_textRenderingMode << 4 | isEmoji() << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique);
</del><ins>+ uintptr_t flags = static_cast<uintptr_t>(m_isHashTableDeletedValue << 5 | m_textRenderingMode << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique);
</ins><span class="cx"> #if USE(APPKIT)
</span><span class="cx"> uintptr_t fontHash = (uintptr_t)m_font.get();
</span><span class="cx"> #else
</span><span class="lines">@@ -193,14 +192,6 @@
</span><span class="cx"> String description() const;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
- bool isEmoji() const { return m_isEmoji; }
- void setIsEmoji(bool isEmoji) { m_isEmoji = isEmoji; }
-#elif PLATFORM(MAC)
- bool isEmoji() const { return false; }
- void setIsEmoji(bool) { }
-#endif
-
</del><span class="cx"> private:
</span><span class="cx"> bool platformIsEqual(const FontPlatformData&) const;
</span><span class="cx"> void platformDataInit(const FontPlatformData&);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -246,48 +246,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-static inline bool isOnOrAfterIOS6()
-{
-#if PLATFORM(IOS)
- return iosExecutableWasLinkedOnOrAfterVersion(wkIOSSystemVersion_6_0);
-#else
- ASSERT_NOT_REACHED();
- return false;
-#endif
-}
-
-static FloatPoint pointAdjustedForEmoji(const FontPlatformData& platformData, FloatPoint point)
-{
- if (!platformData.isEmoji())
- return point;
-
- // Mimic the positioining of non-bitmap glyphs, which are not subpixel-positioned.
- point.setY(ceilf(point.y()));
-
- // Emoji glyphs snap to the CSS pixel grid.
- point.setX(floorf(point.x()));
-
- // Emoji glyphs are offset one CSS pixel to the right.
- point.move(1, 0);
-
- // Emoji glyphs are offset vertically based on font size.
- float fontSize = platformData.size();
- float y = point.y();
- if (fontSize <= 15) {
- // Undo Core Text's y adjustment.
- static float yAdjustmentFactor = isOnOrAfterIOS6() ? .19 : .1;
- point.setY(floorf(y - yAdjustmentFactor * (fontSize + 2) + 2));
- } else {
- if (fontSize < 26)
- y -= .35f * fontSize - 10;
-
- // Undo Core Text's y adjustment.
- static float yAdjustment = isOnOrAfterIOS6() ? 3.8 : 2;
- point.setY(floorf(y - yAdjustment));
- }
- return point;
-}
-
</del><span class="cx"> void FontCascade::drawGlyphs(GraphicsContext* context, const Font* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& anchorPoint) const
</span><span class="cx"> {
</span><span class="cx"> const FontPlatformData& platformData = font->platformData();
</span><span class="lines">@@ -362,7 +320,7 @@
</span><span class="cx"> CGContextSetFont(cgContext, platformData.cgFont());
</span><span class="cx">
</span><span class="cx"> bool useLetterpressEffect = shouldUseLetterpressEffect(*context);
</span><del>- FloatPoint point = pointAdjustedForEmoji(platformData, anchorPoint);
</del><ins>+ FloatPoint point = anchorPoint;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> float fontSize = platformData.size();
</span><span class="lines">@@ -422,7 +380,7 @@
</span><span class="cx"> // If shadows are ignoring transforms, then we haven't applied the Y coordinate flip yet, so down is negative.
</span><span class="cx"> float shadowTextY = point.y() + shadowOffset.height() * (context->shadowsIgnoreTransforms() ? -1 : 1);
</span><span class="cx"> showGlyphsWithAdvances(FloatPoint(shadowTextX, shadowTextY), font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
</span><del>- if (syntheticBoldOffset && !platformData.isEmoji())
</del><ins>+ if (syntheticBoldOffset)
</ins><span class="cx"> showGlyphsWithAdvances(FloatPoint(shadowTextX + syntheticBoldOffset, shadowTextY), font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
</span><span class="cx"> context->setFillColor(fillColor, fillColorSpace);
</span><span class="cx"> }
</span><span class="lines">@@ -431,7 +389,7 @@
</span><span class="cx"> showLetterpressedGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
</span><span class="cx"> else
</span><span class="cx"> showGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
</span><del>- if (syntheticBoldOffset && !platformData.isEmoji())
</del><ins>+ if (syntheticBoldOffset)
</ins><span class="cx"> showGlyphsWithAdvances(FloatPoint(point.x() + syntheticBoldOffset, point.y()), font, cgContext, glyphBuffer.glyphs(from), static_cast<const CGSize*>(glyphBuffer.advances(from)), numGlyphs);
</span><span class="cx">
</span><span class="cx"> if (hasSimpleShadow)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -239,13 +239,6 @@
</span><span class="cx">
</span><span class="cx"> if (platformData().orientation() == Vertical && !isTextOrientationFallback())
</span><span class="cx"> m_hasVerticalGlyphs = fontHasVerticalGlyphs(m_platformData.ctFont());
</span><del>-
- if (m_platformData.isEmoji()) {
- int thirdOfSize = m_platformData.size() / 3;
- m_fontMetrics.setAscent(thirdOfSize);
- m_fontMetrics.setDescent(thirdOfSize);
- m_fontMetrics.setLineGap(thirdOfSize);
- }
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -431,7 +424,7 @@
</span><span class="cx"> {
</span><span class="cx"> const FontPlatformData& platformData = font.platformData();
</span><span class="cx"> // Fast getter doesn't doesn't work for emoji, bitmap fonts, or take custom tracking into account
</span><del>- if (font.hasCustomTracking() || platformData.isEmoji() || platformData.textRenderingMode() == OptimizeLegibility)
</del><ins>+ if (font.hasCustomTracking() || platformData.textRenderingMode() == OptimizeLegibility)
</ins><span class="cx"> return false;
</span><span class="cx"> if (advanceForColorBitmapFont(platformData, glyph, advance)) {
</span><span class="cx"> populatedAdvance = true;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontPlatformDataCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> {
</span><span class="cx"> m_font = f.m_font;
</span><span class="cx">
</span><del>- setIsEmoji(f.isEmoji());
</del><span class="cx"> m_cgFont = f.m_cgFont;
</span><span class="cx"> m_ctFont = f.m_ctFont;
</span><span class="cx"> }
</span><span class="lines">@@ -65,7 +64,6 @@
</span><span class="cx"> const FontPlatformData& FontPlatformData::platformDataAssign(const FontPlatformData& f)
</span><span class="cx"> {
</span><span class="cx"> m_cgFont = f.m_cgFont;
</span><del>- setIsEmoji(f.isEmoji());
</del><span class="cx"> if (m_font && f.m_font && CFEqual(m_font.get(), f.m_font.get()))
</span><span class="cx"> return *this;
</span><span class="cx"> m_font = f.m_font;
</span><span class="lines">@@ -83,10 +81,8 @@
</span><span class="cx"> #else
</span><span class="cx"> result = m_font == other.m_font;
</span><span class="cx"> #endif
</span><del>- ASSERT(!result || isEmoji() == other.isEmoji());
</del><span class="cx"> return result;
</span><span class="cx"> }
</span><del>- ASSERT(m_cgFont != other.m_cgFont || isEmoji() == other.isEmoji());
</del><span class="cx"> return m_cgFont == other.m_cgFont;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -165,12 +161,6 @@
</span><span class="cx"> return descriptor;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CGFloat FontPlatformData::ctFontSize() const
-{
- // On iOS, Apple Color Emoji size is adjusted (and then re-adjusted by Core Text) and capped.
- return !isEmoji() ? m_size : m_size <= 15 ? 4 * (m_size + 2) / static_cast<CGFloat>(5) : 16;
-}
-
</del><span class="cx"> CTFontRef FontPlatformData::ctFont() const
</span><span class="cx"> {
</span><span class="cx"> if (m_ctFont)
</span><span class="lines">@@ -182,12 +172,12 @@
</span><span class="cx"> CTFontDescriptorRef fontDescriptor;
</span><span class="cx"> RetainPtr<CFStringRef> postScriptName = adoptCF(CTFontCopyPostScriptName(m_ctFont.get()));
</span><span class="cx"> fontDescriptor = cascadeToLastResortFontDescriptor();
</span><del>- m_ctFont = adoptCF(CTFontCreateCopyWithAttributes(m_ctFont.get(), ctFontSize(), 0, fontDescriptor));
</del><ins>+ m_ctFont = adoptCF(CTFontCreateCopyWithAttributes(m_ctFont.get(), m_size, 0, fontDescriptor));
</ins><span class="cx"> } else {
</span><span class="cx"> #if CORETEXT_WEB_FONTS
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> #endif
</span><del>- m_ctFont = adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), ctFontSize(), 0, cascadeToLastResortFontDescriptor()));
</del><ins>+ m_ctFont = adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, cascadeToLastResortFontDescriptor()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_widthVariant != RegularWidth) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -81,7 +81,6 @@
</span><span class="cx"> bool syntheticOblique = (originalTraits & kCTFontTraitItalic) && !(actualTraits & kCTFontTraitItalic);
</span><span class="cx">
</span><span class="cx"> FontPlatformData alternateFont(substituteFont.get(), platformData.size(), syntheticBold, syntheticOblique, platformData.m_orientation);
</span><del>- alternateFont.setIsEmoji(CTFontIsAppleColorEmoji(substituteFont.get()));
</del><span class="cx">
</span><span class="cx"> return fontForPlatformData(alternateFont);
</span><span class="cx"> }
</span><span class="lines">@@ -386,8 +385,6 @@
</span><span class="cx"> bool syntheticOblique = (fontDescription.fontSynthesis() & FontSynthesisStyle) && (traits & kCTFontTraitItalic) && !(actualTraits & kCTFontTraitItalic) && !isAppleColorEmoji;
</span><span class="cx">
</span><span class="cx"> auto result = std::make_unique<FontPlatformData>(ctFont.get(), size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.textRenderingMode());
</span><del>- if (isAppleColorEmoji)
- result->setIsEmoji(true);
</del><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (188736 => 188737)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-08-21 02:10:46 UTC (rev 188736)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-08-21 02:12:01 UTC (rev 188737)
</span><span class="lines">@@ -604,7 +604,6 @@
</span><span class="cx"> ComplexTextRun& complexTextRun = *m_complexTextRuns[r];
</span><span class="cx"> unsigned glyphCount = complexTextRun.glyphCount();
</span><span class="cx"> const Font& font = complexTextRun.font();
</span><del>- bool isEmoji = font.platformData().isEmoji();
</del><span class="cx">
</span><span class="cx"> // Represent the initial advance for a text run by adjusting the advance
</span><span class="cx"> // of the last glyph of the previous text run in the glyph buffer.
</span><span class="lines">@@ -652,8 +651,6 @@
</span><span class="cx"> bool treatAsSpace = FontCascade::treatAsSpace(ch);
</span><span class="cx"> CGGlyph glyph = treatAsSpace ? font.spaceGlyph() : glyphs[i];
</span><span class="cx"> CGSize advance = treatAsSpace ? CGSizeMake(spaceWidth, advances[i].height) : advances[i];
</span><del>- if (isEmoji && advance.width)
- advance.width = font.widthForGlyph(glyph);
</del><span class="cx">
</span><span class="cx"> if (ch == '\t' && m_run.allowTabs())
</span><span class="cx"> advance.width = m_font.tabWidth(font, m_run.tabSize(), m_run.xPos() + m_totalWidth + widthSinceLastCommit);
</span></span></pre>
</div>
</div>
</body>
</html>