<!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>[176267] trunk/Source</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/176267">176267</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-11-18 10:52:38 -0800 (Tue, 18 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/176264">r176264</a>.
https://bugs.webkit.org/show_bug.cgi?id=138837

caused many test failures (Requested by litherum on #webkit).

Reverted changeset:

&quot;Subclass CachedFont for SVG fonts&quot;
https://bugs.webkit.org/show_bug.cgi?id=138686
http://trac.webkit.org/changeset/176264</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSourcecpp">trunk/Source/WebCore/css/CSSFontFaceSource.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSourceh">trunk/Source/WebCore/css/CSSFontFaceSource.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSrcValuecpp">trunk/Source/WebCore/css/CSSFontFaceSrcValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSrcValueh">trunk/Source/WebCore/css/CSSFontFaceSrcValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorPageAgentcpp">trunk/Source/WebCore/inspector/InspectorPageAgent.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="#trunkSourceWebCoreloadercacheCachedResourcecpp">trunk/Source/WebCore/loader/cache/CachedResource.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceh">trunk/Source/WebCore/loader/cache/CachedResource.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoaderh">trunk/Source/WebCore/loader/cache/CachedResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCachecpp">trunk/Source/WebCore/loader/cache/MemoryCache.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceUriElementcpp">trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1842,7 +1842,6 @@
</span><span class="cx">     loader/archive/mhtml/MHTMLParser.cpp
</span><span class="cx"> 
</span><span class="cx">     loader/cache/CachedCSSStyleSheet.cpp
</span><del>-    loader/cache/CachedSVGFont.cpp
</del><span class="cx">     loader/cache/CachedFont.cpp
</span><span class="cx">     loader/cache/CachedImage.cpp
</span><span class="cx">     loader/cache/CachedRawResource.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/ChangeLog        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-11-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r176264.
+        https://bugs.webkit.org/show_bug.cgi?id=138837
+
+        caused many test failures (Requested by litherum on #webkit).
+
+        Reverted changeset:
+
+        &quot;Subclass CachedFont for SVG fonts&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=138686
+        http://trac.webkit.org/changeset/176264
+
</ins><span class="cx"> 2014-11-18  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -7328,7 +7328,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\archive\mhtml\MHTMLParser.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedCSSStyleSheet.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedFont.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\loader\cache\CachedSVGFont.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedImage.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedRawResource.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedResource.cpp&quot; /&gt;
</span><span class="lines">@@ -19280,7 +19279,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\archive\mhtml\MHTMLParser.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedCSSStyleSheet.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedFont.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\loader\cache\CachedSVGFont.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedImage.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedRawResource.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedRawResourceClient.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1026,9 +1026,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedCSSStyleSheet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;loader\cache&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\loader\cache\CachedSVGFont.cpp&quot;&gt;
-      &lt;Filter&gt;loader\cache&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\loader\cache\CachedFont.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;loader\cache&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -8055,9 +8052,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedCSSStyleSheet.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;loader\cache&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\loader\cache\CachedSVGFont.h&quot;&gt;
-      &lt;Filter&gt;loader\cache&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\loader\cache\CachedFont.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;loader\cache&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -927,8 +927,6 @@
</span><span class="cx">                 1AFE119A0CBFFCC4003017FA /* JSSQLResultSetRowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */; };
</span><span class="cx">                 1C010700192594DF008A4201 /* InlineTextBoxStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0106FE192594DF008A4201 /* InlineTextBoxStyle.cpp */; };
</span><span class="cx">                 1C010701192594DF008A4201 /* InlineTextBoxStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0106FF192594DF008A4201 /* InlineTextBoxStyle.h */; };
</span><del>-                1C0939EA1A13E12900B788E5 /* CachedSVGFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0939E81A13E12900B788E5 /* CachedSVGFont.cpp */; };
-                1C0939EB1A13E12900B788E5 /* CachedSVGFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0939E91A13E12900B788E5 /* CachedSVGFont.h */; };
</del><span class="cx">                 1C11CCB50AA6093700DADB20 /* DOMNotation.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85CA96E80A9624E900690CCF /* DOMNotation.h */; };
</span><span class="cx">                 1C11CCB60AA6093700DADB20 /* DOMComment.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85089CD10A98C42700A275AA /* DOMComment.h */; };
</span><span class="cx">                 1C11CCB70AA6093700DADB20 /* DOMNamedNodeMap.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 8518DD760A9CF31B0091B7A6 /* DOMNamedNodeMap.h */; };
</span><span class="lines">@@ -7934,8 +7932,6 @@
</span><span class="cx">                 1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLResultSetRowList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C0106FE192594DF008A4201 /* InlineTextBoxStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineTextBoxStyle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C0106FF192594DF008A4201 /* InlineTextBoxStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineTextBoxStyle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1C0939E81A13E12900B788E5 /* CachedSVGFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedSVGFont.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1C0939E91A13E12900B788E5 /* CachedSVGFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedSVGFont.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1C18DA56181AF6A500C4EF22 /* TextPainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextPainter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C18DA57181AF6A500C4EF22 /* TextPainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPainter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOSurfacePool.cpp; path = ../cg/IOSurfacePool.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19601,8 +19597,6 @@
</span><span class="cx">                                 E467680F1A0177F900B9E26B /* CacheValidation.h */,
</span><span class="cx">                                 BCB16BFE0979C3BD00467741 /* MemoryCache.cpp */,
</span><span class="cx">                                 BCB16BFF0979C3BD00467741 /* MemoryCache.h */,
</span><del>-                                1C0939E81A13E12900B788E5 /* CachedSVGFont.cpp */,
-                                1C0939E91A13E12900B788E5 /* CachedSVGFont.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = cache;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -26245,7 +26239,6 @@
</span><span class="cx">                                 B22279E90D00BF220071B782 /* SVGFEFuncRElement.h in Headers */,
</span><span class="cx">                                 B22279EC0D00BF220071B782 /* SVGFEGaussianBlurElement.h in Headers */,
</span><span class="cx">                                 B25599850D00D8BA00BB825C /* SVGFEImage.h in Headers */,
</span><del>-                                1C0939EB1A13E12900B788E5 /* CachedSVGFont.h in Headers */,
</del><span class="cx">                                 B22279EF0D00BF220071B782 /* SVGFEImageElement.h in Headers */,
</span><span class="cx">                                 B22279F20D00BF220071B782 /* SVGFELightElement.h in Headers */,
</span><span class="cx">                                 B22279F40D00BF220071B782 /* SVGFEMergeElement.h in Headers */,
</span><span class="lines">@@ -29457,7 +29450,6 @@
</span><span class="cx">                                 51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */,
</span><span class="cx">                                 49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */,
</span><span class="cx">                                 4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */,
</span><del>-                                1C0939EA1A13E12900B788E5 /* CachedSVGFont.cpp in Sources */,
</del><span class="cx">                                 4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */,
</span><span class="cx">                                 E4AFD00B0DAF335400F5F55C /* SMILTime.cpp in Sources */,
</span><span class="cx">                                 E4AFD00D0DAF335500F5F55C /* SMILTimeContainer.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include &quot;SimpleFontData.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>-#include &quot;CachedSVGFont.h&quot;
</del><span class="cx"> #include &quot;FontCustomPlatformData.h&quot;
</span><span class="cx"> #include &quot;SVGFontData.h&quot;
</span><span class="cx"> #include &quot;SVGFontElement.h&quot;
</span><span class="lines">@@ -123,11 +122,42 @@
</span><span class="cx">     // If we are still loading, then we let the system pick a font.
</span><span class="cx">     if (isLoaded()) {
</span><span class="cx">         if (m_font) {
</span><del>-            // Create new FontPlatformData from our CGFontRef, point size and ATSFontRef.
-            if (!m_font-&gt;ensureCustomFontData(m_hasExternalSVGFont))
-                return nullptr;
</del><ins>+#if ENABLE(SVG_FONTS)
+            if (m_hasExternalSVGFont) {
+                // For SVG fonts parse the external SVG document, and extract the &lt;font&gt; element.
+                if (!m_font-&gt;ensureSVGFontData())
+                    return 0;
</ins><span class="cx"> 
</span><del>-            fontData = m_font-&gt;getFontData(fontDescription, m_string, syntheticBold, syntheticItalic, m_hasExternalSVGFont);
</del><ins>+                if (!m_externalSVGFontElement) {
+                    String fragmentIdentifier;
+                    size_t start = m_string.find('#');
+                    if (start != notFound)
+                        fragmentIdentifier = m_string.string().substring(start + 1);
+                    m_externalSVGFontElement = m_font-&gt;getSVGFontById(fragmentIdentifier);
+                }
+
+                if (!m_externalSVGFontElement)
+                    return 0;
+
+                if (auto firstFontFace = childrenOfType&lt;SVGFontFaceElement&gt;(*m_externalSVGFontElement).first()) {
+                    if (!m_svgFontFaceElement) {
+                        // We're created using a CSS @font-face rule, that means we're not associated with a SVGFontFaceElement.
+                        // Use the imported &lt;font-face&gt; tag as referencing font-face element for these cases.
+                        m_svgFontFaceElement = firstFontFace;
+                    }
+
+                    fontData = SimpleFontData::create(std::make_unique&lt;SVGFontData&gt;(firstFontFace), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic);
+                }
+            } else
+#endif
+            {
+                // Create new FontPlatformData from our CGFontRef, point size and ATSFontRef.
+                if (!m_font-&gt;ensureCustomFontData())
+                    return 0;
+
+                fontData = SimpleFontData::create(m_font-&gt;platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic,
+                    fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
+            }
</ins><span class="cx">         } else {
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">             // In-Document SVG Fonts
</span><span class="lines">@@ -149,6 +179,23 @@
</span><span class="cx">     return fontData.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(SVG_FONTS)
+SVGFontFaceElement* CSSFontFaceSource::svgFontFaceElement() const
+{
+    return m_svgFontFaceElement.get();
+}
+
+void CSSFontFaceSource::setSVGFontFaceElement(PassRefPtr&lt;SVGFontFaceElement&gt; element)
+{
+    m_svgFontFaceElement = element;
+}
+
+bool CSSFontFaceSource::isSVGFontFaceSource() const
+{
+    return m_svgFontFaceElement || m_hasExternalSVGFont;
+}
+#endif
+
</ins><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="cx"> bool CSSFontFaceSource::isDecodeError() const
</span><span class="cx"> {
</span><span class="lines">@@ -161,7 +208,11 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_font)
</span><span class="cx">         return false;
</span><del>-    return m_font-&gt;ensureCustomFontData(m_hasExternalSVGFont);
</del><ins>+#if ENABLE(SVG_FONTS)
+    if (m_hasExternalSVGFont)
+        return m_font-&gt;ensureSVGFontData();
+#endif
+    return m_font-&gt;ensureCustomFontData();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSource.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSource.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -28,11 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CachedFontClient.h&quot;
</span><span class="cx"> #include &quot;CachedResourceHandle.h&quot;
</span><del>-#include &quot;SharedBuffer.h&quot;
-#if ENABLE(SVG_FONTS)
-#include &quot;SVGFontElement.h&quot;
-#include &quot;SVGFontFaceElement.h&quot;
-#endif
</del><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/text/AtomicString.h&gt;
</span><span class="lines">@@ -44,6 +39,10 @@
</span><span class="cx"> class CSSFontSelector;
</span><span class="cx"> class FontDescription;
</span><span class="cx"> class SimpleFontData;
</span><ins>+#if ENABLE(SVG_FONTS)
+class SVGFontElement;
+class SVGFontFaceElement;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> class CSSFontFaceSource final : public CachedFontClient {
</span><span class="cx"> public:
</span><span class="lines">@@ -64,10 +63,10 @@
</span><span class="cx">     void pruneTable();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>-    SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement.get(); }
-    void setSVGFontFaceElement(PassRefPtr&lt;SVGFontFaceElement&gt; element) { m_svgFontFaceElement = element; }
-    bool isSVGFontFaceSource() const { return m_svgFontFaceElement || m_hasExternalSVGFont; }
-    void setHasExternalSVGFont() { m_hasExternalSVGFont = true; }
</del><ins>+    SVGFontFaceElement* svgFontFaceElement() const;
+    void setSVGFontFaceElement(PassRefPtr&lt;SVGFontFaceElement&gt;);
+    bool isSVGFontFaceSource() const;
+    void setHasExternalSVGFont(bool value) { m_hasExternalSVGFont = value; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="lines">@@ -85,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">     RefPtr&lt;SVGFontFaceElement&gt; m_svgFontFaceElement;
</span><ins>+    RefPtr&lt;SVGFontElement&gt; m_externalSVGFontElement;
</ins><span class="cx">     bool m_hasExternalSVGFont;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSrcValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSrcValue.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSrcValue.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/css/CSSFontFaceSrcValue.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -43,11 +43,6 @@
</span><span class="cx"> {
</span><span class="cx">     return equalIgnoringCase(m_format, &quot;svg&quot;);
</span><span class="cx"> }
</span><del>-
-bool CSSFontFaceSrcValue::isSVGFontTarget() const
-{
-    return isSVGFontFaceSrc() || svgFontFaceElement();
-}
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> bool CSSFontFaceSrcValue::isSupportedFormat() const
</span><span class="lines">@@ -98,12 +93,12 @@
</span><span class="cx">     return m_cachedFont-&gt;loadFailedOrCanceled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CachedFont* CSSFontFaceSrcValue::cachedFont(Document* document, bool isSVG)
</del><ins>+CachedFont* CSSFontFaceSrcValue::cachedFont(Document* document)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_cachedFont) {
</span><span class="cx">         CachedResourceRequest request(ResourceRequest(document-&gt;completeURL(m_resource)));
</span><span class="cx">         request.setInitiator(cachedResourceRequestInitiators().css);
</span><del>-        m_cachedFont = document-&gt;cachedResourceLoader()-&gt;requestFont(request, isSVG);
</del><ins>+        m_cachedFont = document-&gt;cachedResourceLoader()-&gt;requestFont(request);
</ins><span class="cx">     }
</span><span class="cx">     return m_cachedFont.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSrcValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSrcValue.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSrcValue.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/css/CSSFontFaceSrcValue.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -58,7 +58,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">     bool isSVGFontFaceSrc() const;
</span><del>-    bool isSVGFontTarget() const;
</del><span class="cx"> 
</span><span class="cx">     SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement; }
</span><span class="cx">     void setSVGFontFaceElement(SVGFontFaceElement* element) { m_svgFontFaceElement = element; }
</span><span class="lines">@@ -70,7 +69,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasFailedOrCanceledSubresources() const;
</span><span class="cx"> 
</span><del>-    CachedFont* cachedFont(Document*, bool isSVG);
</del><ins>+    CachedFont* cachedFont(Document*);
</ins><span class="cx"> 
</span><span class="cx">     bool equals(const CSSFontFaceSrcValue&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -212,12 +212,12 @@
</span><span class="cx">             Settings* settings = m_document ? m_document-&gt;frame() ? &amp;m_document-&gt;frame()-&gt;settings() : 0 : 0;
</span><span class="cx">             bool allowDownloading = foundSVGFont || (settings &amp;&amp; settings-&gt;downloadableBinaryFontsEnabled());
</span><span class="cx">             if (allowDownloading &amp;&amp; item.isSupportedFormat() &amp;&amp; m_document) {
</span><del>-                CachedFont* cachedFont = item.cachedFont(m_document, foundSVGFont);
</del><ins>+                CachedFont* cachedFont = item.cachedFont(m_document);
</ins><span class="cx">                 if (cachedFont) {
</span><span class="cx">                     source = std::make_unique&lt;CSSFontFaceSource&gt;(item.resource(), cachedFont);
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">                     if (foundSVGFont)
</span><del>-                        source-&gt;setHasExternalSVGFont();
</del><ins>+                        source-&gt;setHasExternalSVGFont(true);
</ins><span class="cx"> #endif
</span><span class="cx">                 }
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorPageAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -297,9 +297,6 @@
</span><span class="cx">     switch (cachedResource.type()) {
</span><span class="cx">     case CachedResource::ImageResource:
</span><span class="cx">         return InspectorPageAgent::ImageResource;
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">         return InspectorPageAgent::FontResource;
</span><span class="cx">     case CachedResource::CSSStyleSheet:
</span><span class="lines">@@ -457,9 +454,6 @@
</span><span class="cx">         switch (cachedResource-&gt;type()) {
</span><span class="cx">         case CachedResource::ImageResource:
</span><span class="cx">             // Skip images that were not auto loaded (images disabled in the user agent).
</span><del>-#if ENABLE(SVG_FONTS)
-        case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">         case CachedResource::FontResource:
</span><span class="cx">             // Skip fonts that were referenced in CSS but never used/downloaded.
</span><span class="cx">             if (cachedResource-&gt;stillNeedsLoad())
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedFont.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedFont.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedFont.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;CachedResourceClientWalker.h&quot;
</span><span class="cx"> #include &quot;CachedResourceLoader.h&quot;
</span><span class="cx"> #include &quot;FontCustomPlatformData.h&quot;
</span><del>-#include &quot;FontDescription.h&quot;
</del><span class="cx"> #include &quot;FontPlatformData.h&quot;
</span><span class="cx"> #include &quot;MemoryCache.h&quot;
</span><span class="cx"> #include &quot;SharedBuffer.h&quot;
</span><span class="lines">@@ -40,10 +39,6 @@
</span><span class="cx"> #include &quot;WOFFFileFormat.h&quot;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><del>-#if ENABLE(SVG_OTF_CONVERTER)
-#include &quot;SVGToOTFFontConversion.h&quot;
-#endif
-
</del><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> #include &quot;NodeList.h&quot;
</span><span class="cx"> #include &quot;SVGDocument.h&quot;
</span><span class="lines">@@ -55,8 +50,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-CachedFont::CachedFont(const ResourceRequest&amp; resourceRequest, SessionID sessionID, Type type)
-    : CachedResource(resourceRequest, type, sessionID)
</del><ins>+CachedFont::CachedFont(const ResourceRequest&amp; resourceRequest, SessionID sessionID)
+    : CachedResource(resourceRequest, FontResource, sessionID)
</ins><span class="cx">     , m_loadInitiated(false)
</span><span class="cx">     , m_hasCreatedFontDataWrappingResource(false)
</span><span class="cx"> {
</span><span class="lines">@@ -96,7 +91,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CachedFont::ensureCustomFontData(bool)
</del><ins>+bool CachedFont::ensureCustomFontData()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_fontData &amp;&amp; !errorOccurred() &amp;&amp; !isLoading() &amp;&amp; m_data) {
</span><span class="cx">         RefPtr&lt;SharedBuffer&gt; buffer = m_data;
</span><span class="lines">@@ -123,18 +118,46 @@
</span><span class="cx">     return m_fontData.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;SimpleFontData&gt; CachedFont::getFontData(const FontDescription&amp; fontDescription, const AtomicString&amp;, bool syntheticBold, bool syntheticItalic, bool)
-{
-    return SimpleFontData::create(platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic,
-        fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false);
-}
-
</del><span class="cx"> FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode)
</span><span class="cx"> {
</span><ins>+#if ENABLE(SVG_FONTS)
+    if (m_externalSVGDocument)
+        return FontPlatformData(size, bold, italic);
+#endif
</ins><span class="cx">     ASSERT(m_fontData);
</span><span class="cx">     return m_fontData-&gt;fontPlatformData(static_cast&lt;int&gt;(size), bold, italic, orientation, widthVariant, renderingMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(SVG_FONTS)
+
+bool CachedFont::ensureSVGFontData()
+{
+    if (!m_externalSVGDocument &amp;&amp; !errorOccurred() &amp;&amp; !isLoading() &amp;&amp; m_data) {
+        m_externalSVGDocument = SVGDocument::create(nullptr, URL());
+        RefPtr&lt;TextResourceDecoder&gt; decoder = TextResourceDecoder::create(&quot;application/xml&quot;);
+        m_externalSVGDocument-&gt;setContent(decoder-&gt;decodeAndFlush(m_data-&gt;data(), m_data-&gt;size()));
+        if (decoder-&gt;sawError())
+            m_externalSVGDocument = nullptr;
+    }
+    return m_externalSVGDocument;
+}
+
+SVGFontElement* CachedFont::getSVGFontById(const String&amp; fontName) const
+{
+    auto elements = descendantsOfType&lt;SVGFontElement&gt;(*m_externalSVGDocument);
+
+    if (fontName.isEmpty())
+        return elements.first();
+
+    for (auto&amp; element : elements) {
+        if (element.getIdAttribute() == fontName)
+            return &amp;element;
+    }
+    return nullptr;
+}
+
+#endif
+
</ins><span class="cx"> void CachedFont::allClientsRemoved()
</span><span class="cx"> {
</span><span class="cx">     m_fontData = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedFont.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedFont.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedFont.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -31,32 +31,31 @@
</span><span class="cx"> #include &quot;FontOrientation.h&quot;
</span><span class="cx"> #include &quot;FontRenderingMode.h&quot;
</span><span class="cx"> #include &quot;FontWidthVariant.h&quot;
</span><del>-#include &quot;SimpleFontData.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class CachedResourceLoader;
</span><del>-class FontDescription;
</del><span class="cx"> class FontPlatformData;
</span><span class="cx"> class SVGDocument;
</span><span class="cx"> class SVGFontElement;
</span><span class="cx"> struct FontCustomPlatformData;
</span><span class="cx"> 
</span><del>-class CachedFont : public CachedResource {
</del><ins>+class CachedFont final : public CachedResource {
</ins><span class="cx"> public:
</span><del>-    CachedFont(const ResourceRequest&amp;, SessionID, Type = FontResource);
</del><ins>+    CachedFont(const ResourceRequest&amp;, SessionID);
</ins><span class="cx">     virtual ~CachedFont();
</span><span class="cx"> 
</span><span class="cx">     void beginLoadIfNeeded(CachedResourceLoader* dl);
</span><span class="cx">     virtual bool stillNeedsLoad() const override { return !m_loadInitiated; }
</span><span class="cx"> 
</span><del>-    virtual bool ensureCustomFontData(bool externalSVG);
</del><ins>+    bool ensureCustomFontData();
+    FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
</ins><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;SimpleFontData&gt; getFontData(const FontDescription&amp;, const AtomicString&amp; remoteURI, bool syntheticBold, bool syntheticItalic, bool externalSVG);
</del><ins>+#if ENABLE(SVG_FONTS)
+    bool ensureSVGFontData();
+    SVGFontElement* getSVGFontById(const String&amp;) const;
+#endif
</ins><span class="cx"> 
</span><del>-protected:
-    FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
-
</del><span class="cx"> private:
</span><span class="cx">     virtual void checkNotify() override;
</span><span class="cx">     virtual bool mayTryReplaceEncodedData() const override;
</span><span class="lines">@@ -72,6 +71,10 @@
</span><span class="cx">     bool m_loadInitiated;
</span><span class="cx">     bool m_hasCreatedFontDataWrappingResource;
</span><span class="cx"> 
</span><ins>+#if ENABLE(SVG_FONTS)
+    RefPtr&lt;SVGDocument&gt; m_externalSVGDocument;
+#endif
+
</ins><span class="cx">     friend class MemoryCache;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -69,9 +69,6 @@
</span><span class="cx">     case CachedResource::CSSStyleSheet:
</span><span class="cx">         return ResourceLoadPriorityHigh;
</span><span class="cx">     case CachedResource::Script:
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">     case CachedResource::RawResource:
</span><span class="cx">         return ResourceLoadPriorityMedium;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -66,9 +66,6 @@
</span><span class="cx">         CSSStyleSheet,
</span><span class="cx">         Script,
</span><span class="cx">         FontResource,
</span><del>-#if ENABLE(SVG_FONTS)
-        SVGFontResource,
-#endif
</del><span class="cx">         RawResource,
</span><span class="cx">         SVGDocumentResource
</span><span class="cx"> #if ENABLE(XSLT)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;CachedImage.h&quot;
</span><span class="cx"> #include &quot;CachedRawResource.h&quot;
</span><span class="cx"> #include &quot;CachedResourceRequest.h&quot;
</span><del>-#include &quot;CachedSVGFont.h&quot;
</del><span class="cx"> #include &quot;CachedScript.h&quot;
</span><span class="cx"> #include &quot;CachedXSLStyleSheet.h&quot;
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><span class="lines">@@ -85,10 +84,6 @@
</span><span class="cx">         return new CachedScript(request, charset, sessionID);
</span><span class="cx">     case CachedResource::SVGDocumentResource:
</span><span class="cx">         return new CachedSVGDocument(request, sessionID);
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-        return new CachedSVGFont(request, sessionID);
-#endif
</del><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">         return new CachedFont(request, sessionID);
</span><span class="cx">     case CachedResource::RawResource:
</span><span class="lines">@@ -180,10 +175,8 @@
</span><span class="cx">     return downcast&lt;CachedImage&gt;(requestResource(CachedResource::ImageResource, request).get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CachedResourceHandle&lt;CachedFont&gt; CachedResourceLoader::requestFont(CachedResourceRequest&amp; request, bool isSVG)
</del><ins>+CachedResourceHandle&lt;CachedFont&gt; CachedResourceLoader::requestFont(CachedResourceRequest&amp; request)
</ins><span class="cx"> {
</span><del>-    if (isSVG)
-        return downcast&lt;CachedSVGFont&gt;(requestResource(CachedResource::SVGFontResource, request).get());
</del><span class="cx">     return downcast&lt;CachedFont&gt;(requestResource(CachedResource::FontResource, request).get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -281,9 +274,6 @@
</span><span class="cx"> #endif
</span><span class="cx">     case CachedResource::RawResource:
</span><span class="cx">     case CachedResource::ImageResource:
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource: {
</span><span class="cx">         // These resources can corrupt only the frame's pixels.
</span><span class="cx">         if (Frame* f = frame()) {
</span><span class="lines">@@ -324,9 +314,6 @@
</span><span class="cx">     case CachedResource::ImageResource:
</span><span class="cx">     case CachedResource::CSSStyleSheet:
</span><span class="cx">     case CachedResource::Script:
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">     case CachedResource::RawResource:
</span><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="lines">@@ -374,9 +361,6 @@
</span><span class="cx">         if (!shouldBypassMainWorldContentSecurityPolicy &amp;&amp; !m_document-&gt;contentSecurityPolicy()-&gt;allowImageFromSource(url))
</span><span class="cx">             return false;
</span><span class="cx">         break;
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource: {
</span><span class="cx">         if (!shouldBypassMainWorldContentSecurityPolicy &amp;&amp; !m_document-&gt;contentSecurityPolicy()-&gt;allowFontFromSource(url))
</span><span class="cx">             return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     CachedResourceHandle&lt;CachedCSSStyleSheet&gt; requestCSSStyleSheet(CachedResourceRequest&amp;);
</span><span class="cx">     CachedResourceHandle&lt;CachedCSSStyleSheet&gt; requestUserCSSStyleSheet(CachedResourceRequest&amp;);
</span><span class="cx">     CachedResourceHandle&lt;CachedScript&gt; requestScript(CachedResourceRequest&amp;);
</span><del>-    CachedResourceHandle&lt;CachedFont&gt; requestFont(CachedResourceRequest&amp;, bool isSVG);
</del><ins>+    CachedResourceHandle&lt;CachedFont&gt; requestFont(CachedResourceRequest&amp;);
</ins><span class="cx">     CachedResourceHandle&lt;CachedRawResource&gt; requestRawResource(CachedResourceRequest&amp;);
</span><span class="cx">     CachedResourceHandle&lt;CachedRawResource&gt; requestMainResource(CachedResourceRequest&amp;);
</span><span class="cx">     CachedResourceHandle&lt;CachedSVGDocument&gt; requestSVGDocument(CachedResourceRequest&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedSVGFontcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1,116 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Torch Mobile, Inc.
- *
- * 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. ``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
- * 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;CachedSVGFont.h&quot;
-
-#if ENABLE(SVG_FONTS)
-
-#include &quot;FontDescription.h&quot;
-#include &quot;FontPlatformData.h&quot;
-#include &quot;SVGDocument.h&quot;
-#include &quot;SVGFontData.h&quot;
-#include &quot;SVGFontElement.h&quot;
-#include &quot;SVGFontFaceElement.h&quot;
-#include &quot;SharedBuffer.h&quot;
-#include &quot;TextResourceDecoder.h&quot;
-#include &quot;TypedElementDescendantIterator.h&quot;
-
-namespace WebCore {
-
-CachedSVGFont::CachedSVGFont(const ResourceRequest&amp; resourceRequest, SessionID sessionID)
-    : CachedFont(resourceRequest, sessionID, SVGFontResource)
-    , m_externalSVGFontElement(nullptr)
-{
-}
-
-PassRefPtr&lt;SimpleFontData&gt; CachedSVGFont::getFontData(const FontDescription&amp; fontDescription, const AtomicString&amp; remoteURI, bool syntheticBold, bool syntheticItalic, bool externalSVG)
-{
-    if (!externalSVG)
-        return CachedFont::getFontData(fontDescription, remoteURI, syntheticBold, syntheticItalic, externalSVG);
-
-    if (SVGFontFaceElement* firstFontFace = this-&gt;firstFontFace(remoteURI))
-        return SimpleFontData::create(std::make_unique&lt;SVGFontData&gt;(firstFontFace), fontDescription.computedPixelSize(), syntheticBold, syntheticItalic);
-    return nullptr;
-}
-
-FontPlatformData CachedSVGFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode)
-{
-    if (m_externalSVGDocument)
-        return FontPlatformData(size, bold, italic);
-    return CachedFont::platformDataFromCustomData(size, bold, italic, orientation, widthVariant, renderingMode);
-}
-
-bool CachedSVGFont::ensureCustomFontData(bool externalSVG)
-{
-    if (!externalSVG)
-        return CachedFont::ensureCustomFontData(externalSVG);
-
-    if (!m_externalSVGDocument &amp;&amp; !errorOccurred() &amp;&amp; !isLoading() &amp;&amp; m_data) {
-        m_externalSVGDocument = SVGDocument::create(nullptr, URL());
-        RefPtr&lt;TextResourceDecoder&gt; decoder = TextResourceDecoder::create(&quot;application/xml&quot;);
-        m_externalSVGDocument-&gt;setContent(decoder-&gt;decodeAndFlush(m_data-&gt;data(), m_data-&gt;size()));
-        if (decoder-&gt;sawError())
-            m_externalSVGDocument = nullptr;
-    }
-    return m_externalSVGDocument;
-}
-
-SVGFontElement* CachedSVGFont::getSVGFontById(const String&amp; fontName) const
-{
-    auto elements = descendantsOfType&lt;SVGFontElement&gt;(*m_externalSVGDocument);
-
-    if (fontName.isEmpty())
-        return elements.first();
-
-    for (auto&amp; element : elements) {
-        if (element.getIdAttribute() == fontName)
-            return &amp;element;
-    }
-    return nullptr;
-}
-
-SVGFontFaceElement* CachedSVGFont::firstFontFace(const AtomicString&amp; remoteURI)
-{
-    if (!m_externalSVGFontElement) {
-        String fragmentIdentifier;
-        size_t start = remoteURI.find('#');
-        if (start != notFound)
-            fragmentIdentifier = remoteURI.string().substring(start + 1);
-        m_externalSVGFontElement = getSVGFontById(fragmentIdentifier);
-    }
-
-    if (!m_externalSVGFontElement)
-        return nullptr;
-
-    if (auto* firstFontFace = childrenOfType&lt;SVGFontFaceElement&gt;(*m_externalSVGFontElement).first())
-        return firstFontFace;
-    return nullptr;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedSVGFonth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/cache/CachedSVGFont.h (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedSVGFont.h        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.h        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008 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. ``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
- * 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. 
- */
-
-#ifndef CachedSVGFont_h
-#define CachedSVGFont_h
-
-#if ENABLE(SVG_FONTS)
-
-#include &quot;CachedFont.h&quot;
-
-namespace WebCore {
-
-class SVGFontFaceElement;
-
-class CachedSVGFont final : public CachedFont {
-public:
-    CachedSVGFont(const ResourceRequest&amp;, SessionID);
-
-    virtual bool ensureCustomFontData(bool externalSVG) override;
-    
-    virtual PassRefPtr&lt;SimpleFontData&gt; getFontData(const FontDescription&amp;, const AtomicString&amp; remoteURI, bool syntheticBold, bool syntheticItalic, bool externalSVG) override;
-
-private:
-    FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
-
-    SVGFontElement* getSVGFontById(const String&amp;) const;
-
-    SVGFontFaceElement* firstFontFace(const AtomicString&amp; remoteURI);
-
-    RefPtr&lt;SVGDocument&gt; m_externalSVGDocument;
-    SVGFontElement* m_externalSVGFontElement;
-};
-
-}
-
-SPECIALIZE_TYPE_TRAITS_CACHED_RESOURCE(CachedSVGFont, CachedResource::SVGFontResource)
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -824,9 +824,6 @@
</span><span class="cx">                     stats.xslStyleSheets.addResource(resource);
</span><span class="cx">                     break;
</span><span class="cx"> #endif
</span><del>-#if ENABLE(SVG_FONTS)
-                case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">                 case CachedResource::FontResource:
</span><span class="cx">                     stats.fonts.addResource(resource);
</span><span class="cx">                     break;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceUriElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -88,12 +88,6 @@
</span><span class="cx">     return SVGElement::insertedInto(rootParent);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool isSVGFontTarget(const SVGFontFaceUriElement&amp; element)
-{
-    Ref&lt;CSSFontFaceSrcValue&gt; srcValue(element.srcValue());
-    return srcValue-&gt;isSVGFontTarget();
-}
-
</del><span class="cx"> void SVGFontFaceUriElement::loadFont()
</span><span class="cx"> {
</span><span class="cx">     if (m_cachedFont)
</span><span class="lines">@@ -104,7 +98,7 @@
</span><span class="cx">         CachedResourceLoader* cachedResourceLoader = document().cachedResourceLoader();
</span><span class="cx">         CachedResourceRequest request(ResourceRequest(document().completeURL(href)));
</span><span class="cx">         request.setInitiator(this);
</span><del>-        m_cachedFont = cachedResourceLoader-&gt;requestFont(request, isSVGFontTarget(*this));
</del><ins>+        m_cachedFont = cachedResourceLoader-&gt;requestFont(request);
</ins><span class="cx">         if (m_cachedFont) {
</span><span class="cx">             m_cachedFont-&gt;addClient(this);
</span><span class="cx">             m_cachedFont-&gt;beginLoadIfNeeded(cachedResourceLoader);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebKit2/ChangeLog        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-11-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r176264.
+        https://bugs.webkit.org/show_bug.cgi?id=138837
+
+        caused many test failures (Requested by litherum on #webkit).
+
+        Reverted changeset:
+
+        &quot;Subclass CachedFont for SVG fonts&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=138686
+        http://trac.webkit.org/changeset/176264
+
</ins><span class="cx"> 2014-11-18  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (176266 => 176267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-11-18 18:14:45 UTC (rev 176266)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2014-11-18 18:52:38 UTC (rev 176267)
</span><span class="lines">@@ -92,9 +92,6 @@
</span><span class="cx">     switch (resource-&gt;type()) {
</span><span class="cx">     case CachedResource::CSSStyleSheet:
</span><span class="cx">     case CachedResource::Script:
</span><del>-#if ENABLE(SVG_FONTS)
-    case CachedResource::SVGFontResource:
-#endif
</del><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">         return std::chrono::milliseconds::max();
</span><span class="cx">     case CachedResource::ImageResource:
</span></span></pre>
</div>
</div>

</body>
</html>