<!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>[193019] branches/safari-601-branch</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/193019">193019</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-12-03 10:32:05 -0800 (Thu, 03 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/187249">r187249</a>. rdar://problem/23221163</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsChangeLog">branches/safari-601-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601branchLayoutTestsplatformeflTestExpectations">branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#branchessafari601branchLayoutTestsplatformwinTestExpectations">branches/safari-601-branch/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#branchessafari601branchSourceJavaScriptCoreChangeLog">branches/safari-601-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceJavaScriptCoreinspectorprotocolCSSjson">branches/safari-601-branch/Source/JavaScriptCore/inspector/protocol/CSS.json</a></li>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCoreinspectorInspectorCSSAgentcpp">branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreinspectorInspectorCSSAgenth">branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsFontCacheh">branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm">branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacFontCacheMacmm">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicswinFontCacheWincpp">branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIChangeLog">branches/safari-601-branch/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceBaseMainjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceBaseTestjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceModelsCSSCompletionsjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsinspectorcssgetsystemfontsexpectedtxt">branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsinspectorcssgetsystemfontshtml">branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -1,5 +1,25 @@
</span><span class="cx"> 2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r187249. rdar://problem/23221163
+
+    2015-07-23  Devin Rousso  &lt;drousso@apple.com&gt;
+
+            Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
+            https://bugs.webkit.org/show_bug.cgi?id=147009
+
+            Reviewed by Joseph Pecoraro.
+
+            Skip the get-system-fonts test until it is implemented.
+            * platform/efl/TestExpectations:
+            * platform/gtk/TestExpectations:
+            * platform/win/TestExpectations:
+
+            Added the get-system-fonts test that returns the list of system fonts.
+            * inspector/css/get-system-fonts-expected.html:
+            * inspector/css/get-system-fonts.html:
+
+2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Merge r187211. rdar://problem/23221163
</span><span class="cx"> 
</span><span class="cx">     2015-07-22  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsinspectorcssgetsystemfontsexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt (0 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+Has at least 5 fonts: true
+PASS: Includes Arial
+PASS: Includes Times
+
</ins></span></pre></div>
<a id="branchessafari601branchLayoutTestsinspectorcssgetsystemfontshtml"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts.html (0 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts.html                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/css/get-system-fonts.html        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script type=&quot;text/javascript&quot; src=&quot;../../http/tests/inspector/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+// Testing that we can get the fonts on the system and that the fonts contain some universal fonts (arial, times, etc).
+function test() {
+    function hasFontFamily(fontFamilies, fontFamily) {
+        return (fontFamilies.includes(fontFamily) ? &quot;PASS: Includes &quot; : &quot;FAIL: Missing &quot;) + fontFamily;
+    }
+
+    function fontFamilyNamesCallback(error, fontFamilyNames) {
+        InspectorTest.assert(!error, &quot;Error in getting font family names.&quot;);
+
+        if (!error) {
+            InspectorTest.log(&quot;Has at least 5 fonts: &quot; + (fontFamilyNames.length &gt;= 5));
+            InspectorTest.log(hasFontFamily(fontFamilyNames, &quot;Arial&quot;));
+            InspectorTest.log(hasFontFamily(fontFamilyNames, &quot;Times&quot;));
+        }
+
+        InspectorTest.completeTest();
+    }
+    CSSAgent.getSupportedSystemFontFamilyNames(fontFamilyNamesCallback);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601branchLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/LayoutTests/platform/efl/TestExpectations        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -660,6 +660,8 @@
</span><span class="cx"> 
</span><span class="cx"> #webkit.org/b/142158 inspector-protocol/dom/remove-multiple-nodes.html [ Crash Pass ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/147018 inspector/css/get-system-fonts.html [ Skip ]
+
</ins><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # FLAKY TESTS
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/platform/win/TestExpectations (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/platform/win/TestExpectations        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/LayoutTests/platform/win/TestExpectations        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -2355,6 +2355,8 @@
</span><span class="cx"> inspector/css/selector-specificity.html [ Skip ]
</span><span class="cx"> inspector/css/pseudo-element-matches.html [ Skip ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/147017 inspector/css/get-system-fonts.html [ Skip ]
+
</ins><span class="cx"> # Inspector Protocol
</span><span class="cx"> webkit.org/b/140510 inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]  # Crashing
</span><span class="cx"> inspector-protocol/debugger/pause-on-assert.html [ Skip ]
</span></span></pre></div>
<a id="branchessafari601branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/JavaScriptCore/ChangeLog (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/JavaScriptCore/ChangeLog        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/JavaScriptCore/ChangeLog        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r187249. rdar://problem/23221163
+
+    2015-07-23  Devin Rousso  &lt;drousso@apple.com&gt;
+
+            Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
+            https://bugs.webkit.org/show_bug.cgi?id=147009
+
+            Reviewed by Joseph Pecoraro.
+
+            * inspector/protocol/CSS.json: Added getSupportedSystemFontFamilyNames function.
+
+2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Merge r187211. rdar://problem/23221163
</span><span class="cx"> 
</span><span class="cx">     2015-07-22  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceJavaScriptCoreinspectorprotocolCSSjson"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/JavaScriptCore/inspector/protocol/CSS.json (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/JavaScriptCore/inspector/protocol/CSS.json        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/JavaScriptCore/inspector/protocol/CSS.json        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -348,6 +348,13 @@
</span><span class="cx">             &quot;description&quot;: &quot;Returns all supported CSS property names.&quot;
</span><span class="cx">         },
</span><span class="cx">         {
</span><ins>+            &quot;name&quot;: &quot;getSupportedSystemFontFamilyNames&quot;,
+            &quot;returns&quot;: [
+                { &quot;name&quot;: &quot;fontFamilyNames&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;description&quot;: &quot;Supported system font families.&quot; }
+            ],
+            &quot;description&quot;: &quot;Returns all supported system font family names.&quot;
+        },
+        {
</ins><span class="cx">             &quot;name&quot;: &quot;forcePseudoState&quot;,
</span><span class="cx">             &quot;parameters&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;nodeId&quot;, &quot;$ref&quot;: &quot;DOM.NodeId&quot;, &quot;description&quot;: &quot;The element id for which to force the pseudo state.&quot; },
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -1,5 +1,32 @@
</span><span class="cx"> 2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r187249. rdar://problem/23221163
+
+    2015-07-23  Devin Rousso  &lt;drousso@apple.com&gt;
+
+            Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
+            https://bugs.webkit.org/show_bug.cgi?id=147009
+
+            Reviewed by Joseph Pecoraro.
+
+            Test: inspector/css/get-system-fonts.html
+
+            * inspector/InspectorCSSAgent.cpp:
+            (WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
+            Gets the list of system fonts (implemented in each platform) and returns that list.
+            * inspector/InspectorCSSAgent.h:
+            * platform/graphics/FontCache.h:
+            * platform/graphics/freetype/FontCacheFreeType.cpp:
+            (WebCore::FontCache::systemFontFamilies):
+            * platform/graphics/ios/FontCacheIOS.mm:
+            (WebCore::FontCache::systemFontFamilies):
+            * platform/graphics/mac/FontCacheMac.mm:
+            (WebCore::FontCache::systemFontFamilies):
+            * platform/graphics/win/FontCacheWin.cpp:
+            (WebCore::FontCache::systemFontFamilies):
+
+2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Merge r187211. rdar://problem/23221163
</span><span class="cx"> 
</span><span class="cx">     2015-07-22  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;ContentSecurityPolicy.h&quot;
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><ins>+#include &quot;FontCache.h&quot;
</ins><span class="cx"> #include &quot;HTMLHeadElement.h&quot;
</span><span class="cx"> #include &quot;HTMLStyleElement.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMAgent.h&quot;
</span><span class="lines">@@ -708,6 +709,17 @@
</span><span class="cx">     cssProperties = WTF::move(properties);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InspectorCSSAgent::getSupportedSystemFontFamilyNames(ErrorString&amp;, RefPtr&lt;Inspector::Protocol::Array&lt;String&gt;&gt;&amp; fontFamilyNames)
+{
+    auto families = Inspector::Protocol::Array&lt;String&gt;::create();
+
+    Vector&lt;String&gt; systemFontFamilies = FontCache::singleton().systemFontFamilies();
+    for (const auto&amp; familyName : systemFontFamilies)
+        families-&gt;addItem(familyName);
+
+    fontFamilyNames = WTF::move(families);
+}
+
</ins><span class="cx"> void InspectorCSSAgent::forcePseudoState(ErrorString&amp; errorString, int nodeId, const InspectorArray&amp; forcedPseudoClasses)
</span><span class="cx"> {
</span><span class="cx">     Element* element = m_domAgent-&gt;assertElement(errorString, nodeId);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreinspectorInspectorCSSAgenth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.h (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.h        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/inspector/InspectorCSSAgent.h        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -119,6 +119,7 @@
</span><span class="cx">     virtual void setRuleSelector(ErrorString&amp;, const Inspector::InspectorObject&amp; ruleId, const String&amp; selector, RefPtr&lt;Inspector::Protocol::CSS::CSSRule&gt;&amp; result) override;
</span><span class="cx">     virtual void addRule(ErrorString&amp;, int contextNodeId, const String&amp; selector, RefPtr&lt;Inspector::Protocol::CSS::CSSRule&gt;&amp; result) override;
</span><span class="cx">     virtual void getSupportedCSSProperties(ErrorString&amp;, RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::CSS::CSSPropertyInfo&gt;&gt;&amp; result) override;
</span><ins>+    virtual void getSupportedSystemFontFamilyNames(ErrorString&amp;, RefPtr&lt;Inspector::Protocol::Array&lt;String&gt;&gt;&amp; result) override;
</ins><span class="cx">     virtual void forcePseudoState(ErrorString&amp;, int nodeId, const Inspector::InspectorArray&amp; forcedPseudoClasses) override;
</span><span class="cx">     virtual void getNamedFlowCollection(ErrorString&amp;, int documentNodeId, RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::CSS::NamedFlow&gt;&gt;&amp; result) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -110,10 +110,9 @@
</span><span class="cx"> public:
</span><span class="cx">     WEBCORE_EXPORT static FontCache&amp; singleton();
</span><span class="cx"> 
</span><del>-    // This method is implemented by the platform.
</del><ins>+    // These methods are implemented by the platform.
</ins><span class="cx">     RefPtr&lt;Font&gt; systemFallbackForCharacters(const FontDescription&amp;, const Font* originalFontData, bool isPlatformFont, const UChar* characters, unsigned length);
</span><del>-
-    // Also implemented by the platform.
</del><ins>+    Vector&lt;String&gt; systemFontFamilies();
</ins><span class="cx">     void platformInit();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -98,6 +98,13 @@
</span><span class="cx">     return fontForPlatformData(alternateFontData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Vector&lt;String&gt; FontCache::systemFontFamilies()
+{
+    // FIXME: &lt;https://webkit.org/b/147018&gt; Web Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
+    Vector&lt;String&gt; fontFamilies;
+    return fontFamilies;
+}
+
</ins><span class="cx"> Ref&lt;Font&gt; FontCache::lastResortFallbackFont(const FontDescription&amp; fontDescription)
</span><span class="cx"> {
</span><span class="cx">     // We want to return a fallback font here, otherwise the logic preventing FontConfig
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -462,6 +462,13 @@
</span><span class="cx">     return lastResortFallbackFont(description);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Vector&lt;String&gt; FontCache::systemFontFamilies()
+{
+    // FIXME: &lt;https://webkit.org/b/147033&gt; Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
+    Vector&lt;String&gt; fontFamilies;
+    return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr&lt;Font&gt; FontCache::similarFont(const FontDescription&amp; description)
</span><span class="cx"> {
</span><span class="cx">     // Attempt to find an appropriate font using a match based on the presence of keywords in
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -527,6 +527,26 @@
</span><span class="cx">     return fontForPlatformData(alternateFont);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Vector&lt;String&gt; FontCache::systemFontFamilies()
+{
+    Vector&lt;String&gt; fontFamilies;
+    RetainPtr&lt;CFArrayRef&gt; availableFontFamilies = adoptCF(CTFontManagerCopyAvailableFontFamilyNames());
+    CFIndex count = CFArrayGetCount(availableFontFamilies.get());
+    for (CFIndex i = 0; i &lt; count; ++i) {
+        CFStringRef fontName = static_cast&lt;CFStringRef&gt;(CFArrayGetValueAtIndex(availableFontFamilies.get(), i));
+        if (CFGetTypeID(fontName) != CFStringGetTypeID()) {
+            ASSERT_NOT_REACHED();
+            continue;
+        }
+        // We don't want to make the hidden system fonts visible and since they
+        // all begin with a period, ignore all fonts that begin with a period.
+        if (CFStringHasPrefix(fontName, CFSTR(&quot;.&quot;)))
+            continue;
+        fontFamilies.append(fontName);
+    }
+    return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr&lt;Font&gt; FontCache::similarFont(const FontDescription&amp; description)
</span><span class="cx"> {
</span><span class="cx">     // Attempt to find an appropriate font using a match based on 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicswinFontCacheWincpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -309,6 +309,13 @@
</span><span class="cx">     return fontData.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Vector&lt;String&gt; FontCache::systemFontFamilies()
+{
+    // FIXME: &lt;https://webkit.org/b/147017&gt; Web Inspector: [Win] Allow inspector to retrieve a list of system fonts
+    Vector&lt;String&gt; fontFamilies;
+    return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr&lt;Font&gt; FontCache::fontFromDescriptionAndLogFont(const FontDescription&amp; fontDescription, const LOGFONT&amp; font, AtomicString&amp; outFontFamilyName)
</span><span class="cx"> {
</span><span class="cx">     AtomicString familyName = String(font.lfFaceName, wcsnlen(font.lfFaceName, LF_FACESIZE));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -1,5 +1,28 @@
</span><span class="cx"> 2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r187249. rdar://problem/23221163
+
+    2015-07-23  Devin Rousso  &lt;drousso@apple.com&gt;
+
+            Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
+            https://bugs.webkit.org/show_bug.cgi?id=147009
+
+            Reviewed by Joseph Pecoraro.
+
+            * UserInterface/Base/Main.js:
+            (WebInspector.loaded):
+            (WebInspector.activateExtraDomains):
+            * UserInterface/Base/Test.js:
+            (WebInspector.loaded):
+            * UserInterface/Models/CSSCompletions.js:
+            (WebInspector.CSSCompletions.requestCSSCompletions.fontFamilyNamesCallback):
+            (WebInspector.CSSCompletions.requestCSSCompletions):
+            Now also grabs the list of system font family names and adds that list to the existing completion
+            list for both font and font-family in CSSKeywordCompletions.
+            (WebInspector.CSSCompletions.requestCSSNameCompletions): Deleted.
+
+2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Merge r187227. rdar://problem/23221163
</span><span class="cx"> 
</span><span class="cx">     2015-07-23  Matt Baker  &lt;mattbaker@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">         InspectorAgent.enable();
</span><span class="cx"> 
</span><span class="cx">     // Perform one-time tasks.
</span><del>-    WebInspector.CSSCompletions.requestCSSNameCompletions();
</del><ins>+    WebInspector.CSSCompletions.requestCSSCompletions();
</ins><span class="cx">     this._generateDisclosureTriangleImages();
</span><span class="cx"> 
</span><span class="cx">     // Listen for the ProvisionalLoadStarted event before registering for events so our code gets called before any managers or sidebars.
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx"> 
</span><span class="cx">     this.notifications.dispatchEventToListeners(WebInspector.Notification.ExtraDomainsActivated, {&quot;domains&quot;: domains});
</span><span class="cx"> 
</span><del>-    WebInspector.CSSCompletions.requestCSSNameCompletions();
</del><ins>+    WebInspector.CSSCompletions.requestCSSCompletions();
</ins><span class="cx"> 
</span><span class="cx">     this._updateReloadToolbarButton();
</span><span class="cx">     this._updateDownloadToolbarButton();
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceBaseTestjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Test.js        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     ConsoleAgent.enable();
</span><span class="cx"> 
</span><span class="cx">     // Perform one-time tasks.
</span><del>-    WebInspector.CSSCompletions.requestCSSNameCompletions();
</del><ins>+    WebInspector.CSSCompletions.requestCSSCompletions();
</ins><span class="cx"> 
</span><span class="cx">     // Global settings.
</span><span class="cx">     this.showShadowDOMSetting = new WebInspector.Setting(&quot;show-shadow-dom&quot;, true);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceModelsCSSCompletionsjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js (193018 => 193019)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js        2015-12-03 18:31:49 UTC (rev 193018)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js        2015-12-03 18:32:05 UTC (rev 193019)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Static
</span><span class="cx"> 
</span><del>-    static requestCSSNameCompletions()
</del><ins>+    static requestCSSCompletions()
</ins><span class="cx">     {
</span><span class="cx">         if (WebInspector.CSSCompletions.cssNameCompletions)
</span><span class="cx">             return;
</span><span class="lines">@@ -158,8 +158,21 @@
</span><span class="cx">             updateCodeMirrorCSSMode(&quot;text/x-scss&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (window.CSSAgent)
</del><ins>+        function fontFamilyNamesCallback(error, fontFamilyNames)
+        {
+            if (error)
+                return;
+
+            WebInspector.CSSKeywordCompletions.addPropertyCompletionValues(&quot;font-family&quot;, fontFamilyNames);
+            WebInspector.CSSKeywordCompletions.addPropertyCompletionValues(&quot;font&quot;, fontFamilyNames);
+        }
+
+        if (window.CSSAgent) {
</ins><span class="cx">             CSSAgent.getSupportedCSSProperties(propertyNamesCallback);
</span><ins>+
+            if (CSSAgent.getSupportedSystemFontFamilyNames)
+                CSSAgent.getSupportedSystemFontFamilyNames(fontFamilyNamesCallback);
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span></span></pre>
</div>
</div>

</body>
</html>