<!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>[191331] 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/191331">191331</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-10-19 21:55:27 -0700 (Mon, 19 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
https://bugs.webkit.org/show_bug.cgi?id=149775

Reviewed by Darin Adler.

Source/WebCore:

This patch has two pieces:

We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
simple and complex text codepaths. However, in this brave new world of font-feature-settings
and font-variant-*, there are many properties which may affect shaping (and multiple kinds
of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
the various properties which affect text shaping.

Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
if it should disable ligatures. However, we now have much finer-grained control over
ligatures during font creation. This patch moves the responsibility of dictating which
font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
doesn't know anything about ligatures anymore; the logic inside font creation is used
instead.

An added benefit of moving all the font feature logic to one place is that we can implement
the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
makes sure that text-rendering, font-feature-settings, and font-variant-* play together
nicely.

Test: fast/text/multiple-feature-properties.html

* platform/graphics/Font.cpp:
(WebCore::Font::applyTransforms):
* platform/graphics/Font.h:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade):
(WebCore::FontCascade::operator=):
(WebCore::FontCascade::update):
(WebCore::FontCascade::drawText):
(WebCore::FontCascade::drawEmphasisMarks):
(WebCore::FontCascade::width):
(WebCore::FontCascade::adjustSelectionRectForText):
(WebCore::FontCascade::offsetForPosition):
(WebCore::FontCascade::codePath):
(WebCore::FontCascade::floatWidthForSimpleText):
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::requiresShaping):
(WebCore::FontCascade::computeRequiresShaping):
(WebCore::FontCascade::enableLigatures): Deleted.
(WebCore::FontCascade::computeEnableLigatures): Deleted.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::applyFontTransforms):
* platform/graphics/WidthIterator.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::canRenderCombiningCharacterSequence):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes):
* svg/SVGFontData.h:

LayoutTests:

* fast/text/multiple-feature-properties-expected.html: Added.
* fast/text/multiple-feature-properties.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontcpp">trunk/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFonth">trunk/Source/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadecpp">trunk/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadeh">trunk/Source/WebCore/platform/graphics/FontCascade.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsWidthIteratorcpp">trunk/Source/WebCore/platform/graphics/WidthIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsWidthIteratorh">trunk/Source/WebCore/platform/graphics/WidthIterator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm">trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacSimpleFontDataCoreTextcpp">trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatah">trunk/Source/WebCore/svg/SVGFontData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextmultiplefeaturepropertiesexpectedhtml">trunk/LayoutTests/fast/text/multiple-feature-properties-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextmultiplefeaturepropertieshtml">trunk/LayoutTests/fast/text/multiple-feature-properties.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/LayoutTests/ChangeLog        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-10-19  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
+        https://bugs.webkit.org/show_bug.cgi?id=149775
+
+        Reviewed by Darin Adler.
+
+        * fast/text/multiple-feature-properties-expected.html: Added.
+        * fast/text/multiple-feature-properties.html: Added.
+
</ins><span class="cx"> 2015-10-19  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Don't dump GestureEvent constructor attributes for now
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextmultiplefeaturepropertiesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/multiple-feature-properties-expected.html (0 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/multiple-feature-properties-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/multiple-feature-properties-expected.html        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test makes sure that feature resolution order is honored. For more information, click &lt;a href=&quot;http://www.w3.org/TR/css3-fonts/#feature-precedence&quot;&gt;here&lt;/a&gt;. The test passes if there is a particular sequence of Xs and check marks below.
+&lt;div style=&quot;font-family: FontWithFeaturesOTF;&quot;&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;A&lt;/span&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;A&lt;/span&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;A&lt;/span&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;B&lt;/span&gt;
+&lt;span&gt;A&lt;/span&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextmultiplefeaturepropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/multiple-feature-properties.html (0 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/multiple-feature-properties.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/multiple-feature-properties.html        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test makes sure that feature resolution order is honored. For more information, click &lt;a href=&quot;http://www.w3.org/TR/css3-fonts/#feature-precedence&quot;&gt;here&lt;/a&gt;. The test passes if there is a particular sequence of Xs and check marks below.
+&lt;div style=&quot;font-family: FontWithFeaturesOTF;&quot;&gt;
+&lt;span style=&quot;font-variant-ligatures: common-ligatures; text-rendering: optimizeSpeed;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-variant-ligatures: no-common-ligatures; text-rendering: optimizeSpeed;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-variant-ligatures: common-ligatures; text-rendering: optimizeLegibility;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-variant-ligatures: no-common-ligatures; text-rendering: optimizeLegibility;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-feature-settings: 'liga' 1, 'clig' 1; text-rendering: optimizeSpeed;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-feature-settings: 'liga' 0, 'clig' 0; text-rendering: optimizeSpeed;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-feature-settings: 'liga' 1, 'clig' 1; text-rendering: optimizeLegibility;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-feature-settings: 'liga' 0, 'clig' 0; text-rendering: optimizeLegibility;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-variant-ligatures: common-ligatures; font-feature-settings: 'liga' 0, 'clig' 0;&quot;&gt;C&lt;/span&gt;
+&lt;span style=&quot;font-variant-ligatures: no-common-ligatures; font-feature-settings: 'liga' 1, 'clig' 1;&quot;&gt;C&lt;/span&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/ChangeLog        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -1,5 +1,67 @@
</span><span class="cx"> 2015-10-19  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
+        https://bugs.webkit.org/show_bug.cgi?id=149775
+
+        Reviewed by Darin Adler.
+
+        This patch has two pieces:
+
+        We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
+        simple and complex text codepaths. However, in this brave new world of font-feature-settings
+        and font-variant-*, there are many properties which may affect shaping (and multiple kinds
+        of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
+        the various properties which affect text shaping.
+
+        Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
+        if it should disable ligatures. However, we now have much finer-grained control over
+        ligatures during font creation. This patch moves the responsibility of dictating which
+        font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
+        doesn't know anything about ligatures anymore; the logic inside font creation is used
+        instead.
+
+        An added benefit of moving all the font feature logic to one place is that we can implement
+        the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
+        makes sure that text-rendering, font-feature-settings, and font-variant-* play together
+        nicely.
+
+        Test: fast/text/multiple-feature-properties.html
+
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::applyTransforms):
+        * platform/graphics/Font.h:
+        * platform/graphics/FontCascade.cpp:
+        (WebCore::FontCascade::FontCascade):
+        (WebCore::FontCascade::operator=):
+        (WebCore::FontCascade::update):
+        (WebCore::FontCascade::drawText):
+        (WebCore::FontCascade::drawEmphasisMarks):
+        (WebCore::FontCascade::width):
+        (WebCore::FontCascade::adjustSelectionRectForText):
+        (WebCore::FontCascade::offsetForPosition):
+        (WebCore::FontCascade::codePath):
+        (WebCore::FontCascade::floatWidthForSimpleText):
+        * platform/graphics/FontCascade.h:
+        (WebCore::FontCascade::requiresShaping):
+        (WebCore::FontCascade::computeRequiresShaping):
+        (WebCore::FontCascade::enableLigatures): Deleted.
+        (WebCore::FontCascade::computeEnableLigatures): Deleted.
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::WidthIterator):
+        (WebCore::WidthIterator::applyFontTransforms):
+        * platform/graphics/WidthIterator.h:
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::preparePlatformFont):
+        * platform/graphics/cocoa/FontCocoa.mm:
+        (WebCore::Font::canRenderCombiningCharacterSequence):
+        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
+        (WebCore::Font::getCFStringAttributes):
+        * svg/SVGFontData.h:
+
+2015-10-19  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
</ins><span class="cx">         Shadow GraphicsContext's ImageInterpolationQuality inside GraphicsContextState
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150306
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -371,19 +371,19 @@
</span><span class="cx">     return platformCreateScaledFont(fontDescription, scaleFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Font::applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, bool enableKerning, bool enableLigatures) const
</del><ins>+bool Font::applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, bool enableKerning, bool requiresShaping) const
</ins><span class="cx"> {
</span><span class="cx">     // We need to handle transforms on SVG fonts internally, since they are rendered internally.
</span><span class="cx">     ASSERT(!isSVGFont());
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    CTFontTransformOptions options = (enableKerning ? kCTFontTransformApplyPositioning : 0) | (enableLigatures ? kCTFontTransformApplyShaping : 0);
</del><ins>+    CTFontTransformOptions options = (enableKerning ? kCTFontTransformApplyPositioning : 0) | (requiresShaping ? kCTFontTransformApplyShaping : 0);
</ins><span class="cx">     return CTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast&lt;CGSize*&gt;(advances), glyphCount, options);
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(glyphs);
</span><span class="cx">     UNUSED_PARAM(advances);
</span><span class="cx">     UNUSED_PARAM(glyphCount);
</span><span class="cx">     UNUSED_PARAM(enableKerning);
</span><del>-    UNUSED_PARAM(enableLigatures);
</del><ins>+    UNUSED_PARAM(requiresShaping);
</ins><span class="cx">     return false;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.h (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">     bool shouldNotBeUsedForArabic() const { return m_shouldNotBeUsedForArabic; };
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    CFDictionaryRef getCFStringAttributes(bool enableKerning, bool enableLigatures, FontOrientation) const;
</del><ins>+    CFDictionaryRef getCFStringAttributes(bool enableKerning, FontOrientation) const;
</ins><span class="cx">     bool hasCustomTracking() const { return isSystemFont(); }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, bool enableKerning, bool enableLigatures) const;
</del><ins>+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, bool enableKerning, bool requiresShaping) const;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA) || PLATFORM(WIN)
</span><span class="cx">     bool isSystemFont() const { return m_isSystemFont; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     , m_wordSpacing(0)
</span><span class="cx">     , m_useBackslashAsYenSymbol(false)
</span><span class="cx">     , m_enableKerning(false)
</span><del>-    , m_enableLigatures(false)
</del><ins>+    , m_requiresShaping(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     , m_wordSpacing(wordSpacing)
</span><span class="cx">     , m_useBackslashAsYenSymbol(useBackslashAsYenSignForFamily(fd.firstFamily()))
</span><span class="cx">     , m_enableKerning(computeEnableKerning())
</span><del>-    , m_enableLigatures(computeEnableKerning())
</del><ins>+    , m_requiresShaping(computeRequiresShaping())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     , m_wordSpacing(0)
</span><span class="cx">     , m_useBackslashAsYenSymbol(false)
</span><span class="cx">     , m_enableKerning(computeEnableKerning())
</span><del>-    , m_enableLigatures(computeEnableKerning())
</del><ins>+    , m_requiresShaping(computeRequiresShaping())
</ins><span class="cx"> {
</span><span class="cx">     m_fontDescription.setFontSmoothing(fontSmoothingMode);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">     , m_wordSpacing(other.m_wordSpacing)
</span><span class="cx">     , m_useBackslashAsYenSymbol(other.m_useBackslashAsYenSymbol)
</span><span class="cx">     , m_enableKerning(computeEnableKerning())
</span><del>-    , m_enableLigatures(computeEnableKerning())
</del><ins>+    , m_requiresShaping(computeRequiresShaping())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">     m_wordSpacing = other.m_wordSpacing;
</span><span class="cx">     m_useBackslashAsYenSymbol = other.m_useBackslashAsYenSymbol;
</span><span class="cx">     m_enableKerning = other.m_enableKerning;
</span><del>-    m_enableLigatures = other.m_enableLigatures;
</del><ins>+    m_requiresShaping = other.m_requiresShaping;
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">     m_fonts = retrieveOrAddCachedFonts(m_fontDescription, WTF::move(fontSelector));
</span><span class="cx">     m_useBackslashAsYenSymbol = useBackslashAsYenSignForFamily(firstFamily());
</span><span class="cx">     m_enableKerning = computeEnableKerning();
</span><del>-    m_enableLigatures = computeEnableLigatures();
</del><ins>+    m_requiresShaping = computeRequiresShaping();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> float FontCascade::drawText(GraphicsContext&amp; context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || requiresShaping()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || requiresShaping()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -357,9 +357,8 @@
</span><span class="cx">             glyphOverflow = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool hasKerningOrLigatures = enableKerning() || enableLigatures();
</del><span class="cx">     bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
</span><del>-    float* cacheEntry = m_fonts-&gt;widthCache().add(run, std::numeric_limits&lt;float&gt;::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
</del><ins>+    float* cacheEntry = m_fonts-&gt;widthCache().add(run, std::numeric_limits&lt;float&gt;::quiet_NaN(), enableKerning() || requiresShaping(), hasWordSpacingOrLetterSpacing, glyphOverflow);
</ins><span class="cx">     if (cacheEntry &amp;&amp; !std::isnan(*cacheEntry))
</span><span class="cx">         return *cacheEntry;
</span><span class="cx"> 
</span><span class="lines">@@ -509,7 +508,7 @@
</span><span class="cx"> 
</span><span class="cx">     CodePath codePathToUse = codePath(run);
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || requiresShaping()) &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</ins><span class="cx">         codePathToUse = Complex;
</span><span class="cx"> 
</span><span class="cx">     if (codePathToUse != Complex)
</span><span class="lines">@@ -521,7 +520,7 @@
</span><span class="cx"> int FontCascade::offsetForPosition(const TextRun&amp; run, float x, bool includePartialGlyphs) const
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
</span><del>-    if (codePath(run) != Complex &amp;&amp; (!(enableKerning() || enableLigatures()) || isDrawnWithSVGFont(run)))
</del><ins>+    if (codePath(run) != Complex &amp;&amp; (!(enableKerning() || requiresShaping()) || isDrawnWithSVGFont(run)))
</ins><span class="cx">         return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
</span><span class="cx"> 
</span><span class="cx">     return offsetForPositionForComplexText(run, x, includePartialGlyphs);
</span><span class="lines">@@ -594,12 +593,12 @@
</span><span class="cx">         return Simple;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    // FIXME: This shouldn't be necessary because Font::applyTransforms() should perform all necessary shaping.
</del><ins>+    // Because Font::applyTransforms() doesn't know which features to enable/disable it the simple code path can’t properly handle feature or variant settings.
</ins><span class="cx">     if (m_fontDescription.featureSettings().size() &gt; 0 || !m_fontDescription.variantSettings().isAllNormal())
</span><span class="cx">         return Complex;
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><del>-    if (run.length() &gt; 1 &amp;&amp; (enableKerning() || enableLigatures()))
</del><ins>+    if (run.length() &gt; 1 &amp;&amp; (enableKerning() || requiresShaping()))
</ins><span class="cx">         return Complex;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -1421,7 +1420,7 @@
</span><span class="cx"> {
</span><span class="cx">     WidthIterator it(this, run, fallbackFonts, glyphOverflow);
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><del>-    it.advance(run.length(), (enableKerning() || enableLigatures()) ? &amp;glyphBuffer : nullptr);
</del><ins>+    it.advance(run.length(), (enableKerning() || requiresShaping()) ? &amp;glyphBuffer : nullptr);
</ins><span class="cx"> 
</span><span class="cx">     if (glyphOverflow) {
</span><span class="cx">         glyphOverflow-&gt;top = std::max&lt;int&gt;(glyphOverflow-&gt;top, ceilf(-it.minGlyphBoundingBoxY()) - (glyphOverflow-&gt;computeBounds ? 0 : fontMetrics().ascent()));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     FontRenderingMode renderingMode() const { return m_fontDescription.renderingMode(); }
</span><span class="cx"> 
</span><span class="cx">     bool enableKerning() const { return m_enableKerning; }
</span><del>-    bool enableLigatures() const { return m_enableLigatures; }
</del><ins>+    bool requiresShaping() const { return m_requiresShaping; }
</ins><span class="cx"> 
</span><span class="cx">     const AtomicString&amp; firstFamily() const { return m_fontDescription.firstFamily(); }
</span><span class="cx">     unsigned familyCount() const { return m_fontDescription.familyCount(); }
</span><span class="lines">@@ -321,13 +321,12 @@
</span><span class="cx">         return advancedTextRenderingMode();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool computeEnableLigatures() const
</del><ins>+    bool computeRequiresShaping() const
</ins><span class="cx">     {
</span><del>-        auto ligatures = m_fontDescription.variantCommonLigatures();
-        if (ligatures == FontVariantLigatures::Yes)
</del><ins>+        if (!m_fontDescription.variantSettings().isAllNormal())
</ins><span class="cx">             return true;
</span><del>-        if (ligatures == FontVariantLigatures::No)
-            return false;
</del><ins>+        if (m_fontDescription.featureSettings().size())
+            return true;
</ins><span class="cx">         return advancedTextRenderingMode();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -338,7 +337,7 @@
</span><span class="cx">     float m_wordSpacing;
</span><span class="cx">     mutable bool m_useBackslashAsYenSymbol;
</span><span class="cx">     mutable unsigned m_enableKerning : 1; // Computed from m_fontDescription.
</span><del>-    mutable unsigned m_enableLigatures : 1; // Computed from m_fontDescription.
</del><ins>+    mutable unsigned m_requiresShaping : 1; // Computed from m_fontDescription.
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> void invalidateFontCascadeCache();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     , m_fallbackFonts(fallbackFonts)
</span><span class="cx">     , m_accountForGlyphBounds(accountForGlyphBounds)
</span><span class="cx">     , m_enableKerning(font-&gt;enableKerning())
</span><del>-    , m_enableLigatures(font-&gt;enableLigatures())
</del><ins>+    , m_requiresShaping(font-&gt;requiresShaping())
</ins><span class="cx">     , m_forTextEmphasis(forTextEmphasis)
</span><span class="cx"> {
</span><span class="cx">     // If the padding is non-zero, count the number of spaces in the run
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (glyphBuffer &amp;&amp; glyphBuffer-&gt;size() == (lastGlyphCount + 1) &amp;&amp; isSoftBankEmoji(previousCharacter))
</span><span class="cx">         return TransformsType::Forced;
</span><del>-    if (m_run.length() &lt;= 1 || !(m_enableKerning || m_enableLigatures))
</del><ins>+    if (m_run.length() &lt;= 1 || !(m_enableKerning || m_requiresShaping))
</ins><span class="cx">         return TransformsType::None;
</span><span class="cx">     return TransformsType::NotForced;
</span><span class="cx"> }
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx">         }
</span><span class="cx">     } else
</span><span class="cx"> #endif
</span><del>-        font-&gt;applyTransforms(glyphBuffer-&gt;glyphs(lastGlyphCount), advances + lastGlyphCount, glyphBufferSize - lastGlyphCount, m_enableKerning, m_enableLigatures);
</del><ins>+        font-&gt;applyTransforms(glyphBuffer-&gt;glyphs(lastGlyphCount), advances + lastGlyphCount, glyphBufferSize - lastGlyphCount, m_enableKerning, m_requiresShaping);
</ins><span class="cx"> 
</span><span class="cx">     if (!ltr)
</span><span class="cx">         glyphBuffer-&gt;reverse(lastGlyphCount, glyphBufferSize - lastGlyphCount);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.h (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     HashSet&lt;const Font*&gt;* m_fallbackFonts { nullptr };
</span><span class="cx">     bool m_accountForGlyphBounds { false };
</span><span class="cx">     bool m_enableKerning { false };
</span><del>-    bool m_enableLigatures { false };
</del><ins>+    bool m_requiresShaping { false };
</ins><span class="cx">     bool m_forTextEmphasis { false };
</span><span class="cx">     float m_maxGlyphBoundingBoxY { std::numeric_limits&lt;float&gt;::min() };
</span><span class="cx">     float m_minGlyphBoundingBoxY { std::numeric_limits&lt;float&gt;::max() };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -321,13 +321,29 @@
</span><span class="cx"> 
</span><span class="cx"> RetainPtr&lt;CTFontRef&gt; preparePlatformFont(CTFontRef originalFont, TextRenderingMode textRenderingMode, const FontFeatureSettings&amp; features, const FontVariantSettings&amp; variantSettings)
</span><span class="cx"> {
</span><del>-    if (!originalFont || (!features.size() &amp;&amp; (textRenderingMode != OptimizeLegibility) &amp;&amp; variantSettings.isAllNormal()))
</del><ins>+    if (!originalFont || (!features.size() &amp;&amp; (textRenderingMode == AutoTextRendering) &amp;&amp; variantSettings.isAllNormal()))
</ins><span class="cx">         return originalFont;
</span><span class="cx"> 
</span><del>-    // FIXME: We don't consult with the @font-face first, like the spec says we should.
</del><ins>+    // This algorithm is described at http://www.w3.org/TR/css3-fonts/#feature-precedence
</ins><span class="cx"> 
</span><del>-    // Spec says that font-feature-settings should override font-variant-*.
</del><ins>+    // Step 1: CoreText handles default features (such as required ligatures).
+
+    // Steps 2-3: Consult with @font-face
+    // FIXME: This is not yet implemented.
+
+    // Step 4: Font-variant
</ins><span class="cx">     auto fontFeatureSettingsFromVariants = computeFeatureSettingsFromVariants(variantSettings);
</span><ins>+
+    // Step 5: Other properties (text-rendering)
+    if (textRenderingMode == OptimizeSpeed) {
+        fontFeatureSettingsFromVariants.set(fontFeatureTag(&quot;liga&quot;), 0);
+        fontFeatureSettingsFromVariants.set(fontFeatureTag(&quot;clig&quot;), 0);
+        fontFeatureSettingsFromVariants.set(fontFeatureTag(&quot;dlig&quot;), 0);
+        fontFeatureSettingsFromVariants.set(fontFeatureTag(&quot;hlig&quot;), 0);
+        fontFeatureSettingsFromVariants.set(fontFeatureTag(&quot;calt&quot;), 0);
+    }
+
+    // Step 6: Font-feature-settings
</ins><span class="cx">     for (auto&amp; newFeature : features)
</span><span class="cx">         fontFeatureSettingsFromVariants.set(newFeature.tag(), newFeature.value());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CFTypeRef&gt; fontEqualityObject = platformData().objectForEqualityCheck();
</span><span class="cx"> 
</span><del>-    ProviderInfo info = { characters, length, getCFStringAttributes(false, false, platformData().orientation()) };
</del><ins>+    ProviderInfo info = { characters, length, getCFStringAttributes(false, platformData().orientation()) };
</ins><span class="cx">     RetainPtr&lt;CTLineRef&gt; line = adoptCF(CTLineCreateWithUniCharProvider(&amp;provideStringAndAttributes, 0, &amp;info));
</span><span class="cx"> 
</span><span class="cx">     CFArrayRef runArray = CTLineGetGlyphRuns(line.get());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> 
</span><span class="cx">         RetainPtr&lt;WebCascadeList&gt; cascadeList = adoptNS([[WebCascadeList alloc] initWithFont:&amp;m_font character:baseCharacter]);
</span><span class="cx"> 
</span><del>-        stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font-&gt;getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), font-&gt;platformData().orientation())));
</del><ins>+        stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font-&gt;getCFStringAttributes(m_font.enableKerning(), font-&gt;platformData().orientation())));
</ins><span class="cx">         static const void* attributeKeys[] = { kCTFontCascadeListAttribute };
</span><span class="cx">         const void* values[] = { cascadeList.get() };
</span><span class="cx">         RetainPtr&lt;CFDictionaryRef&gt; attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, attributeKeys, values, sizeof(attributeKeys) / sizeof(*attributeKeys), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx">         RetainPtr&lt;CTFontRef&gt; fontWithCascadeList = adoptCF(CTFontCreateCopyWithAttributes(font-&gt;platformData().ctFont(), m_font.pixelSize(), 0, fontDescriptor.get()));
</span><span class="cx">         CFDictionarySetValue(const_cast&lt;CFMutableDictionaryRef&gt;(stringAttributes.get()), kCTFontAttributeName, fontWithCascadeList.get());
</span><span class="cx">     } else
</span><del>-        stringAttributes = font-&gt;getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), font-&gt;platformData().orientation());
</del><ins>+        stringAttributes = font-&gt;getCFStringAttributes(m_font.enableKerning(), font-&gt;platformData().orientation());
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CTLineRef&gt; line;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacSimpleFontDataCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-CFDictionaryRef Font::getCFStringAttributes(bool enableKerning, bool enableLigatures, FontOrientation orientation) const
</del><ins>+CFDictionaryRef Font::getCFStringAttributes(bool enableKerning, FontOrientation orientation) const
</ins><span class="cx"> {
</span><del>-    unsigned key = (enableKerning &lt;&lt; 1 | enableLigatures) + 1;
</del><ins>+    unsigned key = static_cast&lt;unsigned&gt;(enableKerning) + 1;
</ins><span class="cx">     HashMap&lt;unsigned, RetainPtr&lt;CFDictionaryRef&gt;&gt;::AddResult addResult = m_CFStringAttributes.add(key, RetainPtr&lt;CFDictionaryRef&gt;());
</span><span class="cx">     RetainPtr&lt;CFDictionaryRef&gt;&amp; attributesDictionary = addResult.iterator-&gt;value;
</span><span class="cx">     if (!addResult.isNewEntry)
</span><span class="lines">@@ -54,12 +54,6 @@
</span><span class="cx">         CFDictionarySetValue(mutableAttributes, kCTKernAttributeName, zeroKerningValue);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!enableLigatures) {
-        const int zero = 0;
-        static CFNumberRef essentialLigaturesValue = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &amp;zero);
-        CFDictionarySetValue(mutableAttributes, kCTLigatureAttributeName, essentialLigaturesValue);
-    }
-
</del><span class="cx">     if (orientation == Vertical)
</span><span class="cx">         CFDictionarySetValue(mutableAttributes, kCTVerticalFormsAttributeName, kCFBooleanTrue);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.h (191330 => 191331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.h        2015-10-20 04:22:59 UTC (rev 191330)
+++ trunk/Source/WebCore/svg/SVGFontData.h        2015-10-20 04:55:27 UTC (rev 191331)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     bool fillBMPGlyphs(SVGFontElement*, GlyphPage*, UChar* buffer) const;
</span><span class="cx">     bool fillNonBMPGlyphs(SVGFontElement*, GlyphPage*, UChar* buffer) const;
</span><span class="cx"> 
</span><del>-    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, bool enableKerning, bool enableLigatures) const = delete;
</del><ins>+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, bool enableKerning, bool requiresShaping) const = delete;
</ins><span class="cx"> 
</span><span class="cx">     // Ths SVGFontFaceElement is kept alive --
</span><span class="cx">     // 1) in the external font case: by the CSSFontFaceSource, which holds a reference to the external SVG document
</span></span></pre>
</div>
</div>

</body>
</html>