<!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>[204592] 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/204592">204592</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-08-17 23:38:14 -0700 (Wed, 17 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Migrate off of deprecated CoreGraphics API CGContextSelectFont() and CGContextShowTextAtPoint()
https://bugs.webkit.org/show_bug.cgi?id=160895

Reviewed by Dean Jackson.

Source/WebCore:

Migrate to CTLineDraw() instead.

This patch also adds support for linking to the existing CoreText framework on Windows.

No new tests because there is no behavior change.

* PlatformWin.cmake:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::showText):
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawTextAtPoint):
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::drawLayer):
* platform/spi/win/CoreTextSPIWin.cpp: Added.
* platform/spi/win/CoreTextSPIWin.h: Added.

Source/WebKit:

Link to the existing CoreText framework.

* PlatformWin.cmake:

Tools:

Link to the existing CoreText framework.

* DumpRenderTree/PlatformWin.cmake:
* TestWebKitAPI/PlatformWin.cmake:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformWincmake">trunk/Source/WebCore/PlatformWin.cmake</a></li>
<li><a href="#trunkSourceWebCorepagecocoaResourceUsageOverlayCocoamm">trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCALayercpp">trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformiosLegacyTileCachemm">trunk/Source/WebCore/platform/ios/LegacyTileCache.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitPlatformWincmake">trunk/Source/WebKit/PlatformWin.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreePlatformWincmake">trunk/Tools/DumpRenderTree/PlatformWin.cmake</a></li>
<li><a href="#trunkToolsTestWebKitAPIPlatformWincmake">trunk/Tools/TestWebKitAPI/PlatformWin.cmake</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebCore/platform/spi/win/</li>
<li><a href="#trunkSourceWebCoreplatformspiwinCoreTextSPIWincpp">trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformspiwinCoreTextSPIWinh">trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebCore/ChangeLog        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-08-17  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Migrate off of deprecated CoreGraphics API CGContextSelectFont() and CGContextShowTextAtPoint()
+        https://bugs.webkit.org/show_bug.cgi?id=160895
+
+        Reviewed by Dean Jackson.
+
+        Migrate to CTLineDraw() instead.
+
+        This patch also adds support for linking to the existing CoreText framework on Windows.
+
+        No new tests because there is no behavior change.
+
+        * PlatformWin.cmake:
+        * page/cocoa/ResourceUsageOverlayCocoa.mm:
+        (WebCore::showText):
+        * platform/graphics/ca/PlatformCALayer.cpp:
+        (WebCore::PlatformCALayer::drawTextAtPoint):
+        * platform/ios/LegacyTileCache.mm:
+        (WebCore::LegacyTileCache::drawLayer):
+        * platform/spi/win/CoreTextSPIWin.cpp: Added.
+        * platform/spi/win/CoreTextSPIWin.h: Added.
+
</ins><span class="cx"> 2016-08-17  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS] The parser should not get rid of empty namespace specification in front of element name selectors
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformWin.cmake (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformWin.cmake        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebCore/PlatformWin.cmake        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/graphics/opentype&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/graphics/win&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/network/win&quot;
</span><ins>+    &quot;${WEBCORE_DIR}/platform/spi/win&quot;
</ins><span class="cx">     &quot;${WEBCORE_DIR}/platform/win&quot;
</span><span class="cx">     &quot;${THIRDPARTY_DIR}/ANGLE/include&quot;
</span><span class="cx">     &quot;${THIRDPARTY_DIR}/ANGLE/include/egl&quot;
</span><span class="lines">@@ -104,6 +105,8 @@
</span><span class="cx">     platform/network/win/DownloadBundleWin.cpp
</span><span class="cx">     platform/network/win/NetworkStateNotifierWin.cpp
</span><span class="cx"> 
</span><ins>+    platform/spi/win/CoreTextSPIWin.cpp
+
</ins><span class="cx">     platform/text/LocaleNone.cpp
</span><span class="cx"> 
</span><span class="cx">     platform/text/cf/HyphenationCF.cpp
</span></span></pre></div>
<a id="trunkSourceWebCorepagecocoaResourceUsageOverlayCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOURCE_USAGE)
</span><span class="cx"> 
</span><ins>+#include &lt;CoreText/CoreText.h&gt;
+
</ins><span class="cx"> #include &quot;JSDOMWindow.h&quot;
</span><span class="cx"> #include &quot;PlatformCALayer.h&quot;
</span><span class="cx"> #include &quot;ResourceUsageThread.h&quot;
</span><span class="lines">@@ -252,21 +254,24 @@
</span><span class="cx">     CGContextSetTextDrawingMode(context, kCGTextFill);
</span><span class="cx">     CGContextSetFillColorWithColor(context, color);
</span><span class="cx"> 
</span><del>-    CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1, -1));
-
-    // FIXME: Don't use deprecated APIs.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
-
</del><ins>+    CGAffineTransform matrix = CGAffineTransformMakeScale(1, -1);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>-    CGContextSelectFont(context, &quot;Courier&quot;, 10, kCGEncodingMacRoman);
</del><ins>+    CFStringRef fontName = CFSTR(&quot;Courier&quot;);
+    CGFloat fontSize = 10;
</ins><span class="cx"> #else
</span><del>-    CGContextSelectFont(context, &quot;Menlo&quot;, 11, kCGEncodingMacRoman);
</del><ins>+    CFStringRef fontName = CFSTR(&quot;Menlo&quot;);
+    CGFloat fontSize = 11;
</ins><span class="cx"> #endif
</span><del>-
</del><ins>+    RetainPtr&lt;CTFontRef&gt; font = adoptCF(CTFontCreateWithName(fontName, fontSize, &amp;matrix));
+    CFTypeRef keys[] = { kCTFontAttributeName, kCTForegroundColorFromContextAttributeName };
+    CFTypeRef values[] = { font.get(), kCFBooleanTrue };
+    RetainPtr&lt;CFDictionaryRef&gt; attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</ins><span class="cx">     CString cstr = text.ascii();
</span><del>-    CGContextShowTextAtPoint(context, x, y, cstr.data(), cstr.length());
-#pragma clang diagnostic pop
</del><ins>+    RetainPtr&lt;CFStringRef&gt; string = adoptCF(CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast&lt;const UInt8*&gt;(cstr.data()), cstr.length(), kCFStringEncodingASCII, false, kCFAllocatorNull));
+    RetainPtr&lt;CFAttributedStringRef&gt; attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), attributes.get()));
+    RetainPtr&lt;CTLineRef&gt; line = adoptCF(CTLineCreateWithAttributedString(attributedString.get()));
+    CGContextSetTextPosition(context, x, y);
+    CTLineDraw(line.get(), context);
</ins><span class="cx"> 
</span><span class="cx">     CGContextRestoreGState(context);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCALayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -26,6 +26,9 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;PlatformCALayer.h&quot;
</span><span class="cx"> 
</span><ins>+#include &lt;CoreFoundation/CoreFoundation.h&gt;
+#include &lt;CoreText/CoreText.h&gt;
+
</ins><span class="cx"> #include &quot;GraphicsContextCG.h&quot;
</span><span class="cx"> #include &quot;LayerPool.h&quot;
</span><span class="cx"> #include &quot;PlatformCALayerClient.h&quot;
</span><span class="lines">@@ -32,6 +35,10 @@
</span><span class="cx"> #include &quot;TextStream.h&quot;
</span><span class="cx"> #include &lt;wtf/StringExtras.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(WIN)
+#include &quot;CoreTextSPIWin.h&quot;
+#endif
+
</ins><span class="cx"> #if USE(CA)
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -121,12 +128,16 @@
</span><span class="cx"> // This function is needed to work around a bug in Windows CG &lt;rdar://problem/22703470&gt;
</span><span class="cx"> void PlatformCALayer::drawTextAtPoint(CGContextRef context, CGFloat x, CGFloat y, CGSize scale, CGFloat fontSize, const char* text, size_t length) const
</span><span class="cx"> {
</span><del>-#pragma clang diagnostic push
-#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
-    CGContextSetTextMatrix(context, CGAffineTransformMakeScale(scale.width, scale.height));
-    CGContextSelectFont(context, &quot;Helvetica&quot;, fontSize, kCGEncodingMacRoman);
-    CGContextShowTextAtPoint(context, x, y, text, length);
-#pragma clang diagnostic pop
</del><ins>+    CGAffineTransform matrix = CGAffineTransformMakeScale(scale.width, scale.height);
+    RetainPtr&lt;CTFontRef&gt; font = adoptCF(CTFontCreateWithName(CFSTR(&quot;Helvetica&quot;), fontSize, &amp;matrix));
+    CFTypeRef keys[] = { kCTFontAttributeName, kCTForegroundColorFromContextAttributeName };
+    CFTypeRef values[] = { font.get(), kCFBooleanTrue };
+    RetainPtr&lt;CFDictionaryRef&gt; attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
+    RetainPtr&lt;CFStringRef&gt; string = adoptCF(CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast&lt;const UInt8*&gt;(text), length, kCFStringEncodingUTF8, false, kCFAllocatorNull));
+    RetainPtr&lt;CFAttributedStringRef&gt; attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), attributes.get()));
+    RetainPtr&lt;CTLineRef&gt; line = adoptCF(CTLineCreateWithAttributedString(attributedString.get()));
+    CGContextSetTextPosition(context, x, y);
+    CTLineDraw(line.get(), context);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;PlatformCALayer&gt; PlatformCALayer::createCompatibleLayerOrTakeFromPool(PlatformCALayer::LayerType layerType, PlatformCALayerClient* client, IntSize size)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosLegacyTileCachemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/LegacyTileCache.mm (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/LegacyTileCache.mm        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebCore/platform/ios/LegacyTileCache.mm        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> 
</span><ins>+#include &lt;CoreText/CoreText.h&gt;
+
</ins><span class="cx"> #include &quot;FontAntialiasingStateSaver.h&quot;
</span><span class="cx"> #include &quot;LegacyTileGrid.h&quot;
</span><span class="cx"> #include &quot;LegacyTileGridTile.h&quot;
</span><span class="lines">@@ -591,14 +593,17 @@
</span><span class="cx">             CGContextSetRGBFillColor(context, 1, 0, 0, 0.4f);
</span><span class="cx">         else
</span><span class="cx">             CGContextSetRGBFillColor(context, 1, 1, 1, 0.6f);
</span><del>-#pragma clang diagnostic push
-#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
-        CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1, -1));
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
-        CGContextSelectFont(context, &quot;Helvetica&quot;, 25, kCGEncodingMacRoman);
-        CGContextShowTextAtPoint(context, labelBounds.origin.x + 3, labelBounds.origin.y + 20, text, strlen(text));
-#pragma clang diagnostic pop
</del><ins>+
+        CGAffineTransform matrix = CGAffineTransformMakeScale(1, -1);
+        RetainPtr&lt;CTFontRef&gt; font = adoptCF(CTFontCreateWithName(CFSTR(&quot;Helvetica&quot;), 25, &amp;matrix));
+        CFTypeRef keys[] = { kCTFontAttributeName, kCTForegroundColorFromContextAttributeName };
+        CFTypeRef values[] = { font.get(), kCFBooleanTrue };
+        RetainPtr&lt;CFDictionaryRef&gt; attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
+        RetainPtr&lt;CFStringRef&gt; string = adoptCF(CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast&lt;const UInt8*&gt;(text), strlen(text), kCFStringEncodingUTF8, false, kCFAllocatorNull));
+        RetainPtr&lt;CFAttributedStringRef&gt; attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), attributes.get()));
+        RetainPtr&lt;CTLineRef&gt; line = adoptCF(CTLineCreateWithAttributedString(attributedString.get()));
+        CGContextSetTextPosition(context, labelBounds.origin.x + 3, labelBounds.origin.y + 20);
+        CTLineDraw(line.get(), context);
</ins><span class="cx">     
</span><span class="cx">         CGContextRestoreGState(context);        
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspiwinCoreTextSPIWincpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.cpp (0 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.cpp        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CoreTextSPIWin.h&quot;
+
+extern &quot;C&quot; {
+
+const CFStringRef kCTFontAttributeName = CFSTR(&quot;NSFont&quot;);
+const CFStringRef kCTForegroundColorFromContextAttributeName = CFSTR(&quot;CTForegroundColorFromContext&quot;);
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformspiwinCoreTextSPIWinh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h (0 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h                                (rev 0)
+++ trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;CoreFoundation/CoreFoundation.h&gt;
+#include &lt;CoreGraphics/CoreGraphics.h&gt;
+#include &lt;CoreText/CoreText.h&gt;
+
+extern &quot;C&quot; {
+
+typedef const struct __CTFont* CTFontRef;
+typedef const struct __CTLine* CTLineRef;
+
+extern const CFStringRef kCTFontAttributeName;
+extern const CFStringRef kCTForegroundColorFromContextAttributeName;
+
+CTFontRef CTFontCreateWithName(CFStringRef name, CGFloat size, const CGAffineTransform* matrix);
+CTLineRef CTLineCreateWithAttributedString(CFAttributedStringRef);
+void CTLineDraw(CTLineRef, CGContextRef);
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebKit/ChangeLog        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-08-17  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Migrate off of deprecated CoreGraphics API CGContextSelectFont() and CGContextShowTextAtPoint()
+        https://bugs.webkit.org/show_bug.cgi?id=160895
+
+        Reviewed by Dean Jackson.
+
+        Link to the existing CoreText framework.
+
+        * PlatformWin.cmake:
+
</ins><span class="cx"> 2016-08-16  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, CMake build fix
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/PlatformWin.cmake (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/PlatformWin.cmake        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Source/WebKit/PlatformWin.cmake        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx">         PRIVATE CFNetwork${DEBUG_SUFFIX}
</span><span class="cx">         PRIVATE CoreFoundation${DEBUG_SUFFIX}
</span><span class="cx">         PRIVATE CoreGraphics${DEBUG_SUFFIX}
</span><ins>+        PRIVATE CoreText${DEBUG_SUFFIX}
</ins><span class="cx">         PRIVATE SQLite3${DEBUG_SUFFIX}
</span><span class="cx">         PRIVATE WebKitSystemInterface${DEBUG_SUFFIX}
</span><span class="cx">         PRIVATE libdispatch${DEBUG_SUFFIX}
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Tools/ChangeLog        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-08-17  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [Cocoa] Migrate off of deprecated CoreGraphics API CGContextSelectFont() and CGContextShowTextAtPoint()
+        https://bugs.webkit.org/show_bug.cgi?id=160895
+
+        Reviewed by Dean Jackson.
+
+        Link to the existing CoreText framework.
+
+        * DumpRenderTree/PlatformWin.cmake:
+        * TestWebKitAPI/PlatformWin.cmake:
+
</ins><span class="cx"> 2016-08-17  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Remove old libraries from build inputs
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreePlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/PlatformWin.cmake (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/PlatformWin.cmake        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Tools/DumpRenderTree/PlatformWin.cmake        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx">     list(APPEND DumpRenderTreeLib_LIBRARIES
</span><span class="cx">         CFNetwork
</span><span class="cx">         CoreGraphics
</span><ins>+        CoreText
</ins><span class="cx">     )
</span><span class="cx">     list(APPEND ImageDiff_SOURCES
</span><span class="cx">         cg/ImageDiffCG.cpp
</span><span class="lines">@@ -123,6 +124,7 @@
</span><span class="cx">     list(APPEND ImageDiff_LIBRARIES
</span><span class="cx">        CoreFoundation
</span><span class="cx">        CoreGraphics
</span><ins>+       CoreText
</ins><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIPlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/PlatformWin.cmake (204591 => 204592)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/PlatformWin.cmake        2016-08-18 06:22:40 UTC (rev 204591)
+++ trunk/Tools/TestWebKitAPI/PlatformWin.cmake        2016-08-18 06:38:14 UTC (rev 204592)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">         CFNetwork${DEBUG_SUFFIX}
</span><span class="cx">         CoreFoundation${DEBUG_SUFFIX}
</span><span class="cx">         CoreGraphics${DEBUG_SUFFIX}
</span><ins>+        CoreText${DEBUG_SUFFIX}
</ins><span class="cx">         QuartzCore${DEBUG_SUFFIX}
</span><span class="cx">         SQLite3${DEBUG_SUFFIX}
</span><span class="cx">         WebKitSystemInterface${DEBUG_SUFFIX}
</span></span></pre>
</div>
</div>

</body>
</html>