<!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>[193665] branches/safari-601-branch/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/193665">193665</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-07 16:23:20 -0800 (Mon, 07 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/191014">r191014</a>. rdar://problem/23769801</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSPrimitiveValueMappingsh">branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontcpp">branches/safari-601-branch/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFonth">branches/safari-601-branch/Source/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCascadecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCascadeh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptionh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsWidthIteratorcpp">branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsWidthIteratorh">branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicscocoaFontCocoamm">branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacGlyphPageMaccpp">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacSimpleFontDataCoreTextcpp">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformtextTextFlagsh">branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderingRenderBlockLineLayoutcpp">branches/safari-601-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorerenderinglineBreakingContexth">branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoresvgSVGFontDatah">branches/safari-601-branch/Source/WebCore/svg/SVGFontData.h</a></li>
<li><a href="#branchessafari601branchSourceWebKitmacChangeLog">branches/safari-601-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKitmacWebViewWebViewmm">branches/safari-601-branch/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2ChangeLog">branches/safari-601-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebKit2SharedWebProcessCreationParameterscpp">branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebKit2SharedWebProcessCreationParametersh">branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#branchessafari601branchSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm">branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#branchessafari601branchSourceWebKit2WebProcesscocoaWebProcessCocoamm">branches/safari-601-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsTypesettingFeaturesh">branches/safari-601-branch/Source/WebCore/platform/graphics/TypesettingFeatures.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -1,3 +1,91 @@
</span><ins>+2015-10-13 Myles C. Maxfield <mmaxfield@apple.com>
+
+ 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-12-07 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r193635. rdar://problem/23581586
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -1404,7 +1404,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">@@ -8617,7 +8616,6 @@
</span><span class="cx">                 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = "<group>"; };
</span><span class="cx">                 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ComplexTextControllerCoreText.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
</span><del>-                37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = "<group>"; };
</del><span class="cx">                 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicStringKeyedMRUCache.h; sourceTree = "<group>"; };
</span><span class="cx">                 37D456FB1A9A50B6003330A1 /* LocalizableStrings.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = LocalizableStrings.pm; sourceTree = "<group>"; };
</span><span class="cx">                 37DDCD9213844FD50008B793 /* MIMEHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MIMEHeader.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -21105,7 +21103,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">@@ -27177,7 +27174,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="branchessafari601branchSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-12-08 00:23:20 UTC (rev 193665)
</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<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontDescription::Kerning kerning)
</del><ins>+template<> 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 FontDescription::AutoKerning:
</del><ins>+ case Kerning::Auto:
</ins><span class="cx"> m_value.valueID = CSSValueAuto;
</span><span class="cx"> return;
</span><del>- case FontDescription::NormalKerning:
</del><ins>+ case Kerning::Normal:
</ins><span class="cx"> m_value.valueID = CSSValueNormal;
</span><span class="cx"> return;
</span><del>- case FontDescription::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<> inline CSSPrimitiveValue::operator FontDescription::Kerning() const
</del><ins>+template<> 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 FontDescription::AutoKerning;
</del><ins>+ return Kerning::Auto;
</ins><span class="cx"> case CSSValueNormal:
</span><del>- return FontDescription::NormalKerning;
</del><ins>+ return Kerning::Normal;
</ins><span class="cx"> case CSSValueNone:
</span><del>- return FontDescription::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 FontDescription::AutoKerning;
</del><ins>+ return Kerning::Auto;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ObjectFit fit)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/Font.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/Font.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/Font.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -380,18 +380,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 & Kerning ? kCTFontTransformApplyPositioning : 0) | (typesettingFeatures & 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<CGSize*>(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="branchessafari601branchSourceWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/Font.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/Font.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/Font.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #if ENABLE(OPENTYPE_VERTICAL)
</span><span class="cx"> #include "OpenTypeVerticalData.h"
</span><span class="cx"> #endif
</span><del>-#include "TypesettingFeatures.h"
</del><span class="cx"> #include <wtf/TypeCasts.h>
</span><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><span class="lines">@@ -194,7 +193,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">@@ -202,7 +201,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="branchessafari601branchSourceWebCoreplatformgraphicsFontCascadecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -91,7 +91,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">@@ -102,7 +103,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">@@ -112,7 +114,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">@@ -123,7 +126,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">@@ -158,7 +162,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">@@ -169,7 +174,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">@@ -314,7 +320,8 @@
</span><span class="cx"> {
</span><span class="cx"> m_fonts = retrieveOrAddCachedFonts(m_fontDescription, fontSelector.get());
</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* context, const TextRun& run, const FloatPoint& point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
</span><span class="lines">@@ -329,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 && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</del><ins>+ if (codePathToUse != Complex && (enableKerning() || enableLigatures()) && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</ins><span class="cx"> codePathToUse = Complex;
</span><span class="cx">
</span><span class="cx"> if (codePathToUse != Complex)
</span><span class="lines">@@ -348,7 +355,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 && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</del><ins>+ if (codePathToUse != Complex && (enableKerning() || enableLigatures()) && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</ins><span class="cx"> codePathToUse = Complex;
</span><span class="cx">
</span><span class="cx"> if (codePathToUse != Complex)
</span><span class="lines">@@ -369,7 +376,7 @@
</span><span class="cx"> glyphOverflow = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures);
</del><ins>+ bool hasKerningOrLigatures = enableKerning() || enableLigatures();
</ins><span class="cx"> bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
</span><span class="cx"> float* cacheEntry = m_fonts->widthCache().add(run, std::numeric_limits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
</span><span class="cx"> if (cacheEntry && !std::isnan(*cacheEntry))
</span><span class="lines">@@ -521,7 +528,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 && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</del><ins>+ if (codePathToUse != Complex && (enableKerning() || enableLigatures()) && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
</ins><span class="cx"> codePathToUse = Complex;
</span><span class="cx">
</span><span class="cx"> if (codePathToUse != Complex)
</span><span class="lines">@@ -533,7 +540,7 @@
</span><span class="cx"> int FontCascade::offsetForPosition(const TextRun& 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 && (!typesettingFeatures() || isDrawnWithSVGFont(run)))
</del><ins>+ if (codePath(run) != Complex && (!(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">@@ -596,14 +603,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& run) const
</span><span class="lines">@@ -621,7 +628,7 @@
</span><span class="cx"> return Complex;
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><del>- if (run.length() > 1 && typesettingFeatures())
</del><ins>+ if (run.length() > 1 && (enableKerning() || enableLigatures()))
</ins><span class="cx"> return Complex;
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1443,7 +1450,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() & (Kerning | Ligatures)) ? &glyphBuffer : 0);
</del><ins>+ it.advance(run.length(), (enableKerning() || enableLigatures()) ? &glyphBuffer : nullptr);
</ins><span class="cx">
</span><span class="cx"> if (glyphOverflow) {
</span><span class="cx"> glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-it.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCascadeh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCascade.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "Path.h"
</span><span class="cx"> #include "TextFlags.h"
</span><del>-#include "TypesettingFeatures.h"
</del><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/WeakPtr.h>
</span><span class="lines">@@ -163,7 +162,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<TypesettingFeatures>(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& firstFamily() const { return m_fontDescription.firstFamily(); }
</span><span class="cx"> unsigned familyCount() const { return m_fontDescription.familyCount(); }
</span><span class="lines">@@ -270,9 +270,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">@@ -305,49 +304,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 &= ~(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 FontDescription::NoneKerning:
- features &= ~Kerning;
- break;
- case FontDescription::NormalKerning:
- features |= Kerning;
- break;
- case FontDescription::AutoKerning:
- break;
- }
-
- switch (m_fontDescription.variantCommonLigatures()) {
- case FontVariantLigatures::No:
- features &= ~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"> FontDescription m_fontDescription;
</span><span class="cx"> mutable RefPtr<FontCascadeFonts> m_fonts;
</span><span class="lines">@@ -355,7 +343,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="branchessafari601branchSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -40,8 +40,6 @@
</span><span class="cx">
</span><span class="cx"> class FontDescription {
</span><span class="cx"> public:
</span><del>- enum Kerning { AutoKerning, NormalKerning, NoneKerning };
-
</del><span class="cx"> FontDescription()
</span><span class="cx"> : m_families(1)
</span><span class="cx"> , m_specifiedSize(0)
</span><span class="lines">@@ -54,7 +52,7 @@
</span><span class="cx"> , m_isAbsoluteSize(false)
</span><span class="cx"> , m_weight(FontWeightNormal)
</span><span class="cx"> , m_renderingMode(NormalRenderingMode)
</span><del>- , m_kerning(AutoKerning)
</del><ins>+ , m_kerning(static_cast<unsigned>(Kerning::Auto))
</ins><span class="cx"> , m_keywordSize(0)
</span><span class="cx"> , m_fontSmoothing(AutoSmoothing)
</span><span class="cx"> , m_textRendering(AutoTextRendering)
</span><span class="lines">@@ -164,7 +162,7 @@
</span><span class="cx"> void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; }
</span><span class="cx"> void setWeight(FontWeight w) { m_weight = w; }
</span><span class="cx"> void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; }
</span><del>- void setKerning(Kerning kerning) { m_kerning = kerning; }
</del><ins>+ void setKerning(Kerning kerning) { m_kerning = static_cast<unsigned>(kerning); }
</ins><span class="cx"> void setKeywordSize(unsigned size)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(size <= 8);
</span><span class="lines">@@ -218,7 +216,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="branchessafari601branchSourceWebCoreplatformgraphicsTypesettingFeaturesh"></a>
<div class="delfile"><h4>Deleted: branches/safari-601-branch/Source/WebCore/platform/graphics/TypesettingFeatures.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/TypesettingFeatures.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/TypesettingFeatures.h        2015-12-08 00:23:20 UTC (rev 193665)
</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 << 0,
- Ligatures = 1 << 1,
- };
-
- typedef unsigned TypesettingFeatures;
-} // namespace WebCore
-
-#endif // TypesettingFeatures_h
</del></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -41,13 +41,10 @@
</span><span class="cx"> , m_runWidthSoFar(0)
</span><span class="cx"> , m_isAfterExpansion((run.expansionBehavior() & LeadingExpansionMask) == ForbidLeadingExpansion)
</span><span class="cx"> , m_finalRoundingWidth(0)
</span><del>- , m_typesettingFeatures(font->typesettingFeatures())
</del><span class="cx"> , m_fallbackFonts(fallbackFonts)
</span><span class="cx"> , m_accountForGlyphBounds(accountForGlyphBounds)
</span><del>- , m_maxGlyphBoundingBoxY(std::numeric_limits<float>::min())
- , m_minGlyphBoundingBoxY(std::numeric_limits<float>::max())
- , m_firstGlyphOverflow(0)
- , m_lastGlyphOverflow(0)
</del><ins>+ , m_enableKerning(font->enableKerning())
+ , m_enableLigatures(font->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">@@ -97,10 +94,8 @@
</span><span class="cx">
</span><span class="cx"> typedef Vector<std::pair<int, OriginalAdvancesForCharacterTreatedAsSpace>, 64> CharactersTreatedAsSpace;
</span><span class="cx">
</span><del>-static inline float applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, int& lastGlyphCount, const Font* font, WidthIterator& iterator, TypesettingFeatures typesettingFeatures, bool force, CharactersTreatedAsSpace& charactersTreatedAsSpace)
</del><ins>+static inline float applyFontTransforms(GlyphBuffer* glyphBuffer, bool ltr, int& lastGlyphCount, const Font* font, WidthIterator& iterator, bool force, CharactersTreatedAsSpace& charactersTreatedAsSpace)
</ins><span class="cx"> {
</span><del>- ASSERT(typesettingFeatures & (Kerning | Ligatures));
-
</del><span class="cx"> if (!glyphBuffer)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="lines">@@ -124,14 +119,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->isSVGFont()) {
</span><span class="cx"> // SVG font ligatures are handled during glyph selection, only kerning remaining.
</span><del>- if (iterator.run().renderingContext() && (typesettingFeatures & Kerning)) {
</del><ins>+ if (iterator.run().renderingContext() && iterator.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"> iterator.run().renderingContext()->applySVGKerning(font, iterator, glyphBuffer, lastGlyphCount);
</span><span class="cx"> }
</span><span class="cx"> } else
</span><span class="cx"> #endif
</span><del>- font->applyTransforms(glyphBuffer->glyphs(lastGlyphCount), advances + lastGlyphCount, glyphBufferSize - lastGlyphCount, typesettingFeatures);
</del><ins>+ font->applyTransforms(glyphBuffer->glyphs(lastGlyphCount), advances + lastGlyphCount, glyphBufferSize - lastGlyphCount, iterator.enableKerning(), iterator.enableLigatures());
</ins><span class="cx">
</span><span class="cx"> if (!ltr)
</span><span class="cx"> glyphBuffer->reverse(lastGlyphCount, glyphBufferSize - lastGlyphCount);
</span><span class="lines">@@ -203,7 +198,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (glyphBuffer && glyphBuffer->size() == lastGlyphCount + 1 && isSoftBankEmoji(previousCharacter))
</span><span class="cx"> return TransformsType::Forced;
</span><del>- if (m_run.length() <= 1 || !(m_typesettingFeatures & (Kerning | Ligatures)))
</del><ins>+ if (m_run.length() <= 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="lines">@@ -269,7 +264,7 @@
</span><span class="cx"> if (font != lastFontData && 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, *this, m_typesettingFeatures, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</del><ins>+ m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, *this, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</ins><span class="cx"> if (glyphBuffer)
</span><span class="cx"> glyphBuffer->shrink(lastGlyphCount);
</span><span class="cx"> }
</span><span class="lines">@@ -427,7 +422,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, *this, m_typesettingFeatures, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</del><ins>+ m_runWidthSoFar += applyFontTransforms(glyphBuffer, m_run.ltr(), lastGlyphCount, lastFontData, *this, transformsType == TransformsType::Forced, charactersTreatedAsSpace);
</ins><span class="cx"> if (glyphBuffer)
</span><span class="cx"> glyphBuffer->shrink(lastGlyphCount);
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsWidthIteratorh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/WidthIterator.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx">
</span><span class="cx"> const TextRun& run() const { return m_run; }
</span><span class="cx"> float runWidthSoFar() const { return m_runWidthSoFar; }
</span><ins>+ bool enableKerning() const { return m_enableKerning; }
+ bool enableLigatures() const { return m_enableLigatures; }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> String lastGlyphName() const { return m_lastGlyphName; }
</span><span class="lines">@@ -82,14 +84,15 @@
</span><span class="cx"> enum class TransformsType { None, Forced, NotForced };
</span><span class="cx"> TransformsType shouldApplyFontTransforms(const GlyphBuffer*, int lastGlyphCount, UChar32 previousCharacter) const;
</span><span class="cx">
</span><del>- TypesettingFeatures m_typesettingFeatures;
- HashSet<const Font*>* m_fallbackFonts;
- bool m_accountForGlyphBounds;
- float m_maxGlyphBoundingBoxY;
- float m_minGlyphBoundingBoxY;
- float m_firstGlyphOverflow;
- float m_lastGlyphOverflow;
- bool m_forTextEmphasis;
</del><ins>+ HashSet<const Font*>* 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<float>::min() };
+ float m_minGlyphBoundingBoxY { std::numeric_limits<float>::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="branchessafari601branchSourceWebCoreplatformgraphicscocoaFontCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -525,7 +525,7 @@
</span><span class="cx">
</span><span class="cx"> RetainPtr<CFTypeRef> 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<CTLineRef> line = adoptCF(CTLineCreateWithUniCharProvider(&provideStringAndAttributes, 0, &info));
</span><span class="cx">
</span><span class="cx"> CFArrayRef runArray = CTLineGetGlyphRuns(line.get());
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</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<unsigned>(-1) };
</span><span class="cx"> switch (description.kerning()) {
</span><del>- case FontDescription::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 FontDescription::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 FontDescription::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="branchessafari601branchSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx">
</span><span class="cx"> RetainPtr<WebCascadeList> cascadeList = adoptNS([[WebCascadeList alloc] initWithFont:&m_font character:baseCharacter]);
</span><span class="cx">
</span><del>- stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font->getCFStringAttributes(m_font.typesettingFeatures(), font->platformData().orientation())));
</del><ins>+ stringAttributes = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, font->getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), font->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<CFDictionaryRef> attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, attributeKeys, values, sizeof(attributeKeys) / sizeof(*attributeKeys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx"> RetainPtr<CTFontRef> fontWithCascadeList = adoptCF(CTFontCreateCopyWithAttributes(font->platformData().ctFont(), m_font.pixelSize(), 0, fontDescriptor.get()));
</span><span class="cx"> CFDictionarySetValue(const_cast<CFMutableDictionaryRef>(stringAttributes.get()), kCTFontAttributeName, fontWithCascadeList.get());
</span><span class="cx"> } else
</span><del>- stringAttributes = font->getCFStringAttributes(m_font.typesettingFeatures(), font->platformData().orientation());
</del><ins>+ stringAttributes = font->getCFStringAttributes(m_font.enableKerning(), m_font.enableLigatures(), font->platformData().orientation());
</ins><span class="cx">
</span><span class="cx"> RetainPtr<CTLineRef> line;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacGlyphPageMaccpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> // We ask CoreText for possible vertical variant glyphs
</span><span class="cx"> RetainPtr<CFStringRef> string = adoptCF(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buffer, bufferLength, kCFAllocatorNull));
</span><del>- RetainPtr<CFAttributedStringRef> attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), fontData->getCFStringAttributes(0, fontData->hasVerticalGlyphs() ? Vertical : Horizontal)));
</del><ins>+ RetainPtr<CFAttributedStringRef> attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), fontData->getCFStringAttributes(false, false, fontData->hasVerticalGlyphs() ? Vertical : Horizontal)));
</ins><span class="cx"> RetainPtr<CTLineRef> line = adoptCF(CTLineCreateWithAttributedString(attributedString.get()));
</span><span class="cx">
</span><span class="cx"> CFArrayRef runArray = CTLineGetGlyphRuns(line.get());
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacSimpleFontDataCoreTextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</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 << 1 | enableLigatures) + 1;
</ins><span class="cx"> HashMap<unsigned, RetainPtr<CFDictionaryRef>>::AddResult addResult = m_CFStringAttributes.add(key, RetainPtr<CFDictionaryRef>());
</span><span class="cx"> RetainPtr<CFDictionaryRef>& attributesDictionary = addResult.iterator->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 & Kerning)) {
</del><ins>+ if (!enableKerning) {
</ins><span class="cx"> const float zero = 0;
</span><span class="cx"> static CFNumberRef zeroKerningValue = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &zero);
</span><span class="cx"> CFDictionarySetValue(mutableAttributes, kCTKernAttributeName, zeroKerningValue);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool allowLigatures = (orientation == Horizontal && platformData().allowsLigatures()) || (typesettingFeatures & Ligatures);
- if (!allowLigatures) {
</del><ins>+ if (!((orientation == Horizontal && platformData().allowsLigatures()) || enableLigatures)) {
</ins><span class="cx"> const int zero = 0;
</span><span class="cx"> static CFNumberRef essentialLigaturesValue = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &zero);
</span><span class="cx"> CFDictionarySetValue(mutableAttributes, kCTLigatureAttributeName, essentialLigaturesValue);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h        2015-12-08 00:23:20 UTC (rev 193665)
</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="branchessafari601branchSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -485,7 +485,7 @@
</span><span class="cx">
</span><span class="cx"> float measuredWidth = 0;
</span><span class="cx">
</span><del>- bool kerningIsEnabled = font.typesettingFeatures() & 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="branchessafari601branchSourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/rendering/line/BreakingContext.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> return m_width;
</span><span class="cx">
</span><span class="cx"> const FontCascade& font = m_style.fontCascade();
</span><del>- if ((font.typesettingFeatures() & Kerning) && !m_textLayout)
</del><ins>+ if (font.enableKerning() && !m_textLayout)
</ins><span class="cx"> m_width = font.width(RenderBlock::constructTextRun(&m_renderer, font, &space, 1, m_style), &fallbackFonts) + font.wordSpacing();
</span><span class="cx"> m_state = WordTrailingSpaceState::Computed;
</span><span class="cx"> return m_width;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoresvgSVGFontDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/svg/SVGFontData.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/svg/SVGFontData.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebCore/svg/SVGFontData.h        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> bool fillBMPGlyphs(SVGFontElement*, GlyphPage* , unsigned offset, unsigned length, UChar* buffer, const Font*) const;
</span><span class="cx"> bool fillNonBMPGlyphs(SVGFontElement*, GlyphPage* , unsigned offset, unsigned length, UChar* buffer, const Font*) 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="branchessafari601branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/mac/ChangeLog (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/mac/ChangeLog        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit/mac/ChangeLog        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-10-13 Myles C. Maxfield <mmaxfield@apple.com>
+
+ 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-12-01 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r186724. rdar://problem/23221163
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit/mac/WebView/WebView.mm (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit/mac/WebView/WebView.mm        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit/mac/WebView/WebView.mm        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -4700,7 +4700,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="branchessafari601branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-10-13 Myles C. Maxfield <mmaxfield@apple.com>
+
+ 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-12-05 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Rollout r193474. rdar://problem/23732400
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-12-08 00:23:20 UTC (rev 193665)
</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 << acceleratedCompositingPort;
</span><span class="cx"> encoder << uiProcessBundleResourcePath;
</span><span class="cx"> encoder << uiProcessBundleResourcePathExtensionHandle;
</span><del>- encoder << shouldEnableKerningAndLigaturesByDefault;
</del><ins>+ encoder << shouldEnableKerningByDefault;
+ encoder << shouldEnableLigaturesByDefault;
</ins><span class="cx"> encoder << shouldEnableJIT;
</span><span class="cx"> encoder << shouldEnableFTLJIT;
</span><span class="cx"> encoder << !!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="branchessafari601branchSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-12-08 00:23:20 UTC (rev 193665)
</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="branchessafari601branchSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -173,7 +173,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:@"LogMemoryJetsamDetails"];
</span></span></pre></div>
<a id="branchessafari601branchSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (193664 => 193665)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-12-08 00:22:16 UTC (rev 193664)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-12-08 00:23:20 UTC (rev 193665)
</span><span class="lines">@@ -143,7 +143,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>