<!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>[191014] trunk/Source</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/191014">191014</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-10-13 16:40:38 -0700 (Tue, 13 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Split TypesettingFeatures into kerning and ligatures bools
https://bugs.webkit.org/show_bug.cgi?id=150074

Reviewed by Simon Fraser.

Source/WebCore:

Our TypesettingFeatures type represents whether kerning or ligatures are enabled
when laying out text. However, now that I have implemented font-feature-settings
and font-variant-*, this type is wildly inadequate. There are now multiple kinds
of ligatures, and many other features which are neither kerning nor ligatures.
Adding tons of information to this type doesn't make sense because 1) We already
have a FontVariantSettings struct which contains this information, and 2) None
of the users of TypesettingFeatures care about most of these new features.

In this new world of font features, the font-kerning property isn't changing.
Therefore, all the code which relies only on the Kerning value in
TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
however, need to be updated to understand that there are many different kinds
of ligatures.

Indeed, after inspection, all of the places which inspect ligatures are more
interested in a high-level concept of whether or not we can trust some simple
computation. Therefore, we really have two things we care about: Kerning, and
this high-level concept.

This patch is the second step to update our view of the world to include
font-feature-settings and font-variant-*. In particular, this patch simply
splits TypesettingFeatures into two Booleans, one for Kerning, and one for
Ligatures (which has no behavior change). Then, once they are separated, I can
migrate the Ligatures Boolean to take on its new meaning.

This change is purely mechanical.

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
* 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::setDefaultKerning):
(WebCore::FontCascade::setDefaultLigatures):
(WebCore::FontCascade::codePath):
(WebCore::FontCascade::floatWidthForSimpleText):
(WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
(WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::enableKerning):
(WebCore::FontCascade::enableLigatures):
(WebCore::FontCascade::computeEnableKerning):
(WebCore::FontCascade::computeEnableLigatures):
(WebCore::FontCascade::typesettingFeatures): Deleted.
(WebCore::FontCascade::computeTypesettingFeatures): Deleted.
* platform/graphics/FontDescription.cpp:
(WebCore::FontCascadeDescription::FontCascadeDescription):
* platform/graphics/FontDescription.h:
(WebCore::FontCascadeDescription::setKerning):
(WebCore::FontCascadeDescription::initialKerning):
* platform/graphics/TypesettingFeatures.h: Removed.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/WidthIterator.h:
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::canRenderCombiningCharacterSequence):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
* rendering/line/BreakingContext.h:
(WebCore::WordTrailingSpace::width):
* svg/SVGFontData.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView initialize]):

Source/WebKit2:

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</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="#trunkSourceWebCoreplatformgraphicsFontDescriptioncpp">trunk/Source/WebCore/platform/graphics/FontDescription.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDescriptionh">trunk/Source/WebCore/platform/graphics/FontDescription.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="#trunkSourceWebCoreplatformgraphicscocoaFontCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</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="#trunkSourceWebCoreplatformtextTextFlagsh">trunk/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderinglineBreakingContexth">trunk/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatah">trunk/Source/WebCore/svg/SVGFontData.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm">trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsTypesettingFeaturesh">trunk/Source/WebCore/platform/graphics/TypesettingFeatures.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/ChangeLog        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -1,3 +1,91 @@
</span><ins>+2015-10-13  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Split TypesettingFeatures into kerning and ligatures bools
+        https://bugs.webkit.org/show_bug.cgi?id=150074
+
+        Reviewed by Simon Fraser.
+
+        Our TypesettingFeatures type represents whether kerning or ligatures are enabled
+        when laying out text. However, now that I have implemented font-feature-settings
+        and font-variant-*, this type is wildly inadequate. There are now multiple kinds
+        of ligatures, and many other features which are neither kerning nor ligatures.
+        Adding tons of information to this type doesn't make sense because 1) We already
+        have a FontVariantSettings struct which contains this information, and 2) None
+        of the users of TypesettingFeatures care about most of these new features.
+
+        In this new world of font features, the font-kerning property isn't changing.
+        Therefore, all the code which relies only on the Kerning value in
+        TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
+        however, need to be updated to understand that there are many different kinds
+        of ligatures.
+
+        Indeed, after inspection, all of the places which inspect ligatures are more
+        interested in a high-level concept of whether or not we can trust some simple
+        computation. Therefore, we really have two things we care about: Kerning, and
+        this high-level concept.
+
+        This patch is the second step to update our view of the world to include
+        font-feature-settings and font-variant-*. In particular, this patch simply
+        splits TypesettingFeatures into two Booleans, one for Kerning, and one for
+        Ligatures (which has no behavior change). Then, once they are separated, I can
+        migrate the Ligatures Boolean to take on its new meaning.
+
+        This change is purely mechanical.
+
+        No new tests because there is no behavior change.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
+        * 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::setDefaultKerning):
+        (WebCore::FontCascade::setDefaultLigatures):
+        (WebCore::FontCascade::codePath):
+        (WebCore::FontCascade::floatWidthForSimpleText):
+        (WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
+        (WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
+        * platform/graphics/FontCascade.h:
+        (WebCore::FontCascade::enableKerning):
+        (WebCore::FontCascade::enableLigatures):
+        (WebCore::FontCascade::computeEnableKerning):
+        (WebCore::FontCascade::computeEnableLigatures):
+        (WebCore::FontCascade::typesettingFeatures): Deleted.
+        (WebCore::FontCascade::computeTypesettingFeatures): Deleted.
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::FontCascadeDescription::FontCascadeDescription):
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontCascadeDescription::setKerning):
+        (WebCore::FontCascadeDescription::initialKerning):
+        * platform/graphics/TypesettingFeatures.h: Removed.
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::WidthIterator):
+        (WebCore::WidthIterator::applyFontTransforms):
+        (WebCore::WidthIterator::advanceInternal):
+        * platform/graphics/WidthIterator.h:
+        * platform/graphics/cocoa/FontCocoa.mm:
+        (WebCore::Font::canRenderCombiningCharacterSequence):
+        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
+        (WebCore::Font::getCFStringAttributes):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::setLogicalWidthForTextRun):
+        * rendering/line/BreakingContext.h:
+        (WebCore::WordTrailingSpace::width):
+        * svg/SVGFontData.h:
+
</ins><span class="cx"> 2015-10-13  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Anonymous table objects: inline parent box requires inline-table child.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -1422,7 +1422,6 @@
</span><span class="cx">                 37C236101097EE7700EF9F72 /* ComplexTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */; };
</span><span class="cx">                 37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */; };
</span><span class="cx">                 37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */; };
</span><del>-                37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */; };
</span><span class="cx">                 37D456FD1A9A50D8003330A1 /* LocalizableStrings.pm in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 37D456FB1A9A50B6003330A1 /* LocalizableStrings.pm */; };
</span><span class="cx">                 37DDCD9413844FD50008B793 /* MIMEHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37DDCD9213844FD50008B793 /* MIMEHeader.cpp */; };
</span><span class="lines">@@ -8733,7 +8732,6 @@
</span><span class="cx">                 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ComplexTextControllerCoreText.mm; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><del>-                37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicStringKeyedMRUCache.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37D456FB1A9A50B6003330A1 /* LocalizableStrings.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = LocalizableStrings.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37DDCD9213844FD50008B793 /* MIMEHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MIMEHeader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21467,7 +21465,6 @@
</span><span class="cx">                                 CDD1E525167BA56400CE820B /* TextTrackRepresentation.h */,
</span><span class="cx">                                 1AF89A411518FDEA00E547B5 /* TiledBacking.h */,
</span><span class="cx">                                 BE913D7F181EF8E500DCB09E /* TrackPrivateBase.h */,
</span><del>-                                37C28A6710F659CC008C7813 /* TypesettingFeatures.h */,
</del><span class="cx">                                 E4AFCFA40DAF29A300F5F55C /* UnitBezier.h */,
</span><span class="cx">                                 BEF29EEA1715DD0900C4B4C9 /* VideoTrackPrivate.h */,
</span><span class="cx">                                 1411DCB0164C39A800D49BC1 /* WidthCache.h */,
</span><span class="lines">@@ -27616,7 +27613,6 @@
</span><span class="cx">                                 2D232C001A326F02006BF2DB /* TUCallSPI.h in Headers */,
</span><span class="cx">                                 C375D7FE16639519006184AB /* TypeAhead.h in Headers */,
</span><span class="cx">                                 E46A2B1C17CA65B9000DBCD8 /* TypedElementDescendantIterator.h in Headers */,
</span><del>-                                37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */,
</del><span class="cx">                                 93309E1A099E64920056E581 /* TypingCommand.h in Headers */,
</span><span class="cx">                                 31DF63591AF194F00078FD91 /* UIColorSPI.h in Headers */,
</span><span class="cx">                                 85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -3438,18 +3438,18 @@
</span><span class="cx">     return PE_ALL;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(FontCascadeDescription::Kerning kerning)
</del><ins>+template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(Kerning kerning)
</ins><span class="cx">     : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="cx">     m_primitiveUnitType = CSS_VALUE_ID;
</span><span class="cx">     switch (kerning) {
</span><del>-    case FontCascadeDescription::AutoKerning:
</del><ins>+    case Kerning::Auto:
</ins><span class="cx">         m_value.valueID = CSSValueAuto;
</span><span class="cx">         return;
</span><del>-    case FontCascadeDescription::NormalKerning:
</del><ins>+    case Kerning::Normal:
</ins><span class="cx">         m_value.valueID = CSSValueNormal;
</span><span class="cx">         return;
</span><del>-    case FontCascadeDescription::NoneKerning:
</del><ins>+    case Kerning::NoShift:
</ins><span class="cx">         m_value.valueID = CSSValueNone;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -3458,23 +3458,23 @@
</span><span class="cx">     m_value.valueID = CSSValueAuto;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::operator FontCascadeDescription::Kerning() const
</del><ins>+template&lt;&gt; inline CSSPrimitiveValue::operator Kerning() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isValueID());
</span><span class="cx"> 
</span><span class="cx">     switch (m_value.valueID) {
</span><span class="cx">     case CSSValueAuto:
</span><del>-        return FontCascadeDescription::AutoKerning;
</del><ins>+        return Kerning::Auto;
</ins><span class="cx">     case CSSValueNormal:
</span><del>-        return FontCascadeDescription::NormalKerning;
</del><ins>+        return Kerning::Normal;
</ins><span class="cx">     case CSSValueNone:
</span><del>-        return FontCascadeDescription::NoneKerning;
</del><ins>+        return Kerning::NoShift;
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><del>-    return FontCascadeDescription::AutoKerning;
</del><ins>+    return Kerning::Auto;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(ObjectFit fit)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -371,18 +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, TypesettingFeatures typesettingFeatures) const
</del><ins>+bool Font::applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, bool enableKerning, bool enableLigatures) 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 = (typesettingFeatures &amp; Kerning ? kCTFontTransformApplyPositioning : 0) | (typesettingFeatures &amp; Ligatures ? kCTFontTransformApplyShaping : 0);
</del><ins>+    CTFontTransformOptions options = (enableKerning ? kCTFontTransformApplyPositioning : 0) | (enableLigatures ? 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><del>-    UNUSED_PARAM(typesettingFeatures);
</del><ins>+    UNUSED_PARAM(enableKerning);
+    UNUSED_PARAM(enableLigatures);
</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 (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #if ENABLE(OPENTYPE_VERTICAL)
</span><span class="cx"> #include &quot;OpenTypeVerticalData.h&quot;
</span><span class="cx"> #endif
</span><del>-#include &quot;TypesettingFeatures.h&quot;
</del><span class="cx"> #include &lt;wtf/TypeCasts.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -193,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(TypesettingFeatures, FontOrientation) const;
</del><ins>+    CFDictionaryRef getCFStringAttributes(bool enableKerning, bool enableLigatures, FontOrientation) const;
</ins><span class="cx">     bool hasCustomTracking() const { return isSystemFont(); }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -201,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, TypesettingFeatures) const;
</del><ins>+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, bool enableKerning, bool enableLigatures) 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 (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -92,7 +92,8 @@
</span><span class="cx"> 
</span><span class="cx"> FontCascade::CodePath FontCascade::s_codePath = Auto;
</span><span class="cx"> 
</span><del>-TypesettingFeatures FontCascade::s_defaultTypesettingFeatures = 0;
</del><ins>+bool FontCascade::s_defaultKerning = false;
+bool FontCascade::s_defaultLigatures = false;
</ins><span class="cx"> 
</span><span class="cx"> // ============================================================================================
</span><span class="cx"> // FontCascade Implementation (Cross-Platform Portion)
</span><span class="lines">@@ -103,7 +104,8 @@
</span><span class="cx">     , m_letterSpacing(0)
</span><span class="cx">     , m_wordSpacing(0)
</span><span class="cx">     , m_useBackslashAsYenSymbol(false)
</span><del>-    , m_typesettingFeatures(0)
</del><ins>+    , m_enableKerning(false)
+    , m_enableLigatures(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -113,7 +115,8 @@
</span><span class="cx">     , m_letterSpacing(letterSpacing)
</span><span class="cx">     , m_wordSpacing(wordSpacing)
</span><span class="cx">     , m_useBackslashAsYenSymbol(useBackslashAsYenSignForFamily(fd.firstFamily()))
</span><del>-    , m_typesettingFeatures(computeTypesettingFeatures())
</del><ins>+    , m_enableKerning(computeEnableKerning())
+    , m_enableLigatures(computeEnableKerning())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -124,7 +127,8 @@
</span><span class="cx">     , m_letterSpacing(0)
</span><span class="cx">     , m_wordSpacing(0)
</span><span class="cx">     , m_useBackslashAsYenSymbol(false)
</span><del>-    , m_typesettingFeatures(computeTypesettingFeatures())
</del><ins>+    , m_enableKerning(computeEnableKerning())
+    , m_enableLigatures(computeEnableKerning())
</ins><span class="cx"> {
</span><span class="cx">     m_fontDescription.setFontSmoothing(fontSmoothingMode);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -142,7 +146,8 @@
</span><span class="cx">     , m_letterSpacing(other.m_letterSpacing)
</span><span class="cx">     , m_wordSpacing(other.m_wordSpacing)
</span><span class="cx">     , m_useBackslashAsYenSymbol(other.m_useBackslashAsYenSymbol)
</span><del>-    , m_typesettingFeatures(computeTypesettingFeatures())
</del><ins>+    , m_enableKerning(computeEnableKerning())
+    , m_enableLigatures(computeEnableKerning())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -153,7 +158,8 @@
</span><span class="cx">     m_letterSpacing = other.m_letterSpacing;
</span><span class="cx">     m_wordSpacing = other.m_wordSpacing;
</span><span class="cx">     m_useBackslashAsYenSymbol = other.m_useBackslashAsYenSymbol;
</span><del>-    m_typesettingFeatures = other.m_typesettingFeatures;
</del><ins>+    m_enableKerning = other.m_enableKerning;
+    m_enableLigatures = other.m_enableLigatures;
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -298,7 +304,8 @@
</span><span class="cx"> {
</span><span class="cx">     m_fonts = retrieveOrAddCachedFonts(m_fontDescription, WTF::move(fontSelector));
</span><span class="cx">     m_useBackslashAsYenSymbol = useBackslashAsYenSignForFamily(firstFamily());
</span><del>-    m_typesettingFeatures = computeTypesettingFeatures();
</del><ins>+    m_enableKerning = computeEnableKerning();
+    m_enableLigatures = computeEnableLigatures();
</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">@@ -313,7 +320,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; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &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">@@ -332,7 +339,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; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &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">@@ -353,7 +360,7 @@
</span><span class="cx">             glyphOverflow = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool hasKerningOrLigatures = typesettingFeatures() &amp; (Kerning | Ligatures);
</del><ins>+    bool hasKerningOrLigatures = enableKerning() || enableLigatures();
</ins><span class="cx">     bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
</span><span class="cx">     float* cacheEntry = m_fonts-&gt;widthCache().add(run, std::numeric_limits&lt;float&gt;::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
</span><span class="cx">     if (cacheEntry &amp;&amp; !std::isnan(*cacheEntry))
</span><span class="lines">@@ -505,7 +512,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; typesettingFeatures() &amp;&amp; (from || static_cast&lt;unsigned&gt;(to) != run.length()) &amp;&amp; !isDrawnWithSVGFont(run))
</del><ins>+    if (codePathToUse != Complex &amp;&amp; (enableKerning() || enableLigatures()) &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">@@ -517,7 +524,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; (!typesettingFeatures() || isDrawnWithSVGFont(run)))
</del><ins>+    if (codePath(run) != Complex &amp;&amp; (!(enableKerning() || enableLigatures()) || 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">@@ -580,14 +587,14 @@
</span><span class="cx">     return s_codePath;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FontCascade::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures)
</del><ins>+void FontCascade::setDefaultKerning(bool enable)
</ins><span class="cx"> {
</span><del>-    s_defaultTypesettingFeatures = typesettingFeatures;
</del><ins>+    s_defaultKerning = enable;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TypesettingFeatures FontCascade::defaultTypesettingFeatures()
</del><ins>+void FontCascade::setDefaultLigatures(bool enable)
</ins><span class="cx"> {
</span><del>-    return s_defaultTypesettingFeatures;
</del><ins>+    s_defaultLigatures = enable;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FontCascade::CodePath FontCascade::codePath(const TextRun&amp; run) const
</span><span class="lines">@@ -605,7 +612,7 @@
</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; typesettingFeatures())
</del><ins>+    if (run.length() &gt; 1 &amp;&amp; (enableKerning() || enableLigatures()))
</ins><span class="cx">         return Complex;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -1427,7 +1434,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(), (typesettingFeatures() &amp; (Kerning | Ligatures)) ? &amp;glyphBuffer : 0);
</del><ins>+    it.advance(run.length(), (enableKerning() || enableLigatures()) ? &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 (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;FontDescription.h&quot;
</span><span class="cx"> #include &quot;Path.h&quot;
</span><span class="cx"> #include &quot;TextFlags.h&quot;
</span><del>-#include &quot;TypesettingFeatures.h&quot;
</del><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/WeakPtr.h&gt;
</span><span class="lines">@@ -158,7 +157,8 @@
</span><span class="cx">     
</span><span class="cx">     FontRenderingMode renderingMode() const { return m_fontDescription.renderingMode(); }
</span><span class="cx"> 
</span><del>-    TypesettingFeatures typesettingFeatures() const { return static_cast&lt;TypesettingFeatures&gt;(m_typesettingFeatures); }
</del><ins>+    bool enableKerning() const { return m_enableKerning; }
+    bool enableLigatures() const { return m_enableLigatures; }
</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">@@ -265,9 +265,8 @@
</span><span class="cx">     static CodePath codePath();
</span><span class="cx">     static CodePath s_codePath;
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT static void setDefaultTypesettingFeatures(TypesettingFeatures);
-    static TypesettingFeatures defaultTypesettingFeatures();
-
</del><ins>+    WEBCORE_EXPORT static void setDefaultKerning(bool);
+    WEBCORE_EXPORT static void setDefaultLigatures(bool);
</ins><span class="cx">     static const uint8_t s_roundingHackCharacterTable[256];
</span><span class="cx">     static bool isRoundingHackCharacter(UChar32 c)
</span><span class="cx">     {
</span><span class="lines">@@ -300,49 +299,38 @@
</span><span class="cx"> private:
</span><span class="cx">     bool isLoadingCustomFonts() const;
</span><span class="cx"> 
</span><del>-    TypesettingFeatures computeTypesettingFeatures() const
</del><ins>+    bool advancedTextRenderingMode() const
</ins><span class="cx">     {
</span><del>-        TextRenderingMode textRenderingMode = m_fontDescription.textRenderingMode();
-        TypesettingFeatures features = s_defaultTypesettingFeatures;
</del><ins>+        auto textRenderingMode = m_fontDescription.textRenderingMode();
+        if (textRenderingMode == GeometricPrecision || textRenderingMode == OptimizeLegibility)
+            return true;
+        if (textRenderingMode == OptimizeSpeed)
+            return false;
+        return s_defaultKerning;
+    }
</ins><span class="cx"> 
</span><del>-        switch (textRenderingMode) {
-        case AutoTextRendering:
-            break;
-        case OptimizeSpeed:
-            features &amp;= ~(Kerning | Ligatures);
-            break;
-        case GeometricPrecision:
-        case OptimizeLegibility:
-            features |= Kerning | Ligatures;
-            break;
-        }
</del><ins>+    bool computeEnableKerning() const
+    {
+        auto kerning = m_fontDescription.kerning();
+        if (kerning == Kerning::Normal)
+            return true;
+        if (kerning == Kerning::NoShift)
+            return false;
+        return advancedTextRenderingMode();
+    }
</ins><span class="cx"> 
</span><del>-        switch (m_fontDescription.kerning()) {
-        case FontCascadeDescription::NoneKerning:
-            features &amp;= ~Kerning;
-            break;
-        case FontCascadeDescription::NormalKerning:
-            features |= Kerning;
-            break;
-        case FontCascadeDescription::AutoKerning:
-            break;
-        }
-
-        switch (m_fontDescription.variantCommonLigatures()) {
-        case FontVariantLigatures::No:
-            features &amp;= ~Ligatures;
-            break;
-        case FontVariantLigatures::Yes:
-            features |= Ligatures;
-            break;
-        default:
-            break;
-        }
-
-        return features;
</del><ins>+    bool computeEnableLigatures() const
+    {
+        auto ligatures = m_fontDescription.variantCommonLigatures();
+        if (ligatures == FontVariantLigatures::Yes)
+            return true;
+        if (ligatures == FontVariantLigatures::No)
+            return false;
+        return advancedTextRenderingMode();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static TypesettingFeatures s_defaultTypesettingFeatures;
</del><ins>+    static bool s_defaultKerning;
+    static bool s_defaultLigatures;
</ins><span class="cx"> 
</span><span class="cx">     FontCascadeDescription m_fontDescription;
</span><span class="cx">     mutable RefPtr&lt;FontCascadeFonts&gt; m_fonts;
</span><span class="lines">@@ -350,7 +338,8 @@
</span><span class="cx">     float m_letterSpacing;
</span><span class="cx">     float m_wordSpacing;
</span><span class="cx">     mutable bool m_useBackslashAsYenSymbol;
</span><del>-    mutable unsigned m_typesettingFeatures : 2; // (TypesettingFeatures) Caches values computed from m_fontDescription.
</del><ins>+    mutable unsigned m_enableKerning : 1; // Computed from m_fontDescription.
+    mutable unsigned m_enableLigatures : 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="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx"> FontCascadeDescription::FontCascadeDescription()
</span><span class="cx">     : m_isAbsoluteSize(false)
</span><del>-    , m_kerning(AutoKerning)
</del><ins>+    , m_kerning(static_cast&lt;unsigned&gt;(Kerning::Auto))
</ins><span class="cx">     , m_keywordSize(0)
</span><span class="cx">     , m_fontSmoothing(AutoSmoothing)
</span><span class="cx">     , m_isSpecifiedFont(false)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -192,8 +192,6 @@
</span><span class="cx"> // FIXME: Move to a file of its own.
</span><span class="cx"> class FontCascadeDescription : public FontDescription {
</span><span class="cx"> public:
</span><del>-    enum Kerning { AutoKerning, NormalKerning, NoneKerning };
-
</del><span class="cx">     FontCascadeDescription();
</span><span class="cx"> 
</span><span class="cx">     bool operator==(const FontCascadeDescription&amp;) const;
</span><span class="lines">@@ -228,7 +226,7 @@
</span><span class="cx">     void setFamilies(const RefCountedArray&lt;AtomicString&gt;&amp; families) { m_families = families; }
</span><span class="cx">     void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); }
</span><span class="cx">     void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; }
</span><del>-    void setKerning(Kerning kerning) { m_kerning = kerning; }
</del><ins>+    void setKerning(Kerning kerning) { m_kerning = static_cast&lt;unsigned&gt;(kerning); }
</ins><span class="cx">     void setKeywordSize(unsigned size)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(size &lt;= 8);
</span><span class="lines">@@ -259,7 +257,7 @@
</span><span class="cx">     // Initial values for font properties.
</span><span class="cx">     static FontItalic initialItalic() { return FontItalicOff; }
</span><span class="cx">     static FontSmallCaps initialSmallCaps() { return FontSmallCapsOff; }
</span><del>-    static Kerning initialKerning() { return AutoKerning; }
</del><ins>+    static Kerning initialKerning() { return Kerning::Auto; }
</ins><span class="cx">     static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; }
</span><span class="cx">     static TextRenderingMode initialTextRenderingMode() { return AutoTextRendering; }
</span><span class="cx">     static FontSynthesis initialFontSynthesis() { return FontSynthesisWeight | FontSynthesisStyle; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTypesettingFeaturesh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/TypesettingFeatures.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TypesettingFeatures.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/TypesettingFeatures.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TypesettingFeatures_h
-#define TypesettingFeatures_h
-
-namespace WebCore {
-    enum TypesettingFeature {
-        Kerning = 1 &lt;&lt; 0,
-        Ligatures = 1 &lt;&lt; 1,
-    };
-
-    typedef unsigned TypesettingFeatures;
-} // namespace WebCore
-
-#endif // TypesettingFeatures_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -41,13 +41,10 @@
</span><span class="cx">     , m_runWidthSoFar(0)
</span><span class="cx">     , m_isAfterExpansion((run.expansionBehavior() &amp; LeadingExpansionMask) == ForbidLeadingExpansion)
</span><span class="cx">     , m_finalRoundingWidth(0)
</span><del>-    , m_typesettingFeatures(font-&gt;typesettingFeatures())
</del><span class="cx">     , m_fallbackFonts(fallbackFonts)
</span><span class="cx">     , m_accountForGlyphBounds(accountForGlyphBounds)
</span><del>-    , m_maxGlyphBoundingBoxY(std::numeric_limits&lt;float&gt;::min())
-    , m_minGlyphBoundingBoxY(std::numeric_limits&lt;float&gt;::max())
-    , m_firstGlyphOverflow(0)
-    , m_lastGlyphOverflow(0)
</del><ins>+    , m_enableKerning(font-&gt;enableKerning())
+    , m_enableLigatures(font-&gt;enableLigatures())
</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">@@ -104,12 +101,12 @@
</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_typesettingFeatures &amp; (Kerning | Ligatures)))
</del><ins>+    if (m_run.length() &lt;= 1 || !(m_enableKerning || m_enableLigatures))
</ins><span class="cx">         return TransformsType::None;
</span><span class="cx">     return TransformsType::NotForced;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline float WidthIterator::applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, int&amp; lastGlyphCount, const Font* font, TypesettingFeatures typesettingFeatures, UChar32 previousCharacter, bool force, CharactersTreatedAsSpace&amp; charactersTreatedAsSpace)
</del><ins>+inline float WidthIterator::applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, int&amp; lastGlyphCount, const Font* font, UChar32 previousCharacter, bool force, CharactersTreatedAsSpace&amp; charactersTreatedAsSpace)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT_UNUSED(previousCharacter, shouldApplyFontTransforms(glyphBuffer, lastGlyphCount, previousCharacter) != WidthIterator::TransformsType::None);
</span><span class="cx"> 
</span><span class="lines">@@ -134,14 +131,14 @@
</span><span class="cx">     // We need to handle transforms on SVG fonts internally, since they are rendered internally.
</span><span class="cx">     if (font-&gt;isSVGFont()) {
</span><span class="cx">         // SVG font ligatures are handled during glyph selection, only kerning remaining.
</span><del>-        if (run().renderingContext() &amp;&amp; (typesettingFeatures &amp; Kerning)) {
</del><ins>+        if (run().renderingContext() &amp;&amp; m_enableKerning) {
</ins><span class="cx">             // FIXME: We could pass the necessary context down to this level so we can lazily create rendering contexts at this point.
</span><span class="cx">             // However, a larger refactoring of SVG fonts might necessary to sidestep this problem completely.
</span><span class="cx">             run().renderingContext()-&gt;applySVGKerning(font, *this, glyphBuffer, lastGlyphCount);
</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, typesettingFeatures);
</del><ins>+        font-&gt;applyTransforms(glyphBuffer-&gt;glyphs(lastGlyphCount), advances + lastGlyphCount, glyphBufferSize - lastGlyphCount, m_enableKerning, m_enableLigatures);
</ins><span class="cx"> 
</span><span class="cx">     if (!ltr)
</span><span class="cx">         glyphBuffer-&gt;reverse(lastGlyphCount, glyphBufferSize - lastGlyphCount);
</span><span class="lines">@@ -252,7 +249,7 @@
</span><span class="cx">         if (font != lastFontData &amp;&amp; width) {
</span><span class="cx">             auto transformsType = shouldApplyFontTransforms(glyphBuffer, lastGlyphCount, previousCharacter);
</span><span class="cx">             if (transformsType != TransformsType::None) {
</span><del>-                m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, m_typesettingFeatures, previousCharacter, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</del><ins>+                m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, previousCharacter, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</ins><span class="cx">                 if (glyphBuffer)
</span><span class="cx">                     glyphBuffer-&gt;shrink(lastGlyphCount);
</span><span class="cx">             }
</span><span class="lines">@@ -410,7 +407,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto transformsType = shouldApplyFontTransforms(glyphBuffer, lastGlyphCount, previousCharacter);
</span><span class="cx">     if (transformsType != TransformsType::None) {
</span><del>-        m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, m_typesettingFeatures, previousCharacter, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</del><ins>+        m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, previousCharacter, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</ins><span class="cx">         if (glyphBuffer)
</span><span class="cx">             glyphBuffer-&gt;shrink(lastGlyphCount);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -84,16 +84,17 @@
</span><span class="cx"> 
</span><span class="cx">     enum class TransformsType { None, Forced, NotForced };
</span><span class="cx">     TransformsType shouldApplyFontTransforms(const GlyphBuffer*, int lastGlyphCount, UChar32 previousCharacter) const;
</span><del>-    float applyFontTransforms(GlyphBuffer*, bool ltr, int&amp; lastGlyphCount, const Font*, TypesettingFeatures, UChar32 previousCharacter, bool force, CharactersTreatedAsSpace&amp;);
</del><ins>+    float applyFontTransforms(GlyphBuffer*, bool ltr, int&amp; lastGlyphCount, const Font*, UChar32 previousCharacter, bool force, CharactersTreatedAsSpace&amp;);
</ins><span class="cx"> 
</span><del>-    TypesettingFeatures m_typesettingFeatures;
-    HashSet&lt;const Font*&gt;* m_fallbackFonts;
-    bool m_accountForGlyphBounds;
-    float m_maxGlyphBoundingBoxY;
-    float m_minGlyphBoundingBoxY;
-    float m_firstGlyphOverflow;
-    float m_lastGlyphOverflow;
-    bool m_forTextEmphasis;
</del><ins>+    HashSet&lt;const Font*&gt;* m_fallbackFonts { nullptr };
+    bool m_accountForGlyphBounds { false };
+    bool m_enableKerning { false };
+    bool m_enableLigatures { false };
+    bool m_forTextEmphasis { false };
+    float m_maxGlyphBoundingBoxY { std::numeric_limits&lt;float&gt;::min() };
+    float m_minGlyphBoundingBoxY { std::numeric_limits&lt;float&gt;::max() };
+    float m_firstGlyphOverflow { 0 };
+    float m_lastGlyphOverflow { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</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 (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-10-13 23:40:38 UTC (rev 191014)
</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(0, platformData().orientation()) };
</del><ins>+    ProviderInfo info = { characters, length, getCFStringAttributes(false, 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="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -338,15 +338,15 @@
</span><span class="cx"> 
</span><span class="cx">     hb_feature_t kerning = { HarfBuzzFace::kernTag, 0, 0, static_cast&lt;unsigned&gt;(-1) };
</span><span class="cx">     switch (description.kerning()) {
</span><del>-    case FontCascadeDescription::NormalKerning:
</del><ins>+    case Kerning::Normal:
</ins><span class="cx">         kerning.value = 1;
</span><span class="cx">         m_features.append(kerning);
</span><span class="cx">         break;
</span><del>-    case FontCascadeDescription::NoneKerning:
</del><ins>+    case Kerning::NoShift:
</ins><span class="cx">         kerning.value = 0;
</span><span class="cx">         m_features.append(kerning);
</span><span class="cx">         break;
</span><del>-    case FontCascadeDescription::AutoKerning:
</del><ins>+    case Kerning::Auto:
</ins><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-10-13 23:40:38 UTC (rev 191014)
</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.typesettingFeatures(), font-&gt;platformData().orientation())));
</del><ins>+        stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font-&gt;getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), 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.typesettingFeatures(), font-&gt;platformData().orientation());
</del><ins>+        stringAttributes = font-&gt;getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), 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 (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</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(TypesettingFeatures typesettingFeatures, FontOrientation orientation) const
</del><ins>+CFDictionaryRef Font::getCFStringAttributes(bool enableKerning, bool enableLigatures, FontOrientation orientation) const
</ins><span class="cx"> {
</span><del>-    unsigned key = typesettingFeatures + 1;
</del><ins>+    unsigned key = (enableKerning &lt;&lt; 1 | enableLigatures) + 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">@@ -48,14 +48,13 @@
</span><span class="cx"> 
</span><span class="cx">     CFDictionarySetValue(mutableAttributes, kCTFontAttributeName, platformData().ctFont());
</span><span class="cx"> 
</span><del>-    if (!(typesettingFeatures &amp; Kerning)) {
</del><ins>+    if (!enableKerning) {
</ins><span class="cx">         const float zero = 0;
</span><span class="cx">         static CFNumberRef zeroKerningValue = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &amp;zero);
</span><span class="cx">         CFDictionarySetValue(mutableAttributes, kCTKernAttributeName, zeroKerningValue);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool allowLigatures = (orientation == Horizontal &amp;&amp; platformData().allowsLigatures()) || (typesettingFeatures &amp; Ligatures);
-    if (!allowLigatures) {
</del><ins>+    if (!((orientation == Horizontal &amp;&amp; platformData().allowsLigatures()) || enableLigatures)) {
</ins><span class="cx">         const int zero = 0;
</span><span class="cx">         static CFNumberRef essentialLigaturesValue = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &amp;zero);
</span><span class="cx">         CFDictionarySetValue(mutableAttributes, kCTLigatureAttributeName, essentialLigaturesValue);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextFlags.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextFlags.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/platform/text/TextFlags.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -259,6 +259,12 @@
</span><span class="cx">     FontWeightMask = FontWeight100Mask | FontWeight200Mask | FontWeight300Mask | FontWeight400Mask | FontWeight500Mask | FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class Kerning {
+    Auto,
+    Normal,
+    NoShift
+};
+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx"> 
</span><span class="cx">     float measuredWidth = 0;
</span><span class="cx"> 
</span><del>-    bool kerningIsEnabled = font.typesettingFeatures() &amp; Kerning;
</del><ins>+    bool kerningIsEnabled = font.enableKerning();
</ins><span class="cx">     bool canUseSimpleFontCodePath = renderer.canUseSimpleFontCodePath();
</span><span class="cx">     
</span><span class="cx">     // Since we don't cache glyph overflows, we need to re-measure the run if
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">             return m_width;
</span><span class="cx"> 
</span><span class="cx">         const FontCascade&amp; font = m_style.fontCascade();
</span><del>-        if ((font.typesettingFeatures() &amp; Kerning) &amp;&amp; !m_textLayout)
</del><ins>+        if (font.enableKerning() &amp;&amp; !m_textLayout)
</ins><span class="cx">             m_width = font.width(RenderBlock::constructTextRun(&amp;m_renderer, font, &amp;space, 1, m_style), &amp;fallbackFonts) + font.wordSpacing();
</span><span class="cx">         m_state = WordTrailingSpaceState::Computed;
</span><span class="cx">         return m_width;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebCore/svg/SVGFontData.h        2015-10-13 23:40:38 UTC (rev 191014)
</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, TypesettingFeatures) const = delete;
</del><ins>+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, bool enableKerning, bool enableLigatures) 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>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-10-13  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Split TypesettingFeatures into kerning and ligatures bools
+        https://bugs.webkit.org/show_bug.cgi?id=150074
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebView.mm:
+        (+[WebView initialize]):
+
</ins><span class="cx"> 2015-10-13  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Avoid useless copies in range-loops that are using 'auto'
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -4708,7 +4708,9 @@
</span><span class="cx">     grammarCheckingEnabled = [defaults boolForKey:WebGrammarCheckingEnabled];
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    FontCascade::setDefaultTypesettingFeatures([defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey] ? Kerning | Ligatures : 0);
</del><ins>+    bool defaultKerningAndLigatures = [defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
+    FontCascade::setDefaultKerning(defaultKerningAndLigatures);
+    FontCascade::setDefaultLigatures(defaultKerningAndLigatures);
</ins><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     automaticQuoteSubstitutionEnabled = [self _shouldAutomaticQuoteSubstitutionBeEnabled];
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-10-13  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Split TypesettingFeatures into kerning and ligatures bools
+        https://bugs.webkit.org/show_bug.cgi?id=150074
+
+        Reviewed by Simon Fraser.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
</ins><span class="cx"> 2015-10-13  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix iOS-family builds.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -40,7 +40,8 @@
</span><span class="cx">     , shouldUseFontSmoothing(true)
</span><span class="cx">     , defaultRequestTimeoutInterval(INT_MAX)
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    , shouldEnableKerningAndLigaturesByDefault(false)
</del><ins>+    , shouldEnableKerningByDefault(false)
+    , shouldEnableLigaturesByDefault(false)
</ins><span class="cx">     , shouldEnableJIT(false)
</span><span class="cx">     , shouldEnableFTLJIT(false)
</span><span class="cx"> #endif
</span><span class="lines">@@ -122,7 +123,8 @@
</span><span class="cx">     encoder &lt;&lt; acceleratedCompositingPort;
</span><span class="cx">     encoder &lt;&lt; uiProcessBundleResourcePath;
</span><span class="cx">     encoder &lt;&lt; uiProcessBundleResourcePathExtensionHandle;
</span><del>-    encoder &lt;&lt; shouldEnableKerningAndLigaturesByDefault;
</del><ins>+    encoder &lt;&lt; shouldEnableKerningByDefault;
+    encoder &lt;&lt; shouldEnableLigaturesByDefault;
</ins><span class="cx">     encoder &lt;&lt; shouldEnableJIT;
</span><span class="cx">     encoder &lt;&lt; shouldEnableFTLJIT;
</span><span class="cx">     encoder &lt;&lt; !!bundleParameterData;
</span><span class="lines">@@ -267,8 +269,10 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.uiProcessBundleResourcePathExtensionHandle))
</span><span class="cx">         return false;
</span><del>-    if (!decoder.decode(parameters.shouldEnableKerningAndLigaturesByDefault))
</del><ins>+    if (!decoder.decode(parameters.shouldEnableKerningByDefault))
</ins><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(parameters.shouldEnableLigaturesByDefault))
+        return false;
</ins><span class="cx">     if (!decoder.decode(parameters.shouldEnableJIT))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.shouldEnableFTLJIT))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -142,7 +142,8 @@
</span><span class="cx">     String uiProcessBundleResourcePath;
</span><span class="cx">     SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
</span><span class="cx"> 
</span><del>-    bool shouldEnableKerningAndLigaturesByDefault;
</del><ins>+    bool shouldEnableKerningByDefault;
+    bool shouldEnableLigaturesByDefault;
</ins><span class="cx">     bool shouldEnableJIT;
</span><span class="cx">     bool shouldEnableFTLJIT;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -175,7 +175,9 @@
</span><span class="cx">     parameters.accessibilityEnhancedUserInterfaceEnabled = false;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
</del><ins>+    bool shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
+    parameters.shouldEnableKerningByDefault = shouldEnableKerningAndLigaturesByDefault;
+    parameters.shouldEnableLigaturesByDefault = shouldEnableKerningAndLigaturesByDefault;
</ins><span class="cx">     parameters.shouldEnableJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCJITEnabledDefaultsKey];
</span><span class="cx">     parameters.shouldEnableFTLJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCFTLJITEnabledDefaultsKey];
</span><span class="cx">     parameters.shouldEnableMemoryPressureReliefLogging = [[NSUserDefaults standardUserDefaults] boolForKey:@&quot;LogMemoryJetsamDetails&quot;];
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (191013 => 191014)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-10-13 23:28:03 UTC (rev 191013)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-10-13 23:40:38 UTC (rev 191014)
</span><span class="lines">@@ -144,7 +144,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_compositingRenderServerPort = WTF::move(parameters.acceleratedCompositingPort);
</span><span class="cx">     m_presenterApplicationPid = parameters.presenterApplicationPid;
</span><del>-    FontCascade::setDefaultTypesettingFeatures(parameters.shouldEnableKerningAndLigaturesByDefault ? Kerning | Ligatures : 0);
</del><ins>+    FontCascade::setDefaultKerning(parameters.shouldEnableKerningByDefault);
+    FontCascade::setDefaultLigatures(parameters.shouldEnableLigaturesByDefault);
</ins><span class="cx"> 
</span><span class="cx">     MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>