<!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>[178388] 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/178388">178388</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2015-01-13 15:57:50 -0800 (Tue, 13 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Devirtualize FontData
https://bugs.webkit.org/show_bug.cgi?id=140390

Reviewed by Andreas Kling.

This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.

SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontDataAt):
(WebCore::CSSFontSelector::getFontData): Deleted.
(WebCore::CSSFontSelector::getFallbackFontData): Deleted.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::pruneTable):
(WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
(WebCore::CSSSegmentedFontFace::fontRanges):
(WebCore::CSSSegmentedFontFace::loadFont):
(WebCore::CSSSegmentedFontFace::getFontData): Deleted.
* css/CSSSegmentedFontFace.h:
* platform/graphics/Font.h:
(WebCore::Font::fallbackRangesAt):
(WebCore::Font::fontDataAt): Deleted.
* platform/graphics/FontData.cpp: Removed.
* platform/graphics/FontData.h: Removed.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::isLoadingCustomFonts):
(WebCore::realizeNextFallback):
(WebCore::FontGlyphs::realizeFallbackRangesAt):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):
(WebCore::glyphPageFromFontRanges):
(WebCore::FontGlyphs::glyphDataForCharacter):
(WebCore::realizeNextFamily): Deleted.
(WebCore::FontGlyphs::realizeFontDataAt): Deleted.
(WebCore::glyphPageFromFontData): Deleted.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
(WebCore::FontRanges::FontRanges):
(WebCore::FontRanges::~FontRanges):
(WebCore::FontRanges::fontDataForCharacter):
(WebCore::FontRanges::fontDataForFirstRange):
(WebCore::FontRanges::isLoading):
(WebCore::SegmentedFontData::SegmentedFontData): Deleted.
(WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
(WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
(WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
(WebCore::SegmentedFontData::isCustomFont): Deleted.
(WebCore::SegmentedFontData::isLoading): Deleted.
(WebCore::SegmentedFontData::isSegmented): Deleted.
(WebCore::SegmentedFontData::description): Deleted.
* platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
(WebCore::FontRanges::Range::Range):
(WebCore::FontRanges::Range::from):
(WebCore::FontRanges::Range::to):
(WebCore::FontRanges::Range::fontData):
(WebCore::FontRanges::isEmpty):
(WebCore::FontRanges::appendRange):
(WebCore::FontRanges::size):
(WebCore::FontRanges::rangeAt):
(WebCore::FontDataRange::FontDataRange): Deleted.
(WebCore::FontDataRange::from): Deleted.
(WebCore::FontDataRange::to): Deleted.
(WebCore::FontDataRange::fontData): Deleted.
(WebCore::SegmentedFontData::create): Deleted.
(WebCore::SegmentedFontData::appendRange): Deleted.
(WebCore::SegmentedFontData::numRanges): Deleted.
(WebCore::SegmentedFontData::rangeAt): Deleted.
(isType): Deleted.
* platform/graphics/FontSelector.h:
* platform/graphics/SegmentedFontData.cpp: Removed.
* platform/graphics/SegmentedFontData.h: Removed.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
(WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
(WebCore::SimpleFontData::isSegmented): Deleted.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::isCustomFont):
(WebCore::SimpleFontData::isLoading):
(isType): Deleted.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList initWithFont:character:]):
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):</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="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorh">trunk/Source/WebCore/css/CSSFontSelector.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSSegmentedFontFacecpp">trunk/Source/WebCore/css/CSSSegmentedFontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSSegmentedFontFaceh">trunk/Source/WebCore/css/CSSSegmentedFontFace.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFonth">trunk/Source/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontGlyphscpp">trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontGlyphsh">trunk/Source/WebCore/platform/graphics/FontGlyphs.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontSelectorh">trunk/Source/WebCore/platform/graphics/FontSelector.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSimpleFontDatacpp">trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSimpleFontDatah">trunk/Source/WebCore/platform/graphics/SimpleFontData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm">trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp">trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontRangescpp">trunk/Source/WebCore/platform/graphics/FontRanges.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontRangesh">trunk/Source/WebCore/platform/graphics/FontRanges.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDatacpp">trunk/Source/WebCore/platform/graphics/FontData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontDatah">trunk/Source/WebCore/platform/graphics/FontData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSegmentedFontDatacpp">trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSegmentedFontDatah">trunk/Source/WebCore/platform/graphics/SegmentedFontData.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 (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -2051,12 +2051,12 @@
</span><span class="cx">     platform/graphics/FloatSize.cpp
</span><span class="cx">     platform/graphics/Font.cpp
</span><span class="cx">     platform/graphics/FontCache.cpp
</span><del>-    platform/graphics/FontData.cpp
</del><span class="cx">     platform/graphics/FontDescription.cpp
</span><span class="cx">     platform/graphics/FontFastPath.cpp
</span><span class="cx">     platform/graphics/FontFeatureSettings.cpp
</span><span class="cx">     platform/graphics/FontGenericFamilies.cpp
</span><span class="cx">     platform/graphics/FontGlyphs.cpp
</span><ins>+    platform/graphics/FontRanges.cpp
</ins><span class="cx">     platform/graphics/GeneratedImage.cpp
</span><span class="cx">     platform/graphics/GeometryUtilities.cpp
</span><span class="cx">     platform/graphics/Gradient.cpp
</span><span class="lines">@@ -2084,7 +2084,6 @@
</span><span class="cx">     platform/graphics/Region.cpp
</span><span class="cx">     platform/graphics/RoundedRect.cpp
</span><span class="cx">     platform/graphics/SVGGlyph.cpp
</span><del>-    platform/graphics/SegmentedFontData.cpp
</del><span class="cx">     platform/graphics/ShadowBlur.cpp
</span><span class="cx">     platform/graphics/SimpleFontData.cpp
</span><span class="cx">     platform/graphics/StringTruncator.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/ChangeLog        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1,3 +1,100 @@
</span><ins>+2015-01-13  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Devirtualize FontData
+        https://bugs.webkit.org/show_bug.cgi?id=140390
+
+        Reviewed by Andreas Kling.
+
+        This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
+
+        SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
+
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::fontRangesForFamily):
+        (WebCore::CSSFontSelector::fallbackFontDataAt):
+        (WebCore::CSSFontSelector::getFontData): Deleted.
+        (WebCore::CSSFontSelector::getFallbackFontData): Deleted.
+        * css/CSSFontSelector.h:
+        * css/CSSSegmentedFontFace.cpp:
+        (WebCore::CSSSegmentedFontFace::pruneTable):
+        (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
+        (WebCore::CSSSegmentedFontFace::fontRanges):
+        (WebCore::CSSSegmentedFontFace::loadFont):
+        (WebCore::CSSSegmentedFontFace::getFontData): Deleted.
+        * css/CSSSegmentedFontFace.h:
+        * platform/graphics/Font.h:
+        (WebCore::Font::fallbackRangesAt):
+        (WebCore::Font::fontDataAt): Deleted.
+        * platform/graphics/FontData.cpp: Removed.
+        * platform/graphics/FontData.h: Removed.
+        * platform/graphics/FontGlyphs.cpp:
+        (WebCore::FontGlyphs::FontGlyphs):
+        (WebCore::FontGlyphs::determinePitch):
+        (WebCore::FontGlyphs::isLoadingCustomFonts):
+        (WebCore::realizeNextFallback):
+        (WebCore::FontGlyphs::realizeFallbackRangesAt):
+        (WebCore::FontGlyphs::glyphDataForSystemFallback):
+        (WebCore::FontGlyphs::glyphDataForVariant):
+        (WebCore::FontGlyphs::glyphDataForNormalVariant):
+        (WebCore::glyphPageFromFontRanges):
+        (WebCore::FontGlyphs::glyphDataForCharacter):
+        (WebCore::realizeNextFamily): Deleted.
+        (WebCore::FontGlyphs::realizeFontDataAt): Deleted.
+        (WebCore::glyphPageFromFontData): Deleted.
+        * platform/graphics/FontGlyphs.h:
+        (WebCore::FontGlyphs::primarySimpleFontData):
+        * platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
+        (WebCore::FontRanges::FontRanges):
+        (WebCore::FontRanges::~FontRanges):
+        (WebCore::FontRanges::fontDataForCharacter):
+        (WebCore::FontRanges::fontDataForFirstRange):
+        (WebCore::FontRanges::isLoading):
+        (WebCore::SegmentedFontData::SegmentedFontData): Deleted.
+        (WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
+        (WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
+        (WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
+        (WebCore::SegmentedFontData::isCustomFont): Deleted.
+        (WebCore::SegmentedFontData::isLoading): Deleted.
+        (WebCore::SegmentedFontData::isSegmented): Deleted.
+        (WebCore::SegmentedFontData::description): Deleted.
+        * platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
+        (WebCore::FontRanges::Range::Range):
+        (WebCore::FontRanges::Range::from):
+        (WebCore::FontRanges::Range::to):
+        (WebCore::FontRanges::Range::fontData):
+        (WebCore::FontRanges::isEmpty):
+        (WebCore::FontRanges::appendRange):
+        (WebCore::FontRanges::size):
+        (WebCore::FontRanges::rangeAt):
+        (WebCore::FontDataRange::FontDataRange): Deleted.
+        (WebCore::FontDataRange::from): Deleted.
+        (WebCore::FontDataRange::to): Deleted.
+        (WebCore::FontDataRange::fontData): Deleted.
+        (WebCore::SegmentedFontData::create): Deleted.
+        (WebCore::SegmentedFontData::appendRange): Deleted.
+        (WebCore::SegmentedFontData::numRanges): Deleted.
+        (WebCore::SegmentedFontData::rangeAt): Deleted.
+        (isType): Deleted.
+        * platform/graphics/FontSelector.h:
+        * platform/graphics/SegmentedFontData.cpp: Removed.
+        * platform/graphics/SegmentedFontData.h: Removed.
+        * platform/graphics/SimpleFontData.cpp:
+        (WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
+        (WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
+        (WebCore::SimpleFontData::isSegmented): Deleted.
+        * platform/graphics/SimpleFontData.h:
+        (WebCore::SimpleFontData::isCustomFont):
+        (WebCore::SimpleFontData::isLoading):
+        (isType): Deleted.
+        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+        (-[WebCascadeList initWithFont:character:]):
+        (-[WebCascadeList objectAtIndex:]):
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+        * platform/graphics/mac/FontComplexTextMac.cpp:
+        (WebCore::Font::fontDataForCombiningCharacterSequence):
+
</ins><span class="cx"> 2015-01-13  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Filters aren't applied to elements in columns after the first
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/WebCore.exp.in        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> __ZN7WebCore10CredentialC1EP15NSURLCredential
</span><span class="cx"> __ZN7WebCore10FloatPointC1ERK7CGPoint
</span><span class="cx"> __ZN7WebCore10FloatPointC1ERKNS_8IntPointE
</span><del>-__ZN7WebCore10FontGlyphs17realizeFontDataAtERKNS_15FontDescriptionEj
</del><ins>+__ZN7WebCore10FontGlyphs23realizeFallbackRangesAtERKNS_15FontDescriptionEj
</ins><span class="cx"> __ZN7WebCore10FontGlyphsD1Ev
</span><span class="cx"> __ZN7WebCore10JSDocument6s_infoE
</span><span class="cx"> __ZN7WebCore10JSDocument9toWrappedEN3JSC7JSValueE
</span><span class="lines">@@ -459,6 +459,7 @@
</span><span class="cx"> __ZN7WebCore14SecurityPolicy27resetOriginAccessWhitelistsEv
</span><span class="cx"> __ZN7WebCore14SecurityPolicy29addOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
</span><span class="cx"> __ZN7WebCore14SecurityPolicy32removeOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
</span><ins>+__ZN7WebCore14SimpleFontDataD1Ev
</ins><span class="cx"> __ZN7WebCore14SubframeLoader12allowPluginsENS_28ReasonForCallingAllowPluginsE
</span><span class="cx"> __ZN7WebCore14TileController14setTilesOpaqueEb
</span><span class="cx"> __ZN7WebCore14TileController15containerLayersEv
</span><span class="lines">@@ -1585,6 +1586,8 @@
</span><span class="cx"> __ZNK7WebCore10Credential12nsCredentialEv
</span><span class="cx"> __ZNK7WebCore10Credential7isEmptyEv
</span><span class="cx"> __ZNK7WebCore10FloatPointcv7CGPointEv
</span><ins>+__ZNK7WebCore10FontRanges20fontDataForCharacterEi
+__ZNK7WebCore10FontRanges21fontDataForFirstRangeEv
</ins><span class="cx"> __ZNK7WebCore10LayoutRect8containsERKS0_
</span><span class="cx"> __ZNK7WebCore10PluginData16supportsMimeTypeERKN3WTF6StringENS0_18AllowedPluginTypesE
</span><span class="cx"> __ZNK7WebCore10RenderText16firstRunLocationEv
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -7980,13 +7980,13 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FloatSize.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\Font.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontCache.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\graphics\FontData.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontDescription.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontGenericFamilies.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontGlyphs.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontFastPath.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontFeatureSettings.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\FontPlatformData.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\graphics\FontRanges.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\GeometryUtilities.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\GeneratedImage.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\Gradient.cpp&quot; /&gt;
</span><span class="lines">@@ -8020,7 +8020,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\PlatformTimeRanges.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\Region.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\RoundedRect.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\graphics\SegmentedFontData.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\ShadowBlur.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\SimpleFontData.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\TextRun.cpp&quot; /&gt;
</span><span class="lines">@@ -19469,13 +19468,13 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FloatSizeHash.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\Font.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontCache.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\platform\graphics\FontData.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontDescription.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontGenericFamilies.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontGlyphs.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontFeatureSettings.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontMetrics.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontPlatformData.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\platform\graphics\FontRanges.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontRenderingMode.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontSelector.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\FontSmoothingMode.h&quot; /&gt;
</span><span class="lines">@@ -19518,7 +19517,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\PlatformTimeRanges.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\Region.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\RoundedRect.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\platform\graphics\SegmentedFontData.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\ShadowBlur.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\SimpleFontData.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\TextRun.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1352,10 +1352,8 @@
</span><span class="cx">                 371A67CB11C6C7DB00047B8B /* HyphenationCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371A67CA11C6C7DB00047B8B /* HyphenationCF.cpp */; };
</span><span class="cx">                 371E65CC13661EDC00BEEDB0 /* PageSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */; };
</span><span class="cx">                 371E65CE13661EED00BEEDB0 /* PageSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371E65CD13661EED00BEEDB0 /* PageSerializer.cpp */; };
</span><del>-                371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */; };
-                371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */; };
-                371F4FFD0D25E7F300ECE0D5 /* SegmentedFontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4FFB0D25E7F300ECE0D5 /* SegmentedFontData.cpp */; };
</del><ins>+                371F4FFC0D25E7F300ECE0D5 /* FontRanges.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* FontRanges.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                371F4FFD0D25E7F300ECE0D5 /* FontRanges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4FFB0D25E7F300ECE0D5 /* FontRanges.cpp */; };
</ins><span class="cx">                 371F51A10D262FA000ECE0D5 /* CSSSegmentedFontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F519F0D262FA000ECE0D5 /* CSSSegmentedFontFace.h */; };
</span><span class="cx">                 371F51A20D262FA000ECE0D5 /* CSSSegmentedFontFace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F51A00D262FA000ECE0D5 /* CSSSegmentedFontFace.cpp */; };
</span><span class="cx">                 371F53E90D2704F900ECE0D5 /* CSSUnicodeRangeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F53E70D2704F900ECE0D5 /* CSSUnicodeRangeValue.h */; };
</span><span class="lines">@@ -8390,10 +8388,8 @@
</span><span class="cx">                 371A67CA11C6C7DB00047B8B /* HyphenationCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HyphenationCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageSerializer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 371E65CD13661EED00BEEDB0 /* PageSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageSerializer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                371F4F3E0D25B9AF00ECE0D5 /* FontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SegmentedFontData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                371F4FFB0D25E7F300ECE0D5 /* SegmentedFontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SegmentedFontData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                371F4FFA0D25E7F300ECE0D5 /* FontRanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontRanges.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                371F4FFB0D25E7F300ECE0D5 /* FontRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontRanges.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 371F519F0D262FA000ECE0D5 /* CSSSegmentedFontFace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSSegmentedFontFace.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 371F51A00D262FA000ECE0D5 /* CSSSegmentedFontFace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSSegmentedFontFace.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 371F53E70D2704F900ECE0D5 /* CSSUnicodeRangeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSUnicodeRangeValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -20439,8 +20435,6 @@
</span><span class="cx">                                 BCB92D4E1293550B00C8387F /* FontBaseline.h */,
</span><span class="cx">                                 B2C3DA510D006CD600EF6F26 /* FontCache.cpp */,
</span><span class="cx">                                 B2C3DA520D006CD600EF6F26 /* FontCache.h */,
</span><del>-                                371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */,
-                                371F4F3E0D25B9AF00ECE0D5 /* FontData.h */,
</del><span class="cx">                                 37ACCE620DA2AA960089E602 /* FontDescription.cpp */,
</span><span class="cx">                                 B2C3DA550D006CD600EF6F26 /* FontDescription.h */,
</span><span class="cx">                                 72626E010EF022FE00A07E20 /* FontFastPath.cpp */,
</span><span class="lines">@@ -20543,8 +20537,8 @@
</span><span class="cx">                                 BCAB418013E356E800D8AAF3 /* Region.h */,
</span><span class="cx">                                 A73F95FC12C97BFE0031AAF9 /* RoundedRect.cpp */,
</span><span class="cx">                                 A73F95FD12C97BFE0031AAF9 /* RoundedRect.h */,
</span><del>-                                371F4FFB0D25E7F300ECE0D5 /* SegmentedFontData.cpp */,
-                                371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */,
</del><ins>+                                371F4FFB0D25E7F300ECE0D5 /* FontRanges.cpp */,
+                                371F4FFA0D25E7F300ECE0D5 /* FontRanges.h */,
</ins><span class="cx">                                 0F3DD44D12F5EA1B000D9190 /* ShadowBlur.cpp */,
</span><span class="cx">                                 0F3DD44E12F5EA1B000D9190 /* ShadowBlur.h */,
</span><span class="cx">                                 B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */,
</span><span class="lines">@@ -24309,7 +24303,6 @@
</span><span class="cx">                                 BCB92D4F1293550B00C8387F /* FontBaseline.h in Headers */,
</span><span class="cx">                                 B2C3DA630D006CD600EF6F26 /* FontCache.h in Headers */,
</span><span class="cx">                                 B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */,
</span><del>-                                371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */,
</del><span class="cx">                                 B2C3DA660D006CD600EF6F26 /* FontDescription.h in Headers */,
</span><span class="cx">                                 4A6E9FC813C17D570046A7F8 /* FontFeatureSettings.h in Headers */,
</span><span class="cx">                                 B2C3DA680D006CD600EF6F26 /* FontGlyphs.h in Headers */,
</span><span class="lines">@@ -25960,7 +25953,7 @@
</span><span class="cx">                                 BCD0E0FC0E972C3500265DEA /* SecurityOriginHash.h in Headers */,
</span><span class="cx">                                 974D2DA5146A535D00D51F8B /* SecurityPolicy.h in Headers */,
</span><span class="cx">                                 2D5BC42716F882EE007048D0 /* SecurityPolicyViolationEvent.h in Headers */,
</span><del>-                                371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */,
</del><ins>+                                371F4FFC0D25E7F300ECE0D5 /* FontRanges.h in Headers */,
</ins><span class="cx">                                 99CC0B5E18BE984A006CEBCC /* SegmentedInputStorage.h in Headers */,
</span><span class="cx">                                 B2C3DA2F0D006C1D00EF6F26 /* SegmentedString.h in Headers */,
</span><span class="cx">                                 BEA807C90F714A0300524199 /* SelectionRect.h in Headers */,
</span><span class="lines">@@ -27813,7 +27806,6 @@
</span><span class="cx">                                 B2AFFC7C0D00A5C10030074D /* FontCacheMac.mm in Sources */,
</span><span class="cx">                                 37C2360B1097EDED00EF9F72 /* FontComplexTextMac.cpp in Sources */,
</span><span class="cx">                                 B2AFFC7D0D00A5C10030074D /* FontCustomPlatformData.cpp in Sources */,
</span><del>-                                371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */,
</del><span class="cx">                                 37ACCF690DA414E70089E602 /* FontDescription.cpp in Sources */,
</span><span class="cx">                                 72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */,
</span><span class="cx">                                 4A6E9FC713C17D570046A7F8 /* FontFeatureSettings.cpp in Sources */,
</span><span class="lines">@@ -29391,7 +29383,7 @@
</span><span class="cx">                                 976F36EA14686225005E93B4 /* SecurityContext.cpp in Sources */,
</span><span class="cx">                                 BCD0E0FA0E972C3500265DEA /* SecurityOrigin.cpp in Sources */,
</span><span class="cx">                                 974D2DA4146A535D00D51F8B /* SecurityPolicy.cpp in Sources */,
</span><del>-                                371F4FFD0D25E7F300ECE0D5 /* SegmentedFontData.cpp in Sources */,
</del><ins>+                                371F4FFD0D25E7F300ECE0D5 /* FontRanges.cpp in Sources */,
</ins><span class="cx">                                 99CC0B5D18BE984A006CEBCC /* SegmentedInputStorage.cpp in Sources */,
</span><span class="cx">                                 B2C3DA2E0D006C1D00EF6F26 /* SegmentedString.cpp in Sources */,
</span><span class="cx">                                 BEA807C80F714A0300524199 /* SelectionRect.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -468,7 +468,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;FontData&gt; CSSFontSelector::getFontData(const FontDescription&amp; fontDescription, const AtomicString&amp; familyName)
</del><ins>+FontRanges CSSFontSelector::fontRangesForFamily(const FontDescription&amp; fontDescription, const AtomicString&amp; familyName)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: The spec (and Firefox) says user specified generic families (sans-serif etc.) should be resolved before the @font-face lookup too.
</span><span class="cx">     bool resolveGenericFamilyFirst = familyName == standardFamily;
</span><span class="lines">@@ -478,10 +478,10 @@
</span><span class="cx">     if (!face) {
</span><span class="cx">         if (!resolveGenericFamilyFirst)
</span><span class="cx">             familyForLookup = resolveGenericFamily(m_document, fontDescription, familyName);
</span><del>-        return fontCache().fontForFamily(fontDescription, familyForLookup);
</del><ins>+        return FontRanges(fontCache().fontForFamily(fontDescription, familyForLookup));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return face-&gt;getFontData(fontDescription);
</del><ins>+    return face-&gt;fontRanges(fontDescription);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSSegmentedFontFace* CSSFontSelector::getFontFace(const FontDescription&amp; fontDescription, const AtomicString&amp; family)
</span><span class="lines">@@ -623,7 +623,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;FontData&gt; CSSFontSelector::getFallbackFontData(const FontDescription&amp; fontDescription, size_t index)
</del><ins>+PassRefPtr&lt;SimpleFontData&gt; CSSFontSelector::fallbackFontDataAt(const FontDescription&amp; fontDescription, size_t index)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT_UNUSED(index, !index);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/css/CSSFontSelector.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -58,9 +58,9 @@
</span><span class="cx">     virtual unsigned version() const override { return m_version; }
</span><span class="cx">     virtual unsigned uniqueId() const override { return m_uniqueId; }
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;FontData&gt; getFontData(const FontDescription&amp;, const AtomicString&amp;) override;
</del><ins>+    virtual FontRanges fontRangesForFamily(const FontDescription&amp;, const AtomicString&amp;) override;
</ins><span class="cx">     virtual size_t fallbackFontDataCount() override;
</span><del>-    virtual PassRefPtr&lt;FontData&gt; getFallbackFontData(const FontDescription&amp;, size_t) override;
</del><ins>+    virtual PassRefPtr&lt;SimpleFontData&gt; fallbackFontDataAt(const FontDescription&amp;, size_t) override;
</ins><span class="cx">     CSSSegmentedFontFace* getFontFace(const FontDescription&amp;, const AtomicString&amp; family);
</span><span class="cx"> 
</span><span class="cx">     virtual bool resolvesFamilyFor(const FontDescription&amp;) const override;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSegmentedFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSegmentedFontFace.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSegmentedFontFace.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/css/CSSSegmentedFontFace.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;FontDescription.h&quot;
</span><span class="cx"> #include &quot;RuntimeEnabledFeatures.h&quot;
</span><del>-#include &quot;SegmentedFontData.h&quot;
</del><span class="cx"> #include &quot;SimpleFontData.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -52,11 +51,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CSSSegmentedFontFace::pruneTable()
</span><span class="cx"> {
</span><del>-    // Make sure the glyph page tree prunes out all uses of this custom font.
-    if (m_fontDataTable.isEmpty())
-        return;
-
-    m_fontDataTable.clear();
</del><ins>+    m_descriptionToRangesMap.clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSSegmentedFontFace::isValid() const
</span><span class="lines">@@ -95,28 +90,27 @@
</span><span class="cx">     m_fontFaces.append(fontFace);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void appendFontDataWithInvalidUnicodeRangeIfLoading(SegmentedFontData* newFontData, PassRefPtr&lt;SimpleFontData&gt; prpFaceFontData, const Vector&lt;CSSFontFace::UnicodeRange&gt;&amp; ranges)
</del><ins>+static void appendFontDataWithInvalidUnicodeRangeIfLoading(FontRanges&amp; ranges, Ref&lt;SimpleFontData&gt;&amp;&amp; fontData, const Vector&lt;CSSFontFace::UnicodeRange&gt;&amp; unicodeRanges)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;SimpleFontData&gt; faceFontData = prpFaceFontData;
-    if (faceFontData-&gt;isLoading()) {
-        newFontData-&gt;appendRange(FontDataRange(0, 0, faceFontData));
</del><ins>+    if (fontData-&gt;isLoading()) {
+        ranges.appendRange(FontRanges::Range(0, 0, WTF::move(fontData)));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    unsigned numRanges = ranges.size();
</del><ins>+    unsigned numRanges = unicodeRanges.size();
</ins><span class="cx">     if (!numRanges) {
</span><del>-        newFontData-&gt;appendRange(FontDataRange(0, 0x7FFFFFFF, faceFontData));
</del><ins>+        ranges.appendRange(FontRanges::Range(0, 0x7FFFFFFF, WTF::move(fontData)));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (unsigned j = 0; j &lt; numRanges; ++j)
</span><del>-        newFontData-&gt;appendRange(FontDataRange(ranges[j].from(), ranges[j].to(), faceFontData));
</del><ins>+        ranges.appendRange(FontRanges::Range(unicodeRanges[j].from(), unicodeRanges[j].to(), fontData.copyRef()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;FontData&gt; CSSSegmentedFontFace::getFontData(const FontDescription&amp; fontDescription)
</del><ins>+FontRanges CSSSegmentedFontFace::fontRanges(const FontDescription&amp; fontDescription)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><del>-        return 0;
</del><ins>+        return FontRanges();
</ins><span class="cx"> 
</span><span class="cx">     FontTraitsMask desiredTraitsMask = fontDescription.traitsMask();
</span><span class="cx">     unsigned hashKey = ((fontDescription.computedPixelSize() + 1) &lt;&lt; (FontTraitsMaskWidth + FontWidthVariantWidth + 1))
</span><span class="lines">@@ -124,37 +118,28 @@
</span><span class="cx">         | fontDescription.widthVariant() &lt;&lt; FontTraitsMaskWidth
</span><span class="cx">         | desiredTraitsMask;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;SegmentedFontData&gt;&amp; fontData = m_fontDataTable.add(hashKey, nullptr).iterator-&gt;value;
-    if (fontData &amp;&amp; fontData-&gt;numRanges())
-        return fontData; // No release, we have a reference to an object in the cache which should retain the ref count it has.
</del><ins>+    auto addResult = m_descriptionToRangesMap.add(hashKey, FontRanges());
+    auto&amp; fontRanges = addResult.iterator-&gt;value;
</ins><span class="cx"> 
</span><del>-    if (!fontData)
-        fontData = SegmentedFontData::create();
-
-    unsigned size = m_fontFaces.size();
-    for (unsigned i = 0; i &lt; size; i++) {
-        if (!m_fontFaces[i]-&gt;isValid())
-            continue;
-        FontTraitsMask traitsMask = m_fontFaces[i]-&gt;traitsMask();
-        bool syntheticBold = !(traitsMask &amp; (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask)) &amp;&amp; (desiredTraitsMask &amp; (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask));
-        bool syntheticItalic = !(traitsMask &amp; FontStyleItalicMask) &amp;&amp; (desiredTraitsMask &amp; FontStyleItalicMask);
-        if (RefPtr&lt;SimpleFontData&gt; faceFontData = m_fontFaces[i]-&gt;getFontData(fontDescription, syntheticBold, syntheticItalic)) {
-            ASSERT(!faceFontData-&gt;isSegmented());
-            appendFontDataWithInvalidUnicodeRangeIfLoading(fontData.get(), faceFontData.release(), m_fontFaces[i]-&gt;ranges());
</del><ins>+    if (addResult.isNewEntry) {
+        for (auto&amp; face : m_fontFaces) {
+            if (!face-&gt;isValid())
+                continue;
+            FontTraitsMask traitsMask = face-&gt;traitsMask();
+            bool syntheticBold = !(traitsMask &amp; (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask)) &amp;&amp; (desiredTraitsMask &amp; (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask));
+            bool syntheticItalic = !(traitsMask &amp; FontStyleItalicMask) &amp;&amp; (desiredTraitsMask &amp; FontStyleItalicMask);
+            if (RefPtr&lt;SimpleFontData&gt; faceFontData = face-&gt;getFontData(fontDescription, syntheticBold, syntheticItalic))
+                appendFontDataWithInvalidUnicodeRangeIfLoading(fontRanges, faceFontData.releaseNonNull(), face-&gt;ranges());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if (fontData-&gt;numRanges())
-        return fontData; // No release, we have a reference to an object in the cache which should retain the ref count it has.
-
-    return 0;
</del><ins>+    return fontRanges;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="cx"> bool CSSSegmentedFontFace::isLoading() const
</span><span class="cx"> {
</span><del>-    unsigned size = m_fontFaces.size();
-    for (unsigned i = 0; i &lt; size; i++) {
-        if (m_fontFaces[i]-&gt;loadState() == CSSFontFace::Loading)
</del><ins>+    for (auto&amp; face : m_fontFaces) {
+        if (face-&gt;loadState() == CSSFontFace::Loading)
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span><span class="lines">@@ -162,9 +147,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSSegmentedFontFace::checkFont() const
</span><span class="cx"> {
</span><del>-    unsigned size = m_fontFaces.size();
-    for (unsigned i = 0; i &lt; size; i++) {
-        if (m_fontFaces[i]-&gt;loadState() != CSSFontFace::Loaded)
</del><ins>+    for (auto&amp; face : m_fontFaces) {
+        if (face-&gt;loadState() != CSSFontFace::Loaded)
</ins><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="lines">@@ -172,7 +156,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CSSSegmentedFontFace::loadFont(const FontDescription&amp; fontDescription, PassRefPtr&lt;LoadFontCallback&gt; callback)
</span><span class="cx"> {
</span><del>-    getFontData(fontDescription); // Kick off the load.
</del><ins>+    fontRanges(fontDescription); // Kick off the load.
</ins><span class="cx"> 
</span><span class="cx">     if (callback) {
</span><span class="cx">         if (isLoading())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSegmentedFontFaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSegmentedFontFace.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSegmentedFontFace.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/css/CSSSegmentedFontFace.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #ifndef CSSSegmentedFontFace_h
</span><span class="cx"> #define CSSSegmentedFontFace_h
</span><span class="cx"> 
</span><ins>+#include &quot;FontRanges.h&quot;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="lines">@@ -35,9 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> class CSSFontFace;
</span><span class="cx"> class CSSFontSelector;
</span><del>-class FontData;
</del><span class="cx"> class FontDescription;
</span><del>-class SegmentedFontData;
</del><span class="cx"> 
</span><span class="cx"> class CSSSegmentedFontFace : public RefCounted&lt;CSSSegmentedFontFace&gt; {
</span><span class="cx"> public:
</span><span class="lines">@@ -50,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx">     void appendFontFace(PassRefPtr&lt;CSSFontFace&gt;);
</span><span class="cx"> 
</span><del>-    PassRefPtr&lt;FontData&gt; getFontData(const FontDescription&amp;);
</del><ins>+    FontRanges fontRanges(const FontDescription&amp;);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="cx">     class LoadFontCallback : public RefCounted&lt;LoadFontCallback&gt; {
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     CSSFontSelector* m_fontSelector;
</span><del>-    HashMap&lt;unsigned, RefPtr&lt;SegmentedFontData&gt;&gt; m_fontDataTable;
</del><ins>+    HashMap&lt;unsigned, FontRanges&gt; m_descriptionToRangesMap;
</ins><span class="cx">     Vector&lt;RefPtr&lt;CSSFontFace&gt;, 1&gt; m_fontFaces;
</span><span class="cx"> #if ENABLE(FONT_LOAD_EVENTS)
</span><span class="cx">     Vector&lt;RefPtr&lt;LoadFontCallback&gt;&gt; m_callbacks;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Font.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">     int emphasisMarkHeight(const AtomicString&amp;) const;
</span><span class="cx"> 
</span><span class="cx">     const SimpleFontData&amp; primaryFontData() const;
</span><del>-    const FontData* fontDataAt(unsigned) const;
</del><ins>+    const FontRanges&amp; fallbackRangesAt(unsigned) const;
</ins><span class="cx">     GlyphData glyphDataForCharacter(UChar32, bool mirror, FontDataVariant = AutoVariant) const;
</span><span class="cx">     
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -357,10 +357,10 @@
</span><span class="cx">     return m_glyphs-&gt;primarySimpleFontData(m_fontDescription);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline const FontData* Font::fontDataAt(unsigned index) const
</del><ins>+inline const FontRanges&amp; Font::fallbackRangesAt(unsigned index) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_glyphs);
</span><del>-    return m_glyphs-&gt;realizeFontDataAt(m_fontDescription, index);
</del><ins>+    return m_glyphs-&gt;realizeFallbackRangesAt(m_fontDescription, index);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool Font::isFixedPitch() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDatacpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/FontData.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontData.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/FontData.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-/*
- * Copyright (C) 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. 
- */
-
-#include &quot;config.h&quot;
-#include &quot;FontData.h&quot;
-
-namespace WebCore {
-
-FontData::~FontData()
-{
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDatah"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/FontData.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontData.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/FontData.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2015 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 FontData_h
-#define FontData_h
-
-#include &lt;unicode/utypes.h&gt;
-#include &lt;wtf/FastMalloc.h&gt;
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/Noncopyable.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace WebCore {
-
-class SimpleFontData;
-
-class FontData : public RefCounted&lt;FontData&gt; {
-    WTF_MAKE_NONCOPYABLE(FontData); WTF_MAKE_FAST_ALLOCATED;
-public:
-    FontData()
-    {
-    }
-
-    virtual ~FontData();
-
-    virtual const SimpleFontData* simpleFontDataForCharacter(UChar32) const = 0;
-    virtual const SimpleFontData&amp; simpleFontDataForFirstRange() const = 0;
-    virtual bool isCustomFont() const = 0;
-    virtual bool isLoading() const = 0;
-    virtual bool isSegmented() const = 0;
-
-#ifndef NDEBUG
-    virtual String description() const = 0;
-#endif
-};
-
-} // namespace WebCore
-
-#endif // FontData_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontGlyphscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;Font.h&quot;
</span><span class="cx"> #include &quot;FontCache.h&quot;
</span><span class="cx"> #include &quot;GlyphPage.h&quot;
</span><del>-#include &quot;SegmentedFontData.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -52,7 +51,7 @@
</span><span class="cx">     , m_generation(fontCache().generation())
</span><span class="cx">     , m_isForPlatformFont(true)
</span><span class="cx"> {
</span><del>-    m_realizedFontData.append(fontCache().fontForPlatformData(platformData));
</del><ins>+    m_realizedFallbackRanges.append(FontRanges(fontCache().fontForPlatformData(platformData)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FontGlyphs::~FontGlyphs()
</span><span class="lines">@@ -61,29 +60,24 @@
</span><span class="cx"> 
</span><span class="cx"> void FontGlyphs::determinePitch(const FontDescription&amp; description)
</span><span class="cx"> {
</span><del>-    const FontData&amp; fontData = *realizeFontDataAt(description, 0);
-    if (is&lt;SimpleFontData&gt;(fontData))
-        m_pitch = downcast&lt;SimpleFontData&gt;(fontData).pitch();
-    else {
-        const SegmentedFontData&amp; segmentedFontData = downcast&lt;SegmentedFontData&gt;(fontData);
-        unsigned numRanges = segmentedFontData.numRanges();
-        if (numRanges == 1)
-            m_pitch = segmentedFontData.rangeAt(0).fontData()-&gt;pitch();
-        else
-            m_pitch = VariablePitch;
-    }
</del><ins>+    auto&amp; primaryRanges = realizeFallbackRangesAt(description, 0);
+    unsigned numRanges = primaryRanges.size();
+    if (numRanges == 1)
+        m_pitch = primaryRanges.rangeAt(0).fontData().pitch();
+    else
+        m_pitch = VariablePitch;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool FontGlyphs::isLoadingCustomFonts() const
</span><span class="cx"> {
</span><del>-    for (auto&amp; font : m_realizedFontData) {
-        if (font-&gt;isLoading())
</del><ins>+    for (auto&amp; fontRanges : m_realizedFallbackRanges) {
+        if (fontRanges.isLoading())
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;FontData&gt; realizeNextFamily(const FontDescription&amp; description, unsigned&amp; index, FontSelector* fontSelector)
</del><ins>+static FontRanges realizeNextFallback(const FontDescription&amp; description, unsigned&amp; index, FontSelector* fontSelector)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(index &lt; description.familyCount());
</span><span class="cx"> 
</span><span class="lines">@@ -92,55 +86,53 @@
</span><span class="cx">         if (family.isEmpty())
</span><span class="cx">             continue;
</span><span class="cx">         if (fontSelector) {
</span><del>-            if (auto font = fontSelector-&gt;getFontData(description, family))
-                return font;
</del><ins>+            auto ranges = fontSelector-&gt;fontRangesForFamily(description, family);
+            if (!ranges.isNull())
+                return ranges;
</ins><span class="cx">         }
</span><span class="cx">         if (auto font = fontCache().fontForFamily(description, family))
</span><del>-            return font;
</del><ins>+            return FontRanges(WTF::move(font));
</ins><span class="cx">     }
</span><span class="cx">     // We didn't find a font. Try to find a similar font using our own specific knowledge about our platform.
</span><span class="cx">     // For example on OS X, we know to map any families containing the words Arabic, Pashto, or Urdu to the
</span><span class="cx">     // Geeza Pro font.
</span><del>-    return fontCache().similarFontPlatformData(description);
</del><ins>+    return FontRanges(fontCache().similarFontPlatformData(description));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-const FontData* FontGlyphs::realizeFontDataAt(const FontDescription&amp; description, unsigned index)
</del><ins>+const FontRanges&amp; FontGlyphs::realizeFallbackRangesAt(const FontDescription&amp; description, unsigned index)
</ins><span class="cx"> {
</span><del>-    if (index &lt; m_realizedFontData.size())
-        return &amp;m_realizedFontData[index].get();
</del><ins>+    if (index &lt; m_realizedFallbackRanges.size())
+        return m_realizedFallbackRanges[index];
</ins><span class="cx"> 
</span><del>-    ASSERT(index == m_realizedFontData.size());
</del><ins>+    ASSERT(index == m_realizedFallbackRanges.size());
</ins><span class="cx">     ASSERT(fontCache().generation() == m_generation);
</span><span class="cx"> 
</span><del>-    if (!index) {
-        RefPtr&lt;FontData&gt; result = realizeNextFamily(description, m_lastRealizedFamilyIndex, m_fontSelector.get());
-        if (!result &amp;&amp; m_fontSelector)
-            result = m_fontSelector-&gt;getFontData(description, standardFamily);
-        if (!result)
-            result = fontCache().lastResortFallbackFont(description);
</del><ins>+    m_realizedFallbackRanges.append(FontRanges());
+    auto&amp; fontRanges = m_realizedFallbackRanges.last();
</ins><span class="cx"> 
</span><del>-        m_realizedFontData.append(*result);
-        return result.get();
</del><ins>+    if (!index) {
+        fontRanges = realizeNextFallback(description, m_lastRealizedFallbackIndex, m_fontSelector.get());
+        if (fontRanges.isNull() &amp;&amp; m_fontSelector)
+            fontRanges = m_fontSelector-&gt;fontRangesForFamily(description, standardFamily);
+        if (fontRanges.isNull())
+            fontRanges = FontRanges(fontCache().lastResortFallbackFont(description));
+        return fontRanges;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;FontData&gt; result;
-    if (m_lastRealizedFamilyIndex &lt; description.familyCount())
-        result = realizeNextFamily(description, m_lastRealizedFamilyIndex, m_fontSelector.get());
</del><ins>+    if (m_lastRealizedFallbackIndex &lt; description.familyCount())
+        fontRanges = realizeNextFallback(description, m_lastRealizedFallbackIndex, m_fontSelector.get());
</ins><span class="cx"> 
</span><del>-    if (!result &amp;&amp; m_fontSelector) {
-        ASSERT(m_lastRealizedFamilyIndex &gt;= description.familyCount());
</del><ins>+    if (fontRanges.isNull() &amp;&amp; m_fontSelector) {
+        ASSERT(m_lastRealizedFallbackIndex &gt;= description.familyCount());
</ins><span class="cx"> 
</span><del>-        unsigned fontSelectorFallbackIndex = m_lastRealizedFamilyIndex - description.familyCount();
</del><ins>+        unsigned fontSelectorFallbackIndex = m_lastRealizedFallbackIndex - description.familyCount();
</ins><span class="cx">         if (fontSelectorFallbackIndex == m_fontSelector-&gt;fallbackFontDataCount())
</span><del>-            return nullptr;
-        ++m_lastRealizedFamilyIndex;
-        result = m_fontSelector-&gt;getFallbackFontData(description, fontSelectorFallbackIndex);
</del><ins>+            return fontRanges;
+        ++m_lastRealizedFallbackIndex;
+        fontRanges = FontRanges(m_fontSelector-&gt;fallbackFontDataAt(description, fontSelectorFallbackIndex));
</ins><span class="cx">     }
</span><del>-    if (!result)
-        return nullptr;
</del><span class="cx"> 
</span><del>-    m_realizedFontData.append(*result);
-    return result.get();
</del><ins>+    return fontRanges;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline bool isInRange(UChar32 character, UChar32 lowerBound, UChar32 upperBound)
</span><span class="lines">@@ -263,10 +255,10 @@
</span><span class="cx"> GlyphData FontGlyphs::glyphDataForSystemFallback(UChar32 c, const FontDescription&amp; description, FontDataVariant variant)
</span><span class="cx"> {
</span><span class="cx">     // System fallback is character-dependent.
</span><del>-    auto&amp; primaryFontData = *realizeFontDataAt(description, 0);
-    auto* originalFontData = primaryFontData.simpleFontDataForCharacter(c);
</del><ins>+    auto&amp; primaryRanges = realizeFallbackRangesAt(description, 0);
+    auto* originalFontData = primaryRanges.fontDataForCharacter(c);
</ins><span class="cx">     if (!originalFontData)
</span><del>-        originalFontData = &amp;primaryFontData.simpleFontDataForFirstRange();
</del><ins>+        originalFontData = &amp;primaryRanges.fontDataForFirstRange();
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SimpleFontData&gt; systemFallbackFontData = originalFontData-&gt;systemFallbackFontDataForCharacter(c, description, m_isForPlatformFont);
</span><span class="cx">     if (!systemFallbackFontData)
</span><span class="lines">@@ -295,9 +287,12 @@
</span><span class="cx"> 
</span><span class="cx"> GlyphData FontGlyphs::glyphDataForVariant(UChar32 c, const FontDescription&amp; description, FontDataVariant variant, unsigned fallbackIndex)
</span><span class="cx"> {
</span><del>-    while (auto* fontData = realizeFontDataAt(description, fallbackIndex++)) {
-        auto* simpleFontData = fontData-&gt;simpleFontDataForCharacter(c);
-        GlyphData data = simpleFontData ? simpleFontData-&gt;glyphDataForCharacter(c) : GlyphData();
</del><ins>+    while (true) {
+        auto&amp; fontRanges = realizeFallbackRangesAt(description, fallbackIndex++);
+        if (fontRanges.isNull())
+            break;
+        auto* fontData = fontRanges.fontDataForCharacter(c);
+        GlyphData data = fontData ? fontData-&gt;glyphDataForCharacter(c) : GlyphData();
</ins><span class="cx">         if (data.fontData) {
</span><span class="cx">             // The variantFontData function should not normally return 0.
</span><span class="cx">             // But if it does, we will just render the capital letter big.
</span><span class="lines">@@ -316,8 +311,11 @@
</span><span class="cx"> {
</span><span class="cx">     const unsigned pageNumber = c / GlyphPage::size;
</span><span class="cx"> 
</span><del>-    for (unsigned fallbackIndex = 0; auto* fontData = realizeFontDataAt(description, fallbackIndex); ++fallbackIndex) {
-        auto* simpleFontData = fontData-&gt;simpleFontDataForCharacter(c);
</del><ins>+    for (unsigned fallbackIndex = 0; true; ++fallbackIndex) {
+        auto&amp; fontRanges = realizeFallbackRangesAt(description, fallbackIndex);
+        if (fontRanges.isNull())
+            break;
+        auto* simpleFontData = fontRanges.fontDataForCharacter(c);
</ins><span class="cx">         auto* page = simpleFontData ? simpleFontData-&gt;glyphPage(pageNumber) : nullptr;
</span><span class="cx">         if (!page)
</span><span class="cx">             continue;
</span><span class="lines">@@ -345,25 +343,21 @@
</span><span class="cx">     return glyphDataForSystemFallback(c, description, NormalVariant);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;GlyphPage&gt; glyphPageFromFontData(unsigned pageNumber, const FontData&amp; fontData)
</del><ins>+static RefPtr&lt;GlyphPage&gt; glyphPageFromFontRanges(unsigned pageNumber, const FontRanges&amp; fontRanges)
</ins><span class="cx"> {
</span><span class="cx">     const SimpleFontData* simpleFontData = nullptr;
</span><del>-    if (fontData.isSegmented()) {
-        UChar32 pageRangeFrom = pageNumber * GlyphPage::size;
-        UChar32 pageRangeTo = pageRangeFrom + GlyphPage::size - 1;
-        auto&amp; segmentedFontData = downcast&lt;SegmentedFontData&gt;(fontData);
-        for (unsigned i = 0; i &lt; segmentedFontData.numRanges(); ++i) {
-            auto&amp; range = segmentedFontData.rangeAt(i);
-            if (range.to()) {
-                if (range.from() &lt;= pageRangeFrom &amp;&amp; pageRangeTo &lt;= range.to())
-                    simpleFontData = range.fontData().get();
-                break;
-            }
</del><ins>+    UChar32 pageRangeFrom = pageNumber * GlyphPage::size;
+    UChar32 pageRangeTo = pageRangeFrom + GlyphPage::size - 1;
+    for (unsigned i = 0; i &lt; fontRanges.size(); ++i) {
+        auto&amp; range = fontRanges.rangeAt(i);
+        if (range.to()) {
+            if (range.from() &lt;= pageRangeFrom &amp;&amp; pageRangeTo &lt;= range.to())
+                simpleFontData = &amp;range.fontData();
+            break;
</ins><span class="cx">         }
</span><del>-        if (!simpleFontData)
-            return nullptr;
-    } else
-        simpleFontData = &amp;downcast&lt;SimpleFontData&gt;(fontData);
</del><ins>+    }
+    if (!simpleFontData)
+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (simpleFontData-&gt;platformData().orientation() == Vertical)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -383,7 +377,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;GlyphPage&gt;&amp; cachedPage = pageNumber ? m_cachedPages.add(pageNumber, nullptr).iterator-&gt;value : m_cachedPageZero;
</span><span class="cx">     if (!cachedPage)
</span><del>-        cachedPage = glyphPageFromFontData(pageNumber, *realizeFontDataAt(description, 0));
</del><ins>+        cachedPage = glyphPageFromFontRanges(pageNumber, realizeFallbackRangesAt(description, 0));
</ins><span class="cx"> 
</span><span class="cx">     GlyphData glyphData = cachedPage ? cachedPage-&gt;glyphDataForCharacter(c) : GlyphData();
</span><span class="cx">     if (!glyphData.glyph) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontGlyphsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontGlyphs.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontGlyphs.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/FontGlyphs.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #ifndef FontGlyphs_h
</span><span class="cx"> #define FontGlyphs_h
</span><span class="cx"> 
</span><ins>+#include &quot;FontRanges.h&quot;
</ins><span class="cx"> #include &quot;FontSelector.h&quot;
</span><span class="cx"> #include &quot;GlyphPage.h&quot;
</span><span class="cx"> #include &quot;SimpleFontData.h&quot;
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx">     const WidthCache&amp; widthCache() const { return m_widthCache; }
</span><span class="cx"> 
</span><span class="cx">     const SimpleFontData&amp; primarySimpleFontData(const FontDescription&amp;);
</span><del>-    WEBCORE_EXPORT const FontData* realizeFontDataAt(const FontDescription&amp;, unsigned index);
</del><ins>+    WEBCORE_EXPORT const FontRanges&amp; realizeFallbackRangesAt(const FontDescription&amp;, unsigned fallbackIndex);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     FontGlyphs(PassRefPtr&lt;FontSelector&gt;);
</span><span class="lines">@@ -76,7 +77,8 @@
</span><span class="cx">     GlyphData glyphDataForNormalVariant(UChar32, const FontDescription&amp;);
</span><span class="cx">     GlyphData glyphDataForVariant(UChar32, const FontDescription&amp;, FontDataVariant, unsigned fallbackIndex);
</span><span class="cx"> 
</span><del>-    Vector&lt;Ref&lt;FontData&gt;, 1&gt; m_realizedFontData;
</del><ins>+    Vector&lt;FontRanges, 1&gt; m_realizedFallbackRanges;
+    unsigned m_lastRealizedFallbackIndex { 0 };
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;GlyphPage&gt; m_cachedPageZero;
</span><span class="cx">     HashMap&lt;int, RefPtr&lt;GlyphPage&gt;&gt; m_cachedPages;
</span><span class="lines">@@ -85,10 +87,11 @@
</span><span class="cx"> 
</span><span class="cx">     const SimpleFontData* m_cachedPrimarySimpleFontData;
</span><span class="cx">     RefPtr&lt;FontSelector&gt; m_fontSelector;
</span><ins>+
</ins><span class="cx">     WidthCache m_widthCache;
</span><ins>+
</ins><span class="cx">     unsigned m_fontSelectorVersion;
</span><span class="cx">     unsigned short m_generation;
</span><del>-    unsigned m_lastRealizedFamilyIndex { 0 };
</del><span class="cx">     Pitch m_pitch { UnknownPitch };
</span><span class="cx">     bool m_isForPlatformFont { false };
</span><span class="cx"> };
</span><span class="lines">@@ -104,10 +107,10 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     if (!m_cachedPrimarySimpleFontData) {
</span><del>-        auto&amp; fontData = *realizeFontDataAt(description, 0);
-        m_cachedPrimarySimpleFontData = fontData.simpleFontDataForCharacter(' ');
</del><ins>+        auto&amp; primaryRanges = realizeFallbackRangesAt(description, 0);
+        m_cachedPrimarySimpleFontData = primaryRanges.fontDataForCharacter(' ');
</ins><span class="cx">         if (!m_cachedPrimarySimpleFontData)
</span><del>-            m_cachedPrimarySimpleFontData = &amp;fontData.simpleFontDataForFirstRange();
</del><ins>+            m_cachedPrimarySimpleFontData = &amp;primaryRanges.fontDataForFirstRange();
</ins><span class="cx">     }
</span><span class="cx">     return *m_cachedPrimarySimpleFontData;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontRangescppfromrev178362trunkSourceWebCoreplatformgraphicsSegmentedFontDatacpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/FontRanges.cpp (from rev 178362, trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp) (0 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontRanges.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/FontRanges.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009, 2015 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. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;FontRanges.h&quot;
+
+#include &quot;SimpleFontData.h&quot;
+#include &lt;wtf/Assertions.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+FontRanges::FontRanges()
+{
+}
+
+FontRanges::FontRanges(RefPtr&lt;SimpleFontData&gt;&amp;&amp; fontData)
+{
+    if (fontData)
+        m_ranges.append(Range { 0, 0x7FFFFFFF, fontData.releaseNonNull() });
+}
+
+FontRanges::~FontRanges()
+{
+}
+
+const SimpleFontData* FontRanges::fontDataForCharacter(UChar32 c) const
+{
+    for (auto&amp; range : m_ranges) {
+        if (range.from() &lt;= c &amp;&amp; c &lt;= range.to())
+            return &amp;range.fontData();
+    }
+    return nullptr;
+}
+
+const SimpleFontData&amp; FontRanges::fontDataForFirstRange() const
+{
+    return m_ranges[0].fontData();
+}
+
+bool FontRanges::isLoading() const
+{
+    for (auto&amp; range : m_ranges) {
+        if (range.fontData().isLoading())
+            return true;
+    }
+    return false;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontRangeshfromrev178362trunkSourceWebCoreplatformgraphicsSegmentedFontDatah"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/FontRanges.h (from rev 178362, trunk/Source/WebCore/platform/graphics/SegmentedFontData.h) (0 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontRanges.h                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/FontRanges.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009, 2015 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 FontRanges_h
+#define FontRanges_h
+
+#include &quot;SimpleFontData.h&quot;
+#include &lt;wtf/TypeCasts.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+
+class FontRanges {
+public:
+    struct Range {
+        Range(UChar32 from, UChar32 to, Ref&lt;SimpleFontData&gt;&amp;&amp; fontData)
+            : m_from(from)
+            , m_to(to)
+            , m_fontData(WTF::move(fontData))
+        {
+        }
+
+        UChar32 from() const { return m_from; }
+        UChar32 to() const { return m_to; }
+        const SimpleFontData&amp; fontData() const { return *m_fontData; }
+
+    private:
+        UChar32 m_from;
+        UChar32 m_to;
+        RefPtr&lt;SimpleFontData&gt; m_fontData;
+    };
+
+    FontRanges();
+    explicit FontRanges(RefPtr&lt;SimpleFontData&gt;&amp;&amp;);
+    ~FontRanges();
+
+    bool isNull() const { return m_ranges.isEmpty(); }
+
+    void appendRange(const Range&amp; range) { m_ranges.append(range); }
+    unsigned size() const { return m_ranges.size(); }
+    const Range&amp; rangeAt(unsigned i) const { return m_ranges[i]; }
+
+    const SimpleFontData* fontDataForCharacter(UChar32) const;
+    const SimpleFontData&amp; fontDataForFirstRange() const;
+    bool isLoading() const;
+
+private:
+    Vector&lt;Range, 1&gt; m_ranges;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontSelector.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontSelector.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/FontSelector.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -26,13 +26,13 @@
</span><span class="cx"> #ifndef FontSelector_h
</span><span class="cx"> #define FontSelector_h
</span><span class="cx"> 
</span><ins>+#include &quot;FontRanges.h&quot;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class FontData;
</del><span class="cx"> class FontDescription;
</span><span class="cx"> class FontSelectorClient;
</span><span class="cx"> 
</span><span class="lines">@@ -40,9 +40,8 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~FontSelector() { }
</span><span class="cx"> 
</span><del>-    // FIXME: Remove the &quot;get&quot; prefix from these two member functions
-    virtual PassRefPtr&lt;FontData&gt; getFontData(const FontDescription&amp;, const AtomicString&amp; familyName) = 0;
-    virtual PassRefPtr&lt;FontData&gt; getFallbackFontData(const FontDescription&amp;, size_t) = 0;
</del><ins>+    virtual FontRanges fontRangesForFamily(const FontDescription&amp;, const AtomicString&amp;) = 0;
+    virtual PassRefPtr&lt;SimpleFontData&gt; fallbackFontDataAt(const FontDescription&amp;, size_t) = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual size_t fallbackFontDataCount() = 0;
</span><span class="cx">     virtual bool resolvesFamilyFor(const FontDescription&amp;) const = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSegmentedFontDatacpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1,85 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009, 2015 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. 
- */
-
-#include &quot;config.h&quot;
-#include &quot;SegmentedFontData.h&quot;
-
-#include &quot;SimpleFontData.h&quot;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-SegmentedFontData::SegmentedFontData()
-{
-    
-}
-
-SegmentedFontData::~SegmentedFontData()
-{
-}
-
-const SimpleFontData* SegmentedFontData::simpleFontDataForCharacter(UChar32 c) const
-{
-    for (auto&amp; range : m_ranges) {
-        if (range.from() &lt;= c &amp;&amp; c &lt;= range.to())
-            return range.fontData().get();
-    }
-    return nullptr;
-}
-
-const SimpleFontData&amp; SegmentedFontData::simpleFontDataForFirstRange() const
-{
-    return *m_ranges[0].fontData();
-}
-
-bool SegmentedFontData::isCustomFont() const
-{
-    // All segmented fonts are custom fonts.
-    return true;
-}
-
-bool SegmentedFontData::isLoading() const
-{
-    for (auto&amp; range : m_ranges) {
-        if (range.fontData()-&gt;isLoading())
-            return true;
-    }
-    return false;
-}
-
-bool SegmentedFontData::isSegmented() const
-{
-    return true;
-}
-
-#ifndef NDEBUG
-String SegmentedFontData::description() const
-{
-    return &quot;[segmented font]&quot;;
-}
-#endif
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSegmentedFontDatah"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/SegmentedFontData.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SegmentedFontData.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/SegmentedFontData.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009, 2015 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 SegmentedFontData_h
-#define SegmentedFontData_h
-
-#include &quot;FontData.h&quot;
-#include &lt;wtf/TypeCasts.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-
-class SimpleFontData;
-
-struct FontDataRange {
-    FontDataRange(UChar32 from, UChar32 to, PassRefPtr&lt;SimpleFontData&gt; fontData)
-        : m_from(from)
-        , m_to(to)
-        , m_fontData(fontData)
-    {
-    }
-
-    UChar32 from() const { return m_from; }
-    UChar32 to() const { return m_to; }
-    PassRefPtr&lt;SimpleFontData&gt; fontData() const { return m_fontData; }
-
-private:
-    UChar32 m_from;
-    UChar32 m_to;
-    RefPtr&lt;SimpleFontData&gt; m_fontData;
-};
-
-class SegmentedFontData : public FontData {
-public:
-    static PassRefPtr&lt;SegmentedFontData&gt; create() { return adoptRef(new SegmentedFontData); }
-
-    virtual ~SegmentedFontData();
-
-    void appendRange(const FontDataRange&amp; range) { m_ranges.append(range); }
-    unsigned numRanges() const { return m_ranges.size(); }
-    const FontDataRange&amp; rangeAt(unsigned i) const { return m_ranges[i]; }
-
-#ifndef NDEBUG
-    virtual String description() const;
-#endif
-
-private:
-    SegmentedFontData();
-
-    virtual const SimpleFontData* simpleFontDataForCharacter(UChar32) const override;
-    virtual const SimpleFontData&amp; simpleFontDataForFirstRange() const override;
-
-    virtual bool isCustomFont() const;
-    virtual bool isLoading() const;
-    virtual bool isSegmented() const;
-
-    RefPtr&lt;SimpleFontData&gt; m_nullFontData;
-    Vector&lt;FontDataRange, 1&gt; m_ranges;
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SegmentedFontData)
-    static bool isType(const WebCore::FontData&amp; fontData) { return fontData.isSegmented(); }
-SPECIALIZE_TYPE_TRAITS_END()
-
-#endif // SegmentedFontData_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSimpleFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -157,16 +157,6 @@
</span><span class="cx">     removeFromSystemFallbackCache();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const SimpleFontData* SimpleFontData::simpleFontDataForCharacter(UChar32) const
-{
-    return this;
-}
-
-const SimpleFontData&amp; SimpleFontData::simpleFontDataForFirstRange() const
-{
-    return *this;
-}
-
</del><span class="cx"> static bool fillGlyphPage(GlyphPage&amp; pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="lines">@@ -288,11 +278,6 @@
</span><span class="cx">     return page-&gt;glyphDataForCharacter(character);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SimpleFontData::isSegmented() const
-{
-    return false;
-}
-
</del><span class="cx"> PassRefPtr&lt;SimpleFontData&gt; SimpleFontData::verticalRightOrientationFontData() const
</span><span class="cx"> {
</span><span class="cx">     if (!m_derivedFontData)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSimpleFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.h (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #define SimpleFontData_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FontBaseline.h&quot;
</span><del>-#include &quot;FontData.h&quot;
</del><span class="cx"> #include &quot;FontMetrics.h&quot;
</span><span class="cx"> #include &quot;FontPlatformData.h&quot;
</span><span class="cx"> #include &quot;FloatRect.h&quot;
</span><span class="lines">@@ -68,7 +67,7 @@
</span><span class="cx"> enum FontDataVariant { AutoVariant, NormalVariant, SmallCapsVariant, EmphasisMarkVariant, BrokenIdeographVariant };
</span><span class="cx"> enum Pitch { UnknownPitch, FixedPitch, VariablePitch };
</span><span class="cx"> 
</span><del>-class SimpleFontData final : public FontData {
</del><ins>+class SimpleFontData : public RefCounted&lt;SimpleFontData&gt; {
</ins><span class="cx"> public:
</span><span class="cx">     class SVGData {
</span><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -92,7 +91,7 @@
</span><span class="cx">         return adoptRef(*new SimpleFontData(WTF::move(svgData), fontSize, syntheticBold, syntheticItalic));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual ~SimpleFontData();
</del><ins>+    ~SimpleFontData();
</ins><span class="cx"> 
</span><span class="cx">     static const SimpleFontData* systemFallback() { return reinterpret_cast&lt;const SimpleFontData*&gt;(-1); }
</span><span class="cx"> 
</span><span class="lines">@@ -178,12 +177,11 @@
</span><span class="cx">     const SVGData* svgData() const { return m_svgData.get(); }
</span><span class="cx">     bool isSVGFont() const { return !!m_svgData; }
</span><span class="cx"> 
</span><del>-    virtual bool isCustomFont() const override { return m_isCustomFont; }
-    virtual bool isLoading() const override { return m_isLoading; }
-    virtual bool isSegmented() const override;
</del><ins>+    bool isCustomFont() const { return m_isCustomFont; }
+    bool isLoading() const { return m_isLoading; }
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    virtual String description() const override;
</del><ins>+    String description() const;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span><span class="lines">@@ -229,9 +227,6 @@
</span><span class="cx">     PassRefPtr&lt;SimpleFontData&gt; createScaledFontData(const FontDescription&amp;, float scaleFactor) const;
</span><span class="cx">     PassRefPtr&lt;SimpleFontData&gt; platformCreateScaledFontData(const FontDescription&amp;, float scaleFactor) const;
</span><span class="cx"> 
</span><del>-    virtual const SimpleFontData* simpleFontDataForCharacter(UChar32) const override;
-    virtual const SimpleFontData&amp; simpleFontDataForFirstRange() const override;
-
</del><span class="cx">     void removeFromSystemFallbackCache();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="lines">@@ -371,8 +366,4 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SimpleFontData)
-    static bool isType(const WebCore::FontData&amp; fontData) { return !fontData.isSegmented(); }
-SPECIALIZE_TYPE_TRAITS_END()
-
</del><span class="cx"> #endif // SimpleFontData_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx">     // By the time a WebCascadeList is used, the Font has already been asked to realize all of its
</span><span class="cx">     // FontData, so this loop does not hit the FontCache.
</span><del>-    while (_font-&gt;fontDataAt(_count))
</del><ins>+    while (!_font-&gt;fallbackRangesAt(_count).isNull())
</ins><span class="cx">         _count++;
</span><span class="cx"> 
</span><span class="cx">     return self;
</span><span class="lines">@@ -82,9 +82,9 @@
</span><span class="cx">     } else
</span><span class="cx">         _fontDescriptors.grow(index + 1);
</span><span class="cx"> 
</span><del>-    const WebCore::SimpleFontData* simpleFontData = _font-&gt;fontDataAt(index)-&gt;simpleFontDataForCharacter(_character);
</del><ins>+    const WebCore::SimpleFontData* simpleFontData = _font-&gt;fallbackRangesAt(index).fontDataForCharacter(_character);
</ins><span class="cx">     if (!simpleFontData)
</span><del>-        simpleFontData = &amp;_font-&gt;fontDataAt(index)-&gt;simpleFontDataForFirstRange();
</del><ins>+        simpleFontData = &amp;_font-&gt;fallbackRangesAt(index).fontDataForFirstRange();
</ins><span class="cx">     fontDescriptor = CTFontCopyFontDescriptor(simpleFontData-&gt;platformData().ctFont());
</span><span class="cx">     _fontDescriptors[index] = adoptCF(fontDescriptor);
</span><span class="cx">     return (id)fontDescriptor;
</span><span class="lines">@@ -201,9 +201,9 @@
</span><span class="cx">         isSystemFallback = true;
</span><span class="cx"> 
</span><span class="cx">         U16_GET(cp, 0, 0, length, baseCharacter);
</span><del>-        fontData = m_font.fontDataAt(0)-&gt;simpleFontDataForCharacter(baseCharacter);
</del><ins>+        fontData = m_font.fallbackRangesAt(0).fontDataForCharacter(baseCharacter);
</ins><span class="cx">         if (!fontData)
</span><del>-            fontData = &amp;m_font.fontDataAt(0)-&gt;simpleFontDataForFirstRange();
</del><ins>+            fontData = &amp;m_font.fallbackRangesAt(0).fontDataForFirstRange();
</ins><span class="cx"> 
</span><span class="cx">         RetainPtr&lt;WebCascadeList&gt; cascadeList = adoptNS([[WebCascadeList alloc] initWithFont:&amp;m_font character:baseCharacter]);
</span><span class="cx"> 
</span><span class="lines">@@ -256,9 +256,9 @@
</span><span class="cx">             RetainPtr&lt;CFTypeRef&gt; runFontEqualityObject = FontPlatformData::objectForEqualityCheck(runFont);
</span><span class="cx">             if (!CFEqual(runFontEqualityObject.get(), fontData-&gt;platformData().objectForEqualityCheck().get())) {
</span><span class="cx">                 // Begin trying to see if runFont matches any of the fonts in the fallback list.
</span><del>-                unsigned i = 0;
-                for (const FontData* candidateFontData = m_font.fontDataAt(i); candidateFontData; candidateFontData = m_font.fontDataAt(++i)) {
-                    runFontData = candidateFontData-&gt;simpleFontDataForCharacter(baseCharacter);
</del><ins>+
+                for (unsigned i = 0; !m_font.fallbackRangesAt(i).isNull(); ++i) {
+                    runFontData = m_font.fallbackRangesAt(i).fontDataForCharacter(baseCharacter);
</ins><span class="cx">                     if (!runFontData)
</span><span class="cx">                         continue;
</span><span class="cx">                     RetainPtr&lt;CFTypeRef&gt; runFontEqualityObject = runFontData-&gt;platformData().objectForEqualityCheck();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp (178387 => 178388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2015-01-13 23:56:25 UTC (rev 178387)
+++ trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2015-01-13 23:57:50 UTC (rev 178388)
</span><span class="lines">@@ -138,9 +138,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool triedBaseCharacterFontData = false;
</span><span class="cx"> 
</span><del>-    unsigned i = 0;
-    for (const FontData* fontData = fontDataAt(0); fontData; fontData = fontDataAt(++i)) {
-        const SimpleFontData* simpleFontData = fontData-&gt;simpleFontDataForCharacter(baseCharacter);
</del><ins>+    for (unsigned i = 0; !fallbackRangesAt(i).isEmpty(); ++i) {
+        const SimpleFontData* simpleFontData = fallbackRangesAt(i).fontDataForCharacter(baseCharacter);
</ins><span class="cx">         if (!simpleFontData)
</span><span class="cx">             continue;
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre>
</div>
</div>

</body>
</html>