<!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>[193439] branches/safari-601.1.46-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/193439">193439</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-12-04 12:51:26 -0800 (Fri, 04 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/187249">r187249</a>. rdar://problem/23581597</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchLayoutTestsplatformeflTestExpectations">branches/safari-601.1.46-branch/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#branchessafari601146branchLayoutTestsplatformwinTestExpectations">branches/safari-601.1.46-branch/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#branchessafari601146branchSourceJavaScriptCoreChangeLog">branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceJavaScriptCoreinspectorprotocolCSSjson">branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/protocol/CSS.json</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreChangeLog">branches/safari-601.1.46-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreinspectorInspectorCSSAgentcpp">branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreinspectorInspectorCSSAgenth">branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreplatformgraphicsFontCacheh">branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp">branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm">branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreplatformgraphicsmacFontCacheMacmm">branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreplatformgraphicswinFontCacheWincpp">branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIChangeLog">branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIUserInterfaceBaseMainjs">branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIUserInterfaceBaseTestjs">branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Test.js</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIUserInterfaceModelsCSSCompletionsjs">branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsinspectorcssgetsystemfontsexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestsinspectorcssgetsystemfontshtml">branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -1,5 +1,25 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r187249. rdar://problem/23581597
+
+ 2015-07-23 Devin Rousso <drousso@apple.com>
+
+ 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-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187211. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-07-22 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsinspectorcssgetsystemfontsexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt (0 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts-expected.txt        2015-12-04 20:51:26 UTC (rev 193439)
</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="branchessafari601146branchLayoutTestsinspectorcssgetsystemfontshtml"></a>
<div class="addfile"><h4>Added: branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts.html (0 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts.html         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/inspector/css/get-system-fonts.html        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/inspector-test.js"></script>
+<script>
+// 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) ? "PASS: Includes " : "FAIL: Missing ") + fontFamily;
+ }
+
+ function fontFamilyNamesCallback(error, fontFamilyNames) {
+ InspectorTest.assert(!error, "Error in getting font family names.");
+
+ if (!error) {
+ InspectorTest.log("Has at least 5 fonts: " + (fontFamilyNames.length >= 5));
+ InspectorTest.log(hasFontFamily(fontFamilyNames, "Arial"));
+ InspectorTest.log(hasFontFamily(fontFamilyNames, "Times"));
+ }
+
+ InspectorTest.completeTest();
+ }
+ CSSAgent.getSupportedSystemFontFamilyNames(fontFamilyNamesCallback);
+}
+</script>
+</head>
+<body onload="runTest()"></body>
+</html>
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/platform/efl/TestExpectations (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/platform/efl/TestExpectations        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/LayoutTests/platform/efl/TestExpectations        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -663,6 +663,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="branchessafari601146branchLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/platform/win/TestExpectations (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/platform/win/TestExpectations        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/LayoutTests/platform/win/TestExpectations        2015-12-04 20:51:26 UTC (rev 193439)
</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="branchessafari601146branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r187249. rdar://problem/23581597
+
+ 2015-07-23 Devin Rousso <drousso@apple.com>
+
+ 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-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187211. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-07-22 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchSourceJavaScriptCoreinspectorprotocolCSSjson"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/protocol/CSS.json (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/protocol/CSS.json        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/protocol/CSS.json        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -348,6 +348,13 @@
</span><span class="cx"> "description": "Returns all supported CSS property names."
</span><span class="cx"> },
</span><span class="cx"> {
</span><ins>+ "name": "getSupportedSystemFontFamilyNames",
+ "returns": [
+ { "name": "fontFamilyNames", "type": "array", "items": { "type": "string" }, "description": "Supported system font families." }
+ ],
+ "description": "Returns all supported system font family names."
+ },
+ {
</ins><span class="cx"> "name": "forcePseudoState",
</span><span class="cx"> "parameters": [
</span><span class="cx"> { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -1,5 +1,32 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r187249. rdar://problem/23581597
+
+ 2015-07-23 Devin Rousso <drousso@apple.com>
+
+ 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-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187211. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-07-22 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.cpp        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include "ContentSecurityPolicy.h"
</span><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "ExceptionCodePlaceholder.h"
</span><ins>+#include "FontCache.h"
</ins><span class="cx"> #include "HTMLHeadElement.h"
</span><span class="cx"> #include "HTMLStyleElement.h"
</span><span class="cx"> #include "InspectorDOMAgent.h"
</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&, RefPtr<Inspector::Protocol::Array<String>>& fontFamilyNames)
+{
+ auto families = Inspector::Protocol::Array<String>::create();
+
+ Vector<String> systemFontFamilies = FontCache::singleton().systemFontFamilies();
+ for (const auto& familyName : systemFontFamilies)
+ families->addItem(familyName);
+
+ fontFamilyNames = WTF::move(families);
+}
+
</ins><span class="cx"> void InspectorCSSAgent::forcePseudoState(ErrorString& errorString, int nodeId, const InspectorArray& forcedPseudoClasses)
</span><span class="cx"> {
</span><span class="cx"> Element* element = m_domAgent->assertElement(errorString, nodeId);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreinspectorInspectorCSSAgenth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.h (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.h        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorCSSAgent.h        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -119,6 +119,7 @@
</span><span class="cx"> virtual void setRuleSelector(ErrorString&, const Inspector::InspectorObject& ruleId, const String& selector, RefPtr<Inspector::Protocol::CSS::CSSRule>& result) override;
</span><span class="cx"> virtual void addRule(ErrorString&, int contextNodeId, const String& selector, RefPtr<Inspector::Protocol::CSS::CSSRule>& result) override;
</span><span class="cx"> virtual void getSupportedCSSProperties(ErrorString&, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSPropertyInfo>>& result) override;
</span><ins>+ virtual void getSupportedSystemFontFamilyNames(ErrorString&, RefPtr<Inspector::Protocol::Array<String>>& result) override;
</ins><span class="cx"> virtual void forcePseudoState(ErrorString&, int nodeId, const Inspector::InspectorArray& forcedPseudoClasses) override;
</span><span class="cx"> virtual void getNamedFlowCollection(ErrorString&, int documentNodeId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::NamedFlow>>& result) override;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCache.h (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCache.h        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -110,10 +110,9 @@
</span><span class="cx"> public:
</span><span class="cx"> WEBCORE_EXPORT static FontCache& 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<Font> systemFallbackForCharacters(const FontDescription&, const Font* originalFontData, bool isPlatformFont, const UChar* characters, unsigned length);
</span><del>-
- // Also implemented by the platform.
</del><ins>+ Vector<String> systemFontFamilies();
</ins><span class="cx"> void platformInit();
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-12-04 20:51:26 UTC (rev 193439)
</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<String> FontCache::systemFontFamilies()
+{
+ // FIXME: <https://webkit.org/b/147018> Web Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
+ Vector<String> fontFamilies;
+ return fontFamilies;
+}
+
</ins><span class="cx"> Ref<Font> FontCache::lastResortFallbackFont(const FontDescription& 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="branchessafari601146branchSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-12-04 20:51:26 UTC (rev 193439)
</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<String> FontCache::systemFontFamilies()
+{
+ // FIXME: <https://webkit.org/b/147033> Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
+ Vector<String> fontFamilies;
+ return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr<Font> FontCache::similarFont(const FontDescription& 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="branchessafari601146branchSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-12-04 20:51:26 UTC (rev 193439)
</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<String> FontCache::systemFontFamilies()
+{
+ Vector<String> fontFamilies;
+ RetainPtr<CFArrayRef> availableFontFamilies = adoptCF(CTFontManagerCopyAvailableFontFamilyNames());
+ CFIndex count = CFArrayGetCount(availableFontFamilies.get());
+ for (CFIndex i = 0; i < count; ++i) {
+ CFStringRef fontName = static_cast<CFStringRef>(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(".")))
+ continue;
+ fontFamilies.append(fontName);
+ }
+ return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr<Font> FontCache::similarFont(const FontDescription& 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="branchessafari601146branchSourceWebCoreplatformgraphicswinFontCacheWincpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-12-04 20:51:26 UTC (rev 193439)
</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<String> FontCache::systemFontFamilies()
+{
+ // FIXME: <https://webkit.org/b/147017> Web Inspector: [Win] Allow inspector to retrieve a list of system fonts
+ Vector<String> fontFamilies;
+ return fontFamilies;
+}
+
</ins><span class="cx"> RefPtr<Font> FontCache::fontFromDescriptionAndLogFont(const FontDescription& fontDescription, const LOGFONT& font, AtomicString& 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="branchessafari601146branchSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog        2015-12-04 20:51:26 UTC (rev 193439)
</span><span class="lines">@@ -1,5 +1,28 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r187249. rdar://problem/23581597
+
+ 2015-07-23 Devin Rousso <drousso@apple.com>
+
+ 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-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187211. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-07-22 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Main.js (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-12-04 20:51:26 UTC (rev 193439)
</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">@@ -501,7 +501,7 @@
</span><span class="cx">
</span><span class="cx"> this.notifications.dispatchEventToListeners(WebInspector.Notification.ExtraDomainsActivated, {"domains": 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="branchessafari601146branchSourceWebInspectorUIUserInterfaceBaseTestjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Test.js (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Test.js        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Base/Test.js        2015-12-04 20:51:26 UTC (rev 193439)
</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("show-shadow-dom", true);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebInspectorUIUserInterfaceModelsCSSCompletionsjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js (193438 => 193439)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js        2015-12-04 20:51:12 UTC (rev 193438)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js        2015-12-04 20:51:26 UTC (rev 193439)
</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("text/x-scss");
</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("font-family", fontFamilyNames);
+ WebInspector.CSSKeywordCompletions.addPropertyCompletionValues("font", 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>