<!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>[226172] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/226172">226172</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2017-12-19 19:24:15 -0800 (Tue, 19 Dec 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor user-installed font setting for clarity
https://bugs.webkit.org/show_bug.cgi?id=181013

Reviewed by Simon Fraser.

Source/WebCore:

Pave the way for https://bugs.webkit.org/show_bug.cgi?id=180951.

This patch renames the Setting to not have so many grammatical negatives, and moves
some CoreText-specific FontCache function signatures into a new FontCacheCoreText.h
header file. It also uses the AllowUserInstalledFonts enum class in more places instead
of the old boolean we were using, and puts this enum class in the common TextFlags.h
header.

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::initializeFontStyle):
* page/Settings.yaml:
* platform/graphics/FontCache.h:
(WebCore::SynthesisPair::SynthesisPair): Deleted.
(WebCore::SynthesisPair::boldObliquePair const): Deleted.
* platform/graphics/FontDescription.cpp:
(WebCore::m_shouldAllowUserInstalledFonts):
(WebCore::m_mayRepresentUserInstalledFont): Deleted.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::shouldAllowUserInstalledFonts const):
(WebCore::FontDescription::setShouldAllowUserInstalledFonts):
(WebCore::FontDescription::operator== const):
(WebCore::FontDescription::mayRepresentUserInstalledFont const): Deleted.
(WebCore::FontDescription::setMayRepresentUserInstalledFont): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::singleton):
(WebCore::FontDatabase::singletonAllowingUserInstalledFonts):
(WebCore::FontDatabase::singletonDisallowingUserInstalledFonts):
(WebCore::FontDatabase::FontDatabase):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):
* platform/graphics/cocoa/FontCacheCoreText.h: Added.
(WebCore::SynthesisPair::SynthesisPair):
(WebCore::SynthesisPair::boldObliquePair const):
* platform/text/TextFlags.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

Source/WebKit:

There are no clients of this SPI yet, so we can rename it to remove the
grammatical negative.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShouldAllowUserInstalledFonts):
(WKPreferencesGetShouldAllowUserInstalledFonts):
(WKPreferencesSetShouldDisallowUserInstalledFonts): Deleted.
(WKPreferencesGetShouldDisallowUserInstalledFonts): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _shouldAllowUserInstalledFonts]):
(-[WKPreferences _setShouldAllowUserInstalledFonts:]):
(-[WKPreferences _shouldDisallowUserInstalledFonts]): Deleted.
(-[WKPreferences _setShouldDisallowUserInstalledFonts:]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

LayoutTests:

* fast/text/user-installed-fonts/disable.html:
* fast/text/user-installed-fonts/shadow-disable.html:
* fast/text/user-installed-fonts/shadow-family-disable.html:
* fast/text/user-installed-fonts/shadow-postscript-disable.html:
* fast/text/user-installed-fonts/shadow-postscript-family-disable.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttextuserinstalledfontsdisablehtml">trunk/LayoutTests/fast/text/user-installed-fonts/disable.html</a></li>
<li><a href="#trunkLayoutTestsfasttextuserinstalledfontsshadowdisablehtml">trunk/LayoutTests/fast/text/user-installed-fonts/shadow-disable.html</a></li>
<li><a href="#trunkLayoutTestsfasttextuserinstalledfontsshadowfamilydisablehtml">trunk/LayoutTests/fast/text/user-installed-fonts/shadow-family-disable.html</a></li>
<li><a href="#trunkLayoutTestsfasttextuserinstalledfontsshadowpostscriptdisablehtml">trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-disable.html</a></li>
<li><a href="#trunkLayoutTestsfasttextuserinstalledfontsshadowpostscriptfamilydisablehtml">trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-family-disable.html</a></li>
<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="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsyaml">trunk/Source/WebCore/page/Settings.yaml</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCacheh">trunk/Source/WebCore/platform/graphics/FontCache.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="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextTextFlagsh">trunk/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveForDocumentcpp">trunk/Source/WebCore/style/StyleResolveForDocument.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitSharedWebPreferencesyaml">trunk/Source/WebKit/Shared/WebPreferences.yaml</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKPreferencescpp">trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKPreferencesRefPrivateh">trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKPreferencesmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKPreferencesPrivateh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTexth">trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/ChangeLog 2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Refactor user-installed font setting for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=181013
+
+        Reviewed by Simon Fraser.
+
+        * fast/text/user-installed-fonts/disable.html:
+        * fast/text/user-installed-fonts/shadow-disable.html:
+        * fast/text/user-installed-fonts/shadow-family-disable.html:
+        * fast/text/user-installed-fonts/shadow-postscript-disable.html:
+        * fast/text/user-installed-fonts/shadow-postscript-family-disable.html:
+
</ins><span class="cx"> 2017-12-19  Brian Burg  <bburg@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: InspectorTest.evaluateInPage should return a rejection if an error was thrown
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextuserinstalledfontsdisablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/user-installed-fonts/disable.html (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/user-installed-fonts/disable.html    2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/fast/text/user-installed-fonts/disable.html       2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.internals)
</span><del>-    internals.settings.setShouldDisallowUserInstalledFonts(true);
</del><ins>+    internals.settings.setShouldAllowUserInstalledFonts(false);
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextuserinstalledfontsshadowdisablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/user-installed-fonts/shadow-disable.html (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/user-installed-fonts/shadow-disable.html     2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/fast/text/user-installed-fonts/shadow-disable.html        2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.installFakeHelvetica("Helvetica-400");
</span><span class="cx"> if (window.internals)
</span><del>-    internals.settings.setShouldDisallowUserInstalledFonts(true);
</del><ins>+    internals.settings.setShouldAllowUserInstalledFonts(false);
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextuserinstalledfontsshadowfamilydisablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/user-installed-fonts/shadow-family-disable.html (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/user-installed-fonts/shadow-family-disable.html      2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/fast/text/user-installed-fonts/shadow-family-disable.html 2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.installFakeHelvetica("Helvetica-500");
</span><span class="cx"> if (window.internals)
</span><del>-    internals.settings.setShouldDisallowUserInstalledFonts(true);
</del><ins>+    internals.settings.setShouldAllowUserInstalledFonts(false);
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextuserinstalledfontsshadowpostscriptdisablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-disable.html (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-disable.html  2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-disable.html     2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.installFakeHelvetica("Helvetica2-400");
</span><span class="cx"> if (window.internals)
</span><del>-    internals.settings.setShouldDisallowUserInstalledFonts(true);
</del><ins>+    internals.settings.setShouldAllowUserInstalledFonts(false);
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextuserinstalledfontsshadowpostscriptfamilydisablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-family-disable.html (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-family-disable.html   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/LayoutTests/fast/text/user-installed-fonts/shadow-postscript-family-disable.html      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.installFakeHelvetica("Helvetica2-500");
</span><span class="cx"> if (window.internals)
</span><del>-    internals.settings.setShouldDisallowUserInstalledFonts(true);
</del><ins>+    internals.settings.setShouldAllowUserInstalledFonts(false);
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/ChangeLog      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2017-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Refactor user-installed font setting for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=181013
+
+        Reviewed by Simon Fraser.
+
+        Pave the way for https://bugs.webkit.org/show_bug.cgi?id=180951.
+
+        This patch renames the Setting to not have so many grammatical negatives, and moves
+        some CoreText-specific FontCache function signatures into a new FontCacheCoreText.h
+        header file. It also uses the AllowUserInstalledFonts enum class in more places instead
+        of the old boolean we were using, and puts this enum class in the common TextFlags.h
+        header.
+
+        No new tests because there is no behavior change.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSFontFaceSet.cpp:
+        (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::initializeFontStyle):
+        * page/Settings.yaml:
+        * platform/graphics/FontCache.h:
+        (WebCore::SynthesisPair::SynthesisPair): Deleted.
+        (WebCore::SynthesisPair::boldObliquePair const): Deleted.
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::m_shouldAllowUserInstalledFonts):
+        (WebCore::m_mayRepresentUserInstalledFont): Deleted.
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::shouldAllowUserInstalledFonts const):
+        (WebCore::FontDescription::setShouldAllowUserInstalledFonts):
+        (WebCore::FontDescription::operator== const):
+        (WebCore::FontDescription::mayRepresentUserInstalledFont const): Deleted.
+        (WebCore::FontDescription::setMayRepresentUserInstalledFont): Deleted.
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::FontDatabase::singleton):
+        (WebCore::FontDatabase::singletonAllowingUserInstalledFonts):
+        (WebCore::FontDatabase::singletonDisallowingUserInstalledFonts):
+        (WebCore::FontDatabase::FontDatabase):
+        (WebCore::platformFontLookupWithFamily):
+        (WebCore::fontWithFamily):
+        * platform/graphics/cocoa/FontCacheCoreText.h: Added.
+        (WebCore::SynthesisPair::SynthesisPair):
+        (WebCore::SynthesisPair::boldObliquePair const):
+        * platform/text/TextFlags.h:
+        * style/StyleResolveForDocument.cpp:
+        (WebCore::Style::resolveForDocument):
+
</ins><span class="cx"> 2017-12-19  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         UserMediaRequest should stop a request when Document is being stopped
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -3722,6 +3722,7 @@
</span><span class="cx">          C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
</span><span class="cx">          C2015C0A1BE6FEB200822389 /* FontVariantBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */; };
</span><span class="cx">          C21DF2EA1D9E4E9900F5B24C /* CSSFontVariationValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */; };
</span><ins>+               C2458E631FE897B000594759 /* FontCacheCoreText.h in Headers */ = {isa = PBXBuildFile; fileRef = C2458E611FE8979E00594759 /* FontCacheCoreText.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           C26017A41C72DC9900F74A16 /* CSSFontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = C26017A21C72DC9900F74A16 /* CSSFontFaceSet.h */; };
</span><span class="cx">          C280833F1C6DC26F001451B6 /* JSFontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = C280833E1C6DC22C001451B6 /* JSFontFace.h */; };
</span><span class="cx">          C2AB0AF71E6B3C6C001348C5 /* FontSelectionAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = C2AB0AF51E6B3C6C001348C5 /* FontSelectionAlgorithm.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -12641,6 +12642,7 @@
</span><span class="cx">          C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontVariantBuilder.h; sourceTree = "<group>"; };
</span><span class="cx">          C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontVariationValue.cpp; sourceTree = "<group>"; };
</span><span class="cx">          C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontVariationValue.h; sourceTree = "<group>"; };
</span><ins>+               C2458E611FE8979E00594759 /* FontCacheCoreText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontCacheCoreText.h; sourceTree = "<group>"; };
</ins><span class="cx">           C26017A11C72DC9900F74A16 /* CSSFontFaceSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontFaceSet.cpp; sourceTree = "<group>"; };
</span><span class="cx">          C26017A21C72DC9900F74A16 /* CSSFontFaceSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFaceSet.h; sourceTree = "<group>"; };
</span><span class="cx">          C280833C1C6DB194001451B6 /* FontFace.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FontFace.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -23009,6 +23011,7 @@
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><span class="cx">                          1C3969CF1B74211E002BCFA7 /* FontCacheCoreText.cpp */,
</span><ins>+                               C2458E611FE8979E00594759 /* FontCacheCoreText.h */,
</ins><span class="cx">                           B2AFFC780D00A5C10030074D /* FontCascadeCocoa.mm */,
</span><span class="cx">                          7C4EDD731A7B607800198C4D /* FontCocoa.mm */,
</span><span class="cx">                          1C12AC2C1EE779950079E0A0 /* FontDescriptionCocoa.cpp */,
</span><span class="lines">@@ -26994,6 +26997,7 @@
</span><span class="cx">                          1AC2D89D1B1E291F00D52E87 /* FontAntialiasingStateSaver.h in Headers */,
</span><span class="cx">                          BCB92D4F1293550B00C8387F /* FontBaseline.h in Headers */,
</span><span class="cx">                          B2C3DA630D006CD600EF6F26 /* FontCache.h in Headers */,
</span><ins>+                               C2458E631FE897B000594759 /* FontCacheCoreText.h in Headers */,
</ins><span class="cx">                           B2C3DA610D006CD600EF6F26 /* FontCascade.h in Headers */,
</span><span class="cx">                          B2C3DA680D006CD600EF6F26 /* FontCascadeFonts.h in Headers */,
</span><span class="cx">                          B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp      2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp 2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -104,9 +104,9 @@
</span><span class="cx">     if (m_locallyInstalledFacesLookupTable.contains(familyName))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    FontCache::AllowUserInstalledFonts allowUserInstalledFonts = FontCache::AllowUserInstalledFonts::Yes;
-    if (m_owningFontSelector->document() && m_owningFontSelector->document()->settings().shouldDisallowUserInstalledFonts())
-        allowUserInstalledFonts = FontCache::AllowUserInstalledFonts::No;
</del><ins>+    AllowUserInstalledFonts allowUserInstalledFonts = AllowUserInstalledFonts::Yes;
+    if (m_owningFontSelector->document())
+        allowUserInstalledFonts = m_owningFontSelector->document()->settings().shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No;
</ins><span class="cx">     Vector<FontSelectionCapabilities> capabilities = FontCache::singleton().getFontSelectionCapabilitiesInFamily(familyName, allowUserInstalledFonts);
</span><span class="cx">     if (capabilities.isEmpty())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp       2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/css/StyleResolver.cpp  2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1788,7 +1788,7 @@
</span><span class="cx">     fontDescription.setOneFamily(standardFamily);
</span><span class="cx">     fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
</span><span class="cx">     setFontSize(fontDescription, Style::fontSizeForKeyword(CSSValueMedium, false, document()));
</span><del>-    fontDescription.setMayRepresentUserInstalledFont(!settings().shouldDisallowUserInstalledFonts());
</del><ins>+    fontDescription.setShouldAllowUserInstalledFonts(settings().shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No);
</ins><span class="cx">     setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.yaml (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.yaml  2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/page/Settings.yaml     2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -661,8 +661,8 @@
</span><span class="cx">   initial: SecurityOrigin::AllowAllStorage
</span><span class="cx">   onChange: storageBlockingPolicyChanged
</span><span class="cx"> 
</span><del>-shouldDisallowUserInstalledFonts:
-  initial: false
</del><ins>+shouldAllowUserInstalledFonts:
+  initial: true
</ins><span class="cx">   onChange: setNeedsRecalcStyleInAllFrames
</span><span class="cx"> 
</span><span class="cx"> # Only set by Layout Tests.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.h       2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h  2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-#include <CoreText/CTFont.h>
</del><ins>+#include "FontCacheCoreText.h"
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if OS(WINDOWS)
</span><span class="lines">@@ -200,10 +200,6 @@
</span><span class="cx">     static IMultiLanguage* getMultiLanguageInterface();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    enum class AllowUserInstalledFonts {
-        Yes,
-        No
-    };
</del><span class="cx">     // This function exists so CSSFontSelector can have a unified notion of preinstalled fonts and @font-face.
</span><span class="cx">     // It comes into play when you create an @font-face which shares a family name as a preinstalled font.
</span><span class="cx">     Vector<FontSelectionCapabilities> getFontSelectionCapabilitiesInFamily(const AtomicString&, AllowUserInstalledFonts);
</span><span class="lines">@@ -270,33 +266,8 @@
</span><span class="cx">     return createFontPlatformData(fontDescription, family, nullptr, nullptr, { });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if !PLATFORM(COCOA)
</ins><span class="cx"> 
</span><del>-struct SynthesisPair {
-    SynthesisPair(bool needsSyntheticBold, bool needsSyntheticOblique)
-        : needsSyntheticBold(needsSyntheticBold)
-        , needsSyntheticOblique(needsSyntheticOblique)
-    {
-    }
-
-    std::pair<bool, bool> boldObliquePair() const
-    {
-        return std::make_pair(needsSyntheticBold, needsSyntheticOblique);
-    }
-
-    bool needsSyntheticBold;
-    bool needsSyntheticOblique;
-};
-
-RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size, bool applyWeightWidthSlopeVariations = true);
-SynthesisPair computeNecessarySynthesis(CTFontRef, const FontDescription&, bool isPlatformFont = false);
-RetainPtr<CTFontRef> platformFontWithFamilySpecialCase(const AtomicString& family, FontSelectionRequest, float size);
-RetainPtr<CTFontRef> platformFontWithFamily(const AtomicString& family, FontSelectionRequest, TextRenderingMode, float size);
-bool requiresCustomFallbackFont(UChar32 character);
-FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef);
-
-#else
-
</del><span class="cx"> inline void FontCache::platformPurgeInactiveFontData()
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp       2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp  2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     , m_variantEastAsianRuby(static_cast<unsigned>(FontVariantEastAsianRuby::Normal))
</span><span class="cx">     , m_opticalSizing(static_cast<unsigned>(FontOpticalSizing::Enabled))
</span><span class="cx">     , m_fontStyleAxis(FontCascadeDescription::initialFontStyleAxis() == FontStyleAxis::ital)
</span><del>-    , m_mayRepresentUserInstalledFont(true)
</del><ins>+    , m_shouldAllowUserInstalledFonts(static_cast<unsigned>(AllowUserInstalledFonts::Yes))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h 2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h    2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx">     }
</span><span class="cx">     FontOpticalSizing opticalSizing() const { return static_cast<FontOpticalSizing>(m_opticalSizing); }
</span><span class="cx">     FontStyleAxis fontStyleAxis() const { return m_fontStyleAxis ? FontStyleAxis::ital : FontStyleAxis::slnt; }
</span><del>-    bool mayRepresentUserInstalledFont() const { return m_mayRepresentUserInstalledFont; }
</del><ins>+    AllowUserInstalledFonts shouldAllowUserInstalledFonts() const { return static_cast<AllowUserInstalledFonts>(m_shouldAllowUserInstalledFonts); }
</ins><span class="cx"> 
</span><span class="cx">     void setComputedSize(float s) { m_computedSize = clampToFloat(s); }
</span><span class="cx">     void setItalic(FontSelectionValue italic) { m_fontSelectionRequest.slope = italic; }
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     void setVariantEastAsianRuby(FontVariantEastAsianRuby variant) { m_variantEastAsianRuby = static_cast<unsigned>(variant); }
</span><span class="cx">     void setOpticalSizing(FontOpticalSizing sizing) { m_opticalSizing = static_cast<unsigned>(sizing); }
</span><span class="cx">     void setFontStyleAxis(FontStyleAxis axis) { m_fontStyleAxis = axis == FontStyleAxis::ital; }
</span><del>-    void setMayRepresentUserInstalledFont(bool mayRepresentUserInstalledFont) { m_mayRepresentUserInstalledFont = mayRepresentUserInstalledFont; }
</del><ins>+    void setShouldAllowUserInstalledFonts(AllowUserInstalledFonts shouldAllowUserInstalledFonts) { m_shouldAllowUserInstalledFonts = static_cast<unsigned>(shouldAllowUserInstalledFonts); }
</ins><span class="cx"> 
</span><span class="cx">     static void invalidateCaches();
</span><span class="cx"> 
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">     unsigned m_variantEastAsianRuby : 1; // FontVariantEastAsianRuby
</span><span class="cx">     unsigned m_opticalSizing : 1; // FontOpticalSizing
</span><span class="cx">     unsigned m_fontStyleAxis : 1; // Whether "font-style: italic" or "font-style: oblique 20deg" was specified
</span><del>-    unsigned m_mayRepresentUserInstalledFont : 1; // If this description is allowed to match a user-installed font
</del><ins>+    unsigned m_shouldAllowUserInstalledFonts : 1; // AllowUserInstalledFonts: If this description is allowed to match a user-installed font
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline bool FontDescription::operator==(const FontDescription& other) const
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx">         && m_variantEastAsianRuby == other.m_variantEastAsianRuby
</span><span class="cx">         && m_opticalSizing == other.m_opticalSizing
</span><span class="cx">         && m_fontStyleAxis == other.m_fontStyleAxis
</span><del>-        && m_mayRepresentUserInstalledFont == other.m_mayRepresentUserInstalledFont;
</del><ins>+        && m_shouldAllowUserInstalledFonts == other.m_shouldAllowUserInstalledFonts;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Move to a file of its own.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp       2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp  2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -833,7 +833,7 @@
</span><span class="cx"> #if !CAN_DISALLOW_USER_INSTALLED_FONTS
</span><span class="cx">     static FontDatabase& singleton()
</span><span class="cx">     {
</span><del>-        static NeverDestroyed<FontDatabase> database(FontCache::AllowUserInstalledFonts::Yes);
</del><ins>+        static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::Yes);
</ins><span class="cx">         return database;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -841,7 +841,7 @@
</span><span class="cx">     static FontDatabase& singletonAllowingUserInstalledFonts()
</span><span class="cx">     {
</span><span class="cx"> #if CAN_DISALLOW_USER_INSTALLED_FONTS
</span><del>-        static NeverDestroyed<FontDatabase> database(FontCache::AllowUserInstalledFonts::Yes);
</del><ins>+        static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::Yes);
</ins><span class="cx">         return database;
</span><span class="cx"> #else
</span><span class="cx">         return singleton();
</span><span class="lines">@@ -851,7 +851,7 @@
</span><span class="cx">     static FontDatabase& singletonDisallowingUserInstalledFonts()
</span><span class="cx">     {
</span><span class="cx"> #if CAN_DISALLOW_USER_INSTALLED_FONTS
</span><del>-        static NeverDestroyed<FontDatabase> database(FontCache::AllowUserInstalledFonts::No);
</del><ins>+        static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::No);
</ins><span class="cx">         return database;
</span><span class="cx"> #else
</span><span class="cx">         return singleton();
</span><span class="lines">@@ -974,7 +974,7 @@
</span><span class="cx"> private:
</span><span class="cx">     friend class NeverDestroyed<FontDatabase>;
</span><span class="cx"> 
</span><del>-    FontDatabase(FontCache::AllowUserInstalledFonts allowUserInstalledFonts)
</del><ins>+    FontDatabase(AllowUserInstalledFonts allowUserInstalledFonts)
</ins><span class="cx">         : m_allowUserInstalledFonts(allowUserInstalledFonts)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -981,7 +981,7 @@
</span><span class="cx"> 
</span><span class="cx">     HashMap<String, InstalledFontFamily> m_familyNameToFontDescriptors;
</span><span class="cx">     HashMap<String, InstalledFont> m_postScriptNameToFontDescriptors;
</span><del>-    FontCache::AllowUserInstalledFonts m_allowUserInstalledFonts;
</del><ins>+    AllowUserInstalledFonts m_allowUserInstalledFonts;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // Because this struct holds intermediate values which may be in the compressed -1 - 1 GX range, we don't want to use the relatively large
</span><span class="lines">@@ -1190,7 +1190,7 @@
</span><span class="cx">     bool createdFromPostScriptName { false };
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static FontLookup platformFontLookupWithFamily(const AtomicString& family, FontSelectionRequest request, float size, bool mayRepresentUserInstalledFont)
</del><ins>+static FontLookup platformFontLookupWithFamily(const AtomicString& family, FontSelectionRequest request, float size, AllowUserInstalledFonts allowUserInstalledFonts)
</ins><span class="cx"> {
</span><span class="cx">     const auto& whitelist = fontWhitelist();
</span><span class="cx">     if (!isSystemFont(family) && whitelist.size() && !whitelist.contains(family))
</span><span class="lines">@@ -1197,11 +1197,11 @@
</span><span class="cx">         return { nullptr };
</span><span class="cx"> 
</span><span class="cx"> #if SHOULD_USE_CORE_TEXT_FONT_LOOKUP
</span><del>-    UNUSED_PARAM(mayRepresentUserInstalledFont);
</del><ins>+    UNUSED_PARAM(allowUserInstalledFonts);
</ins><span class="cx">     CTFontSymbolicTraits traits = (isFontWeightBold(request.weight) ? kCTFontTraitBold : 0) | (isItalic(request.slope) ? kCTFontTraitItalic : 0);
</span><span class="cx">     return { adoptCF(CTFontCreateForCSS(family.string().createCFString().get(), static_cast<float>(request.weight), traits, size)) };
</span><span class="cx"> #else
</span><del>-    auto& fontDatabase = mayRepresentUserInstalledFont ? FontDatabase::singletonAllowingUserInstalledFonts() : FontDatabase::singletonDisallowingUserInstalledFonts();
</del><ins>+    auto& fontDatabase = allowUserInstalledFonts == AllowUserInstalledFonts::Yes ? FontDatabase::singletonAllowingUserInstalledFonts() : FontDatabase::singletonDisallowingUserInstalledFonts();
</ins><span class="cx">     const auto& familyFonts = fontDatabase.collectionForFamily(family.string());
</span><span class="cx">     if (familyFonts.isEmpty()) {
</span><span class="cx">         // The CSS spec states that font-family only accepts a name of an actual font family. However, in WebKit, we claim to also
</span><span class="lines">@@ -1265,7 +1265,7 @@
</span><span class="cx">     FontLookup fontLookup;
</span><span class="cx">     fontLookup.result = platformFontWithFamilySpecialCase(family, request, size);
</span><span class="cx">     if (!fontLookup.result)
</span><del>-        fontLookup = platformFontLookupWithFamily(family, request, size, fontDescription.mayRepresentUserInstalledFont());
</del><ins>+        fontLookup = platformFontLookupWithFamily(family, request, size, fontDescription.shouldAllowUserInstalledFonts());
</ins><span class="cx">     return preparePlatformFont(fontLookup.result.get(), fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, size, !fontLookup.createdFromPostScriptName);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCacheCoreTexth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h (0 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h                         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h    2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2017 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.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
+ */
+
+#pragma once
+
+#include "FontDescription.h"
+
+#include <CoreText/CTFont.h>
+
+namespace WebCore {
+
+struct SynthesisPair {
+    SynthesisPair(bool needsSyntheticBold, bool needsSyntheticOblique)
+        : needsSyntheticBold(needsSyntheticBold)
+        , needsSyntheticOblique(needsSyntheticOblique)
+    {
+    }
+
+    std::pair<bool, bool> boldObliquePair() const
+    {
+        return std::make_pair(needsSyntheticBold, needsSyntheticOblique);
+    }
+
+    bool needsSyntheticBold;
+    bool needsSyntheticOblique;
+};
+
+RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size, bool applyWeightWidthSlopeVariations = true);
+SynthesisPair computeNecessarySynthesis(CTFontRef, const FontDescription&, bool isPlatformFont = false);
+RetainPtr<CTFontRef> platformFontWithFamilySpecialCase(const AtomicString& family, FontSelectionRequest, float size);
+RetainPtr<CTFontRef> platformFontWithFamily(const AtomicString& family, FontSelectionRequest, TextRenderingMode, float size);
+bool requiresCustomFallbackFont(UChar32 character);
+FontSelectionCapabilities capabilitiesForFontDescriptor(CTFontDescriptorRef);
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Author Date Id Rev URL
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/TextFlags.h (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/TextFlags.h   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/platform/text/TextFlags.h      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2003, 2006 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2003, 2006, 2017 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -362,4 +362,9 @@
</span><span class="cx">     ital
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class AllowUserInstalledFonts {
+    No,
+    Yes
+};
+
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveForDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveForDocument.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveForDocument.cpp   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebCore/style/StyleResolveForDocument.cpp      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">     fontDescription.setLocale(document.contentLanguage());
</span><span class="cx">     fontDescription.setRenderingMode(settings.fontRenderingMode());
</span><span class="cx">     fontDescription.setOneFamily(standardFamily);
</span><del>-    fontDescription.setMayRepresentUserInstalledFont(!settings.shouldDisallowUserInstalledFonts());
</del><ins>+    fontDescription.setShouldAllowUserInstalledFonts(settings.shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No);
</ins><span class="cx"> 
</span><span class="cx">     fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
</span><span class="cx">     int size = fontSizeForKeyword(CSSValueMedium, false, document);
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/ChangeLog       2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Refactor user-installed font setting for clarity
+        https://bugs.webkit.org/show_bug.cgi?id=181013
+
+        Reviewed by Simon Fraser.
+
+        There are no clients of this SPI yet, so we can rename it to remove the
+        grammatical negative.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetShouldAllowUserInstalledFonts):
+        (WKPreferencesGetShouldAllowUserInstalledFonts):
+        (WKPreferencesSetShouldDisallowUserInstalledFonts): Deleted.
+        (WKPreferencesGetShouldDisallowUserInstalledFonts): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _shouldAllowUserInstalledFonts]):
+        (-[WKPreferences _setShouldAllowUserInstalledFonts:]):
+        (-[WKPreferences _shouldDisallowUserInstalledFonts]): Deleted.
+        (-[WKPreferences _setShouldDisallowUserInstalledFonts:]): Deleted.
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
</ins><span class="cx"> 2017-12-19  Eric Carlson  <eric.carlson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [MediaStream] Clean up RealtimeMediaSource interfaces
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPreferencesyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPreferences.yaml   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1034,9 +1034,9 @@
</span><span class="cx">   defaultValue: 0
</span><span class="cx">   category: debug
</span><span class="cx"> 
</span><del>-ShouldDisallowUserInstalledFonts:
</del><ins>+ShouldAllowUserInstalledFonts:
</ins><span class="cx">   type: bool
</span><del>-  defaultValue: false
</del><ins>+  defaultValue: true
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> # For experimental features:
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp    2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp       2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -1920,12 +1920,12 @@
</span><span class="cx">     return toImpl(preferencesRef)->accessibilityObjectModelEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPreferencesSetShouldDisallowUserInstalledFonts(WKPreferencesRef preferencesRef, bool flag)
</del><ins>+void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef, bool flag)
</ins><span class="cx"> {
</span><del>-    toImpl(preferencesRef)->setShouldDisallowUserInstalledFonts(flag);
</del><ins>+    toImpl(preferencesRef)->setShouldAllowUserInstalledFonts(flag);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WKPreferencesGetShouldDisallowUserInstalledFonts(WKPreferencesRef preferencesRef)
</del><ins>+bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef)
</ins><span class="cx"> {
</span><del>-    return toImpl(preferencesRef)->shouldDisallowUserInstalledFonts();
</del><ins>+    return toImpl(preferencesRef)->shouldAllowUserInstalledFonts();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h    2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h       2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -546,8 +546,8 @@
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef);
</span><span class="cx"> 
</span><span class="cx"> // Defaults to false.
</span><del>-WK_EXPORT void WKPreferencesSetShouldDisallowUserInstalledFonts(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetShouldDisallowUserInstalledFonts(WKPreferencesRef);
</del><ins>+WK_EXPORT void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef);
</ins><span class="cx">     
</span><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm    2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -657,14 +657,14 @@
</span><span class="cx">     _preferences->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (BOOL)_shouldDisallowUserInstalledFonts
</del><ins>+- (BOOL)_shouldAllowUserInstalledFonts
</ins><span class="cx"> {
</span><del>-    return _preferences->shouldDisallowUserInstalledFonts();
</del><ins>+    return _preferences->shouldAllowUserInstalledFonts();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_setShouldDisallowUserInstalledFonts:(BOOL)_shouldDisallowUserInstalledFonts
</del><ins>+- (void)_setShouldAllowUserInstalledFonts:(BOOL)_shouldAllowUserInstalledFonts
</ins><span class="cx"> {
</span><del>-    _preferences->setShouldDisallowUserInstalledFonts(_shouldDisallowUserInstalledFonts);
</del><ins>+    _preferences->setShouldAllowUserInstalledFonts(_shouldAllowUserInstalledFonts);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (226171 => 226172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h   2017-12-20 03:17:24 UTC (rev 226171)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h      2017-12-20 03:24:15 UTC (rev 226172)
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> @property (nonatomic, setter=_setJavaScriptCanAccessClipboard:) BOOL _javaScriptCanAccessClipboard WK_API_AVAILABLE(macosx(10.13), ios(11.0));
</span><span class="cx"> @property (nonatomic, setter=_setDOMPasteAllowed:) BOOL _domPasteAllowed WK_API_AVAILABLE(macosx(10.13), ios(11.0));
</span><span class="cx"> 
</span><del>-@property (nonatomic, setter=_setShouldDisallowUserInstalledFonts:) BOOL _shouldDisallowUserInstalledFonts WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</del><ins>+@property (nonatomic, setter=_setShouldAllowUserInstalledFonts:) BOOL _shouldAllowUserInstalledFonts WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</ins><span class="cx"> 
</span><span class="cx"> + (NSArray<_WKExperimentalFeature *> *)_experimentalFeatures WK_API_AVAILABLE(macosx(10.12), ios(10.0));
</span><span class="cx"> - (BOOL)_isEnabledForFeature:(_WKExperimentalFeature *)feature WK_API_AVAILABLE(macosx(10.12), ios(10.0));
</span></span></pre>
</div>
</div>

</body>
</html>