<!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>[193524] branches/safari-601-branch/Source/WebCore</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/193524">193524</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-05 10:30:37 -0800 (Sat, 05 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/188130">r188130</a>. rdar://problem/23769732</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCorecssCSSFontFaceSourcecpp">branches/safari-601-branch/Source/WebCore/css/CSSFontFaceSource.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreloadercacheCachedFontcpp">branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreloadercacheCachedFonth">branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreloadercacheCachedSVGFontcpp">branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreloadercacheCachedSVGFonth">branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicscairoFontCustomPlatformDatah">branches/safari-601-branch/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontCustomPlatformDataFreeTypecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontPlatformDatah">branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformData.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontPlatformDataFreeTypecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp">branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatah">branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicswinFontCustomPlatformDatacpp">branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCoreplatformgraphicswinFontCustomPlatformDatah">branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -1,5 +1,48 @@
</span><span class="cx"> 2015-12-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r188130. rdar://problem/23769732
+
+    2015-08-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+            Allow FontCustomPlatformData to consult with FontDescription
+            https://bugs.webkit.org/show_bug.cgi?id=147775
+
+            Reviewed by Zalan Bujtas.
+
+            In order to implement font-feature-settings, web fonts need to be
+            able to consult with the set of active font features. Rather than
+            add yet another argument to all the functions in this flow, this
+            patch passes around a reference to the FontDescription itself instead
+            of copies of constituent members of it.
+
+            No new tests because there is no behavior change.
+
+            * css/CSSFontFaceSource.cpp:
+            (WebCore::CSSFontFaceSource::font):
+            * loader/cache/CachedFont.cpp:
+            (WebCore::CachedFont::createFont):
+            (WebCore::CachedFont::platformDataFromCustomData):
+            * loader/cache/CachedFont.h:
+            * loader/cache/CachedSVGFont.cpp:
+            (WebCore::CachedSVGFont::platformDataFromCustomData):
+            * loader/cache/CachedSVGFont.h:
+            * platform/graphics/cairo/FontCustomPlatformData.h:
+            * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
+            (WebCore::FontCustomPlatformData::fontPlatformData):
+            * platform/graphics/freetype/FontPlatformData.h:
+            * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
+            (WebCore::FontPlatformData::FontPlatformData):
+            * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+            (WebCore::Font::platformCreateScaledFont):
+            * platform/graphics/mac/FontCustomPlatformData.cpp:
+            (WebCore::FontCustomPlatformData::fontPlatformData):
+            * platform/graphics/mac/FontCustomPlatformData.h:
+            * platform/graphics/win/FontCustomPlatformData.cpp:
+            (WebCore::FontCustomPlatformData::fontPlatformData):
+            * platform/graphics/win/FontCustomPlatformData.h:
+
+2015-12-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r187709. rdar://problem/23769732
</span><span class="cx"> 
</span><span class="cx">     2015-07-31  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorecssCSSFontFaceSourcecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/css/CSSFontFaceSource.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/css/CSSFontFaceSource.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/css/CSSFontFaceSource.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">                 auto customPlatformData = createFontCustomPlatformData(*m_generatedOTFBuffer);
</span><span class="cx">                 if (!customPlatformData)
</span><span class="cx">                     return nullptr;
</span><del>-                font = Font::create(customPlatformData-&gt;fontPlatformData(static_cast&lt;int&gt;(fontDescription.computedPixelSize()), syntheticBold, syntheticItalic, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
</del><ins>+                font = Font::create(customPlatformData-&gt;fontPlatformData(fontDescription, syntheticBold, syntheticItalic), true, false);
</ins><span class="cx"> #else
</span><span class="cx">                 font = Font::create(std::make_unique&lt;SVGFontData&gt;(m_svgFontFaceElement.get()), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreloadercacheCachedFontcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -123,14 +123,13 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;Font&gt; CachedFont::createFont(const FontDescription&amp; fontDescription, const AtomicString&amp;, bool syntheticBold, bool syntheticItalic, bool)
</span><span class="cx"> {
</span><del>-    return Font::create(platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic,
-        fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
</del><ins>+    return Font::create(platformDataFromCustomData(fontDescription, syntheticBold, syntheticItalic), true, false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode)
</del><ins>+FontPlatformData CachedFont::platformDataFromCustomData(const FontDescription&amp; fontDescription, bool bold, bool italic)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_fontCustomPlatformData);
</span><del>-    return m_fontCustomPlatformData-&gt;fontPlatformData(static_cast&lt;int&gt;(size), bold, italic, orientation, widthVariant, renderingMode);
</del><ins>+    return m_fontCustomPlatformData-&gt;fontPlatformData(fontDescription, bold, italic);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CachedFont::allClientsRemoved()
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreloadercacheCachedFonth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/loader/cache/CachedFont.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     virtual RefPtr&lt;Font&gt; createFont(const FontDescription&amp;, const AtomicString&amp; remoteURI, bool syntheticBold, bool syntheticItalic, bool externalSVG);
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</del><ins>+    FontPlatformData platformDataFromCustomData(const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx"> 
</span><span class="cx">     bool ensureCustomFontData(SharedBuffer* data);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreloadercacheCachedSVGFontcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -66,11 +66,11 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData CachedSVGFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode)
</del><ins>+FontPlatformData CachedSVGFont::platformDataFromCustomData(const FontDescription&amp; fontDescription, bool bold, bool italic)
</ins><span class="cx"> {
</span><span class="cx">     if (m_externalSVGDocument)
</span><del>-        return FontPlatformData(size, bold, italic);
-    return CachedFont::platformDataFromCustomData(size, bold, italic, orientation, widthVariant, renderingMode);
</del><ins>+        return FontPlatformData(fontDescription.computedPixelSize(), bold, italic);
+    return CachedFont::platformDataFromCustomData(fontDescription, bold, italic);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CachedSVGFont::ensureCustomFontData(bool externalSVG, const AtomicString&amp; remoteURI)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreloadercacheCachedSVGFonth"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/loader/cache/CachedSVGFont.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     virtual RefPtr&lt;Font&gt; createFont(const FontDescription&amp;, const AtomicString&amp; remoteURI, bool syntheticBold, bool syntheticItalic, bool externalSVG) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</del><ins>+    FontPlatformData platformDataFromCustomData(const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx"> 
</span><span class="cx">     SVGFontElement* getSVGFontById(const String&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicscairoFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class FontDescription;
</ins><span class="cx"> class FontPlatformData;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +42,7 @@
</span><span class="cx"> public:
</span><span class="cx">     FontCustomPlatformData(FT_Face, SharedBuffer&amp;);
</span><span class="cx">     ~FontCustomPlatformData();
</span><del>-    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</del><ins>+    FontPlatformData fontPlatformData(const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx">     static bool supportsFormat(const String&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontCustomPlatformDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -68,9 +68,9 @@
</span><span class="cx">     cairo_font_face_destroy(m_fontFace);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant, FontRenderingMode)
</del><ins>+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription&amp; description, bool bold, bool italic)
</ins><span class="cx"> {
</span><del>-    return FontPlatformData(m_fontFace, size, bold, italic, orientation);
</del><ins>+    return FontPlatformData(m_fontFace, description, bold, italic);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;FontCustomPlatformData&gt; createFontCustomPlatformData(SharedBuffer&amp; buffer)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontPlatformDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformData.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformData.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformData.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">         { }
</span><span class="cx"> 
</span><span class="cx">     FontPlatformData(FcPattern*, const FontDescription&amp;);
</span><del>-    FontPlatformData(cairo_font_face_t*, float size, bool bold, bool italic, FontOrientation);
</del><ins>+    FontPlatformData(cairo_font_face_t*, const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx">     FontPlatformData(float size, bool bold, bool italic);
</span><span class="cx">     FontPlatformData(const FontPlatformData&amp;);
</span><span class="cx">     FontPlatformData(const FontPlatformData&amp;, float size);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsfreetypeFontPlatformDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -187,14 +187,14 @@
</span><span class="cx">     // We cannot create a scaled font here.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData::FontPlatformData(cairo_font_face_t* fontFace, float size, bool bold, bool italic, FontOrientation orientation)
</del><ins>+FontPlatformData::FontPlatformData(cairo_font_face_t* fontFace, const FontDescription&amp; description, bool bold, bool italic)
</ins><span class="cx">     : m_fallbacks(nullptr)
</span><del>-    , m_size(size)
</del><ins>+    , m_size(description.computedPixelSize())
</ins><span class="cx">     , m_syntheticBold(bold)
</span><span class="cx">     , m_syntheticOblique(italic)
</span><span class="cx">     , m_fixedWidth(false)
</span><span class="cx">     , m_scaledFont(nullptr)
</span><del>-    , m_orientation(orientation)
</del><ins>+    , m_orientation(description.orientation())
</ins><span class="cx"> {
</span><span class="cx">     buildScaledFont(fontFace);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -103,11 +103,12 @@
</span><span class="cx"> PassRefPtr&lt;Font&gt; Font::platformCreateScaledFont(const FontDescription&amp; fontDescription, float scaleFactor) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_platformData.scaledFont());
</span><ins>+    FontDescription scaledFontDescription = fontDescription;
+    scaledFontDescription.setComputedSize(scaleFactor * fontDescription.computedSize());
</ins><span class="cx">     return Font::create(FontPlatformData(cairo_scaled_font_get_font_face(m_platformData.scaledFont()),
</span><del>-        scaleFactor * fontDescription.computedSize(),
</del><ins>+        scaledFontDescription,
</ins><span class="cx">         m_platformData.syntheticBold(),
</span><del>-        m_platformData.syntheticOblique(),
-        fontDescription.orientation()),
</del><ins>+        m_platformData.syntheticOblique()),
</ins><span class="cx">         isCustomFont(), false);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> #include &quot;FontCustomPlatformData.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FontCache.h&quot;
</span><ins>+#include &quot;FontDescription.h&quot;
</ins><span class="cx"> #include &quot;FontPlatformData.h&quot;
</span><span class="cx"> #include &quot;SharedBuffer.h&quot;
</span><span class="cx"> #include &lt;CoreGraphics/CoreGraphics.h&gt;
</span><span class="lines">@@ -33,8 +34,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode)
</del><ins>+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription&amp; fontDescription, bool bold, bool italic)
</ins><span class="cx"> {
</span><ins>+    int size = fontDescription.computedPixelSize();
+    FontOrientation orientation = fontDescription.orientation();
+    FontWidthVariant widthVariant = fontDescription.widthVariant();
</ins><span class="cx"> #if CORETEXT_WEB_FONTS
</span><span class="cx">     RetainPtr&lt;CTFontRef&gt; font = adoptCF(CTFontCreateWithFontDescriptor(m_fontDescriptor.get(), size, nullptr));
</span><span class="cx">     font = applyFontFeatureSettings(font.get(), fontDescription.featureSettings());
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicsmacFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class FontDescription;
</ins><span class="cx"> class FontPlatformData;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> 
</span><span class="lines">@@ -50,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx">     ~FontCustomPlatformData();
</span><span class="cx"> 
</span><del>-    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</del><ins>+    FontPlatformData fontPlatformData(const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx"> 
</span><span class="cx">     static bool supportsFormat(const String&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicswinFontCustomPlatformDatacpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -40,8 +40,11 @@
</span><span class="cx">             RemoveFontMemResourceEx(m_fontReference);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode renderingMode)
</del><ins>+FontPlatformData FontCustomPlatformData::fontPlatformData(const FontDescription&amp; fontDescription, bool bold, bool italic)
</ins><span class="cx"> {
</span><ins>+    int size = fontDescription.computedPixelSize();
+    FontRenderingMode renderingMode = fontDescription.renderingMode();
+
</ins><span class="cx">     ASSERT(m_fontReference);
</span><span class="cx"> 
</span><span class="cx">     LOGFONT&amp; logFont = *static_cast&lt;LOGFONT*&gt;(malloc(sizeof(LOGFONT)));
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCoreplatformgraphicswinFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h (193523 => 193524)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h        2015-12-05 18:30:30 UTC (rev 193523)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h        2015-12-05 18:30:37 UTC (rev 193524)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class FontDescription;
</ins><span class="cx"> class FontPlatformData;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> 
</span><span class="lines">@@ -45,8 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     ~FontCustomPlatformData();
</span><span class="cx"> 
</span><del>-    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal,
-                                      FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</del><ins>+    FontPlatformData fontPlatformData(const FontDescription&amp;, bool bold, bool italic);
</ins><span class="cx"> 
</span><span class="cx">     static bool supportsFormat(const String&amp;);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>