<!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>[188130] trunk/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/188130">188130</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-08-07 10:06:26 -0700 (Fri, 07 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSourcecpp">trunk/Source/WebCore/css/CSSFontFaceSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedFontcpp">trunk/Source/WebCore/loader/cache/CachedFont.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedFonth">trunk/Source/WebCore/loader/cache/CachedFont.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedSVGFontcpp">trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedSVGFonth">trunk/Source/WebCore/loader/cache/CachedSVGFont.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoFontCustomPlatformDatah">trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeFontCustomPlatformDataFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeFontPlatformDatah">trunk/Source/WebCore/platform/graphics/freetype/FontPlatformData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeFontPlatformDataFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp">trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontCustomPlatformDatah">trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCustomPlatformDatacpp">trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCustomPlatformDatah">trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/ChangeLog        2015-08-07 17:06:26 UTC (rev 188130)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+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:
+
</ins><span class="cx"> 2015-08-07  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Streams API] Create CountQueuingStrategy object as per spec
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">                 if (!m_generatedOTFBuffer)
</span><span class="cx">                     return nullptr;
</span><span class="cx">                 std::unique_ptr&lt;FontCustomPlatformData&gt; customPlatformData = createFontCustomPlatformData(*m_generatedOTFBuffer);
</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="trunkSourceWebCoreloadercacheCachedFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedFont.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedFont.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/loader/cache/CachedFont.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreloadercacheCachedFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedFont.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedFont.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/loader/cache/CachedFont.h        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreloadercacheCachedSVGFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreloadercacheCachedSVGFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedSVGFont.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedSVGFont.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.h        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicscairoFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicsfreetypeFontCustomPlatformDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicsfreetypeFontPlatformDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/FontPlatformData.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/FontPlatformData.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontPlatformData.h        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicsfreetypeFontPlatformDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicsmacFontCustomPlatformDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;FontCustomPlatformData.h&quot;
</span><span class="cx"> 
</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">@@ -32,8 +33,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">     return FontPlatformData(adoptCF(CTFontCreateWithFontDescriptor(m_fontDescriptor.get(), size, nullptr)).get(), size, bold, italic, orientation, widthVariant);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicswinFontCustomPlatformDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp        2015-08-07 17:06:26 UTC (rev 188130)
</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="trunkSourceWebCoreplatformgraphicswinFontCustomPlatformDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h (188129 => 188130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h        2015-08-07 17:04:31 UTC (rev 188129)
+++ trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.h        2015-08-07 17:06:26 UTC (rev 188130)
</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>