<!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>[178510] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178510">178510</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2015-01-15 06:19:56 -0800 (Thu, 15 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename Font to FontCascade
https://bugs.webkit.org/show_bug.cgi?id=140442
Reviewed by Darin Adler.
We can then rename SimpleFontData to Font. This will match the usual definition of a "font".</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="#trunkSourceWebCoreaccessibilityatkWebKitAccessibleInterfaceTextcpp">trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcDOMmm">trunk/Source/WebCore/bindings/objc/DOM.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcDOMUIKitExtensionsmm">trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontLoadercpp">trunk/Source/WebCore/css/FontLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontLoaderh">trunk/Source/WebCore/css/FontLoader.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingiosEditorIOSmm">trunk/Source/WebCore/editing/ios/EditorIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingmacEditorMacmm">trunk/Source/WebCore/editing/mac/EditorMac.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dh">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLMencloseElementcpp">trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingscpp">trunk/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformMemoryPressureHandlercpp">trunk/Source/WebCore/platform/MemoryPressureHandler.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformPopupMenuStyleh">trunk/Source/WebCore/platform/PopupMenuStyle.h</a></li>
<li><a href="#trunkSourceWebCoreplatformThemecpp">trunk/Source/WebCore/platform/Theme.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformThemeh">trunk/Source/WebCore/platform/Theme.h</a></li>
<li><a href="#trunkSourceWebCoreplatformWidgeth">trunk/Source/WebCore/platform/Widget.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCachecpp">trunk/Source/WebCore/platform/graphics/FontCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCacheh">trunk/Source/WebCore/platform/graphics/FontCache.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontFastPathcpp">trunk/Source/WebCore/platform/graphics/FontFastPath.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontGlyphscpp">trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextcpp">trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSimpleFontDatacpp">trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsStringTruncatorcpp">trunk/Source/WebCore/platform/graphics/StringTruncator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsStringTruncatorh">trunk/Source/WebCore/platform/graphics/StringTruncator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTextRunh">trunk/Source/WebCore/platform/graphics/TextRun.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsWidthIteratorcpp">trunk/Source/WebCore/platform/graphics/WidthIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsWidthIteratorh">trunk/Source/WebCore/platform/graphics/WidthIterator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoFontCairocpp">trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoFontCairoHarfbuzzNGcpp">trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShaperh">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm">trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosSimpleFontDataIOSmm">trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp">trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllerh">trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm">trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontCacheMacmm">trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp">trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontMacmm">trunk/Source/WebCore/platform/graphics/mac/FontMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacGlyphPageMaccpp">trunk/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacSimpleFontDataMacmm">trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCGWincpp">trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontCacheWincpp">trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinFontWincpp">trunk/Source/WebCore/platform/graphics/win/FontWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinSimpleFontDataCGWincpp">trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinSimpleFontDataCairoWincpp">trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinSimpleFontDataWincpp">trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinUniscribeControllercpp">trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinUniscribeControllerh">trunk/Source/WebCore/platform/graphics/win/UniscribeController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWidgetIOSmm">trunk/Source/WebCore/platform/ios/WidgetIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformioswakWKGraphicsmm">trunk/Source/WebCore/platform/ios/wak/WKGraphics.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacDragImageMacmm">trunk/Source/WebCore/platform/mac/DragImageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMach">trunk/Source/WebCore/platform/mac/ThemeMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMacmm">trunk/Source/WebCore/platform/mac/ThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWidgetMacmm">trunk/Source/WebCore/platform/mac/WidgetMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformtextPlatformLocaleh">trunk/Source/WebCore/platform/text/PlatformLocale.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextiosLocalizedDateCacheh">trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.h</a></li>
<li><a href="#trunkSourceWebCoreplatformtextiosLocalizedDateCachemm">trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingEllipsisBoxcpp">trunk/Source/WebCore/rendering/EllipsisBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingEllipsisBoxh">trunk/Source/WebCore/rendering/EllipsisBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxh">trunk/Source/WebCore/rendering/InlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTextcpp">trunk/Source/WebCore/rendering/RenderCombineText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTexth">trunk/Source/WebCore/rendering/RenderCombineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderEmbeddedObjectcpp">trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderEmbeddedObjecth">trunk/Source/WebCore/rendering/RenderEmbeddedObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFileUploadControlcpp">trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlowThreadcpp">trunk/Source/WebCore/rendering/RenderFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFullScreencpp">trunk/Source/WebCore/rendering/RenderFullScreen.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListMarkercpp">trunk/Source/WebCore/rendering/RenderListMarker.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRubyRuncpp">trunk/Source/WebCore/rendering/RenderRubyRun.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSearchFieldcpp">trunk/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTexth">trunk/Source/WebCore/rendering/RenderText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlcpp">trunk/Source/WebCore/rendering/RenderTextControl.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlMultiLinecpp">trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlSingleLinecpp">trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeh">trunk/Source/WebCore/rendering/RenderTheme.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeGtkcpp">trunk/Source/WebCore/rendering/RenderThemeGtk.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeGtkh">trunk/Source/WebCore/rendering/RenderThemeGtk.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMach">trunk/Source/WebCore/rendering/RenderThemeMac.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxcpp">trunk/Source/WebCore/rendering/RootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingSimpleLineLayoutcpp">trunk/Source/WebCore/rendering/SimpleLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingSimpleLineLayoutFlowContentscpp">trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingSimpleLineLayoutFlowContentsh">trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.h</a></li>
<li><a href="#trunkSourceWebCorerenderingSimpleLineLayoutFunctionscpp">trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingSimpleLineLayoutResolvercpp">trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextAutoSizingcpp">trunk/Source/WebCore/rendering/TextAutoSizing.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextPaintercpp">trunk/Source/WebCore/rendering/TextPainter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextPainterh">trunk/Source/WebCore/rendering/TextPainter.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineBreakingContextInlineHeadersh">trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineBreakerh">trunk/Source/WebCore/rendering/line/LineBreaker.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineInlineHeadersh">trunk/Source/WebCore/rendering/line/LineInlineHeaders.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLTokencpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleInheritedDatah">trunk/Source/WebCore/rendering/style/StyleInheritedData.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineTextcpp">trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineTexth">trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextLayoutEnginecpp">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextLayoutEngineBaselinecpp">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextLayoutEngineBaselineh">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextLayoutEngineSpacingcpp">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextLayoutEngineSpacingh">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextMetricscpp">trunk/Source/WebCore/rendering/svg/SVGTextMetrics.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp">trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextRunRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGTextRunRenderingContexth">trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorestyleInlineTextBoxStylecpp">trunk/Source/WebCore/style/InlineTextBoxStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleInlineTextBoxStyleh">trunk/Source/WebCore/style/InlineTextBoxStyle.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveForDocumentcpp">trunk/Source/WebCore/style/StyleResolveForDocument.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreecpp">trunk/Source/WebCore/style/StyleResolveTree.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatacpp">trunk/Source/WebCore/svg/SVGFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontElementcpp">trunk/Source/WebCore/svg/SVGFontElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebKitNSStringExtrasmm">trunk/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebStringTruncatormm">trunk/Source/WebKit/mac/Misc/WebStringTruncator.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportPopupMenuMacmm">trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadecpp">trunk/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadeh">trunk/Source/WebCore/platform/graphics/FontCascade.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontcpp">trunk/Source/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFonth">trunk/Source/WebCore/platform/graphics/Font.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 (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -2049,8 +2049,8 @@
</span><span class="cx"> platform/graphics/FloatRect.cpp
</span><span class="cx"> platform/graphics/FloatRoundedRect.cpp
</span><span class="cx"> platform/graphics/FloatSize.cpp
</span><del>- platform/graphics/Font.cpp
</del><span class="cx"> platform/graphics/FontCache.cpp
</span><ins>+ platform/graphics/FontCascade.cpp
</ins><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></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/ChangeLog        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-01-15 Antti Koivisto <antti@apple.com>
+
+ Rename Font to FontCascade
+ https://bugs.webkit.org/show_bug.cgi?id=140442
+
+ Reviewed by Darin Adler.
+
+ We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
+
</ins><span class="cx"> 2015-01-15 Mihnea Ovidenie <mihnea@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/WebCore.exp.in        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -136,6 +136,13 @@
</span><span class="cx"> __ZN7WebCore11FileChooser10chooseFileERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore11FileChooser11chooseFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
</span><span class="cx"> __ZN7WebCore11FileChooserD1Ev
</span><ins>+__ZN7WebCore11FontCascade11setCodePathENS0_8CodePathE
+__ZN7WebCore11FontCascade18shouldUseSmoothingEv
+__ZN7WebCore11FontCascade21setShouldUseSmoothingEb
+__ZN7WebCore11FontCascade29setDefaultTypesettingFeaturesEj
+__ZN7WebCore11FontCascadeC1ERKNS_16FontPlatformDataEbNS_17FontSmoothingModeE
+__ZN7WebCore11FontCascadeC1Ev
+__ZN7WebCore11FontCascadeaSERKS0_
</ins><span class="cx"> __ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE
</span><span class="cx"> __ZN7WebCore11FrameLoader11shouldCloseEv
</span><span class="cx"> __ZN7WebCore11FrameLoader11urlSelectedERKNS_3URLERKN3WTF6StringENS4_10PassRefPtrINS_5EventEEENS_11LockHistoryENS_19LockBackForwardListENS_18ShouldSendReferrerE
</span><span class="lines">@@ -656,9 +663,9 @@
</span><span class="cx"> __ZN7WebCore15SQLiteStatementD1Ev
</span><span class="cx"> __ZN7WebCore15ScrollAlignment17alignCenterAlwaysE
</span><span class="cx"> __ZN7WebCore15ScrollAlignment19alignToEdgeIfNeededE
</span><del>-__ZN7WebCore15StringTruncator13rightTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotE
-__ZN7WebCore15StringTruncator14centerTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotE
-__ZN7WebCore15StringTruncator5widthERKN3WTF6StringERKNS_4FontENS0_24EnableRoundingHacksOrNotE
</del><ins>+__ZN7WebCore15StringTruncator13rightTruncateERKN3WTF6StringEfRKNS_11FontCascadeENS0_24EnableRoundingHacksOrNotE
+__ZN7WebCore15StringTruncator14centerTruncateERKN3WTF6StringEfRKNS_11FontCascadeENS0_24EnableRoundingHacksOrNotE
+__ZN7WebCore15StringTruncator5widthERKN3WTF6StringERKNS_11FontCascadeENS0_24EnableRoundingHacksOrNotE
</ins><span class="cx"> __ZN7WebCore15UserInputBridge11loadRequestERKNS_16FrameLoadRequestENS_11InputSourceE
</span><span class="cx"> __ZN7WebCore15UserInputBridge11reloadFrameEPNS_5FrameEbNS_11InputSourceE
</span><span class="cx"> __ZN7WebCore15UserInputBridge12tryClosePageENS_11InputSourceE
</span><span class="lines">@@ -1127,13 +1134,6 @@
</span><span class="cx"> __ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeEf
</span><span class="cx"> __ZN7WebCore42URLByTruncatingOneCharacterBeforeComponentEP5NSURL18CFURLComponentType
</span><span class="cx"> __ZN7WebCore47attributedStringByStrippingAttachmentCharactersEP18NSAttributedString
</span><del>-__ZN7WebCore4Font11setCodePathENS0_8CodePathE
-__ZN7WebCore4Font18shouldUseSmoothingEv
-__ZN7WebCore4Font21setShouldUseSmoothingEb
-__ZN7WebCore4Font29setDefaultTypesettingFeaturesEj
-__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEbNS_17FontSmoothingModeE
-__ZN7WebCore4FontC1Ev
-__ZN7WebCore4FontaSERKS0_
</del><span class="cx"> __ZN7WebCore4Icon18createIconForFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
</span><span class="cx"> __ZN7WebCore4IconD1Ev
</span><span class="cx"> __ZN7WebCore4Node10renderRectEPb
</span><span class="lines">@@ -1618,6 +1618,9 @@
</span><span class="cx"> __ZNK7WebCore10TimeRanges4copyEv
</span><span class="cx"> __ZNK7WebCore10TimeRanges5startEjRi
</span><span class="cx"> __ZNK7WebCore10TimeRanges6lengthEv
</span><ins>+__ZNK7WebCore11FontCascade5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
+__ZNK7WebCore11FontCascade8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEiiNS0_24CustomFontNotReadyActionE
+__ZNK7WebCore11FontCascadeeqERKS0_
</ins><span class="cx"> __ZNK7WebCore11FrameLoader10isCompleteEv
</span><span class="cx"> __ZNK7WebCore11FrameLoader14cancelledErrorERKNS_15ResourceRequestE
</span><span class="cx"> __ZNK7WebCore11FrameLoader14frameHasLoadedEv
</span><span class="lines">@@ -1654,10 +1657,10 @@
</span><span class="cx"> __ZNK7WebCore11RenderBlock25inlineElementContinuationEv
</span><span class="cx"> __ZNK7WebCore11RenderLayer19absoluteBoundingBoxEv
</span><span class="cx"> __ZNK7WebCore11RenderLayer24needsCompositedScrollingEv
</span><ins>+__ZNK7WebCore11RenderStyle11fontCascadeEv
</ins><span class="cx"> __ZNK7WebCore11RenderStyle11fontMetricsEv
</span><span class="cx"> __ZNK7WebCore11RenderStyle15fontDescriptionEv
</span><span class="cx"> __ZNK7WebCore11RenderStyle21visitedDependentColorEi
</span><del>-__ZNK7WebCore11RenderStyle4fontEv
</del><span class="cx"> __ZNK7WebCore12RenderInline16linesBoundingBoxEv
</span><span class="cx"> __ZNK7WebCore12RenderObject14enclosingLayerEv
</span><span class="cx"> __ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEj
</span><span class="lines">@@ -1945,9 +1948,6 @@
</span><span class="cx"> __ZNK7WebCore3URL5queryEv
</span><span class="cx"> __ZNK7WebCore3URL8protocolEv
</span><span class="cx"> __ZNK7WebCore3URLcvP5NSURLEv
</span><del>-__ZNK7WebCore4Font5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
-__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEiiNS0_24CustomFontNotReadyActionE
-__ZNK7WebCore4FonteqERKS0_
</del><span class="cx"> __ZNK7WebCore4Node10shadowHostEv
</span><span class="cx"> __ZNK7WebCore4Node11textContentEb
</span><span class="cx"> __ZNK7WebCore4Node13ownerDocumentEv
</span><span class="lines">@@ -2650,18 +2650,12 @@
</span><span class="cx"> __ZN7WebCore15DatabaseTracker38emptyDatabaseFilesRemovalTaskDidFinishEv
</span><span class="cx"> __ZN7WebCore15DatabaseTracker44emptyDatabaseFilesRemovalTaskWillBeScheduledEv
</span><span class="cx"> __ZN7WebCore15DatabaseTracker7trackerEv
</span><del>-__ZN7WebCore15GraphicsContext12drawBidiTextERKNS_4FontERKNS_7TextRunERKNS_10FloatPointENS1_24CustomFontNotReadyActionEPNS_10BidiStatusEi
</del><span class="cx"> __ZN7WebCore15GraphicsContext15drawLineForTextERKNS_10FloatPointEfbb
</span><span class="cx"> __ZN7WebCore15GraphicsContext22setEmojiDrawingEnabledEb
</span><span class="cx"> __ZN7WebCore15GraphicsContext23setIsAcceleratedContextEb
</span><span class="cx"> __ZN7WebCore15LegacyTileCache14drainLayerPoolEv
</span><span class="cx"> __ZN7WebCore15LegacyTileCache20setLayerPoolCapacityEj
</span><span class="cx"> __ZN7WebCore15ResourceRequest41updateFromDelegatePreservingOldPropertiesERKS0_
</span><del>-__ZN7WebCore15StringTruncator12leftTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotERfbf
-__ZN7WebCore15StringTruncator13rightTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotERfbf
-__ZN7WebCore15StringTruncator14centerTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotERfbf
-__ZN7WebCore15StringTruncator15rightClipToWordERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotERfbfb
-__ZN7WebCore15StringTruncator20rightClipToCharacterERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotERfbf
</del><span class="cx"> __ZN7WebCore15isEndOfDocumentERKNS_15VisiblePositionE
</span><span class="cx"> __ZN7WebCore15startOfDocumentEPKNS_4NodeE
</span><span class="cx"> __ZN7WebCore15startOfDocumentERKNS_15VisiblePositionE
</span><span class="lines">@@ -2745,7 +2739,6 @@
</span><span class="cx"> __ZN7WebCore35isEndOfEditableOrNonEditableContentERKNS_15VisiblePositionE
</span><span class="cx"> __ZN7WebCore35positionOfNextBoundaryOfGranularityERKNS_15VisiblePositionENS_15TextGranularityENS_18SelectionDirectionE
</span><span class="cx"> __ZN7WebCore41initializeHTTPConnectionSettingsOnStartupEv
</span><del>-__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEN3WTF10PassRefPtrINS_12FontSelectorEEE
</del><span class="cx"> __ZN7WebCore4Icon18createIconForImageEP7CGImage
</span><span class="cx"> __ZN7WebCore4Node17isContentEditableENS0_22UserSelectAllTreatmentE
</span><span class="cx"> __ZN7WebCore4Node23compareDocumentPositionEPS0_
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -7978,8 +7978,8 @@
</span><span class="cx"> <ClCompile Include="..\platform\graphics\FloatRect.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\FloatRoundedRect.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\FloatSize.cpp" />
</span><del>- <ClCompile Include="..\platform\graphics\Font.cpp" />
</del><span class="cx"> <ClCompile Include="..\platform\graphics\FontCache.cpp" />
</span><ins>+ <ClCompile Include="..\platform\graphics\FontCascade.cpp" />
</ins><span class="cx"> <ClCompile Include="..\platform\graphics\FontDescription.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\FontGenericFamilies.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\FontGlyphs.cpp" />
</span><span class="lines">@@ -19467,8 +19467,8 @@
</span><span class="cx"> <ClInclude Include="..\platform\graphics\FloatRoundedRect.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\FloatSize.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\FloatSizeHash.h" />
</span><del>- <ClInclude Include="..\platform\graphics\Font.h" />
</del><span class="cx"> <ClInclude Include="..\platform\graphics\FontCache.h" />
</span><ins>+ <ClInclude Include="..\platform\graphics\FontCascade.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\FontDescription.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\FontGenericFamilies.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\FontGlyphs.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -4704,8 +4704,8 @@
</span><span class="cx">                 B2C3DA490D006C1D00EF6F26 /* TextEncodingRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA190D006C1D00EF6F26 /* TextEncodingRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 B2C3DA4A0D006C1D00EF6F26 /* TextStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA1A0D006C1D00EF6F26 /* TextStream.cpp */; };
</span><span class="cx">                 B2C3DA4B0D006C1D00EF6F26 /* TextStream.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA1B0D006C1D00EF6F26 /* TextStream.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                B2C3DA600D006CD600EF6F26 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA4F0D006CD600EF6F26 /* Font.cpp */; };
-                B2C3DA610D006CD600EF6F26 /* Font.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA500D006CD600EF6F26 /* Font.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                B2C3DA600D006CD600EF6F26 /* FontCascade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA4F0D006CD600EF6F26 /* FontCascade.cpp */; };
+                B2C3DA610D006CD600EF6F26 /* FontCascade.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA500D006CD600EF6F26 /* FontCascade.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 B2C3DA620D006CD600EF6F26 /* FontCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA510D006CD600EF6F26 /* FontCache.cpp */; };
</span><span class="cx">                 B2C3DA630D006CD600EF6F26 /* FontCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA520D006CD600EF6F26 /* FontCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */; };
</span><span class="lines">@@ -12081,8 +12081,8 @@
</span><span class="cx">                 B2C3DA190D006C1D00EF6F26 /* TextEncodingRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextEncodingRegistry.h; sourceTree = "<group>"; };
</span><span class="cx">                 B2C3DA1A0D006C1D00EF6F26 /* TextStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TextStream.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B2C3DA1B0D006C1D00EF6F26 /* TextStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextStream.h; sourceTree = "<group>"; };
</span><del>-                B2C3DA4F0D006CD600EF6F26 /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = "<group>"; };
-                B2C3DA500D006CD600EF6F26 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; };
</del><ins>+                B2C3DA4F0D006CD600EF6F26 /* FontCascade.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontCascade.cpp; sourceTree = "<group>"; };
+                B2C3DA500D006CD600EF6F26 /* FontCascade.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCascade.h; sourceTree = "<group>"; };
</ins><span class="cx">                 B2C3DA510D006CD600EF6F26 /* FontCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontCache.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B2C3DA520D006CD600EF6F26 /* FontCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCache.h; sourceTree = "<group>"; };
</span><span class="cx">                 B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleFontData.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -20414,6 +20414,8 @@
</span><span class="cx">                                 B27535380B053814002CE64F /* Color.cpp */,
</span><span class="cx">                                 B27535390B053814002CE64F /* Color.h */,
</span><span class="cx">                                 9382DF5710A8D5C900925652 /* ColorSpace.h */,
</span><ins>+                                B2C3DA4F0D006CD600EF6F26 /* FontCascade.cpp */,
+                                B2C3DA500D006CD600EF6F26 /* FontCascade.h */,
</ins><span class="cx">                                 2D2FC0541460CD6F00263633 /* CrossfadeGeneratedImage.cpp */,
</span><span class="cx">                                 2D2FC0551460CD6F00263633 /* CrossfadeGeneratedImage.h */,
</span><span class="cx">                                 A8CB41020E85B8A50032C4F0 /* DashArray.h */,
</span><span class="lines">@@ -20439,8 +20441,6 @@
</span><span class="cx">                                 B275353E0B053814002CE64F /* FloatSize.cpp */,
</span><span class="cx">                                 B275353F0B053814002CE64F /* FloatSize.h */,
</span><span class="cx">                                 58CD35CA18EB4C3900B9F3AC /* FloatSizeHash.h */,
</span><del>-                                B2C3DA4F0D006CD600EF6F26 /* Font.cpp */,
-                                B2C3DA500D006CD600EF6F26 /* Font.h */,
</del><span class="cx">                                 BCB92D4E1293550B00C8387F /* FontBaseline.h */,
</span><span class="cx">                                 B2C3DA510D006CD600EF6F26 /* FontCache.cpp */,
</span><span class="cx">                                 B2C3DA520D006CD600EF6F26 /* FontCache.h */,
</span><span class="lines">@@ -24312,7 +24312,7 @@
</span><span class="cx">                                 14993BE60B2F2B1C0050497F /* FocusController.h in Headers */,
</span><span class="cx">                                 062287840B4DB322000C34DF /* FocusDirection.h in Headers */,
</span><span class="cx">                                 B6D9D23514EABD260090D75E /* FocusEvent.h in Headers */,
</span><del>-                                B2C3DA610D006CD600EF6F26 /* Font.h in Headers */,
</del><ins>+                                B2C3DA610D006CD600EF6F26 /* FontCascade.h in Headers */,
</ins><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><span class="lines">@@ -27815,7 +27815,7 @@
</span><span class="cx">                                 D72F6D79153159A3001EE44E /* FlowThreadController.cpp in Sources */,
</span><span class="cx">                                 14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */,
</span><span class="cx">                                 B6D9D23614EABD260090D75E /* FocusEvent.cpp in Sources */,
</span><del>-                                B2C3DA600D006CD600EF6F26 /* Font.cpp in Sources */,
</del><ins>+                                B2C3DA600D006CD600EF6F26 /* FontCascade.cpp in Sources */,
</ins><span class="cx">                                 B2C3DA620D006CD600EF6F26 /* FontCache.cpp in Sources */,
</span><span class="cx">                                 3727DFD5142AAE4500D449CB /* FontCacheIOS.mm in Sources */,
</span><span class="cx">                                 B2AFFC7C0D00A5C10030074D /* FontCacheMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatkWebKitAccessibleInterfaceTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> #include "AccessibilityObject.h"
</span><span class="cx"> #include "Document.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><span class="cx"> #include "HostWindow.h"
</span><span class="lines">@@ -130,14 +130,14 @@
</span><span class="cx"> result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INDENT), buffer.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- String fontFamilyName = style->font().firstFamily();
</del><ins>+ String fontFamilyName = style->fontCascade().firstFamily();
</ins><span class="cx"> if (fontFamilyName.left(8) == "-webkit-")
</span><span class="cx"> fontFamilyName = fontFamilyName.substring(8);
</span><span class="cx">
</span><span class="cx"> result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_FAMILY_NAME), fontFamilyName.utf8().data());
</span><span class="cx">
</span><span class="cx"> int fontWeight = -1;
</span><del>- switch (style->font().weight()) {
</del><ins>+ switch (style->fontCascade().weight()) {
</ins><span class="cx"> case FontWeight100:
</span><span class="cx"> fontWeight = 100;
</span><span class="cx"> break;
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">
</span><span class="cx"> result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_UNDERLINE), (style->textDecoration() & TextDecorationUnderline) ? "single" : "none");
</span><span class="cx">
</span><del>- result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STYLE), style->font().italic() ? "italic" : "normal");
</del><ins>+ result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STYLE), style->fontCascade().italic() ? "italic" : "normal");
</ins><span class="cx">
</span><span class="cx"> result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & TextDecorationLineThrough) ? "true" : "false");
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #import "AccessibilityTableCell.h"
</span><span class="cx"> #import "Chrome.h"
</span><span class="cx"> #import "ChromeClient.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameSelection.h"
</span><span class="cx"> #import "FrameView.h"
</span><span class="lines">@@ -1758,7 +1758,7 @@
</span><span class="cx"> RenderStyle& style = renderer->style();
</span><span class="cx">
</span><span class="cx"> // set basic font info
</span><del>- AXAttributeStringSetFont(attrString, style.font().primaryFontData().getCTFont(), range);
</del><ins>+ AXAttributeStringSetFont(attrString, style.fontCascade().primaryFontData().getCTFont(), range);
</ins><span class="cx">
</span><span class="cx"> int decor = style.textDecorationsInEffect();
</span><span class="cx"> if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> #import "ChromeClient.h"
</span><span class="cx"> #import "ColorMac.h"
</span><span class="cx"> #import "ContextMenuController.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameLoaderClient.h"
</span><span class="cx"> #import "FrameSelection.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> #import "ColorMac.h"
</span><span class="cx"> #import "ContextMenuController.h"
</span><span class="cx"> #import "Editor.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "FrameLoaderClient.h"
</span><span class="cx"> #import "FrameSelection.h"
</span><span class="cx"> #import "HTMLAnchorElement.h"
</span><span class="lines">@@ -848,7 +848,7 @@
</span><span class="cx"> const RenderStyle& style = renderer->style();
</span><span class="cx">
</span><span class="cx"> // set basic font info
</span><del>- AXAttributeStringSetFont(attrString, NSAccessibilityFontTextAttribute, style.font().primaryFontData().getNSFont(), range);
</del><ins>+ AXAttributeStringSetFont(attrString, NSAccessibilityFontTextAttribute, style.fontCascade().primaryFontData().getNSFont(), range);
</ins><span class="cx">
</span><span class="cx"> // set basic colors
</span><span class="cx"> AXAttributeStringSetColor(attrString, NSAccessibilityForegroundColorTextAttribute, nsColor(style.visitedDependentColor(CSSPropertyColor)), range);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcDOMmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/DOM.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/DOM.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/bindings/objc/DOM.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #import "DOMPrivate.h"
</span><span class="cx"> #import "DOMRangeInternal.h"
</span><span class="cx"> #import "DragImage.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "HTMLElement.h"
</span><span class="cx"> #import "HTMLNames.h"
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx"> auto renderer = core(self)->renderer();
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return nil;
</span><del>- return renderer->style().font().primaryFontData().getNSFont();
</del><ins>+ return renderer->style().fontCascade().primaryFontData().getNSFont();
</ins><span class="cx"> }
</span><span class="cx"> #else
</span><span class="cx"> - (CTFontRef)_font
</span><span class="lines">@@ -677,7 +677,7 @@
</span><span class="cx"> RenderObject* renderer = core(self)->renderer();
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return nil;
</span><del>- return renderer->style().font().primaryFontData().getCTFont();
</del><ins>+ return renderer->style().fontCascade().primaryFontData().getCTFont();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcDOMUIKitExtensionsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/bindings/objc/DOMUIKitExtensions.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> #import "DOMNodeInternal.h"
</span><span class="cx"> #import "DOMRangeInternal.h"
</span><span class="cx"> #import "FloatPoint.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "FrameSelection.h"
</span><span class="cx"> #import "HTMLAreaElement.h"
</span><span class="cx"> #import "htmlediting.h"
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> using WebCore::FloatPoint;
</span><del>-using WebCore::Font;
</del><ins>+using WebCore::FontCascade;
</ins><span class="cx"> using WebCore::HTMLAreaElement;
</span><span class="cx"> using WebCore::HTMLImageElement;
</span><span class="cx"> using WebCore::HTMLSelectElement;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1504,8 +1504,8 @@
</span><span class="cx"> static Ref<CSSValueList> fontFamilyFromStyle(RenderStyle* style)
</span><span class="cx"> {
</span><span class="cx"> auto list = CSSValueList::createCommaSeparated();
</span><del>- for (unsigned i = 0; i < style->font().familyCount(); ++i)
- list.get().append(valueForFamily(style->font().familyAt(i)));
</del><ins>+ for (unsigned i = 0; i < style->fontCascade().familyCount(); ++i)
+ list.get().append(valueForFamily(style->fontCascade().familyAt(i)));
</ins><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2545,7 +2545,7 @@
</span><span class="cx"> case CSSPropertyWordBreak:
</span><span class="cx"> return cssValuePool().createValue(style->wordBreak());
</span><span class="cx"> case CSSPropertyWordSpacing:
</span><del>- return zoomAdjustedPixelValue(style->font().wordSpacing(), style.get());
</del><ins>+ return zoomAdjustedPixelValue(style->fontCascade().wordSpacing(), style.get());
</ins><span class="cx"> case CSSPropertyWordWrap:
</span><span class="cx"> return cssValuePool().createValue(style->overflowWrap());
</span><span class="cx"> case CSSPropertyWebkitLineBreak:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include "Color.h"
</span><span class="cx"> #include "Counter.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Node.h"
</span><span class="cx"> #include "Pair.h"
</span><span class="cx"> #include "RGBColor.h"
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontLoader.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontLoader.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/css/FontLoader.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #include "Dictionary.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCodeDescription.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "StyleProperties.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> return adoptRef<LoadFontCallback>(new LoadFontCallback(numLoading, fontLoader, loadCallback, errorCallback));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- static PassRefPtr<LoadFontCallback> createFromParams(const Dictionary& params, FontLoader& fontLoader, const Font& font)
</del><ins>+ static PassRefPtr<LoadFontCallback> createFromParams(const Dictionary& params, FontLoader& fontLoader, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<VoidCallback> onsuccess;
</span><span class="cx"> RefPtr<VoidCallback> onerror;
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx"> String fontString;
</span><span class="cx"> if (!params.get("font", fontString))
</span><span class="cx"> return;
</span><del>- Font font;
</del><ins>+ FontCascade font;
</ins><span class="cx"> if (!resolveFontStyle(fontString, font))
</span><span class="cx"> return;
</span><span class="cx"> RefPtr<LoadFontCallback> callback = LoadFontCallback::createFromParams(params, *this, font);
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx"> bool FontLoader::checkFont(const String& fontString, const String&)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: The second parameter (text) is ignored.
</span><del>- Font font;
</del><ins>+ FontCascade font;
</ins><span class="cx"> if (!resolveFontStyle(fontString, font))
</span><span class="cx"> return false;
</span><span class="cx"> for (unsigned i = 0; i < font.familyCount(); i++) {
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx"> styleResolver.applyPropertyToCurrentStyle(id, parsedStyle->getPropertyCSSValue(id).get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool FontLoader::resolveFontStyle(const String& fontString, Font& font)
</del><ins>+bool FontLoader::resolveFontStyle(const String& fontString, FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> // Interpret fontString in the same way as the 'font' attribute of CanvasRenderingContext2D.
</span><span class="cx"> RefPtr<MutableStyleProperties> parsedStyle = MutableStyleProperties::create();
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">
</span><span class="cx"> style->setFontDescription(defaultFontDescription);
</span><span class="cx">
</span><del>- style->font().update(style->font().fontSelector());
</del><ins>+ style->fontCascade().update(style->fontCascade().fontSelector());
</ins><span class="cx">
</span><span class="cx"> // Now map the font property longhands into the style.
</span><span class="cx"> StyleResolver& styleResolver = m_document->ensureStyleResolver();
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx"> styleResolver.updateFont();
</span><span class="cx"> applyPropertyToCurrentStyle(styleResolver, CSSPropertyLineHeight, parsedStyle);
</span><span class="cx">
</span><del>- font = style->font();
</del><ins>+ font = style->fontCascade();
</ins><span class="cx"> font.update(styleResolver.fontSelector());
</span><span class="cx"> return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontLoader.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontLoader.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/css/FontLoader.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> class Dictionary;
</span><span class="cx"> class Document;
</span><span class="cx"> class Event;
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class LoadFontCallback;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="cx">
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> void pendingEventsTimerFired() { firePendingEvents(); }
</span><span class="cx"> void scheduleEvent(PassRefPtr<Event>);
</span><span class="cx"> void firePendingEvents();
</span><del>- bool resolveFontStyle(const String&, Font&);
</del><ins>+ bool resolveFontStyle(const String&, FontCascade&);
</ins><span class="cx">
</span><span class="cx"> Document* m_document;
</span><span class="cx"> EventTargetData m_eventTargetData;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_ruleSets.appendAuthorStyleSheets(firstNew, styleSheets, m_medium.get(), m_inspectorCSSOMWrappers, this);
</span><span class="cx"> if (auto renderView = document().renderView())
</span><del>- renderView->style().font().update(fontSelector());
</del><ins>+ renderView->style().fontCascade().update(fontSelector());
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><span class="cx"> viewportStyleResolver()->resolve();
</span><span class="lines">@@ -748,7 +748,7 @@
</span><span class="cx"> if (!s_styleNotYetAvailable) {
</span><span class="cx"> s_styleNotYetAvailable = &RenderStyle::create().leakRef();
</span><span class="cx"> s_styleNotYetAvailable->setDisplay(NONE);
</span><del>- s_styleNotYetAvailable->font().update(m_fontSelector);
</del><ins>+ s_styleNotYetAvailable->fontCascade().update(m_fontSelector);
</ins><span class="cx"> }
</span><span class="cx"> element->document().setHasNodesWithPlaceholderStyle();
</span><span class="cx"> return *s_styleNotYetAvailable;
</span><span class="lines">@@ -1031,9 +1031,9 @@
</span><span class="cx"> // Make sure our fonts are initialized if we don't inherit them from our parent style.
</span><span class="cx"> if (Settings* settings = documentSettings()) {
</span><span class="cx"> initializeFontStyle(settings);
</span><del>- m_state.style()->font().update(fontSelector());
</del><ins>+ m_state.style()->fontCascade().update(fontSelector());
</ins><span class="cx"> } else
</span><del>- m_state.style()->font().update(0);
</del><ins>+ m_state.style()->fontCascade().update(nullptr);
</ins><span class="cx">
</span><span class="cx"> return m_state.takeStyle();
</span><span class="cx"> }
</span><span class="lines">@@ -1484,7 +1484,7 @@
</span><span class="cx"> checkForGenericFamilyChange(style, m_state.parentStyle());
</span><span class="cx"> checkForZoomChange(style, m_state.parentStyle());
</span><span class="cx"> checkForOrientationChange(style);
</span><del>- style->font().update(m_fontSelector);
</del><ins>+ style->fontCascade().update(m_fontSelector);
</ins><span class="cx"> if (m_state.fontSizeHasViewportUnits())
</span><span class="cx"> style->setHasViewportUnits(true);
</span><span class="cx"> m_state.setFontDirty(false);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/editing/TextIterator.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCodePlaceholder.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLElement.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="lines">@@ -2185,7 +2185,7 @@
</span><span class="cx">
</span><span class="cx"> // Chinese and Japanese lack word boundary marks, and there is no clear agreement on what constitutes
</span><span class="cx"> // a word, so treat the position before any CJK character as a word start.
</span><del>- if (Font::isCJKIdeographOrSymbol(firstCharacter))
</del><ins>+ if (FontCascade::isCJKIdeographOrSymbol(firstCharacter))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> size_t wordBreakSearchStart = start + length;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #import "DocumentLoader.h"
</span><span class="cx"> #import "Element.h"
</span><span class="cx"> #import "ElementTraversal.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameLoader.h"
</span><span class="cx"> #import "HTMLElement.h"
</span><span class="lines">@@ -1114,7 +1114,7 @@
</span><span class="cx"> auto renderer = element.renderer();
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return nil;
</span><del>- return renderer->style().font().primaryFontData().getNSFont();
</del><ins>+ return renderer->style().fontCascade().primaryFontData().getNSFont();
</ins><span class="cx"> }
</span><span class="cx"> #else
</span><span class="cx"> static PlatformFont *_font(Element& element)
</span><span class="lines">@@ -1122,7 +1122,7 @@
</span><span class="cx"> auto renderer = element.renderer();
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return nil;
</span><del>- return (PlatformFont *)renderer->style().font().primaryFontData().getCTFont();
</del><ins>+ return (PlatformFont *)renderer->style().fontCascade().primaryFontData().getCTFont();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -2594,10 +2594,10 @@
</span><span class="cx"> [attrs.get() setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName];
</span><span class="cx"> if (style.textDecorationsInEffect() & TextDecorationLineThrough)
</span><span class="cx"> [attrs.get() setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSStrikethroughStyleAttributeName];
</span><del>- if (NSFont *font = style.font().primaryFontData().getNSFont())
</del><ins>+ if (NSFont *font = style.fontCascade().primaryFontData().getNSFont())
</ins><span class="cx"> [attrs.get() setObject:font forKey:NSFontAttributeName];
</span><span class="cx"> else
</span><del>- [attrs.get() setObject:[fontManager convertFont:WebDefaultFont() toSize:style.font().primaryFontData().platformData().size()] forKey:NSFontAttributeName];
</del><ins>+ [attrs.get() setObject:[fontManager convertFont:WebDefaultFont() toSize:style.fontCascade().primaryFontData().platformData().size()] forKey:NSFontAttributeName];
</ins><span class="cx"> if (style.visitedDependentColor(CSSPropertyColor).alpha())
</span><span class="cx"> [attrs.get() setObject:nsColor(style.visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
</span><span class="cx"> else
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingiosEditorIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ios/EditorIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ios/EditorIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/editing/ios/EditorIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #include "DocumentFragment.h"
</span><span class="cx"> #include "DocumentLoader.h"
</span><span class="cx"> #include "EditorClient.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameLoaderClient.h"
</span><span class="cx"> #include "HTMLConverter.h"
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx">
</span><span class="cx"> const SimpleFontData* result = nullptr;
</span><span class="cx"> if (style)
</span><del>- result = &style->font().primaryFontData();
</del><ins>+ result = &style->fontCascade().primaryFontData();
</ins><span class="cx">
</span><span class="cx"> if (nodeToRemove) {
</span><span class="cx"> ExceptionCode ec;
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx"> if (!renderer)
</span><span class="cx"> continue;
</span><span class="cx"> // FIXME: Are there any node types that have renderers, but that we should be skipping?
</span><del>- const SimpleFontData& primaryFont = renderer->style().font().primaryFontData();
</del><ins>+ const SimpleFontData& primaryFont = renderer->style().fontCascade().primaryFontData();
</ins><span class="cx"> if (!font)
</span><span class="cx"> font = &primaryFont;
</span><span class="cx"> else if (font != &primaryFont) {
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">
</span><span class="cx"> NSMutableDictionary* result = [NSMutableDictionary dictionary];
</span><span class="cx">
</span><del>- CTFontRef font = style->font().primaryFontData().getCTFont();
</del><ins>+ CTFontRef font = style->fontCascade().primaryFontData().getCTFont();
</ins><span class="cx"> if (font)
</span><span class="cx"> [result setObject:(id)font forKey:NSFontAttributeName];
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmacEditorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/mac/EditorMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/mac/EditorMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/editing/mac/EditorMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #import "DocumentLoader.h"
</span><span class="cx"> #import "Editor.h"
</span><span class="cx"> #import "EditorClient.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameLoaderClient.h"
</span><span class="cx"> #import "FrameView.h"
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">
</span><span class="cx"> const SimpleFontData* result = nullptr;
</span><span class="cx"> if (style)
</span><del>- result = &style->font().primaryFontData();
</del><ins>+ result = &style->fontCascade().primaryFontData();
</ins><span class="cx">
</span><span class="cx"> if (nodeToRemove)
</span><span class="cx"> nodeToRemove->remove(ASSERT_NO_EXCEPTION);
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> if (!renderer)
</span><span class="cx"> continue;
</span><span class="cx"> // FIXME: Are there any node types that have renderers, but that we should be skipping?
</span><del>- const SimpleFontData& primaryFont = renderer->style().font().primaryFontData();
</del><ins>+ const SimpleFontData& primaryFont = renderer->style().fontCascade().primaryFontData();
</ins><span class="cx"> if (!font)
</span><span class="cx"> font = &primaryFont;
</span><span class="cx"> else if (font != &primaryFont) {
</span><span class="lines">@@ -160,8 +160,8 @@
</span><span class="cx"> if (style->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && style->visitedDependentColor(CSSPropertyBackgroundColor).alpha() != 0)
</span><span class="cx"> [result setObject:nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
</span><span class="cx">
</span><del>- if (style->font().primaryFontData().getNSFont())
- [result setObject:style->font().primaryFontData().getNSFont() forKey:NSFontAttributeName];
</del><ins>+ if (style->fontCascade().primaryFontData().getNSFont())
+ [result setObject:style->fontCascade().primaryFontData().getNSFont() forKey:NSFontAttributeName];
</ins><span class="cx">
</span><span class="cx"> if (style->visitedDependentColor(CSSPropertyColor).isValid() && style->visitedDependentColor(CSSPropertyColor) != Color::black)
</span><span class="cx"> [result setObject:nsColor(style->visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -2105,7 +2105,7 @@
</span><span class="cx"> newStyle->setFontDescription(defaultFontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- newStyle->font().update(newStyle->font().fontSelector());
</del><ins>+ newStyle->fontCascade().update(newStyle->fontCascade().fontSelector());
</ins><span class="cx">
</span><span class="cx"> // Now map the font property longhands into the style.
</span><span class="cx"> StyleResolver& styleResolver = canvas()->document().ensureStyleResolver();
</span><span class="lines">@@ -2122,7 +2122,7 @@
</span><span class="cx"> styleResolver.updateFont();
</span><span class="cx"> styleResolver.applyPropertyToCurrentStyle(CSSPropertyLineHeight, parsedStyle->getPropertyCSSValue(CSSPropertyLineHeight).get());
</span><span class="cx">
</span><del>- modifiableState().m_font = newStyle->font();
</del><ins>+ modifiableState().m_font = newStyle->fontCascade();
</ins><span class="cx"> modifiableState().m_font.update(styleResolver.fontSelector());
</span><span class="cx"> modifiableState().m_realizedFont = true;
</span><span class="cx"> styleResolver.fontSelector()->registerForInvalidationCallbacks(&modifiableState());
</span><span class="lines">@@ -2287,7 +2287,7 @@
</span><span class="cx"> if (fill && gradient && gradient->isZeroSize())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- const Font& font = accessFont();
</del><ins>+ const FontCascade& font = accessFont();
</ins><span class="cx"> const FontMetrics& fontMetrics = font.fontMetrics();
</span><span class="cx">
</span><span class="cx"> String normalizedText = text;
</span><span class="lines">@@ -2372,10 +2372,10 @@
</span><span class="cx"> maskImageContext->translate(location.x() - maskRect.x(), location.y() - maskRect.y());
</span><span class="cx"> // We draw when fontWidth is 0 so compositing operations (eg, a "copy" op) still work.
</span><span class="cx"> maskImageContext->scale(FloatSize((fontWidth > 0 ? (width / fontWidth) : 0), 1));
</span><del>- maskImageContext->drawBidiText(font, textRun, FloatPoint(0, 0), Font::UseFallbackIfFontNotReady);
</del><ins>+ maskImageContext->drawBidiText(font, textRun, FloatPoint(0, 0), FontCascade::UseFallbackIfFontNotReady);
</ins><span class="cx"> } else {
</span><span class="cx"> maskImageContext->translate(-maskRect.x(), -maskRect.y());
</span><del>- maskImageContext->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
</del><ins>+ maskImageContext->drawBidiText(font, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*c);
</span><span class="lines">@@ -2398,15 +2398,15 @@
</span><span class="cx">
</span><span class="cx"> if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</span><span class="cx"> beginCompositeLayer();
</span><del>- c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
</del><ins>+ c->drawBidiText(font, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</ins><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><span class="cx"> } else if (state().m_globalComposite == CompositeCopy) {
</span><span class="cx"> clearCanvas();
</span><del>- c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
</del><ins>+ c->drawBidiText(font, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</ins><span class="cx"> didDrawEntireCanvas();
</span><span class="cx"> } else {
</span><del>- c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
</del><ins>+ c->drawBidiText(font, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</ins><span class="cx"> didDraw(textRect);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2426,7 +2426,7 @@
</span><span class="cx"> rect.inflate(delta);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const Font& CanvasRenderingContext2D::accessFont()
</del><ins>+const FontCascade& CanvasRenderingContext2D::accessFont()
</ins><span class="cx"> {
</span><span class="cx"> canvas()->document().updateStyleIfNeeded();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include "Color.h"
</span><span class="cx"> #include "ColorSpace.h"
</span><span class="cx"> #include "FloatSize.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GraphicsTypes.h"
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "Path.h"
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx"> Direction m_direction;
</span><span class="cx">
</span><span class="cx"> String m_unparsedFont;
</span><del>- Font m_font;
</del><ins>+ FontCascade m_font;
</ins><span class="cx"> bool m_realizedFont;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">
</span><span class="cx"> void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
</span><span class="cx">
</span><del>- const Font& accessFont();
</del><ins>+ const FontCascade& accessFont();
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(DASHBOARD_SUPPORT)
</span><span class="cx"> void clearPathForDashboardBackwardCompatibilityMode();
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLMencloseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> TextRun run(closingBrace.impl(), closingBrace.length());
</span><span class="cx"> Node* node = parentNode();
</span><span class="cx"> if (node && node->renderer()) {
</span><del>- const Font& font = node->renderer()->style().font();
</del><ins>+ const FontCascade& font = node->renderer()->style().fontCascade();
</ins><span class="cx"> padding.appendNumber(font.width(run));
</span><span class="cx"> padding.appendLiteral("px");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/page/Settings.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include "DOMTimer.h"
</span><span class="cx"> #include "Database.h"
</span><span class="cx"> #include "Document.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FontGenericFamilies.h"
</span><span class="cx"> #include "FrameTree.h"
</span><span class="cx"> #include "FrameView.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformMemoryPressureHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/MemoryPressureHandler.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #include "CSSValuePool.h"
</span><span class="cx"> #include "Document.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GCController.h"
</span><span class="cx"> #include "JSDOMWindow.h"
</span><span class="cx"> #include "MemoryCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPopupMenuStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PopupMenuStyle.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PopupMenuStyle.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/PopupMenuStyle.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #define PopupMenuStyle_h
</span><span class="cx">
</span><span class="cx"> #include "Color.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Length.h"
</span><span class="cx"> #include "TextDirection.h"
</span><span class="cx">
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> PopupMenuSizeMini
</span><span class="cx"> };
</span><span class="cx">
</span><del>- PopupMenuStyle(const Color& foreground, const Color& background, const Font& font, bool visible, bool isDisplayNone, bool hasDefaultAppearance, Length textIndent, TextDirection textDirection, bool hasTextDirectionOverride, BackgroundColorType backgroundColorType = DefaultBackgroundColor, PopupMenuType menuType = SelectPopup, PopupMenuSize menuSize = PopupMenuSizeNormal)
</del><ins>+ PopupMenuStyle(const Color& foreground, const Color& background, const FontCascade& font, bool visible, bool isDisplayNone, bool hasDefaultAppearance, Length textIndent, TextDirection textDirection, bool hasTextDirectionOverride, BackgroundColorType backgroundColorType = DefaultBackgroundColor, PopupMenuType menuType = SelectPopup, PopupMenuSize menuSize = PopupMenuSizeNormal)
</ins><span class="cx"> : m_foregroundColor(foreground)
</span><span class="cx"> , m_backgroundColor(background)
</span><span class="cx"> , m_font(font)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> const Color& foregroundColor() const { return m_foregroundColor; }
</span><span class="cx"> const Color& backgroundColor() const { return m_backgroundColor; }
</span><del>- const Font& font() const { return m_font; }
</del><ins>+ const FontCascade& font() const { return m_font; }
</ins><span class="cx"> bool isVisible() const { return m_visible; }
</span><span class="cx"> bool isDisplayNone() const { return m_isDisplayNone; }
</span><span class="cx"> bool hasDefaultAppearance() const { return m_hasDefaultAppearance; }
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> private:
</span><span class="cx"> Color m_foregroundColor;
</span><span class="cx"> Color m_backgroundColor;
</span><del>- Font m_font;
</del><ins>+ FontCascade m_font;
</ins><span class="cx"> bool m_visible;
</span><span class="cx"> bool m_isDisplayNone;
</span><span class="cx"> bool m_hasDefaultAppearance;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Theme.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Theme.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/Theme.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-LengthBox Theme::controlBorder(ControlPart part, const Font&, const LengthBox& zoomedBox, float) const
</del><ins>+LengthBox Theme::controlBorder(ControlPart part, const FontCascade&, const LengthBox& zoomedBox, float) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case PushButtonPart:
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LengthBox Theme::controlPadding(ControlPart part, const Font&, const LengthBox& zoomedBox, float) const
</del><ins>+LengthBox Theme::controlPadding(ControlPart part, const FontCascade&, const LengthBox& zoomedBox, float) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case MenulistPart:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Theme.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Theme.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/Theme.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Color.h"
</span><span class="cx"> #include "ControlStates.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include "LengthBox.h"
</span><span class="cx"> #include "LengthSize.h"
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">
</span><span class="cx"> // CSS system colors and fonts
</span><span class="cx"> virtual Color systemColor(ThemeColor) const { return Color(); }
</span><del>- virtual Font systemFont(ThemeFont, FontDescription&) const { return Font(); }
</del><ins>+ virtual FontCascade systemFont(ThemeFont, FontDescription&) const { return FontCascade(); }
</ins><span class="cx">
</span><span class="cx"> // How fast the caret blinks in text fields.
</span><span class="cx"> virtual double caretBlinkInterval() const { return 0.5; }
</span><span class="lines">@@ -82,17 +82,17 @@
</span><span class="cx"> // Methods used to adjust the RenderStyles of controls.
</span><span class="cx">
</span><span class="cx"> // The font description result should have a zoomed font size.
</span><del>- virtual FontDescription controlFont(ControlPart, const Font& font, float /*zoomFactor*/) const { return font.fontDescription(); }
</del><ins>+ virtual FontDescription controlFont(ControlPart, const FontCascade& font, float /*zoomFactor*/) const { return font.fontDescription(); }
</ins><span class="cx">
</span><span class="cx"> // The size here is in zoomed coordinates already. If a new size is returned, it also needs to be in zoomed coordinates.
</span><del>- virtual LengthSize controlSize(ControlPart, const Font&, const LengthSize& zoomedSize, float /*zoomFactor*/) const { return zoomedSize; }
</del><ins>+ virtual LengthSize controlSize(ControlPart, const FontCascade&, const LengthSize& zoomedSize, float /*zoomFactor*/) const { return zoomedSize; }
</ins><span class="cx">
</span><span class="cx"> // Returns the minimum size for a control in zoomed coordinates.
</span><del>- virtual LengthSize minimumControlSize(ControlPart, const Font&, float /*zoomFactor*/) const { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
</del><ins>+ virtual LengthSize minimumControlSize(ControlPart, const FontCascade&, float /*zoomFactor*/) const { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
</ins><span class="cx">
</span><span class="cx"> // Allows the theme to modify the existing padding/border.
</span><del>- virtual LengthBox controlPadding(ControlPart, const Font&, const LengthBox& zoomedBox, float zoomFactor) const;
- virtual LengthBox controlBorder(ControlPart, const Font&, const LengthBox& zoomedBox, float zoomFactor) const;
</del><ins>+ virtual LengthBox controlPadding(ControlPart, const FontCascade&, const LengthBox& zoomedBox, float zoomFactor) const;
+ virtual LengthBox controlBorder(ControlPart, const FontCascade&, const LengthBox& zoomedBox, float zoomFactor) const;
</ins><span class="cx">
</span><span class="cx"> // Whether or not whitespace: pre should be forced on always.
</span><span class="cx"> virtual bool controlRequiresPreWhiteSpace(ControlPart) const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformWidgeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Widget.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Widget.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/Widget.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">
</span><span class="cx"> class Cursor;
</span><span class="cx"> class Event;
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class FrameView;
</span><span class="cx"> class GraphicsContext;
</span><span class="cx"> class PlatformMouseEvent;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/Font.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1,1142 +0,0 @@
</span><del>-/*
- * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * (C) 1999 Antti Koivisto (koivisto@kde.org)
- * (C) 2000 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "Font.h"
-
-#include "FloatRect.h"
-#include "FontCache.h"
-#include "GlyphBuffer.h"
-#include "LayoutRect.h"
-#include "TextRun.h"
-#include "WidthIterator.h"
-#include <wtf/MainThread.h>
-#include <wtf/MathExtras.h>
-#include <wtf/text/AtomicStringHash.h>
-#include <wtf/text/StringBuilder.h>
-
-using namespace WTF;
-using namespace Unicode;
-
-namespace WTF {
-
-// allow compilation of OwnPtr<TextLayout> in source files that don't have access to the TextLayout class definition
-template <> void deleteOwnedPtr<WebCore::TextLayout>(WebCore::TextLayout* ptr)
-{
- WebCore::Font::deleteLayout(ptr);
-}
-
-}
-
-namespace WebCore {
-
-static Ref<FontGlyphs> retrieveOrAddCachedFontGlyphs(const FontDescription&, PassRefPtr<FontSelector>);
-
-const uint8_t Font::s_roundingHackCharacterTable[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*\t*/, 1 /*\n*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1 /*space*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*-*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*?*/,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1 /*no-break space*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static bool isDrawnWithSVGFont(const TextRun& run)
-{
- return run.renderingContext();
-}
-
-static bool useBackslashAsYenSignForFamily(const AtomicString& family)
-{
- if (family.isEmpty())
- return false;
- static HashSet<AtomicString>* set;
- if (!set) {
- set = new HashSet<AtomicString>;
- set->add("MS PGothic");
- UChar unicodeNameMSPGothic[] = {0xFF2D, 0xFF33, 0x0020, 0xFF30, 0x30B4, 0x30B7, 0x30C3, 0x30AF};
- set->add(AtomicString(unicodeNameMSPGothic, WTF_ARRAY_LENGTH(unicodeNameMSPGothic)));
-
- set->add("MS PMincho");
- UChar unicodeNameMSPMincho[] = {0xFF2D, 0xFF33, 0x0020, 0xFF30, 0x660E, 0x671D};
- set->add(AtomicString(unicodeNameMSPMincho, WTF_ARRAY_LENGTH(unicodeNameMSPMincho)));
-
- set->add("MS Gothic");
- UChar unicodeNameMSGothic[] = {0xFF2D, 0xFF33, 0x0020, 0x30B4, 0x30B7, 0x30C3, 0x30AF};
- set->add(AtomicString(unicodeNameMSGothic, WTF_ARRAY_LENGTH(unicodeNameMSGothic)));
-
- set->add("MS Mincho");
- UChar unicodeNameMSMincho[] = {0xFF2D, 0xFF33, 0x0020, 0x660E, 0x671D};
- set->add(AtomicString(unicodeNameMSMincho, WTF_ARRAY_LENGTH(unicodeNameMSMincho)));
-
- set->add("Meiryo");
- UChar unicodeNameMeiryo[] = {0x30E1, 0x30A4, 0x30EA, 0x30AA};
- set->add(AtomicString(unicodeNameMeiryo, WTF_ARRAY_LENGTH(unicodeNameMeiryo)));
- }
- return set->contains(family);
-}
-
-Font::CodePath Font::s_codePath = Auto;
-
-TypesettingFeatures Font::s_defaultTypesettingFeatures = 0;
-
-// ============================================================================================
-// Font Implementation (Cross-Platform Portion)
-// ============================================================================================
-
-Font::Font()
- : m_letterSpacing(0)
- , m_wordSpacing(0)
- , m_useBackslashAsYenSymbol(false)
- , m_typesettingFeatures(0)
-{
-}
-
-Font::Font(const FontDescription& fd, float letterSpacing, float wordSpacing)
- : m_fontDescription(fd)
- , m_letterSpacing(letterSpacing)
- , m_wordSpacing(wordSpacing)
- , m_useBackslashAsYenSymbol(useBackslashAsYenSignForFamily(fd.firstFamily()))
- , m_typesettingFeatures(computeTypesettingFeatures())
-{
-}
-
-// FIXME: We should make this constructor platform-independent.
-Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode)
- : m_glyphs(FontGlyphs::createForPlatformFont(fontData))
- , m_letterSpacing(0)
- , m_wordSpacing(0)
- , m_useBackslashAsYenSymbol(false)
- , m_typesettingFeatures(computeTypesettingFeatures())
-{
- m_fontDescription.setUsePrinterFont(isPrinterFont);
- m_fontDescription.setFontSmoothing(fontSmoothingMode);
-#if PLATFORM(IOS)
- m_fontDescription.setSpecifiedSize(CTFontGetSize(fontData.font()));
- m_fontDescription.setComputedSize(CTFontGetSize(fontData.font()));
- m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitItalic);
- m_fontDescription.setWeight((CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
-#endif
-}
-
-// FIXME: We should make this constructor platform-independent.
-#if PLATFORM(IOS)
-Font::Font(const FontPlatformData& fontData, PassRefPtr<FontSelector> fontSelector)
- : m_glyphs(FontGlyphs::createForPlatformFont(fontData))
- , m_letterSpacing(0)
- , m_wordSpacing(0)
- , m_typesettingFeatures(computeTypesettingFeatures())
-{
- CTFontRef primaryFont = fontData.font();
- m_fontDescription.setSpecifiedSize(CTFontGetSize(primaryFont));
- m_fontDescription.setComputedSize(CTFontGetSize(primaryFont));
- m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitItalic);
- m_fontDescription.setWeight((CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
- m_fontDescription.setUsePrinterFont(fontData.isPrinterFont());
- m_glyphs = retrieveOrAddCachedFontGlyphs(m_fontDescription, fontSelector.get());
-}
-#endif
-
-Font::Font(const Font& other)
- : m_fontDescription(other.m_fontDescription)
- , m_glyphs(other.m_glyphs)
- , m_letterSpacing(other.m_letterSpacing)
- , m_wordSpacing(other.m_wordSpacing)
- , m_useBackslashAsYenSymbol(other.m_useBackslashAsYenSymbol)
- , m_typesettingFeatures(computeTypesettingFeatures())
-{
-}
-
-Font& Font::operator=(const Font& other)
-{
- m_fontDescription = other.m_fontDescription;
- m_glyphs = other.m_glyphs;
- m_letterSpacing = other.m_letterSpacing;
- m_wordSpacing = other.m_wordSpacing;
- m_useBackslashAsYenSymbol = other.m_useBackslashAsYenSymbol;
- m_typesettingFeatures = other.m_typesettingFeatures;
- return *this;
-}
-
-bool Font::operator==(const Font& other) const
-{
- if (isLoadingCustomFonts() || other.isLoadingCustomFonts())
- return false;
-
- if (m_fontDescription != other.m_fontDescription || m_letterSpacing != other.m_letterSpacing || m_wordSpacing != other.m_wordSpacing)
- return false;
- if (m_glyphs == other.m_glyphs)
- return true;
- if (!m_glyphs || !other.m_glyphs)
- return false;
- if (m_glyphs->fontSelector() != other.m_glyphs->fontSelector())
- return false;
- // Can these cases actually somehow occur? All fonts should get wiped out by full style recalc.
- if (m_glyphs->fontSelectorVersion() != other.m_glyphs->fontSelectorVersion())
- return false;
- if (m_glyphs->generation() != other.m_glyphs->generation())
- return false;
- return true;
-}
-
-struct FontGlyphsCacheKey {
- // This part of the key is shared with the lower level FontCache (caching FontData objects).
- FontDescriptionFontDataCacheKey fontDescriptionCacheKey;
- Vector<AtomicString, 3> families;
- unsigned fontSelectorId;
- unsigned fontSelectorVersion;
- unsigned fontSelectorFlags;
-};
-
-struct FontGlyphsCacheEntry {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- FontGlyphsCacheEntry(FontGlyphsCacheKey&& k, Ref<FontGlyphs>&& g)
- : key(WTF::move(k))
- , glyphs(WTF::move(g))
- { }
- FontGlyphsCacheKey key;
- Ref<FontGlyphs> glyphs;
-};
-
-typedef HashMap<unsigned, std::unique_ptr<FontGlyphsCacheEntry>, AlreadyHashed> FontGlyphsCache;
-
-static bool operator==(const FontGlyphsCacheKey& a, const FontGlyphsCacheKey& b)
-{
- if (a.fontDescriptionCacheKey != b.fontDescriptionCacheKey)
- return false;
- if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion || a.fontSelectorFlags != b.fontSelectorFlags)
- return false;
- if (a.families.size() != b.families.size())
- return false;
- for (unsigned i = 0; i < a.families.size(); ++i) {
- if (!equalIgnoringCase(a.families[i].impl(), b.families[i].impl()))
- return false;
- }
- return true;
-}
-
-static FontGlyphsCache& fontGlyphsCache()
-{
- DEPRECATED_DEFINE_STATIC_LOCAL(FontGlyphsCache, cache, ());
- return cache;
-}
-
-void invalidateFontGlyphsCache()
-{
- fontGlyphsCache().clear();
-}
-
-void clearWidthCaches()
-{
- for (auto it = fontGlyphsCache().begin(), end = fontGlyphsCache().end(); it != end; ++it)
- it->value->glyphs.get().widthCache().clear();
-}
-
-static unsigned makeFontSelectorFlags(const FontDescription& description)
-{
- return static_cast<unsigned>(description.script()) << 1 | static_cast<unsigned>(description.smallCaps());
-}
-
-static void makeFontGlyphsCacheKey(FontGlyphsCacheKey& key, const FontDescription& description, FontSelector* fontSelector)
-{
- key.fontDescriptionCacheKey = FontDescriptionFontDataCacheKey(description);
- for (unsigned i = 0; i < description.familyCount(); ++i)
- key.families.append(description.familyAt(i));
- key.fontSelectorId = fontSelector ? fontSelector->uniqueId() : 0;
- key.fontSelectorVersion = fontSelector ? fontSelector->version() : 0;
- key.fontSelectorFlags = fontSelector && fontSelector->resolvesFamilyFor(description) ? makeFontSelectorFlags(description) : 0;
-}
-
-static unsigned computeFontGlyphsCacheHash(const FontGlyphsCacheKey& key)
-{
- Vector<unsigned, 7> hashCodes;
- hashCodes.reserveInitialCapacity(4 + key.families.size());
-
- hashCodes.uncheckedAppend(key.fontDescriptionCacheKey.computeHash());
- hashCodes.uncheckedAppend(key.fontSelectorId);
- hashCodes.uncheckedAppend(key.fontSelectorVersion);
- hashCodes.uncheckedAppend(key.fontSelectorFlags);
- for (unsigned i = 0; i < key.families.size(); ++i)
- hashCodes.uncheckedAppend(key.families[i].impl() ? CaseFoldingHash::hash(key.families[i]) : 0);
-
- return StringHasher::hashMemory(hashCodes.data(), hashCodes.size() * sizeof(unsigned));
-}
-
-void pruneUnreferencedEntriesFromFontGlyphsCache()
-{
- Vector<unsigned, 50> toRemove;
- FontGlyphsCache::iterator end = fontGlyphsCache().end();
- for (FontGlyphsCache::iterator it = fontGlyphsCache().begin(); it != end; ++it) {
- if (it->value->glyphs.get().hasOneRef())
- toRemove.append(it->key);
- }
- for (unsigned i = 0; i < toRemove.size(); ++i)
- fontGlyphsCache().remove(toRemove[i]);
-}
-
-static Ref<FontGlyphs> retrieveOrAddCachedFontGlyphs(const FontDescription& fontDescription, PassRefPtr<FontSelector> fontSelector)
-{
- FontGlyphsCacheKey key;
- makeFontGlyphsCacheKey(key, fontDescription, fontSelector.get());
-
- unsigned hash = computeFontGlyphsCacheHash(key);
- FontGlyphsCache::AddResult addResult = fontGlyphsCache().add(hash, std::unique_ptr<FontGlyphsCacheEntry>());
- if (!addResult.isNewEntry && addResult.iterator->value->key == key)
- return addResult.iterator->value->glyphs.get();
-
- std::unique_ptr<FontGlyphsCacheEntry>& newEntry = addResult.iterator->value;
- newEntry = std::make_unique<FontGlyphsCacheEntry>(WTF::move(key), FontGlyphs::create(fontSelector));
- Ref<FontGlyphs> glyphs = newEntry->glyphs.get();
-
- static const unsigned unreferencedPruneInterval = 50;
- static const int maximumEntries = 400;
- static unsigned pruneCounter;
- // Referenced FontGlyphs would exist anyway so pruning them saves little memory.
- if (!(++pruneCounter % unreferencedPruneInterval))
- pruneUnreferencedEntriesFromFontGlyphsCache();
- // Prevent pathological growth.
- if (fontGlyphsCache().size() > maximumEntries)
- fontGlyphsCache().remove(fontGlyphsCache().begin());
- return glyphs;
-}
-
-void Font::update(PassRefPtr<FontSelector> fontSelector) const
-{
- m_glyphs = retrieveOrAddCachedFontGlyphs(m_fontDescription, fontSelector.get());
- m_useBackslashAsYenSymbol = useBackslashAsYenSignForFamily(firstFamily());
- m_typesettingFeatures = computeTypesettingFeatures();
-}
-
-float Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
-{
- // Don't draw anything while we are using custom fonts that are in the process of loading,
- // except if the 'force' argument is set to true (in which case it will use a fallback
- // font).
- if (isLoadingCustomFonts() && customFontNotReadyAction == DoNotPaintIfFontNotReady)
- return 0;
-
- to = (to == -1 ? run.length() : to);
-
- CodePath codePathToUse = codePath(run);
- // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
- if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
- codePathToUse = Complex;
-
- if (codePathToUse != Complex)
- return drawSimpleText(context, run, point, from, to);
-
- return drawComplexText(context, run, point, from, to);
-}
-
-void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
-{
- if (isLoadingCustomFonts())
- return;
-
- if (to < 0)
- to = run.length();
-
- CodePath codePathToUse = codePath(run);
- // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
- if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
- codePathToUse = Complex;
-
- if (codePathToUse != Complex)
- drawEmphasisMarksForSimpleText(context, run, mark, point, from, to);
- else
- drawEmphasisMarksForComplexText(context, run, mark, point, from, to);
-}
-
-float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
-{
- CodePath codePathToUse = codePath(run);
- if (codePathToUse != Complex) {
- // The complex path is more restrictive about returning fallback fonts than the simple path, so we need an explicit test to make their behaviors match.
- if (!canReturnFallbackFontsForComplexText())
- fallbackFonts = 0;
- // The simple path can optimize the case where glyph overflow is not observable.
- if (codePathToUse != SimpleWithGlyphOverflow && (glyphOverflow && !glyphOverflow->computeBounds))
- glyphOverflow = 0;
- }
-
- bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures);
- bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
- float* cacheEntry = m_glyphs->widthCache().add(run, std::numeric_limits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
- if (cacheEntry && !std::isnan(*cacheEntry))
- return *cacheEntry;
-
- HashSet<const SimpleFontData*> localFallbackFonts;
- if (!fallbackFonts)
- fallbackFonts = &localFallbackFonts;
-
- float result;
- if (codePathToUse == Complex)
- result = floatWidthForComplexText(run, fallbackFonts, glyphOverflow);
- else
- result = floatWidthForSimpleText(run, fallbackFonts, glyphOverflow);
-
- if (cacheEntry && fallbackFonts->isEmpty())
- *cacheEntry = result;
- return result;
-}
-
-float Font::width(const TextRun& run, int& charsConsumed, String& glyphName) const
-{
-#if ENABLE(SVG_FONTS)
- if (isDrawnWithSVGFont(run))
- return run.renderingContext()->floatWidthUsingSVGFont(*this, run, charsConsumed, glyphName);
-#endif
-
- charsConsumed = run.length();
- glyphName = "";
- return width(run);
-}
-
-GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant variant) const
-{
- if (variant == AutoVariant) {
- if (m_fontDescription.smallCaps() && !primaryFontData().isSVGFont()) {
- UChar32 upperC = u_toupper(c);
- if (upperC != c) {
- c = upperC;
- variant = SmallCapsVariant;
- } else
- variant = NormalVariant;
- } else
- variant = NormalVariant;
- }
-
- if (mirror)
- c = u_charMirror(c);
-
- return m_glyphs->glyphDataForCharacter(c, m_fontDescription, variant);
-}
-
-#if !PLATFORM(COCOA)
-PassOwnPtr<TextLayout> Font::createLayout(RenderText*, float, bool) const
-{
- return nullptr;
-}
-
-void Font::deleteLayout(TextLayout*)
-{
-}
-
-float Font::width(TextLayout&, unsigned, unsigned, HashSet<const SimpleFontData*>*)
-{
- ASSERT_NOT_REACHED();
- return 0;
-}
-#endif
-
-
-
-static const char* fontFamiliesWithInvalidCharWidth[] = {
- "American Typewriter",
- "Arial Hebrew",
- "Chalkboard",
- "Cochin",
- "Corsiva Hebrew",
- "Courier",
- "Euphemia UCAS",
- "Geneva",
- "Gill Sans",
- "Hei",
- "Helvetica",
- "Hoefler Text",
- "InaiMathi",
- "Kai",
- "Lucida Grande",
- "Marker Felt",
- "Monaco",
- "Mshtakan",
- "New Peninim MT",
- "Osaka",
- "Raanana",
- "STHeiti",
- "Symbol",
- "Times",
- "Apple Braille",
- "Apple LiGothic",
- "Apple LiSung",
- "Apple Symbols",
- "AppleGothic",
- "AppleMyungjo",
- "#GungSeo",
- "#HeadLineA",
- "#PCMyungjo",
- "#PilGi",
-};
-
-// For font families where any of the fonts don't have a valid entry in the OS/2 table
-// for avgCharWidth, fallback to the legacy webkit behavior of getting the avgCharWidth
-// from the width of a '0'. This only seems to apply to a fixed number of Mac fonts,
-// but, in order to get similar rendering across platforms, we do this check for
-// all platforms.
-bool Font::hasValidAverageCharWidth() const
-{
- AtomicString family = firstFamily();
- if (family.isEmpty())
- return false;
-
-#if PLATFORM(MAC) || PLATFORM(IOS)
- // Internal fonts on OS X and iOS also have an invalid entry in the table for avgCharWidth.
- if (primaryFontDataIsSystemFont())
- return false;
-#endif
-
- static HashSet<AtomicString>* fontFamiliesWithInvalidCharWidthMap = 0;
-
- if (!fontFamiliesWithInvalidCharWidthMap) {
- fontFamiliesWithInvalidCharWidthMap = new HashSet<AtomicString>;
-
- for (size_t i = 0; i < WTF_ARRAY_LENGTH(fontFamiliesWithInvalidCharWidth); ++i)
- fontFamiliesWithInvalidCharWidthMap->add(AtomicString(fontFamiliesWithInvalidCharWidth[i]));
- }
-
- return !fontFamiliesWithInvalidCharWidthMap->contains(family);
-}
-
-bool Font::fastAverageCharWidthIfAvailable(float& width) const
-{
- bool success = hasValidAverageCharWidth();
- if (success)
- width = roundf(primaryFontData().avgCharWidth()); // FIXME: primaryFontData() might not correspond to firstFamily().
- return success;
-}
-
-void Font::adjustSelectionRectForText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
-{
- to = (to == -1 ? run.length() : to);
-
- CodePath codePathToUse = codePath(run);
- // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
- if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
- codePathToUse = Complex;
-
- if (codePathToUse != Complex)
- return adjustSelectionRectForSimpleText(run, selectionRect, from, to);
-
- return adjustSelectionRectForComplexText(run, selectionRect, from, to);
-}
-
-int Font::offsetForPosition(const TextRun& run, float x, bool includePartialGlyphs) const
-{
- // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
- if (codePath(run) != Complex && (!typesettingFeatures() || isDrawnWithSVGFont(run)))
- return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
-
- return offsetForPositionForComplexText(run, x, includePartialGlyphs);
-}
-
-template <typename CharacterType>
-static inline String normalizeSpacesInternal(const CharacterType* characters, unsigned length)
-{
- StringBuilder normalized;
- normalized.reserveCapacity(length);
-
- for (unsigned i = 0; i < length; ++i)
- normalized.append(Font::normalizeSpaces(characters[i]));
-
- return normalized.toString();
-}
-
-String Font::normalizeSpaces(const LChar* characters, unsigned length)
-{
- return normalizeSpacesInternal(characters, length);
-}
-
-String Font::normalizeSpaces(const UChar* characters, unsigned length)
-{
- return normalizeSpacesInternal(characters, length);
-}
-
-static bool shouldUseFontSmoothing = true;
-
-void Font::setShouldUseSmoothing(bool shouldUseSmoothing)
-{
- ASSERT(isMainThread());
- shouldUseFontSmoothing = shouldUseSmoothing;
-}
-
-bool Font::shouldUseSmoothing()
-{
- return shouldUseFontSmoothing;
-}
-
-void Font::setCodePath(CodePath p)
-{
- s_codePath = p;
-}
-
-Font::CodePath Font::codePath()
-{
- return s_codePath;
-}
-
-void Font::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures)
-{
- s_defaultTypesettingFeatures = typesettingFeatures;
-}
-
-TypesettingFeatures Font::defaultTypesettingFeatures()
-{
- return s_defaultTypesettingFeatures;
-}
-
-Font::CodePath Font::codePath(const TextRun& run) const
-{
- if (s_codePath != Auto)
- return s_codePath;
-
-#if ENABLE(SVG_FONTS)
- if (isDrawnWithSVGFont(run))
- return Simple;
-#endif
-
- if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings()->size() > 0)
- return Complex;
-
- if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this))
- return Complex;
-
- if (!run.characterScanForCodePath())
- return Simple;
-
- if (run.is8Bit())
- return Simple;
-
- // Start from 0 since drawing and highlighting also measure the characters before run->from.
- return characterRangeCodePath(run.characters16(), run.length());
-}
-
-Font::CodePath Font::characterRangeCodePath(const UChar* characters, unsigned len)
-{
- // FIXME: Should use a UnicodeSet in ports where ICU is used. Note that we
- // can't simply use UnicodeCharacter Property/class because some characters
- // are not 'combining', but still need to go to the complex path.
- // Alternatively, we may as well consider binary search over a sorted
- // list of ranges.
- CodePath result = Simple;
- for (unsigned i = 0; i < len; i++) {
- const UChar c = characters[i];
- if (c < 0x2E5) // U+02E5 through U+02E9 (Modifier Letters : Tone letters)
- continue;
- if (c <= 0x2E9)
- return Complex;
-
- if (c < 0x300) // U+0300 through U+036F Combining diacritical marks
- continue;
- if (c <= 0x36F)
- return Complex;
-
- if (c < 0x0591 || c == 0x05BE) // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha
- continue;
- if (c <= 0x05CF)
- return Complex;
-
- // U+0600 through U+109F Arabic, Syriac, Thaana, NKo, Samaritan, Mandaic,
- // Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada,
- // Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar
- if (c < 0x0600)
- continue;
- if (c <= 0x109F)
- return Complex;
-
- // U+1100 through U+11FF Hangul Jamo (only Ancient Korean should be left here if you precompose;
- // Modern Korean will be precomposed as a result of step A)
- if (c < 0x1100)
- continue;
- if (c <= 0x11FF)
- return Complex;
-
- if (c < 0x135D) // U+135D through U+135F Ethiopic combining marks
- continue;
- if (c <= 0x135F)
- return Complex;
-
- if (c < 0x1700) // U+1780 through U+18AF Tagalog, Hanunoo, Buhid, Taghanwa,Khmer, Mongolian
- continue;
- if (c <= 0x18AF)
- return Complex;
-
- if (c < 0x1900) // U+1900 through U+194F Limbu (Unicode 4.0)
- continue;
- if (c <= 0x194F)
- return Complex;
-
- if (c < 0x1980) // U+1980 through U+19DF New Tai Lue
- continue;
- if (c <= 0x19DF)
- return Complex;
-
- if (c < 0x1A00) // U+1A00 through U+1CFF Buginese, Tai Tham, Balinese, Batak, Lepcha, Vedic
- continue;
- if (c <= 0x1CFF)
- return Complex;
-
- if (c < 0x1DC0) // U+1DC0 through U+1DFF Comining diacritical mark supplement
- continue;
- if (c <= 0x1DFF)
- return Complex;
-
- // U+1E00 through U+2000 characters with diacritics and stacked diacritics
- if (c <= 0x2000) {
- result = SimpleWithGlyphOverflow;
- continue;
- }
-
- if (c < 0x20D0) // U+20D0 through U+20FF Combining marks for symbols
- continue;
- if (c <= 0x20FF)
- return Complex;
-
- if (c < 0x2CEF) // U+2CEF through U+2CF1 Combining marks for Coptic
- continue;
- if (c <= 0x2CF1)
- return Complex;
-
- if (c < 0x302A) // U+302A through U+302F Ideographic and Hangul Tone marks
- continue;
- if (c <= 0x302F)
- return Complex;
-
- if (c < 0xA67C) // U+A67C through U+A67D Combining marks for old Cyrillic
- continue;
- if (c <= 0xA67D)
- return Complex;
-
- if (c < 0xA6F0) // U+A6F0 through U+A6F1 Combining mark for Bamum
- continue;
- if (c <= 0xA6F1)
- return Complex;
-
- // U+A800 through U+ABFF Nagri, Phags-pa, Saurashtra, Devanagari Extended,
- // Hangul Jamo Ext. A, Javanese, Myanmar Extended A, Tai Viet, Meetei Mayek,
- if (c < 0xA800)
- continue;
- if (c <= 0xABFF)
- return Complex;
-
- if (c < 0xD7B0) // U+D7B0 through U+D7FF Hangul Jamo Ext. B
- continue;
- if (c <= 0xD7FF)
- return Complex;
-
- if (c <= 0xDBFF) {
- // High surrogate
-
- if (i == len - 1)
- continue;
-
- UChar next = characters[++i];
- if (!U16_IS_TRAIL(next))
- continue;
-
- UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next);
-
- if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Regional Indicator Symbols
- continue;
- if (supplementaryCharacter <= 0x1F1FF)
- return Complex;
-
- if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors.
- continue;
- if (supplementaryCharacter <= 0xE01EF)
- return Complex;
-
- // FIXME: Check for Brahmi (U+11000 block), Kaithi (U+11080 block) and other complex scripts
- // in plane 1 or higher.
-
- continue;
- }
-
- if (c < 0xFE00) // U+FE00 through U+FE0F Unicode variation selectors
- continue;
- if (c <= 0xFE0F)
- return Complex;
-
- if (c < 0xFE20) // U+FE20 through U+FE2F Combining half marks
- continue;
- if (c <= 0xFE2F)
- return Complex;
- }
- return result;
-}
-
-bool Font::isCJKIdeograph(UChar32 c)
-{
- // The basic CJK Unified Ideographs block.
- if (c >= 0x4E00 && c <= 0x9FFF)
- return true;
-
- // CJK Unified Ideographs Extension A.
- if (c >= 0x3400 && c <= 0x4DBF)
- return true;
-
- // CJK Radicals Supplement.
- if (c >= 0x2E80 && c <= 0x2EFF)
- return true;
-
- // Kangxi Radicals.
- if (c >= 0x2F00 && c <= 0x2FDF)
- return true;
-
- // CJK Strokes.
- if (c >= 0x31C0 && c <= 0x31EF)
- return true;
-
- // CJK Compatibility Ideographs.
- if (c >= 0xF900 && c <= 0xFAFF)
- return true;
-
- // CJK Unified Ideographs Extension B.
- if (c >= 0x20000 && c <= 0x2A6DF)
- return true;
-
- // CJK Unified Ideographs Extension C.
- if (c >= 0x2A700 && c <= 0x2B73F)
- return true;
-
- // CJK Unified Ideographs Extension D.
- if (c >= 0x2B740 && c <= 0x2B81F)
- return true;
-
- // CJK Compatibility Ideographs Supplement.
- if (c >= 0x2F800 && c <= 0x2FA1F)
- return true;
-
- return false;
-}
-
-bool Font::isCJKIdeographOrSymbol(UChar32 c)
-{
- // 0x2C7 Caron, Mandarin Chinese 3rd Tone
- // 0x2CA Modifier Letter Acute Accent, Mandarin Chinese 2nd Tone
- // 0x2CB Modifier Letter Grave Access, Mandarin Chinese 4th Tone
- // 0x2D9 Dot Above, Mandarin Chinese 5th Tone
- if ((c == 0x2C7) || (c == 0x2CA) || (c == 0x2CB) || (c == 0x2D9))
- return true;
-
- if ((c == 0x2020) || (c == 0x2021) || (c == 0x2030) || (c == 0x203B) || (c == 0x203C)
- || (c == 0x2042) || (c == 0x2047) || (c == 0x2048) || (c == 0x2049) || (c == 0x2051)
- || (c == 0x20DD) || (c == 0x20DE) || (c == 0x2100) || (c == 0x2103) || (c == 0x2105)
- || (c == 0x2109) || (c == 0x210A) || (c == 0x2113) || (c == 0x2116) || (c == 0x2121)
- || (c == 0x212B) || (c == 0x213B) || (c == 0x2150) || (c == 0x2151) || (c == 0x2152))
- return true;
-
- if (c >= 0x2156 && c <= 0x215A)
- return true;
-
- if (c >= 0x2160 && c <= 0x216B)
- return true;
-
- if (c >= 0x2170 && c <= 0x217B)
- return true;
-
- if ((c == 0x217F) || (c == 0x2189) || (c == 0x2307) || (c == 0x2312) || (c == 0x23BE) || (c == 0x23BF))
- return true;
-
- if (c >= 0x23C0 && c <= 0x23CC)
- return true;
-
- if ((c == 0x23CE) || (c == 0x2423))
- return true;
-
- if (c >= 0x2460 && c <= 0x2492)
- return true;
-
- if (c >= 0x249C && c <= 0x24FF)
- return true;
-
- if ((c == 0x25A0) || (c == 0x25A1) || (c == 0x25A2) || (c == 0x25AA) || (c == 0x25AB))
- return true;
-
- if ((c == 0x25B1) || (c == 0x25B2) || (c == 0x25B3) || (c == 0x25B6) || (c == 0x25B7) || (c == 0x25BC) || (c == 0x25BD))
- return true;
-
- if ((c == 0x25C0) || (c == 0x25C1) || (c == 0x25C6) || (c == 0x25C7) || (c == 0x25C9) || (c == 0x25CB) || (c == 0x25CC))
- return true;
-
- if (c >= 0x25CE && c <= 0x25D3)
- return true;
-
- if (c >= 0x25E2 && c <= 0x25E6)
- return true;
-
- if (c == 0x25EF)
- return true;
-
- if (c >= 0x2600 && c <= 0x2603)
- return true;
-
- if ((c == 0x2605) || (c == 0x2606) || (c == 0x260E) || (c == 0x2616) || (c == 0x2617) || (c == 0x2640) || (c == 0x2642))
- return true;
-
- if (c >= 0x2660 && c <= 0x266F)
- return true;
-
- if (c >= 0x2672 && c <= 0x267D)
- return true;
-
- if ((c == 0x26A0) || (c == 0x26BD) || (c == 0x26BE) || (c == 0x2713) || (c == 0x271A) || (c == 0x273F) || (c == 0x2740) || (c == 0x2756))
- return true;
-
- if (c >= 0x2776 && c <= 0x277F)
- return true;
-
- if (c == 0x2B1A)
- return true;
-
- // Ideographic Description Characters.
- if (c >= 0x2FF0 && c <= 0x2FFF)
- return true;
-
- // CJK Symbols and Punctuation, excluding 0x3030.
- if (c >= 0x3000 && c < 0x3030)
- return true;
-
- if (c > 0x3030 && c <= 0x303F)
- return true;
-
- // Hiragana
- if (c >= 0x3040 && c <= 0x309F)
- return true;
-
- // Katakana
- if (c >= 0x30A0 && c <= 0x30FF)
- return true;
-
- // Bopomofo
- if (c >= 0x3100 && c <= 0x312F)
- return true;
-
- if (c >= 0x3190 && c <= 0x319F)
- return true;
-
- // Bopomofo Extended
- if (c >= 0x31A0 && c <= 0x31BF)
- return true;
-
- // Enclosed CJK Letters and Months.
- if (c >= 0x3200 && c <= 0x32FF)
- return true;
-
- // CJK Compatibility.
- if (c >= 0x3300 && c <= 0x33FF)
- return true;
-
- if (c >= 0xF860 && c <= 0xF862)
- return true;
-
- // CJK Compatibility Forms.
- if (c >= 0xFE30 && c <= 0xFE4F)
- return true;
-
- if ((c == 0xFE10) || (c == 0xFE11) || (c == 0xFE12) || (c == 0xFE19))
- return true;
-
- if ((c == 0xFF0D) || (c == 0xFF1B) || (c == 0xFF1C) || (c == 0xFF1E))
- return false;
-
- // Halfwidth and Fullwidth Forms
- // Usually only used in CJK
- if (c >= 0xFF00 && c <= 0xFFEF)
- return true;
-
- // Emoji.
- if (c == 0x1F100)
- return true;
-
- if (c >= 0x1F110 && c <= 0x1F129)
- return true;
-
- if (c >= 0x1F130 && c <= 0x1F149)
- return true;
-
- if (c >= 0x1F150 && c <= 0x1F169)
- return true;
-
- if (c >= 0x1F170 && c <= 0x1F189)
- return true;
-
- if (c >= 0x1F200 && c <= 0x1F6C5)
- return true;
-
- return isCJKIdeograph(c);
-}
-
-unsigned Font::expansionOpportunityCountInternal(const LChar* characters, size_t length, TextDirection direction, bool& isAfterExpansion)
-{
- unsigned count = 0;
- if (direction == LTR) {
- for (size_t i = 0; i < length; ++i) {
- if (treatAsSpace(characters[i])) {
- count++;
- isAfterExpansion = true;
- } else
- isAfterExpansion = false;
- }
- } else {
- for (size_t i = length; i > 0; --i) {
- if (treatAsSpace(characters[i - 1])) {
- count++;
- isAfterExpansion = true;
- } else
- isAfterExpansion = false;
- }
- }
- return count;
-}
-
-unsigned Font::expansionOpportunityCountInternal(const UChar* characters, size_t length, TextDirection direction, bool& isAfterExpansion)
-{
- static bool expandAroundIdeographs = canExpandAroundIdeographsInComplexText();
- unsigned count = 0;
- if (direction == LTR) {
- for (size_t i = 0; i < length; ++i) {
- UChar32 character = characters[i];
- if (treatAsSpace(character)) {
- count++;
- isAfterExpansion = true;
- continue;
- }
- if (U16_IS_LEAD(character) && i + 1 < length && U16_IS_TRAIL(characters[i + 1])) {
- character = U16_GET_SUPPLEMENTARY(character, characters[i + 1]);
- i++;
- }
- if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
- if (!isAfterExpansion)
- count++;
- count++;
- isAfterExpansion = true;
- continue;
- }
- isAfterExpansion = false;
- }
- } else {
- for (size_t i = length; i > 0; --i) {
- UChar32 character = characters[i - 1];
- if (treatAsSpace(character)) {
- count++;
- isAfterExpansion = true;
- continue;
- }
- if (U16_IS_TRAIL(character) && i > 1 && U16_IS_LEAD(characters[i - 2])) {
- character = U16_GET_SUPPLEMENTARY(characters[i - 2], character);
- i--;
- }
- if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
- if (!isAfterExpansion)
- count++;
- count++;
- isAfterExpansion = true;
- continue;
- }
- isAfterExpansion = false;
- }
- }
- return count;
-}
-
-unsigned Font::expansionOpportunityCount(const StringView& stringView, TextDirection direction, bool& isAfterExpansion)
-{
- if (stringView.is8Bit())
- return expansionOpportunityCountInternal(stringView.characters8(), stringView.length(), direction, isAfterExpansion);
- return expansionOpportunityCountInternal(stringView.characters16(), stringView.length(), direction, isAfterExpansion);
-}
-
-bool Font::canReceiveTextEmphasis(UChar32 c)
-{
- if (U_GET_GC_MASK(c) & (U_GC_Z_MASK | U_GC_CN_MASK | U_GC_CC_MASK | U_GC_CF_MASK))
- return false;
-
- // Additional word-separator characters listed in CSS Text Level 3 Editor's Draft 3 November 2010.
- if (c == ethiopicWordspace || c == aegeanWordSeparatorLine || c == aegeanWordSeparatorDot
- || c == ugariticWordDivider || c == tibetanMarkIntersyllabicTsheg || c == tibetanMarkDelimiterTshegBstar)
- return false;
-
- return true;
-}
-
-bool Font::isLoadingCustomFonts() const
-{
- return m_glyphs && m_glyphs->isLoadingCustomFonts();
-}
-
-GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun& textRun, const GlyphBuffer& glyphBuffer, int index)
-{
- // In general, we want to skip descenders. However, skipping descenders on CJK characters leads to undesirable renderings,
- // so we want to draw through CJK characters (on a character-by-character basis).
- UChar32 baseCharacter;
- unsigned offsetInString = glyphBuffer.offsetInString(index);
-
- if (offsetInString == GlyphBuffer::noOffset) {
- // We have no idea which character spawned this glyph. Bail.
- return GlyphToPathTranslator::GlyphUnderlineType::DrawOverGlyph;
- }
-
- if (textRun.is8Bit())
- baseCharacter = textRun.characters8()[offsetInString];
- else
- U16_NEXT(textRun.characters16(), offsetInString, textRun.length(), baseCharacter);
-
- // u_getIntPropertyValue with UCHAR_IDEOGRAPHIC doesn't return true for Japanese or Korean codepoints.
- // Instead, we can use the "Unicode allocation block" for the character.
- UBlockCode blockCode = ublock_getCode(baseCharacter);
- switch (blockCode) {
- case UBLOCK_CJK_RADICALS_SUPPLEMENT:
- case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:
- case UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS:
- case UBLOCK_CJK_COMPATIBILITY:
- case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A:
- case UBLOCK_CJK_UNIFIED_IDEOGRAPHS:
- case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS:
- case UBLOCK_CJK_COMPATIBILITY_FORMS:
- case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B:
- case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT:
- case UBLOCK_CJK_STROKES:
- case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C:
- case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:
- case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS:
- case UBLOCK_LINEAR_B_IDEOGRAMS:
- case UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT:
- case UBLOCK_HIRAGANA:
- case UBLOCK_KATAKANA:
- case UBLOCK_BOPOMOFO:
- case UBLOCK_BOPOMOFO_EXTENDED:
- case UBLOCK_HANGUL_JAMO:
- case UBLOCK_HANGUL_COMPATIBILITY_JAMO:
- case UBLOCK_HANGUL_SYLLABLES:
- case UBLOCK_HANGUL_JAMO_EXTENDED_A:
- case UBLOCK_HANGUL_JAMO_EXTENDED_B:
- return GlyphToPathTranslator::GlyphUnderlineType::DrawOverGlyph;
- default:
- return GlyphToPathTranslator::GlyphUnderlineType::SkipDescenders;
- }
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/Font.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Font.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/Font.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1,394 +0,0 @@
</span><del>-/*
- * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
- * (C) 2000 Antti Koivisto (koivisto@kde.org)
- * (C) 2000 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Holger Hans Peter Freyther
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef Font_h
-#define Font_h
-
-#include "DashArray.h"
-#include "FontDescription.h"
-#include "FontGlyphs.h"
-#include "Path.h"
-#include "SimpleFontData.h"
-#include "TextDirection.h"
-#include "TypesettingFeatures.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/unicode/CharacterNames.h>
-
-// "X11/X.h" defines Complex to 0 and conflicts
-// with Complex value in CodePath enum.
-#ifdef Complex
-#undef Complex
-#endif
-
-namespace WebCore {
-
-class FloatPoint;
-class FloatRect;
-class FontData;
-class FontMetrics;
-class FontPlatformData;
-class FontSelector;
-class GlyphBuffer;
-class GraphicsContext;
-class LayoutRect;
-class RenderText;
-class TextLayout;
-class TextRun;
-
-struct GlyphData;
-
-struct GlyphOverflow {
- GlyphOverflow()
- : left(0)
- , right(0)
- , top(0)
- , bottom(0)
- , computeBounds(false)
- {
- }
-
- inline bool isEmpty()
- {
- return !left && !right && !top && !bottom;
- }
-
- inline void extendTo(const GlyphOverflow& other)
- {
- left = std::max(left, other.left);
- right = std::max(right, other.right);
- top = std::max(top, other.top);
- bottom = std::max(bottom, other.bottom);
- }
-
- bool operator!=(const GlyphOverflow& other)
- {
- return left != other.left || right != other.right || top != other.top || bottom != other.bottom;
- }
-
- int left;
- int right;
- int top;
- int bottom;
- bool computeBounds;
-};
-
-class GlyphToPathTranslator {
-public:
- enum class GlyphUnderlineType {SkipDescenders, SkipGlyph, DrawOverGlyph};
- virtual bool containsMorePaths() = 0;
- virtual Path path() = 0;
- virtual std::pair<float, float> extents() = 0;
- virtual GlyphUnderlineType underlineType() = 0;
- virtual void advance() = 0;
- virtual ~GlyphToPathTranslator() { }
-};
-GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&, const GlyphBuffer&, int index);
-
-class Font {
-public:
- WEBCORE_EXPORT Font();
- WEBCORE_EXPORT Font(const FontDescription&, float letterSpacing, float wordSpacing);
- // This constructor is only used if the platform wants to start with a native font.
- WEBCORE_EXPORT Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoothing);
-
- // FIXME: We should make this constructor platform-independent.
-#if PLATFORM(IOS)
- Font(const FontPlatformData&, PassRefPtr<FontSelector>);
-#endif
- ~Font();
-
- Font(const Font&);
- WEBCORE_EXPORT Font& operator=(const Font&);
-
- WEBCORE_EXPORT bool operator==(const Font& other) const;
- bool operator!=(const Font& other) const { return !(*this == other); }
-
- const FontDescription& fontDescription() const { return m_fontDescription; }
-
- int pixelSize() const { return fontDescription().computedPixelSize(); }
- float size() const { return fontDescription().computedSize(); }
-
- void update(PassRefPtr<FontSelector>) const;
-
- enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontNotReady };
- WEBCORE_EXPORT float drawText(GraphicsContext*, const TextRun&, const FloatPoint&, int from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const;
- void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&) const;
- void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1) const;
-
- DashArray dashesForIntersectionsWithRect(const TextRun&, const FloatPoint& textOrigin, const FloatRect& lineExtents) const;
-
- WEBCORE_EXPORT float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
- float width(const TextRun&, int& charsConsumed, String& glyphName) const;
-
- PassOwnPtr<TextLayout> createLayout(RenderText*, float xPos, bool collapseWhiteSpace) const;
- static void deleteLayout(TextLayout*);
- static float width(TextLayout&, unsigned from, unsigned len, HashSet<const SimpleFontData*>* fallbackFonts = 0);
-
- int offsetForPosition(const TextRun&, float position, bool includePartialGlyphs) const;
- void adjustSelectionRectForText(const TextRun&, LayoutRect& selectionRect, int from = 0, int to = -1) const;
-
- bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
-
- float wordSpacing() const { return m_wordSpacing; }
- float letterSpacing() const { return m_letterSpacing; }
- void setWordSpacing(float s) { m_wordSpacing = s; }
- void setLetterSpacing(float s) { m_letterSpacing = s; }
- bool isFixedPitch() const;
- bool isPrinterFont() const { return m_fontDescription.usePrinterFont(); }
-
- FontRenderingMode renderingMode() const { return m_fontDescription.renderingMode(); }
-
- TypesettingFeatures typesettingFeatures() const { return static_cast<TypesettingFeatures>(m_typesettingFeatures); }
-
- const AtomicString& firstFamily() const { return m_fontDescription.firstFamily(); }
- unsigned familyCount() const { return m_fontDescription.familyCount(); }
- const AtomicString& familyAt(unsigned i) const { return m_fontDescription.familyAt(i); }
-
- FontItalic italic() const { return m_fontDescription.italic(); }
- FontWeight weight() const { return m_fontDescription.weight(); }
- FontWidthVariant widthVariant() const { return m_fontDescription.widthVariant(); }
-
- bool isPlatformFont() const { return m_glyphs->isForPlatformFont(); }
-
- const FontMetrics& fontMetrics() const { return primaryFontData().fontMetrics(); }
- float spaceWidth() const { return primaryFontData().spaceWidth() + m_letterSpacing; }
- float tabWidth(const SimpleFontData&, unsigned tabSize, float position) const;
- float tabWidth(unsigned tabSize, float position) const { return tabWidth(primaryFontData(), tabSize, position); }
- bool hasValidAverageCharWidth() const;
- bool fastAverageCharWidthIfAvailable(float &width) const; // returns true on success
-
- int emphasisMarkAscent(const AtomicString&) const;
- int emphasisMarkDescent(const AtomicString&) const;
- int emphasisMarkHeight(const AtomicString&) const;
-
- const SimpleFontData& primaryFontData() const;
- const FontRanges& fallbackRangesAt(unsigned) const;
- GlyphData glyphDataForCharacter(UChar32, bool mirror, FontDataVariant = AutoVariant) const;
-
-#if PLATFORM(COCOA)
- const SimpleFontData* fontDataForCombiningCharacterSequence(const UChar*, size_t length, FontDataVariant) const;
-#endif
-
- static bool isCJKIdeograph(UChar32);
- static bool isCJKIdeographOrSymbol(UChar32);
-
- // BEWARE: If isAfterExpansion is true after this function call, then the returned value includes a trailing opportunity
- // which may or may not actually be present. RenderBlockFlow::computeInlineDirectionPositionsForSegment() compensates
- // for this by decrementing the returned value if isAfterExpansion is true at the end of a line.
- static unsigned expansionOpportunityCount(const StringView&, TextDirection, bool& isAfterExpansion);
-
- WEBCORE_EXPORT static void setShouldUseSmoothing(bool);
- WEBCORE_EXPORT static bool shouldUseSmoothing();
-
- enum CodePath { Auto, Simple, Complex, SimpleWithGlyphOverflow };
- CodePath codePath(const TextRun&) const;
- static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simple; }
- static CodePath characterRangeCodePath(const UChar*, unsigned len);
-
- bool primaryFontDataIsSystemFont() const;
-
-private:
- enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis };
-
- // Returns the initial in-stream advance.
- float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
- float drawSimpleText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
- void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
- void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, FloatPoint&) const;
- void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const FloatPoint&) const;
- float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
- int offsetForPositionForSimpleText(const TextRun&, float position, bool includePartialGlyphs) const;
- void adjustSelectionRectForSimpleText(const TextRun&, LayoutRect& selectionRect, int from, int to) const;
-
- bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const;
-
- static bool canReturnFallbackFontsForComplexText();
- static bool canExpandAroundIdeographsInComplexText();
-
- // Returns the initial in-stream advance.
- float getGlyphsAndAdvancesForComplexText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
- float drawComplexText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
- void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
- float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
- int offsetForPositionForComplexText(const TextRun&, float position, bool includePartialGlyphs) const;
- void adjustSelectionRectForComplexText(const TextRun&, LayoutRect& selectionRect, int from, int to) const;
-
- static unsigned expansionOpportunityCountInternal(const LChar*, size_t length, TextDirection, bool& isAfterExpansion);
- static unsigned expansionOpportunityCountInternal(const UChar*, size_t length, TextDirection, bool& isAfterExpansion);
-
- friend struct WidthIterator;
- friend class SVGTextRunRenderingContext;
-
-public:
-#if ENABLE(IOS_TEXT_AUTOSIZING)
- bool equalForTextAutoSizing(const Font& other) const
- {
- return m_fontDescription.equalForTextAutoSizing(other.m_fontDescription)
- && m_letterSpacing == other.m_letterSpacing
- && m_wordSpacing == other.m_wordSpacing;
- }
-#endif
-
- // Useful for debugging the different font rendering code paths.
- WEBCORE_EXPORT static void setCodePath(CodePath);
- static CodePath codePath();
- static CodePath s_codePath;
-
- WEBCORE_EXPORT static void setDefaultTypesettingFeatures(TypesettingFeatures);
- static TypesettingFeatures defaultTypesettingFeatures();
-
- static const uint8_t s_roundingHackCharacterTable[256];
- static bool isRoundingHackCharacter(UChar32 c)
- {
- return !(c & ~0xFF) && s_roundingHackCharacterTable[c];
- }
-
- FontSelector* fontSelector() const;
- static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == noBreakSpace; }
- static bool treatAsZeroWidthSpace(UChar c) { return treatAsZeroWidthSpaceInComplexScript(c) || c == 0x200c || c == 0x200d; }
- static bool treatAsZeroWidthSpaceInComplexScript(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == softHyphen || c == zeroWidthSpace || (c >= 0x200e && c <= 0x200f) || (c >= 0x202a && c <= 0x202e) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter; }
- static bool canReceiveTextEmphasis(UChar32 c);
-
- static inline UChar normalizeSpaces(UChar character)
- {
- if (treatAsSpace(character))
- return space;
-
- if (treatAsZeroWidthSpace(character))
- return zeroWidthSpace;
-
- return character;
- }
-
- static String normalizeSpaces(const LChar*, unsigned length);
- static String normalizeSpaces(const UChar*, unsigned length);
-
- bool useBackslashAsYenSymbol() const { return m_useBackslashAsYenSymbol; }
- FontGlyphs* glyphs() const { return m_glyphs.get(); }
-
-private:
- bool isLoadingCustomFonts() const;
-
- TypesettingFeatures computeTypesettingFeatures() const
- {
- TextRenderingMode textRenderingMode = m_fontDescription.textRenderingMode();
- TypesettingFeatures features = s_defaultTypesettingFeatures;
-
- switch (textRenderingMode) {
- case AutoTextRendering:
- break;
- case OptimizeSpeed:
- features &= ~(Kerning | Ligatures);
- break;
- case GeometricPrecision:
- case OptimizeLegibility:
- features |= Kerning | Ligatures;
- break;
- }
-
- switch (m_fontDescription.kerning()) {
- case FontDescription::NoneKerning:
- features &= ~Kerning;
- break;
- case FontDescription::NormalKerning:
- features |= Kerning;
- break;
- case FontDescription::AutoKerning:
- break;
- }
-
- switch (m_fontDescription.commonLigaturesState()) {
- case FontDescription::DisabledLigaturesState:
- features &= ~Ligatures;
- break;
- case FontDescription::EnabledLigaturesState:
- features |= Ligatures;
- break;
- case FontDescription::NormalLigaturesState:
- break;
- }
-
- return features;
- }
-
- static TypesettingFeatures s_defaultTypesettingFeatures;
-
- FontDescription m_fontDescription;
- mutable RefPtr<FontGlyphs> m_glyphs;
- float m_letterSpacing;
- float m_wordSpacing;
- mutable bool m_useBackslashAsYenSymbol;
- mutable unsigned m_typesettingFeatures : 2; // (TypesettingFeatures) Caches values computed from m_fontDescription.
-};
-
-void invalidateFontGlyphsCache();
-void pruneUnreferencedEntriesFromFontGlyphsCache();
-void clearWidthCaches();
-
-inline Font::~Font()
-{
-}
-
-inline const SimpleFontData& Font::primaryFontData() const
-{
- ASSERT(m_glyphs);
- return m_glyphs->primarySimpleFontData(m_fontDescription);
-}
-
-inline const FontRanges& Font::fallbackRangesAt(unsigned index) const
-{
- ASSERT(m_glyphs);
- return m_glyphs->realizeFallbackRangesAt(m_fontDescription, index);
-}
-
-inline bool Font::isFixedPitch() const
-{
- ASSERT(m_glyphs);
- return m_glyphs->isFixedPitch(m_fontDescription);
-}
-
-inline FontSelector* Font::fontSelector() const
-{
- return m_glyphs ? m_glyphs->fontSelector() : 0;
-}
-
-inline float Font::tabWidth(const SimpleFontData& fontData, unsigned tabSize, float position) const
-{
- if (!tabSize)
- return letterSpacing();
- float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing();
- float tabDeltaWidth = tabWidth - fmodf(position, tabWidth);
- return (tabDeltaWidth < fontData.spaceWidth() / 2) ? tabWidth : tabDeltaWidth;
-}
-
-}
-
-namespace WTF {
-
-template <> void deleteOwnedPtr<WebCore::TextLayout>(WebCore::TextLayout*);
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FontCache.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FontGlyphs.h"
</span><span class="cx"> #include "FontPlatformData.h"
</span><span class="cx"> #include "FontSelector.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCache.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class FontPlatformData;
</span><span class="cx"> class FontSelector;
</span><span class="cx"> class OpenTypeVerticalData;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadecppfromrev178496trunkSourceWebCoreplatformgraphicsFontcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (from rev 178496, trunk/Source/WebCore/platform/graphics/Font.cpp) (0 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -0,0 +1,1142 @@
</span><ins>+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ * (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * (C) 2000 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "FontCascade.h"
+
+#include "FloatRect.h"
+#include "FontCache.h"
+#include "GlyphBuffer.h"
+#include "LayoutRect.h"
+#include "TextRun.h"
+#include "WidthIterator.h"
+#include <wtf/MainThread.h>
+#include <wtf/MathExtras.h>
+#include <wtf/text/AtomicStringHash.h>
+#include <wtf/text/StringBuilder.h>
+
+using namespace WTF;
+using namespace Unicode;
+
+namespace WTF {
+
+// allow compilation of OwnPtr<TextLayout> in source files that don't have access to the TextLayout class definition
+template <> void deleteOwnedPtr<WebCore::TextLayout>(WebCore::TextLayout* ptr)
+{
+ WebCore::FontCascade::deleteLayout(ptr);
+}
+
+}
+
+namespace WebCore {
+
+static Ref<FontGlyphs> retrieveOrAddCachedFontGlyphs(const FontDescription&, PassRefPtr<FontSelector>);
+
+const uint8_t FontCascade::s_roundingHackCharacterTable[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*\t*/, 1 /*\n*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1 /*space*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*-*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 /*?*/,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1 /*no-break space*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static bool isDrawnWithSVGFont(const TextRun& run)
+{
+ return run.renderingContext();
+}
+
+static bool useBackslashAsYenSignForFamily(const AtomicString& family)
+{
+ if (family.isEmpty())
+ return false;
+ static HashSet<AtomicString>* set;
+ if (!set) {
+ set = new HashSet<AtomicString>;
+ set->add("MS PGothic");
+ UChar unicodeNameMSPGothic[] = {0xFF2D, 0xFF33, 0x0020, 0xFF30, 0x30B4, 0x30B7, 0x30C3, 0x30AF};
+ set->add(AtomicString(unicodeNameMSPGothic, WTF_ARRAY_LENGTH(unicodeNameMSPGothic)));
+
+ set->add("MS PMincho");
+ UChar unicodeNameMSPMincho[] = {0xFF2D, 0xFF33, 0x0020, 0xFF30, 0x660E, 0x671D};
+ set->add(AtomicString(unicodeNameMSPMincho, WTF_ARRAY_LENGTH(unicodeNameMSPMincho)));
+
+ set->add("MS Gothic");
+ UChar unicodeNameMSGothic[] = {0xFF2D, 0xFF33, 0x0020, 0x30B4, 0x30B7, 0x30C3, 0x30AF};
+ set->add(AtomicString(unicodeNameMSGothic, WTF_ARRAY_LENGTH(unicodeNameMSGothic)));
+
+ set->add("MS Mincho");
+ UChar unicodeNameMSMincho[] = {0xFF2D, 0xFF33, 0x0020, 0x660E, 0x671D};
+ set->add(AtomicString(unicodeNameMSMincho, WTF_ARRAY_LENGTH(unicodeNameMSMincho)));
+
+ set->add("Meiryo");
+ UChar unicodeNameMeiryo[] = {0x30E1, 0x30A4, 0x30EA, 0x30AA};
+ set->add(AtomicString(unicodeNameMeiryo, WTF_ARRAY_LENGTH(unicodeNameMeiryo)));
+ }
+ return set->contains(family);
+}
+
+FontCascade::CodePath FontCascade::s_codePath = Auto;
+
+TypesettingFeatures FontCascade::s_defaultTypesettingFeatures = 0;
+
+// ============================================================================================
+// FontCascade Implementation (Cross-Platform Portion)
+// ============================================================================================
+
+FontCascade::FontCascade()
+ : m_letterSpacing(0)
+ , m_wordSpacing(0)
+ , m_useBackslashAsYenSymbol(false)
+ , m_typesettingFeatures(0)
+{
+}
+
+FontCascade::FontCascade(const FontDescription& fd, float letterSpacing, float wordSpacing)
+ : m_fontDescription(fd)
+ , m_letterSpacing(letterSpacing)
+ , m_wordSpacing(wordSpacing)
+ , m_useBackslashAsYenSymbol(useBackslashAsYenSignForFamily(fd.firstFamily()))
+ , m_typesettingFeatures(computeTypesettingFeatures())
+{
+}
+
+// FIXME: We should make this constructor platform-independent.
+FontCascade::FontCascade(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode)
+ : m_glyphs(FontGlyphs::createForPlatformFont(fontData))
+ , m_letterSpacing(0)
+ , m_wordSpacing(0)
+ , m_useBackslashAsYenSymbol(false)
+ , m_typesettingFeatures(computeTypesettingFeatures())
+{
+ m_fontDescription.setUsePrinterFont(isPrinterFont);
+ m_fontDescription.setFontSmoothing(fontSmoothingMode);
+#if PLATFORM(IOS)
+ m_fontDescription.setSpecifiedSize(CTFontGetSize(fontData.font()));
+ m_fontDescription.setComputedSize(CTFontGetSize(fontData.font()));
+ m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitItalic);
+ m_fontDescription.setWeight((CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
+#endif
+}
+
+// FIXME: We should make this constructor platform-independent.
+#if PLATFORM(IOS)
+FontCascade::FontCascade(const FontPlatformData& fontData, PassRefPtr<FontSelector> fontSelector)
+ : m_glyphs(FontGlyphs::createForPlatformFont(fontData))
+ , m_letterSpacing(0)
+ , m_wordSpacing(0)
+ , m_typesettingFeatures(computeTypesettingFeatures())
+{
+ CTFontRef primaryFont = fontData.font();
+ m_fontDescription.setSpecifiedSize(CTFontGetSize(primaryFont));
+ m_fontDescription.setComputedSize(CTFontGetSize(primaryFont));
+ m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitItalic);
+ m_fontDescription.setWeight((CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
+ m_fontDescription.setUsePrinterFont(fontData.isPrinterFont());
+ m_glyphs = retrieveOrAddCachedFontGlyphs(m_fontDescription, fontSelector.get());
+}
+#endif
+
+FontCascade::FontCascade(const FontCascade& other)
+ : m_fontDescription(other.m_fontDescription)
+ , m_glyphs(other.m_glyphs)
+ , m_letterSpacing(other.m_letterSpacing)
+ , m_wordSpacing(other.m_wordSpacing)
+ , m_useBackslashAsYenSymbol(other.m_useBackslashAsYenSymbol)
+ , m_typesettingFeatures(computeTypesettingFeatures())
+{
+}
+
+FontCascade& FontCascade::operator=(const FontCascade& other)
+{
+ m_fontDescription = other.m_fontDescription;
+ m_glyphs = other.m_glyphs;
+ m_letterSpacing = other.m_letterSpacing;
+ m_wordSpacing = other.m_wordSpacing;
+ m_useBackslashAsYenSymbol = other.m_useBackslashAsYenSymbol;
+ m_typesettingFeatures = other.m_typesettingFeatures;
+ return *this;
+}
+
+bool FontCascade::operator==(const FontCascade& other) const
+{
+ if (isLoadingCustomFonts() || other.isLoadingCustomFonts())
+ return false;
+
+ if (m_fontDescription != other.m_fontDescription || m_letterSpacing != other.m_letterSpacing || m_wordSpacing != other.m_wordSpacing)
+ return false;
+ if (m_glyphs == other.m_glyphs)
+ return true;
+ if (!m_glyphs || !other.m_glyphs)
+ return false;
+ if (m_glyphs->fontSelector() != other.m_glyphs->fontSelector())
+ return false;
+ // Can these cases actually somehow occur? All fonts should get wiped out by full style recalc.
+ if (m_glyphs->fontSelectorVersion() != other.m_glyphs->fontSelectorVersion())
+ return false;
+ if (m_glyphs->generation() != other.m_glyphs->generation())
+ return false;
+ return true;
+}
+
+struct FontGlyphsCacheKey {
+ // This part of the key is shared with the lower level FontCache (caching FontData objects).
+ FontDescriptionFontDataCacheKey fontDescriptionCacheKey;
+ Vector<AtomicString, 3> families;
+ unsigned fontSelectorId;
+ unsigned fontSelectorVersion;
+ unsigned fontSelectorFlags;
+};
+
+struct FontGlyphsCacheEntry {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ FontGlyphsCacheEntry(FontGlyphsCacheKey&& k, Ref<FontGlyphs>&& g)
+ : key(WTF::move(k))
+ , glyphs(WTF::move(g))
+ { }
+ FontGlyphsCacheKey key;
+ Ref<FontGlyphs> glyphs;
+};
+
+typedef HashMap<unsigned, std::unique_ptr<FontGlyphsCacheEntry>, AlreadyHashed> FontGlyphsCache;
+
+static bool operator==(const FontGlyphsCacheKey& a, const FontGlyphsCacheKey& b)
+{
+ if (a.fontDescriptionCacheKey != b.fontDescriptionCacheKey)
+ return false;
+ if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion || a.fontSelectorFlags != b.fontSelectorFlags)
+ return false;
+ if (a.families.size() != b.families.size())
+ return false;
+ for (unsigned i = 0; i < a.families.size(); ++i) {
+ if (!equalIgnoringCase(a.families[i].impl(), b.families[i].impl()))
+ return false;
+ }
+ return true;
+}
+
+static FontGlyphsCache& fontGlyphsCache()
+{
+ DEPRECATED_DEFINE_STATIC_LOCAL(FontGlyphsCache, cache, ());
+ return cache;
+}
+
+void invalidateFontGlyphsCache()
+{
+ fontGlyphsCache().clear();
+}
+
+void clearWidthCaches()
+{
+ for (auto it = fontGlyphsCache().begin(), end = fontGlyphsCache().end(); it != end; ++it)
+ it->value->glyphs.get().widthCache().clear();
+}
+
+static unsigned makeFontSelectorFlags(const FontDescription& description)
+{
+ return static_cast<unsigned>(description.script()) << 1 | static_cast<unsigned>(description.smallCaps());
+}
+
+static void makeFontGlyphsCacheKey(FontGlyphsCacheKey& key, const FontDescription& description, FontSelector* fontSelector)
+{
+ key.fontDescriptionCacheKey = FontDescriptionFontDataCacheKey(description);
+ for (unsigned i = 0; i < description.familyCount(); ++i)
+ key.families.append(description.familyAt(i));
+ key.fontSelectorId = fontSelector ? fontSelector->uniqueId() : 0;
+ key.fontSelectorVersion = fontSelector ? fontSelector->version() : 0;
+ key.fontSelectorFlags = fontSelector && fontSelector->resolvesFamilyFor(description) ? makeFontSelectorFlags(description) : 0;
+}
+
+static unsigned computeFontGlyphsCacheHash(const FontGlyphsCacheKey& key)
+{
+ Vector<unsigned, 7> hashCodes;
+ hashCodes.reserveInitialCapacity(4 + key.families.size());
+
+ hashCodes.uncheckedAppend(key.fontDescriptionCacheKey.computeHash());
+ hashCodes.uncheckedAppend(key.fontSelectorId);
+ hashCodes.uncheckedAppend(key.fontSelectorVersion);
+ hashCodes.uncheckedAppend(key.fontSelectorFlags);
+ for (unsigned i = 0; i < key.families.size(); ++i)
+ hashCodes.uncheckedAppend(key.families[i].impl() ? CaseFoldingHash::hash(key.families[i]) : 0);
+
+ return StringHasher::hashMemory(hashCodes.data(), hashCodes.size() * sizeof(unsigned));
+}
+
+void pruneUnreferencedEntriesFromFontGlyphsCache()
+{
+ Vector<unsigned, 50> toRemove;
+ FontGlyphsCache::iterator end = fontGlyphsCache().end();
+ for (FontGlyphsCache::iterator it = fontGlyphsCache().begin(); it != end; ++it) {
+ if (it->value->glyphs.get().hasOneRef())
+ toRemove.append(it->key);
+ }
+ for (unsigned i = 0; i < toRemove.size(); ++i)
+ fontGlyphsCache().remove(toRemove[i]);
+}
+
+static Ref<FontGlyphs> retrieveOrAddCachedFontGlyphs(const FontDescription& fontDescription, PassRefPtr<FontSelector> fontSelector)
+{
+ FontGlyphsCacheKey key;
+ makeFontGlyphsCacheKey(key, fontDescription, fontSelector.get());
+
+ unsigned hash = computeFontGlyphsCacheHash(key);
+ FontGlyphsCache::AddResult addResult = fontGlyphsCache().add(hash, std::unique_ptr<FontGlyphsCacheEntry>());
+ if (!addResult.isNewEntry && addResult.iterator->value->key == key)
+ return addResult.iterator->value->glyphs.get();
+
+ std::unique_ptr<FontGlyphsCacheEntry>& newEntry = addResult.iterator->value;
+ newEntry = std::make_unique<FontGlyphsCacheEntry>(WTF::move(key), FontGlyphs::create(fontSelector));
+ Ref<FontGlyphs> glyphs = newEntry->glyphs.get();
+
+ static const unsigned unreferencedPruneInterval = 50;
+ static const int maximumEntries = 400;
+ static unsigned pruneCounter;
+ // Referenced FontGlyphs would exist anyway so pruning them saves little memory.
+ if (!(++pruneCounter % unreferencedPruneInterval))
+ pruneUnreferencedEntriesFromFontGlyphsCache();
+ // Prevent pathological growth.
+ if (fontGlyphsCache().size() > maximumEntries)
+ fontGlyphsCache().remove(fontGlyphsCache().begin());
+ return glyphs;
+}
+
+void FontCascade::update(PassRefPtr<FontSelector> fontSelector) const
+{
+ m_glyphs = retrieveOrAddCachedFontGlyphs(m_fontDescription, fontSelector.get());
+ m_useBackslashAsYenSymbol = useBackslashAsYenSignForFamily(firstFamily());
+ m_typesettingFeatures = computeTypesettingFeatures();
+}
+
+float FontCascade::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
+{
+ // Don't draw anything while we are using custom fonts that are in the process of loading,
+ // except if the 'force' argument is set to true (in which case it will use a fallback
+ // font).
+ if (isLoadingCustomFonts() && customFontNotReadyAction == DoNotPaintIfFontNotReady)
+ return 0;
+
+ to = (to == -1 ? run.length() : to);
+
+ CodePath codePathToUse = codePath(run);
+ // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
+ if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
+ codePathToUse = Complex;
+
+ if (codePathToUse != Complex)
+ return drawSimpleText(context, run, point, from, to);
+
+ return drawComplexText(context, run, point, from, to);
+}
+
+void FontCascade::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
+{
+ if (isLoadingCustomFonts())
+ return;
+
+ if (to < 0)
+ to = run.length();
+
+ CodePath codePathToUse = codePath(run);
+ // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
+ if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
+ codePathToUse = Complex;
+
+ if (codePathToUse != Complex)
+ drawEmphasisMarksForSimpleText(context, run, mark, point, from, to);
+ else
+ drawEmphasisMarksForComplexText(context, run, mark, point, from, to);
+}
+
+float FontCascade::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
+{
+ CodePath codePathToUse = codePath(run);
+ if (codePathToUse != Complex) {
+ // The complex path is more restrictive about returning fallback fonts than the simple path, so we need an explicit test to make their behaviors match.
+ if (!canReturnFallbackFontsForComplexText())
+ fallbackFonts = 0;
+ // The simple path can optimize the case where glyph overflow is not observable.
+ if (codePathToUse != SimpleWithGlyphOverflow && (glyphOverflow && !glyphOverflow->computeBounds))
+ glyphOverflow = 0;
+ }
+
+ bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures);
+ bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
+ float* cacheEntry = m_glyphs->widthCache().add(run, std::numeric_limits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
+ if (cacheEntry && !std::isnan(*cacheEntry))
+ return *cacheEntry;
+
+ HashSet<const SimpleFontData*> localFallbackFonts;
+ if (!fallbackFonts)
+ fallbackFonts = &localFallbackFonts;
+
+ float result;
+ if (codePathToUse == Complex)
+ result = floatWidthForComplexText(run, fallbackFonts, glyphOverflow);
+ else
+ result = floatWidthForSimpleText(run, fallbackFonts, glyphOverflow);
+
+ if (cacheEntry && fallbackFonts->isEmpty())
+ *cacheEntry = result;
+ return result;
+}
+
+float FontCascade::width(const TextRun& run, int& charsConsumed, String& glyphName) const
+{
+#if ENABLE(SVG_FONTS)
+ if (isDrawnWithSVGFont(run))
+ return run.renderingContext()->floatWidthUsingSVGFont(*this, run, charsConsumed, glyphName);
+#endif
+
+ charsConsumed = run.length();
+ glyphName = "";
+ return width(run);
+}
+
+GlyphData FontCascade::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant variant) const
+{
+ if (variant == AutoVariant) {
+ if (m_fontDescription.smallCaps() && !primaryFontData().isSVGFont()) {
+ UChar32 upperC = u_toupper(c);
+ if (upperC != c) {
+ c = upperC;
+ variant = SmallCapsVariant;
+ } else
+ variant = NormalVariant;
+ } else
+ variant = NormalVariant;
+ }
+
+ if (mirror)
+ c = u_charMirror(c);
+
+ return m_glyphs->glyphDataForCharacter(c, m_fontDescription, variant);
+}
+
+#if !PLATFORM(COCOA)
+PassOwnPtr<TextLayout> FontCascade::createLayout(RenderText*, float, bool) const
+{
+ return nullptr;
+}
+
+void FontCascade::deleteLayout(TextLayout*)
+{
+}
+
+float FontCascade::width(TextLayout&, unsigned, unsigned, HashSet<const SimpleFontData*>*)
+{
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+#endif
+
+
+
+static const char* fontFamiliesWithInvalidCharWidth[] = {
+ "American Typewriter",
+ "Arial Hebrew",
+ "Chalkboard",
+ "Cochin",
+ "Corsiva Hebrew",
+ "Courier",
+ "Euphemia UCAS",
+ "Geneva",
+ "Gill Sans",
+ "Hei",
+ "Helvetica",
+ "Hoefler Text",
+ "InaiMathi",
+ "Kai",
+ "Lucida Grande",
+ "Marker Felt",
+ "Monaco",
+ "Mshtakan",
+ "New Peninim MT",
+ "Osaka",
+ "Raanana",
+ "STHeiti",
+ "Symbol",
+ "Times",
+ "Apple Braille",
+ "Apple LiGothic",
+ "Apple LiSung",
+ "Apple Symbols",
+ "AppleGothic",
+ "AppleMyungjo",
+ "#GungSeo",
+ "#HeadLineA",
+ "#PCMyungjo",
+ "#PilGi",
+};
+
+// For font families where any of the fonts don't have a valid entry in the OS/2 table
+// for avgCharWidth, fallback to the legacy webkit behavior of getting the avgCharWidth
+// from the width of a '0'. This only seems to apply to a fixed number of Mac fonts,
+// but, in order to get similar rendering across platforms, we do this check for
+// all platforms.
+bool FontCascade::hasValidAverageCharWidth() const
+{
+ AtomicString family = firstFamily();
+ if (family.isEmpty())
+ return false;
+
+#if PLATFORM(MAC) || PLATFORM(IOS)
+ // Internal fonts on OS X and iOS also have an invalid entry in the table for avgCharWidth.
+ if (primaryFontDataIsSystemFont())
+ return false;
+#endif
+
+ static HashSet<AtomicString>* fontFamiliesWithInvalidCharWidthMap = 0;
+
+ if (!fontFamiliesWithInvalidCharWidthMap) {
+ fontFamiliesWithInvalidCharWidthMap = new HashSet<AtomicString>;
+
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(fontFamiliesWithInvalidCharWidth); ++i)
+ fontFamiliesWithInvalidCharWidthMap->add(AtomicString(fontFamiliesWithInvalidCharWidth[i]));
+ }
+
+ return !fontFamiliesWithInvalidCharWidthMap->contains(family);
+}
+
+bool FontCascade::fastAverageCharWidthIfAvailable(float& width) const
+{
+ bool success = hasValidAverageCharWidth();
+ if (success)
+ width = roundf(primaryFontData().avgCharWidth()); // FIXME: primaryFontData() might not correspond to firstFamily().
+ return success;
+}
+
+void FontCascade::adjustSelectionRectForText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
+{
+ to = (to == -1 ? run.length() : to);
+
+ CodePath codePathToUse = codePath(run);
+ // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
+ if (codePathToUse != Complex && typesettingFeatures() && (from || static_cast<unsigned>(to) != run.length()) && !isDrawnWithSVGFont(run))
+ codePathToUse = Complex;
+
+ if (codePathToUse != Complex)
+ return adjustSelectionRectForSimpleText(run, selectionRect, from, to);
+
+ return adjustSelectionRectForComplexText(run, selectionRect, from, to);
+}
+
+int FontCascade::offsetForPosition(const TextRun& run, float x, bool includePartialGlyphs) const
+{
+ // FIXME: Use the fast code path once it handles partial runs with kerning and ligatures. See http://webkit.org/b/100050
+ if (codePath(run) != Complex && (!typesettingFeatures() || isDrawnWithSVGFont(run)))
+ return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
+
+ return offsetForPositionForComplexText(run, x, includePartialGlyphs);
+}
+
+template <typename CharacterType>
+static inline String normalizeSpacesInternal(const CharacterType* characters, unsigned length)
+{
+ StringBuilder normalized;
+ normalized.reserveCapacity(length);
+
+ for (unsigned i = 0; i < length; ++i)
+ normalized.append(FontCascade::normalizeSpaces(characters[i]));
+
+ return normalized.toString();
+}
+
+String FontCascade::normalizeSpaces(const LChar* characters, unsigned length)
+{
+ return normalizeSpacesInternal(characters, length);
+}
+
+String FontCascade::normalizeSpaces(const UChar* characters, unsigned length)
+{
+ return normalizeSpacesInternal(characters, length);
+}
+
+static bool shouldUseFontSmoothing = true;
+
+void FontCascade::setShouldUseSmoothing(bool shouldUseSmoothing)
+{
+ ASSERT(isMainThread());
+ shouldUseFontSmoothing = shouldUseSmoothing;
+}
+
+bool FontCascade::shouldUseSmoothing()
+{
+ return shouldUseFontSmoothing;
+}
+
+void FontCascade::setCodePath(CodePath p)
+{
+ s_codePath = p;
+}
+
+FontCascade::CodePath FontCascade::codePath()
+{
+ return s_codePath;
+}
+
+void FontCascade::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures)
+{
+ s_defaultTypesettingFeatures = typesettingFeatures;
+}
+
+TypesettingFeatures FontCascade::defaultTypesettingFeatures()
+{
+ return s_defaultTypesettingFeatures;
+}
+
+FontCascade::CodePath FontCascade::codePath(const TextRun& run) const
+{
+ if (s_codePath != Auto)
+ return s_codePath;
+
+#if ENABLE(SVG_FONTS)
+ if (isDrawnWithSVGFont(run))
+ return Simple;
+#endif
+
+ if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings()->size() > 0)
+ return Complex;
+
+ if (run.length() > 1 && !WidthIterator::supportsTypesettingFeatures(*this))
+ return Complex;
+
+ if (!run.characterScanForCodePath())
+ return Simple;
+
+ if (run.is8Bit())
+ return Simple;
+
+ // Start from 0 since drawing and highlighting also measure the characters before run->from.
+ return characterRangeCodePath(run.characters16(), run.length());
+}
+
+FontCascade::CodePath FontCascade::characterRangeCodePath(const UChar* characters, unsigned len)
+{
+ // FIXME: Should use a UnicodeSet in ports where ICU is used. Note that we
+ // can't simply use UnicodeCharacter Property/class because some characters
+ // are not 'combining', but still need to go to the complex path.
+ // Alternatively, we may as well consider binary search over a sorted
+ // list of ranges.
+ CodePath result = Simple;
+ for (unsigned i = 0; i < len; i++) {
+ const UChar c = characters[i];
+ if (c < 0x2E5) // U+02E5 through U+02E9 (Modifier Letters : Tone letters)
+ continue;
+ if (c <= 0x2E9)
+ return Complex;
+
+ if (c < 0x300) // U+0300 through U+036F Combining diacritical marks
+ continue;
+ if (c <= 0x36F)
+ return Complex;
+
+ if (c < 0x0591 || c == 0x05BE) // U+0591 through U+05CF excluding U+05BE Hebrew combining marks, Hebrew punctuation Paseq, Sof Pasuq and Nun Hafukha
+ continue;
+ if (c <= 0x05CF)
+ return Complex;
+
+ // U+0600 through U+109F Arabic, Syriac, Thaana, NKo, Samaritan, Mandaic,
+ // Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada,
+ // Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar
+ if (c < 0x0600)
+ continue;
+ if (c <= 0x109F)
+ return Complex;
+
+ // U+1100 through U+11FF Hangul Jamo (only Ancient Korean should be left here if you precompose;
+ // Modern Korean will be precomposed as a result of step A)
+ if (c < 0x1100)
+ continue;
+ if (c <= 0x11FF)
+ return Complex;
+
+ if (c < 0x135D) // U+135D through U+135F Ethiopic combining marks
+ continue;
+ if (c <= 0x135F)
+ return Complex;
+
+ if (c < 0x1700) // U+1780 through U+18AF Tagalog, Hanunoo, Buhid, Taghanwa,Khmer, Mongolian
+ continue;
+ if (c <= 0x18AF)
+ return Complex;
+
+ if (c < 0x1900) // U+1900 through U+194F Limbu (Unicode 4.0)
+ continue;
+ if (c <= 0x194F)
+ return Complex;
+
+ if (c < 0x1980) // U+1980 through U+19DF New Tai Lue
+ continue;
+ if (c <= 0x19DF)
+ return Complex;
+
+ if (c < 0x1A00) // U+1A00 through U+1CFF Buginese, Tai Tham, Balinese, Batak, Lepcha, Vedic
+ continue;
+ if (c <= 0x1CFF)
+ return Complex;
+
+ if (c < 0x1DC0) // U+1DC0 through U+1DFF Comining diacritical mark supplement
+ continue;
+ if (c <= 0x1DFF)
+ return Complex;
+
+ // U+1E00 through U+2000 characters with diacritics and stacked diacritics
+ if (c <= 0x2000) {
+ result = SimpleWithGlyphOverflow;
+ continue;
+ }
+
+ if (c < 0x20D0) // U+20D0 through U+20FF Combining marks for symbols
+ continue;
+ if (c <= 0x20FF)
+ return Complex;
+
+ if (c < 0x2CEF) // U+2CEF through U+2CF1 Combining marks for Coptic
+ continue;
+ if (c <= 0x2CF1)
+ return Complex;
+
+ if (c < 0x302A) // U+302A through U+302F Ideographic and Hangul Tone marks
+ continue;
+ if (c <= 0x302F)
+ return Complex;
+
+ if (c < 0xA67C) // U+A67C through U+A67D Combining marks for old Cyrillic
+ continue;
+ if (c <= 0xA67D)
+ return Complex;
+
+ if (c < 0xA6F0) // U+A6F0 through U+A6F1 Combining mark for Bamum
+ continue;
+ if (c <= 0xA6F1)
+ return Complex;
+
+ // U+A800 through U+ABFF Nagri, Phags-pa, Saurashtra, Devanagari Extended,
+ // Hangul Jamo Ext. A, Javanese, Myanmar Extended A, Tai Viet, Meetei Mayek,
+ if (c < 0xA800)
+ continue;
+ if (c <= 0xABFF)
+ return Complex;
+
+ if (c < 0xD7B0) // U+D7B0 through U+D7FF Hangul Jamo Ext. B
+ continue;
+ if (c <= 0xD7FF)
+ return Complex;
+
+ if (c <= 0xDBFF) {
+ // High surrogate
+
+ if (i == len - 1)
+ continue;
+
+ UChar next = characters[++i];
+ if (!U16_IS_TRAIL(next))
+ continue;
+
+ UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next);
+
+ if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Regional Indicator Symbols
+ continue;
+ if (supplementaryCharacter <= 0x1F1FF)
+ return Complex;
+
+ if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors.
+ continue;
+ if (supplementaryCharacter <= 0xE01EF)
+ return Complex;
+
+ // FIXME: Check for Brahmi (U+11000 block), Kaithi (U+11080 block) and other complex scripts
+ // in plane 1 or higher.
+
+ continue;
+ }
+
+ if (c < 0xFE00) // U+FE00 through U+FE0F Unicode variation selectors
+ continue;
+ if (c <= 0xFE0F)
+ return Complex;
+
+ if (c < 0xFE20) // U+FE20 through U+FE2F Combining half marks
+ continue;
+ if (c <= 0xFE2F)
+ return Complex;
+ }
+ return result;
+}
+
+bool FontCascade::isCJKIdeograph(UChar32 c)
+{
+ // The basic CJK Unified Ideographs block.
+ if (c >= 0x4E00 && c <= 0x9FFF)
+ return true;
+
+ // CJK Unified Ideographs Extension A.
+ if (c >= 0x3400 && c <= 0x4DBF)
+ return true;
+
+ // CJK Radicals Supplement.
+ if (c >= 0x2E80 && c <= 0x2EFF)
+ return true;
+
+ // Kangxi Radicals.
+ if (c >= 0x2F00 && c <= 0x2FDF)
+ return true;
+
+ // CJK Strokes.
+ if (c >= 0x31C0 && c <= 0x31EF)
+ return true;
+
+ // CJK Compatibility Ideographs.
+ if (c >= 0xF900 && c <= 0xFAFF)
+ return true;
+
+ // CJK Unified Ideographs Extension B.
+ if (c >= 0x20000 && c <= 0x2A6DF)
+ return true;
+
+ // CJK Unified Ideographs Extension C.
+ if (c >= 0x2A700 && c <= 0x2B73F)
+ return true;
+
+ // CJK Unified Ideographs Extension D.
+ if (c >= 0x2B740 && c <= 0x2B81F)
+ return true;
+
+ // CJK Compatibility Ideographs Supplement.
+ if (c >= 0x2F800 && c <= 0x2FA1F)
+ return true;
+
+ return false;
+}
+
+bool FontCascade::isCJKIdeographOrSymbol(UChar32 c)
+{
+ // 0x2C7 Caron, Mandarin Chinese 3rd Tone
+ // 0x2CA Modifier Letter Acute Accent, Mandarin Chinese 2nd Tone
+ // 0x2CB Modifier Letter Grave Access, Mandarin Chinese 4th Tone
+ // 0x2D9 Dot Above, Mandarin Chinese 5th Tone
+ if ((c == 0x2C7) || (c == 0x2CA) || (c == 0x2CB) || (c == 0x2D9))
+ return true;
+
+ if ((c == 0x2020) || (c == 0x2021) || (c == 0x2030) || (c == 0x203B) || (c == 0x203C)
+ || (c == 0x2042) || (c == 0x2047) || (c == 0x2048) || (c == 0x2049) || (c == 0x2051)
+ || (c == 0x20DD) || (c == 0x20DE) || (c == 0x2100) || (c == 0x2103) || (c == 0x2105)
+ || (c == 0x2109) || (c == 0x210A) || (c == 0x2113) || (c == 0x2116) || (c == 0x2121)
+ || (c == 0x212B) || (c == 0x213B) || (c == 0x2150) || (c == 0x2151) || (c == 0x2152))
+ return true;
+
+ if (c >= 0x2156 && c <= 0x215A)
+ return true;
+
+ if (c >= 0x2160 && c <= 0x216B)
+ return true;
+
+ if (c >= 0x2170 && c <= 0x217B)
+ return true;
+
+ if ((c == 0x217F) || (c == 0x2189) || (c == 0x2307) || (c == 0x2312) || (c == 0x23BE) || (c == 0x23BF))
+ return true;
+
+ if (c >= 0x23C0 && c <= 0x23CC)
+ return true;
+
+ if ((c == 0x23CE) || (c == 0x2423))
+ return true;
+
+ if (c >= 0x2460 && c <= 0x2492)
+ return true;
+
+ if (c >= 0x249C && c <= 0x24FF)
+ return true;
+
+ if ((c == 0x25A0) || (c == 0x25A1) || (c == 0x25A2) || (c == 0x25AA) || (c == 0x25AB))
+ return true;
+
+ if ((c == 0x25B1) || (c == 0x25B2) || (c == 0x25B3) || (c == 0x25B6) || (c == 0x25B7) || (c == 0x25BC) || (c == 0x25BD))
+ return true;
+
+ if ((c == 0x25C0) || (c == 0x25C1) || (c == 0x25C6) || (c == 0x25C7) || (c == 0x25C9) || (c == 0x25CB) || (c == 0x25CC))
+ return true;
+
+ if (c >= 0x25CE && c <= 0x25D3)
+ return true;
+
+ if (c >= 0x25E2 && c <= 0x25E6)
+ return true;
+
+ if (c == 0x25EF)
+ return true;
+
+ if (c >= 0x2600 && c <= 0x2603)
+ return true;
+
+ if ((c == 0x2605) || (c == 0x2606) || (c == 0x260E) || (c == 0x2616) || (c == 0x2617) || (c == 0x2640) || (c == 0x2642))
+ return true;
+
+ if (c >= 0x2660 && c <= 0x266F)
+ return true;
+
+ if (c >= 0x2672 && c <= 0x267D)
+ return true;
+
+ if ((c == 0x26A0) || (c == 0x26BD) || (c == 0x26BE) || (c == 0x2713) || (c == 0x271A) || (c == 0x273F) || (c == 0x2740) || (c == 0x2756))
+ return true;
+
+ if (c >= 0x2776 && c <= 0x277F)
+ return true;
+
+ if (c == 0x2B1A)
+ return true;
+
+ // Ideographic Description Characters.
+ if (c >= 0x2FF0 && c <= 0x2FFF)
+ return true;
+
+ // CJK Symbols and Punctuation, excluding 0x3030.
+ if (c >= 0x3000 && c < 0x3030)
+ return true;
+
+ if (c > 0x3030 && c <= 0x303F)
+ return true;
+
+ // Hiragana
+ if (c >= 0x3040 && c <= 0x309F)
+ return true;
+
+ // Katakana
+ if (c >= 0x30A0 && c <= 0x30FF)
+ return true;
+
+ // Bopomofo
+ if (c >= 0x3100 && c <= 0x312F)
+ return true;
+
+ if (c >= 0x3190 && c <= 0x319F)
+ return true;
+
+ // Bopomofo Extended
+ if (c >= 0x31A0 && c <= 0x31BF)
+ return true;
+
+ // Enclosed CJK Letters and Months.
+ if (c >= 0x3200 && c <= 0x32FF)
+ return true;
+
+ // CJK Compatibility.
+ if (c >= 0x3300 && c <= 0x33FF)
+ return true;
+
+ if (c >= 0xF860 && c <= 0xF862)
+ return true;
+
+ // CJK Compatibility Forms.
+ if (c >= 0xFE30 && c <= 0xFE4F)
+ return true;
+
+ if ((c == 0xFE10) || (c == 0xFE11) || (c == 0xFE12) || (c == 0xFE19))
+ return true;
+
+ if ((c == 0xFF0D) || (c == 0xFF1B) || (c == 0xFF1C) || (c == 0xFF1E))
+ return false;
+
+ // Halfwidth and Fullwidth Forms
+ // Usually only used in CJK
+ if (c >= 0xFF00 && c <= 0xFFEF)
+ return true;
+
+ // Emoji.
+ if (c == 0x1F100)
+ return true;
+
+ if (c >= 0x1F110 && c <= 0x1F129)
+ return true;
+
+ if (c >= 0x1F130 && c <= 0x1F149)
+ return true;
+
+ if (c >= 0x1F150 && c <= 0x1F169)
+ return true;
+
+ if (c >= 0x1F170 && c <= 0x1F189)
+ return true;
+
+ if (c >= 0x1F200 && c <= 0x1F6C5)
+ return true;
+
+ return isCJKIdeograph(c);
+}
+
+unsigned FontCascade::expansionOpportunityCountInternal(const LChar* characters, size_t length, TextDirection direction, bool& isAfterExpansion)
+{
+ unsigned count = 0;
+ if (direction == LTR) {
+ for (size_t i = 0; i < length; ++i) {
+ if (treatAsSpace(characters[i])) {
+ count++;
+ isAfterExpansion = true;
+ } else
+ isAfterExpansion = false;
+ }
+ } else {
+ for (size_t i = length; i > 0; --i) {
+ if (treatAsSpace(characters[i - 1])) {
+ count++;
+ isAfterExpansion = true;
+ } else
+ isAfterExpansion = false;
+ }
+ }
+ return count;
+}
+
+unsigned FontCascade::expansionOpportunityCountInternal(const UChar* characters, size_t length, TextDirection direction, bool& isAfterExpansion)
+{
+ static bool expandAroundIdeographs = canExpandAroundIdeographsInComplexText();
+ unsigned count = 0;
+ if (direction == LTR) {
+ for (size_t i = 0; i < length; ++i) {
+ UChar32 character = characters[i];
+ if (treatAsSpace(character)) {
+ count++;
+ isAfterExpansion = true;
+ continue;
+ }
+ if (U16_IS_LEAD(character) && i + 1 < length && U16_IS_TRAIL(characters[i + 1])) {
+ character = U16_GET_SUPPLEMENTARY(character, characters[i + 1]);
+ i++;
+ }
+ if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
+ if (!isAfterExpansion)
+ count++;
+ count++;
+ isAfterExpansion = true;
+ continue;
+ }
+ isAfterExpansion = false;
+ }
+ } else {
+ for (size_t i = length; i > 0; --i) {
+ UChar32 character = characters[i - 1];
+ if (treatAsSpace(character)) {
+ count++;
+ isAfterExpansion = true;
+ continue;
+ }
+ if (U16_IS_TRAIL(character) && i > 1 && U16_IS_LEAD(characters[i - 2])) {
+ character = U16_GET_SUPPLEMENTARY(characters[i - 2], character);
+ i--;
+ }
+ if (expandAroundIdeographs && isCJKIdeographOrSymbol(character)) {
+ if (!isAfterExpansion)
+ count++;
+ count++;
+ isAfterExpansion = true;
+ continue;
+ }
+ isAfterExpansion = false;
+ }
+ }
+ return count;
+}
+
+unsigned FontCascade::expansionOpportunityCount(const StringView& stringView, TextDirection direction, bool& isAfterExpansion)
+{
+ if (stringView.is8Bit())
+ return expansionOpportunityCountInternal(stringView.characters8(), stringView.length(), direction, isAfterExpansion);
+ return expansionOpportunityCountInternal(stringView.characters16(), stringView.length(), direction, isAfterExpansion);
+}
+
+bool FontCascade::canReceiveTextEmphasis(UChar32 c)
+{
+ if (U_GET_GC_MASK(c) & (U_GC_Z_MASK | U_GC_CN_MASK | U_GC_CC_MASK | U_GC_CF_MASK))
+ return false;
+
+ // Additional word-separator characters listed in CSS Text Level 3 Editor's Draft 3 November 2010.
+ if (c == ethiopicWordspace || c == aegeanWordSeparatorLine || c == aegeanWordSeparatorDot
+ || c == ugariticWordDivider || c == tibetanMarkIntersyllabicTsheg || c == tibetanMarkDelimiterTshegBstar)
+ return false;
+
+ return true;
+}
+
+bool FontCascade::isLoadingCustomFonts() const
+{
+ return m_glyphs && m_glyphs->isLoadingCustomFonts();
+}
+
+GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun& textRun, const GlyphBuffer& glyphBuffer, int index)
+{
+ // In general, we want to skip descenders. However, skipping descenders on CJK characters leads to undesirable renderings,
+ // so we want to draw through CJK characters (on a character-by-character basis).
+ UChar32 baseCharacter;
+ unsigned offsetInString = glyphBuffer.offsetInString(index);
+
+ if (offsetInString == GlyphBuffer::noOffset) {
+ // We have no idea which character spawned this glyph. Bail.
+ return GlyphToPathTranslator::GlyphUnderlineType::DrawOverGlyph;
+ }
+
+ if (textRun.is8Bit())
+ baseCharacter = textRun.characters8()[offsetInString];
+ else
+ U16_NEXT(textRun.characters16(), offsetInString, textRun.length(), baseCharacter);
+
+ // u_getIntPropertyValue with UCHAR_IDEOGRAPHIC doesn't return true for Japanese or Korean codepoints.
+ // Instead, we can use the "Unicode allocation block" for the character.
+ UBlockCode blockCode = ublock_getCode(baseCharacter);
+ switch (blockCode) {
+ case UBLOCK_CJK_RADICALS_SUPPLEMENT:
+ case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:
+ case UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS:
+ case UBLOCK_CJK_COMPATIBILITY:
+ case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A:
+ case UBLOCK_CJK_UNIFIED_IDEOGRAPHS:
+ case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS:
+ case UBLOCK_CJK_COMPATIBILITY_FORMS:
+ case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B:
+ case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT:
+ case UBLOCK_CJK_STROKES:
+ case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C:
+ case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:
+ case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS:
+ case UBLOCK_LINEAR_B_IDEOGRAMS:
+ case UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT:
+ case UBLOCK_HIRAGANA:
+ case UBLOCK_KATAKANA:
+ case UBLOCK_BOPOMOFO:
+ case UBLOCK_BOPOMOFO_EXTENDED:
+ case UBLOCK_HANGUL_JAMO:
+ case UBLOCK_HANGUL_COMPATIBILITY_JAMO:
+ case UBLOCK_HANGUL_SYLLABLES:
+ case UBLOCK_HANGUL_JAMO_EXTENDED_A:
+ case UBLOCK_HANGUL_JAMO_EXTENDED_B:
+ return GlyphToPathTranslator::GlyphUnderlineType::DrawOverGlyph;
+ default:
+ return GlyphToPathTranslator::GlyphUnderlineType::SkipDescenders;
+ }
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadehfromrev178496trunkSourceWebCoreplatformgraphicsFonth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/FontCascade.h (from rev 178496, trunk/Source/WebCore/platform/graphics/Font.h) (0 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -0,0 +1,394 @@
</span><ins>+/*
+ * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
+ * (C) 2000 Antti Koivisto (koivisto@kde.org)
+ * (C) 2000 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Holger Hans Peter Freyther
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef FontCascade_h
+#define FontCascade_h
+
+#include "DashArray.h"
+#include "FontDescription.h"
+#include "FontGlyphs.h"
+#include "Path.h"
+#include "SimpleFontData.h"
+#include "TextDirection.h"
+#include "TypesettingFeatures.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/unicode/CharacterNames.h>
+
+// "X11/X.h" defines Complex to 0 and conflicts
+// with Complex value in CodePath enum.
+#ifdef Complex
+#undef Complex
+#endif
+
+namespace WebCore {
+
+class FloatPoint;
+class FloatRect;
+class FontData;
+class FontMetrics;
+class FontPlatformData;
+class FontSelector;
+class GlyphBuffer;
+class GraphicsContext;
+class LayoutRect;
+class RenderText;
+class TextLayout;
+class TextRun;
+
+struct GlyphData;
+
+struct GlyphOverflow {
+ GlyphOverflow()
+ : left(0)
+ , right(0)
+ , top(0)
+ , bottom(0)
+ , computeBounds(false)
+ {
+ }
+
+ inline bool isEmpty()
+ {
+ return !left && !right && !top && !bottom;
+ }
+
+ inline void extendTo(const GlyphOverflow& other)
+ {
+ left = std::max(left, other.left);
+ right = std::max(right, other.right);
+ top = std::max(top, other.top);
+ bottom = std::max(bottom, other.bottom);
+ }
+
+ bool operator!=(const GlyphOverflow& other)
+ {
+ return left != other.left || right != other.right || top != other.top || bottom != other.bottom;
+ }
+
+ int left;
+ int right;
+ int top;
+ int bottom;
+ bool computeBounds;
+};
+
+class GlyphToPathTranslator {
+public:
+ enum class GlyphUnderlineType {SkipDescenders, SkipGlyph, DrawOverGlyph};
+ virtual bool containsMorePaths() = 0;
+ virtual Path path() = 0;
+ virtual std::pair<float, float> extents() = 0;
+ virtual GlyphUnderlineType underlineType() = 0;
+ virtual void advance() = 0;
+ virtual ~GlyphToPathTranslator() { }
+};
+GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&, const GlyphBuffer&, int index);
+
+class FontCascade {
+public:
+ WEBCORE_EXPORT FontCascade();
+ WEBCORE_EXPORT FontCascade(const FontDescription&, float letterSpacing, float wordSpacing);
+ // This constructor is only used if the platform wants to start with a native font.
+ WEBCORE_EXPORT FontCascade(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoothing);
+
+ // FIXME: We should make this constructor platform-independent.
+#if PLATFORM(IOS)
+ FontCascade(const FontPlatformData&, PassRefPtr<FontSelector>);
+#endif
+ ~FontCascade();
+
+ FontCascade(const FontCascade&);
+ WEBCORE_EXPORT FontCascade& operator=(const FontCascade&);
+
+ WEBCORE_EXPORT bool operator==(const FontCascade& other) const;
+ bool operator!=(const FontCascade& other) const { return !(*this == other); }
+
+ const FontDescription& fontDescription() const { return m_fontDescription; }
+
+ int pixelSize() const { return fontDescription().computedPixelSize(); }
+ float size() const { return fontDescription().computedSize(); }
+
+ void update(PassRefPtr<FontSelector>) const;
+
+ enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontNotReady };
+ WEBCORE_EXPORT float drawText(GraphicsContext*, const TextRun&, const FloatPoint&, int from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const;
+ void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&) const;
+ void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1) const;
+
+ DashArray dashesForIntersectionsWithRect(const TextRun&, const FloatPoint& textOrigin, const FloatRect& lineExtents) const;
+
+ WEBCORE_EXPORT float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
+ float width(const TextRun&, int& charsConsumed, String& glyphName) const;
+
+ PassOwnPtr<TextLayout> createLayout(RenderText*, float xPos, bool collapseWhiteSpace) const;
+ static void deleteLayout(TextLayout*);
+ static float width(TextLayout&, unsigned from, unsigned len, HashSet<const SimpleFontData*>* fallbackFonts = 0);
+
+ int offsetForPosition(const TextRun&, float position, bool includePartialGlyphs) const;
+ void adjustSelectionRectForText(const TextRun&, LayoutRect& selectionRect, int from = 0, int to = -1) const;
+
+ bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
+
+ float wordSpacing() const { return m_wordSpacing; }
+ float letterSpacing() const { return m_letterSpacing; }
+ void setWordSpacing(float s) { m_wordSpacing = s; }
+ void setLetterSpacing(float s) { m_letterSpacing = s; }
+ bool isFixedPitch() const;
+ bool isPrinterFont() const { return m_fontDescription.usePrinterFont(); }
+
+ FontRenderingMode renderingMode() const { return m_fontDescription.renderingMode(); }
+
+ TypesettingFeatures typesettingFeatures() const { return static_cast<TypesettingFeatures>(m_typesettingFeatures); }
+
+ const AtomicString& firstFamily() const { return m_fontDescription.firstFamily(); }
+ unsigned familyCount() const { return m_fontDescription.familyCount(); }
+ const AtomicString& familyAt(unsigned i) const { return m_fontDescription.familyAt(i); }
+
+ FontItalic italic() const { return m_fontDescription.italic(); }
+ FontWeight weight() const { return m_fontDescription.weight(); }
+ FontWidthVariant widthVariant() const { return m_fontDescription.widthVariant(); }
+
+ bool isPlatformFont() const { return m_glyphs->isForPlatformFont(); }
+
+ const FontMetrics& fontMetrics() const { return primaryFontData().fontMetrics(); }
+ float spaceWidth() const { return primaryFontData().spaceWidth() + m_letterSpacing; }
+ float tabWidth(const SimpleFontData&, unsigned tabSize, float position) const;
+ float tabWidth(unsigned tabSize, float position) const { return tabWidth(primaryFontData(), tabSize, position); }
+ bool hasValidAverageCharWidth() const;
+ bool fastAverageCharWidthIfAvailable(float &width) const; // returns true on success
+
+ int emphasisMarkAscent(const AtomicString&) const;
+ int emphasisMarkDescent(const AtomicString&) const;
+ int emphasisMarkHeight(const AtomicString&) const;
+
+ const SimpleFontData& primaryFontData() const;
+ const FontRanges& fallbackRangesAt(unsigned) const;
+ GlyphData glyphDataForCharacter(UChar32, bool mirror, FontDataVariant = AutoVariant) const;
+
+#if PLATFORM(COCOA)
+ const SimpleFontData* fontDataForCombiningCharacterSequence(const UChar*, size_t length, FontDataVariant) const;
+#endif
+
+ static bool isCJKIdeograph(UChar32);
+ static bool isCJKIdeographOrSymbol(UChar32);
+
+ // BEWARE: If isAfterExpansion is true after this function call, then the returned value includes a trailing opportunity
+ // which may or may not actually be present. RenderBlockFlow::computeInlineDirectionPositionsForSegment() compensates
+ // for this by decrementing the returned value if isAfterExpansion is true at the end of a line.
+ static unsigned expansionOpportunityCount(const StringView&, TextDirection, bool& isAfterExpansion);
+
+ WEBCORE_EXPORT static void setShouldUseSmoothing(bool);
+ WEBCORE_EXPORT static bool shouldUseSmoothing();
+
+ enum CodePath { Auto, Simple, Complex, SimpleWithGlyphOverflow };
+ CodePath codePath(const TextRun&) const;
+ static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simple; }
+ static CodePath characterRangeCodePath(const UChar*, unsigned len);
+
+ bool primaryFontDataIsSystemFont() const;
+
+private:
+ enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis };
+
+ // Returns the initial in-stream advance.
+ float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
+ float drawSimpleText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
+ void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
+ void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, FloatPoint&) const;
+ void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const FloatPoint&) const;
+ float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
+ int offsetForPositionForSimpleText(const TextRun&, float position, bool includePartialGlyphs) const;
+ void adjustSelectionRectForSimpleText(const TextRun&, LayoutRect& selectionRect, int from, int to) const;
+
+ bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const;
+
+ static bool canReturnFallbackFontsForComplexText();
+ static bool canExpandAroundIdeographsInComplexText();
+
+ // Returns the initial in-stream advance.
+ float getGlyphsAndAdvancesForComplexText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
+ float drawComplexText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
+ void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
+ float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
+ int offsetForPositionForComplexText(const TextRun&, float position, bool includePartialGlyphs) const;
+ void adjustSelectionRectForComplexText(const TextRun&, LayoutRect& selectionRect, int from, int to) const;
+
+ static unsigned expansionOpportunityCountInternal(const LChar*, size_t length, TextDirection, bool& isAfterExpansion);
+ static unsigned expansionOpportunityCountInternal(const UChar*, size_t length, TextDirection, bool& isAfterExpansion);
+
+ friend struct WidthIterator;
+ friend class SVGTextRunRenderingContext;
+
+public:
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+ bool equalForTextAutoSizing(const FontCascade& other) const
+ {
+ return m_fontDescription.equalForTextAutoSizing(other.m_fontDescription)
+ && m_letterSpacing == other.m_letterSpacing
+ && m_wordSpacing == other.m_wordSpacing;
+ }
+#endif
+
+ // Useful for debugging the different font rendering code paths.
+ WEBCORE_EXPORT static void setCodePath(CodePath);
+ static CodePath codePath();
+ static CodePath s_codePath;
+
+ WEBCORE_EXPORT static void setDefaultTypesettingFeatures(TypesettingFeatures);
+ static TypesettingFeatures defaultTypesettingFeatures();
+
+ static const uint8_t s_roundingHackCharacterTable[256];
+ static bool isRoundingHackCharacter(UChar32 c)
+ {
+ return !(c & ~0xFF) && s_roundingHackCharacterTable[c];
+ }
+
+ FontSelector* fontSelector() const;
+ static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == noBreakSpace; }
+ static bool treatAsZeroWidthSpace(UChar c) { return treatAsZeroWidthSpaceInComplexScript(c) || c == 0x200c || c == 0x200d; }
+ static bool treatAsZeroWidthSpaceInComplexScript(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == softHyphen || c == zeroWidthSpace || (c >= 0x200e && c <= 0x200f) || (c >= 0x202a && c <= 0x202e) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter; }
+ static bool canReceiveTextEmphasis(UChar32);
+
+ static inline UChar normalizeSpaces(UChar character)
+ {
+ if (treatAsSpace(character))
+ return space;
+
+ if (treatAsZeroWidthSpace(character))
+ return zeroWidthSpace;
+
+ return character;
+ }
+
+ static String normalizeSpaces(const LChar*, unsigned length);
+ static String normalizeSpaces(const UChar*, unsigned length);
+
+ bool useBackslashAsYenSymbol() const { return m_useBackslashAsYenSymbol; }
+ FontGlyphs* glyphs() const { return m_glyphs.get(); }
+
+private:
+ bool isLoadingCustomFonts() const;
+
+ TypesettingFeatures computeTypesettingFeatures() const
+ {
+ TextRenderingMode textRenderingMode = m_fontDescription.textRenderingMode();
+ TypesettingFeatures features = s_defaultTypesettingFeatures;
+
+ switch (textRenderingMode) {
+ case AutoTextRendering:
+ break;
+ case OptimizeSpeed:
+ features &= ~(Kerning | Ligatures);
+ break;
+ case GeometricPrecision:
+ case OptimizeLegibility:
+ features |= Kerning | Ligatures;
+ break;
+ }
+
+ switch (m_fontDescription.kerning()) {
+ case FontDescription::NoneKerning:
+ features &= ~Kerning;
+ break;
+ case FontDescription::NormalKerning:
+ features |= Kerning;
+ break;
+ case FontDescription::AutoKerning:
+ break;
+ }
+
+ switch (m_fontDescription.commonLigaturesState()) {
+ case FontDescription::DisabledLigaturesState:
+ features &= ~Ligatures;
+ break;
+ case FontDescription::EnabledLigaturesState:
+ features |= Ligatures;
+ break;
+ case FontDescription::NormalLigaturesState:
+ break;
+ }
+
+ return features;
+ }
+
+ static TypesettingFeatures s_defaultTypesettingFeatures;
+
+ FontDescription m_fontDescription;
+ mutable RefPtr<FontGlyphs> m_glyphs;
+ float m_letterSpacing;
+ float m_wordSpacing;
+ mutable bool m_useBackslashAsYenSymbol;
+ mutable unsigned m_typesettingFeatures : 2; // (TypesettingFeatures) Caches values computed from m_fontDescription.
+};
+
+void invalidateFontGlyphsCache();
+void pruneUnreferencedEntriesFromFontGlyphsCache();
+void clearWidthCaches();
+
+inline FontCascade::~FontCascade()
+{
+}
+
+inline const SimpleFontData& FontCascade::primaryFontData() const
+{
+ ASSERT(m_glyphs);
+ return m_glyphs->primarySimpleFontData(m_fontDescription);
+}
+
+inline const FontRanges& FontCascade::fallbackRangesAt(unsigned index) const
+{
+ ASSERT(m_glyphs);
+ return m_glyphs->realizeFallbackRangesAt(m_fontDescription, index);
+}
+
+inline bool FontCascade::isFixedPitch() const
+{
+ ASSERT(m_glyphs);
+ return m_glyphs->isFixedPitch(m_fontDescription);
+}
+
+inline FontSelector* FontCascade::fontSelector() const
+{
+ return m_glyphs ? m_glyphs->fontSelector() : 0;
+}
+
+inline float FontCascade::tabWidth(const SimpleFontData& fontData, unsigned tabSize, float position) const
+{
+ if (!tabSize)
+ return letterSpacing();
+ float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing();
+ float tabDeltaWidth = tabWidth - fmodf(position, tabWidth);
+ return (tabDeltaWidth < fontData.spaceWidth() / 2) ? tabWidth : tabDeltaWidth;
+}
+
+}
+
+namespace WTF {
+
+template <> void deleteOwnedPtr<WebCore::TextLayout>(WebCore::TextLayout*);
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontFastPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontFastPath.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontFastPath.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/FontFastPath.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "FloatRect.h"
</span><span class="cx"> #include "FontGlyphs.h"
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: This function may not work if the emphasis mark uses a complex script, but none of the
</span><span class="cx"> // standard emphasis marks do so.
</span><del>-bool Font::getEmphasisMarkGlyphData(const AtomicString& mark, GlyphData& glyphData) const
</del><ins>+bool FontCascade::getEmphasisMarkGlyphData(const AtomicString& mark, GlyphData& glyphData) const
</ins><span class="cx"> {
</span><span class="cx"> if (mark.isEmpty())
</span><span class="cx"> return false;
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::emphasisMarkAscent(const AtomicString& mark) const
</del><ins>+int FontCascade::emphasisMarkAscent(const AtomicString& mark) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphData markGlyphData;
</span><span class="cx"> if (!getEmphasisMarkGlyphData(mark, markGlyphData))
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> return markFontData->fontMetrics().ascent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::emphasisMarkDescent(const AtomicString& mark) const
</del><ins>+int FontCascade::emphasisMarkDescent(const AtomicString& mark) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphData markGlyphData;
</span><span class="cx"> if (!getEmphasisMarkGlyphData(mark, markGlyphData))
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> return markFontData->fontMetrics().descent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::emphasisMarkHeight(const AtomicString& mark) const
</del><ins>+int FontCascade::emphasisMarkHeight(const AtomicString& mark) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphData markGlyphData;
</span><span class="cx"> if (!getEmphasisMarkGlyphData(mark, markGlyphData))
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> return markFontData->fontMetrics().height();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::getGlyphsAndAdvancesForSimpleText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float FontCascade::getGlyphsAndAdvancesForSimpleText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx"> float initialAdvance;
</span><span class="cx">
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> return initialAdvance;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::drawSimpleText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</del><ins>+float FontCascade::drawSimpleText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> // This glyph buffer holds our glyphs+advances+font data for each glyph.
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx"> return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</del><ins>+void FontCascade::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> float initialAdvance = getGlyphsAndAdvancesForSimpleText(run, from, to, glyphBuffer, ForTextEmphasis);
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx"> drawEmphasisMarks(context, run, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawGlyphBuffer(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, FloatPoint& point) const
</del><ins>+void FontCascade::drawGlyphBuffer(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, FloatPoint& point) const
</ins><span class="cx"> {
</span><span class="cx"> #if !ENABLE(SVG_FONTS)
</span><span class="cx"> UNUSED_PARAM(run);
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx"> return offsetToMiddleOfGlyph(glyphBuffer.fontDataAt(i), glyphBuffer.glyphAt(i));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const AtomicString& mark, const FloatPoint& point) const
</del><ins>+void FontCascade::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const AtomicString& mark, const FloatPoint& point) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphData markGlyphData;
</span><span class="cx"> if (!getEmphasisMarkGlyphData(mark, markGlyphData))
</span><span class="lines">@@ -260,7 +260,7 @@
</span><span class="cx"> drawGlyphBuffer(context, run, markBuffer, startPoint);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</del><ins>+float FontCascade::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</ins><span class="cx"> {
</span><span class="cx"> WidthIterator it(this, run, fallbackFonts, glyphOverflow);
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx"> return it.m_runWidthSoFar;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::adjustSelectionRectForSimpleText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</del><ins>+void FontCascade::adjustSelectionRectForSimpleText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> WidthIterator it(this, run);
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx"> selectionRect.setWidth(afterWidth - beforeWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::offsetForPositionForSimpleText(const TextRun& run, float x, bool includePartialGlyphs) const
</del><ins>+int FontCascade::offsetForPositionForSimpleText(const TextRun& run, float x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx"> float delta = x;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontGlyphscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FontGlyphs.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GlyphPage.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> if (!systemFallbackFontData)
</span><span class="cx"> return GlyphData();
</span><span class="cx">
</span><del>- if (systemFallbackFontData->platformData().orientation() == Vertical && !systemFallbackFontData->hasVerticalGlyphs() && Font::isCJKIdeographOrSymbol(c))
</del><ins>+ if (systemFallbackFontData->platformData().orientation() == Vertical && !systemFallbackFontData->hasVerticalGlyphs() && FontCascade::isCJKIdeographOrSymbol(c))
</ins><span class="cx"> variant = BrokenIdeographVariant;
</span><span class="cx">
</span><span class="cx"> GlyphData fallbackGlyphData;
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx"> fallbackGlyphData = systemFallbackFontData->variantFontData(description, variant)->glyphDataForCharacter(c);
</span><span class="cx">
</span><span class="cx"> if (variant == NormalVariant && fallbackGlyphData.fontData) {
</span><del>- if (!Font::isCJKIdeographOrSymbol(c) && fallbackGlyphData.fontData->platformData().orientation() == Vertical && !fallbackGlyphData.fontData->isTextOrientationFallback())
</del><ins>+ if (!FontCascade::isCJKIdeographOrSymbol(c) && fallbackGlyphData.fontData->platformData().orientation() == Vertical && !fallbackGlyphData.fontData->isTextOrientationFallback())
</ins><span class="cx"> fallbackGlyphData = glyphDataForNonCJKCharacterWithGlyphOrientation(c, description.nonCJKGlyphOrientation(), fallbackGlyphData);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx"> GlyphData data = page->glyphDataForCharacter(c);
</span><span class="cx"> if (data.fontData) {
</span><span class="cx"> if (data.fontData->platformData().orientation() == Vertical && !data.fontData->isTextOrientationFallback()) {
</span><del>- if (!Font::isCJKIdeographOrSymbol(c))
</del><ins>+ if (!FontCascade::isCJKIdeographOrSymbol(c))
</ins><span class="cx"> return glyphDataForNonCJKCharacterWithGlyphOrientation(c, description.nonCJKGlyphOrientation(), data);
</span><span class="cx">
</span><span class="cx"> if (!data.fontData->hasVerticalGlyphs()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -430,7 +430,7 @@
</span><span class="cx"> // the width of the drawn text. Ensure that there aren't noticeable differences in layout.
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> #if !USE(WINGDI)
</span><del>-void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
</del><ins>+void GraphicsContext::drawText(const FontCascade& font, const TextRun& run, const FloatPoint& point, int from, int to)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -439,7 +439,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> #else
</span><del>-float GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
</del><ins>+float GraphicsContext::drawText(const FontCascade& font, const TextRun& run, const FloatPoint& point, int from, int to)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return 0;
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx">
</span><del>-void GraphicsContext::drawGlyphs(const Font& font, const SimpleFontData& fontData, const GlyphBuffer& buffer, int from, int numGlyphs, const FloatPoint& point)
</del><ins>+void GraphicsContext::drawGlyphs(const FontCascade& font, const SimpleFontData& fontData, const GlyphBuffer& buffer, int from, int numGlyphs, const FloatPoint& point)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> font.drawGlyphs(this, &fontData, buffer, from, numGlyphs, point);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawEmphasisMarks(const Font& font, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to)
</del><ins>+void GraphicsContext::drawEmphasisMarks(const FontCascade& font, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -465,12 +465,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: Better merge the iOS and non-iOS differences. In particular, make this method use the
</span><del>-// returned width of the drawn text, Font::drawText(), instead of computing it. Ensure that there
</del><ins>+// returned width of the drawn text, FontCascade::drawText(), instead of computing it. Ensure that there
</ins><span class="cx"> // aren't noticeable differences in layout with such a change.
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const FloatPoint& point, Font::CustomFontNotReadyAction customFontNotReadyAction)
</del><ins>+void GraphicsContext::drawBidiText(const FontCascade& font, const TextRun& run, const FloatPoint& point, FontCascade::CustomFontNotReadyAction customFontNotReadyAction)
</ins><span class="cx"> #else
</span><del>-float GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const FloatPoint& point, Font::CustomFontNotReadyAction customFontNotReadyAction, BidiStatus* status, int length)
</del><ins>+float GraphicsContext::drawBidiText(const FontCascade& font, const TextRun& run, const FloatPoint& point, FontCascade::CustomFontNotReadyAction customFontNotReadyAction, BidiStatus* status, int length)
</ins><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="lines">@@ -515,7 +515,7 @@
</span><span class="cx"> font.drawText(this, subrun, currPoint, 0, -1, customFontNotReadyAction);
</span><span class="cx">
</span><span class="cx"> bidiRun = bidiRun->next();
</span><del>- // FIXME: Have Font::drawText return the width of what it drew so that we don't have to re-measure here.
</del><ins>+ // FIXME: Have FontCascade::drawText return the width of what it drew so that we don't have to re-measure here.
</ins><span class="cx"> if (bidiRun)
</span><span class="cx"> currPoint.move(font.width(subrun), 0);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "ColorSpace.h"
</span><span class="cx"> #include "DashArray.h"
</span><span class="cx"> #include "FloatRect.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Gradient.h"
</span><span class="cx"> #include "Image.h"
</span><span class="cx"> #include "ImageOrientation.h"
</span><span class="lines">@@ -356,16 +356,16 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- void drawText(const Font&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
</del><ins>+ void drawText(const FontCascade&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
</ins><span class="cx"> #else
</span><del>- float drawText(const Font&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
</del><ins>+ float drawText(const FontCascade&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
</ins><span class="cx"> #endif
</span><del>- void drawGlyphs(const Font&, const SimpleFontData&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
- void drawEmphasisMarks(const Font&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1);
</del><ins>+ void drawGlyphs(const FontCascade&, const SimpleFontData&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
+ void drawEmphasisMarks(const FontCascade&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1);
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><del>- void drawBidiText(const Font&, const TextRun&, const FloatPoint&, Font::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady);
</del><ins>+ void drawBidiText(const FontCascade&, const TextRun&, const FloatPoint&, FontCascade::CustomFontNotReadyAction = FontCascade::DoNotPaintIfFontNotReady);
</ins><span class="cx"> #else
</span><del>- WEBCORE_EXPORT float drawBidiText(const Font&, const TextRun&, const FloatPoint&, Font::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady, BidiStatus* = 0, int length = -1);
</del><ins>+ WEBCORE_EXPORT float drawBidiText(const FontCascade&, const TextRun&, const FloatPoint&, FontCascade::CustomFontNotReadyAction = FontCascade::DoNotPaintIfFontNotReady, BidiStatus* = 0, int length = -1);
</ins><span class="cx"> #endif
</span><span class="cx"> enum RoundingMode {
</span><span class="cx"> RoundAllSides,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSimpleFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
</span><span class="cx"> #include "CoreTextSPI.h"
</span><span class="cx"> #endif
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "OpenTypeMathData.h"
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx"> UChar codeUnits[2];
</span><span class="cx"> int codeUnitsLength;
</span><span class="cx"> if (U_IS_BMP(character)) {
</span><del>- codeUnits[0] = Font::normalizeSpaces(character);
</del><ins>+ codeUnits[0] = FontCascade::normalizeSpaces(character);
</ins><span class="cx"> codeUnitsLength = 1;
</span><span class="cx"> } else {
</span><span class="cx"> codeUnits[0] = U16_LEAD(character);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsStringTruncatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/StringTruncator.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/StringTruncator.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/StringTruncator.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "StringTruncator.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "TextBreakIterator.h"
</span><span class="cx"> #include "TextRun.h"
</span><span class="cx"> #include <wtf/Assertions.h>
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> return length - adjustedStartIndex;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static float stringWidth(const Font& renderer, const UChar* characters, unsigned length, bool disableRoundingHacks)
</del><ins>+static float stringWidth(const FontCascade& renderer, const UChar* characters, unsigned length, bool disableRoundingHacks)
</ins><span class="cx"> {
</span><span class="cx"> TextRun run(characters, length);
</span><span class="cx"> if (disableRoundingHacks)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> return renderer.width(run);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static String truncateString(const String& string, float maxWidth, const Font& font, TruncationFunction truncateToBuffer, bool disableRoundingHacks, float* resultWidth = nullptr, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0, bool alwaysTruncate = false)
</del><ins>+static String truncateString(const String& string, float maxWidth, const FontCascade& font, TruncationFunction truncateToBuffer, bool disableRoundingHacks, float* resultWidth = nullptr, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0, bool alwaysTruncate = false)
</ins><span class="cx"> {
</span><span class="cx"> if (string.isEmpty())
</span><span class="cx"> return string;
</span><span class="lines">@@ -295,42 +295,42 @@
</span><span class="cx"> return String(stringBuffer, truncatedLength);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::centerTruncate(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks)
</del><ins>+String StringTruncator::centerTruncate(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, centerTruncateToBuffer, !enableRoundingHacks);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::rightTruncate(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks)
</del><ins>+String StringTruncator::rightTruncate(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, rightTruncateToBuffer, !enableRoundingHacks);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float StringTruncator::width(const String& string, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks)
</del><ins>+float StringTruncator::width(const String& string, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks)
</ins><span class="cx"> {
</span><span class="cx"> return stringWidth(font, StringView(string).upconvertedCharacters(), string.length(), !enableRoundingHacks);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::centerTruncate(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</del><ins>+String StringTruncator::centerTruncate(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, centerTruncateToBuffer, !enableRoundingHacks, &resultWidth, shouldInsertEllipsis, customTruncationElementWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::rightTruncate(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</del><ins>+String StringTruncator::rightTruncate(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, rightTruncateToBuffer, !enableRoundingHacks, &resultWidth, shouldInsertEllipsis, customTruncationElementWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::leftTruncate(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</del><ins>+String StringTruncator::leftTruncate(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, leftTruncateToBuffer, !enableRoundingHacks, &resultWidth, shouldInsertEllipsis, customTruncationElementWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::rightClipToCharacter(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</del><ins>+String StringTruncator::rightClipToCharacter(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, rightClipToCharacterBuffer, !enableRoundingHacks, &resultWidth, shouldInsertEllipsis, customTruncationElementWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String StringTruncator::rightClipToWord(const String& string, float maxWidth, const Font& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth, bool alwaysTruncate)
</del><ins>+String StringTruncator::rightClipToWord(const String& string, float maxWidth, const FontCascade& font, EnableRoundingHacksOrNot enableRoundingHacks, float& resultWidth, bool shouldInsertEllipsis, float customTruncationElementWidth, bool alwaysTruncate)
</ins><span class="cx"> {
</span><span class="cx"> return truncateString(string, maxWidth, font, rightClipToWordBuffer, !enableRoundingHacks, &resultWidth, shouldInsertEllipsis, customTruncationElementWidth, alwaysTruncate);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsStringTruncatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/StringTruncator.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/StringTruncator.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/StringTruncator.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,23 +33,23 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>- class Font;
-
- class StringTruncator {
- public:
- enum EnableRoundingHacksOrNot { DisableRoundingHacks, EnableRoundingHacks };
</del><ins>+class FontCascade;
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT static String centerTruncate(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot = DisableRoundingHacks);
- WEBCORE_EXPORT static String rightTruncate(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot = DisableRoundingHacks);
</del><ins>+class StringTruncator {
+public:
+ enum EnableRoundingHacksOrNot { DisableRoundingHacks, EnableRoundingHacks };
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT static String centerTruncate(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
- WEBCORE_EXPORT static String rightTruncate(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
- WEBCORE_EXPORT static String leftTruncate(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
- WEBCORE_EXPORT static String rightClipToCharacter(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
- WEBCORE_EXPORT static String rightClipToWord(const String&, float maxWidth, const Font&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0, bool alwaysTruncate = false);
</del><ins>+ WEBCORE_EXPORT static String centerTruncate(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot = DisableRoundingHacks);
+ WEBCORE_EXPORT static String rightTruncate(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot = DisableRoundingHacks);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT static float width(const String&, const Font&, EnableRoundingHacksOrNot = DisableRoundingHacks);
- };
</del><ins>+ WEBCORE_EXPORT static String centerTruncate(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
+ WEBCORE_EXPORT static String rightTruncate(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
+ WEBCORE_EXPORT static String leftTruncate(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
+ WEBCORE_EXPORT static String rightClipToCharacter(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0);
+ WEBCORE_EXPORT static String rightClipToWord(const String&, float maxWidth, const FontCascade&, EnableRoundingHacksOrNot, float& resultWidth, bool shouldInsertEllipsis = true, float customTruncationElementWidth = 0, bool alwaysTruncate = false);
+
+ WEBCORE_EXPORT static float width(const String&, const FontCascade&, EnableRoundingHacksOrNot = DisableRoundingHacks);
+};
</ins><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextRunh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextRun.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> class FloatPoint;
</span><span class="cx"> class FloatRect;
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class GraphicsContext;
</span><span class="cx"> class GlyphBuffer;
</span><span class="cx"> class GlyphToPathTranslator;
</span><span class="lines">@@ -197,9 +197,9 @@
</span><span class="cx"> virtual ~RenderingContext() { }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>- virtual GlyphData glyphDataForCharacter(const Font&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache) = 0;
</del><ins>+ virtual GlyphData glyphDataForCharacter(const FontCascade&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache) = 0;
</ins><span class="cx"> virtual void drawSVGGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const = 0;
</span><del>- virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& charsConsumed, String& glyphName) const = 0;
</del><ins>+ virtual float floatWidthUsingSVGFont(const FontCascade&, const TextRun&, int& charsConsumed, String& glyphName) const = 0;
</ins><span class="cx"> virtual bool applySVGKerning(const SimpleFontData*, WidthIterator&, GlyphBuffer*, int from) const = 0;
</span><span class="cx"> virtual std::unique_ptr<GlyphToPathTranslator> createGlyphToPathTranslator(const SimpleFontData&, const TextRun*, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&) const = 0;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WidthIterator.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GlyphBuffer.h"
</span><span class="cx"> #include "Latin1TextIterator.h"
</span><span class="cx"> #include "SimpleFontData.h"
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, bool accountForGlyphBounds, bool forTextEmphasis)
</del><ins>+WidthIterator::WidthIterator(const FontCascade* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, bool accountForGlyphBounds, bool forTextEmphasis)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> , m_run(run)
</span><span class="cx"> , m_currentCharacter(0)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> m_expansionPerOpportunity = 0;
</span><span class="cx"> else {
</span><span class="cx"> bool isAfterExpansion = m_isAfterExpansion;
</span><del>- unsigned expansionOpportunityCount = Font::expansionOpportunityCount(m_run.text(), m_run.ltr() ? LTR : RTL, isAfterExpansion);
</del><ins>+ unsigned expansionOpportunityCount = FontCascade::expansionOpportunityCount(m_run.text(), m_run.ltr() ? LTR : RTL, isAfterExpansion);
</ins><span class="cx"> if (isAfterExpansion && !m_run.allowsTrailingExpansion())
</span><span class="cx"> expansionOpportunityCount--;
</span><span class="cx">
</span><span class="lines">@@ -229,9 +229,9 @@
</span><span class="cx"> if (width && m_font->letterSpacing())
</span><span class="cx"> width += m_font->letterSpacing();
</span><span class="cx">
</span><del>- static bool expandAroundIdeographs = Font::canExpandAroundIdeographsInComplexText();
- bool treatAsSpace = Font::treatAsSpace(character);
- if (treatAsSpace || (expandAroundIdeographs && Font::isCJKIdeographOrSymbol(character))) {
</del><ins>+ static bool expandAroundIdeographs = FontCascade::canExpandAroundIdeographsInComplexText();
+ bool treatAsSpace = FontCascade::treatAsSpace(character);
+ if (treatAsSpace || (expandAroundIdeographs && FontCascade::isCJKIdeographOrSymbol(character))) {
</ins><span class="cx"> // Distribute the run's total expansion evenly over all expansion opportunities in the run.
</span><span class="cx"> if (m_expansion) {
</span><span class="cx"> float previousExpansion = m_expansion;
</span><span class="lines">@@ -268,9 +268,10 @@
</span><span class="cx"> m_isAfterExpansion = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (shouldApplyFontTransforms() && glyphBuffer && Font::treatAsSpace(character))
</del><ins>+ if (shouldApplyFontTransforms() && glyphBuffer && FontCascade::treatAsSpace(character)) {
</ins><span class="cx"> charactersTreatedAsSpace.append(std::make_pair(glyphBuffer->size(),
</span><span class="cx"> OriginalAdvancesForCharacterTreatedAsSpace(character == ' ', glyphBuffer->size() ? glyphBuffer->advanceAt(glyphBuffer->size() - 1).width() : 0, width)));
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> if (m_accountForGlyphBounds) {
</span><span class="cx"> bounds = fontData->boundsForGlyph(glyph);
</span><span class="lines">@@ -278,7 +279,7 @@
</span><span class="cx"> m_firstGlyphOverflow = std::max<float>(0, -bounds.x());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_forTextEmphasis && !Font::canReceiveTextEmphasis(character))
</del><ins>+ if (m_forTextEmphasis && !FontCascade::canReceiveTextEmphasis(character))
</ins><span class="cx"> glyph = 0;
</span><span class="cx">
</span><span class="cx"> // Advance past the character we just dealt with.
</span><span class="lines">@@ -288,7 +289,7 @@
</span><span class="cx">
</span><span class="cx"> // Force characters that are used to determine word boundaries for the rounding hack
</span><span class="cx"> // to be integer width, so following words will start on an integer boundary.
</span><del>- if (m_run.applyWordRounding() && Font::isRoundingHackCharacter(character)) {
</del><ins>+ if (m_run.applyWordRounding() && FontCascade::isRoundingHackCharacter(character)) {
</ins><span class="cx"> width = ceilf(width);
</span><span class="cx">
</span><span class="cx"> // Since widthSinceLastRounding can lose precision if we include measurements for
</span><span class="lines">@@ -301,7 +302,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> // Check to see if the next character is a "rounding hack character", if so, adjust
</span><span class="cx"> // width so that the total run width will be on an integer boundary.
</span><del>- if ((m_run.applyWordRounding() && static_cast<unsigned>(textIterator.currentCharacter()) < m_run.length() && Font::isRoundingHackCharacter(*(textIterator.characters())))
</del><ins>+ if ((m_run.applyWordRounding() && static_cast<unsigned>(textIterator.currentCharacter()) < m_run.length() && FontCascade::isRoundingHackCharacter(*(textIterator.characters())))
</ins><span class="cx"> || (m_run.applyRunRounding() && static_cast<unsigned>(textIterator.currentCharacter()) >= m_run.length())) {
</span><span class="cx"> float totalWidth = widthSinceLastRounding + width;
</span><span class="cx"> widthSinceLastRounding = ceilf(totalWidth);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsWidthIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> #ifndef WidthIterator_h
</span><span class="cx"> #define WidthIterator_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "SVGGlyph.h"
</span><span class="cx"> #include "TextRun.h"
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class GlyphBuffer;
</span><span class="cx"> class SimpleFontData;
</span><span class="cx"> class TextRun;
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> struct WidthIterator {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- WidthIterator(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, bool accountForGlyphBounds = false, bool forTextEmphasis = false);
</del><ins>+ WidthIterator(const FontCascade*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, bool accountForGlyphBounds = false, bool forTextEmphasis = false);
</ins><span class="cx">
</span><span class="cx"> unsigned advance(int to, GlyphBuffer*);
</span><span class="cx"> bool advanceOneCharacter(float& width, GlyphBuffer&);
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> Vector<SVGGlyph::ArabicForm>& arabicForms() { return m_arabicForms; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- static bool supportsTypesettingFeatures(const Font& font)
</del><ins>+ static bool supportsTypesettingFeatures(const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
</span><span class="cx"> if (!font.isPrinterFont())
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Font* m_font;
</del><ins>+ const FontCascade* m_font;
</ins><span class="cx">
</span><span class="cx"> const TextRun& m_run;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoFontCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "AffineTransform.h"
</span><span class="cx"> #include "CairoUtilities.h"
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
</del><ins>+void FontCascade::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
</ins><span class="cx"> int from, int numGlyphs, const FloatPoint& point) const
</span><span class="cx"> {
</span><span class="cx"> if (!font->platformData().size())
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> } while (m_fontData->isSVGFont() && m_index < m_glyphBuffer.size());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DashArray Font::dashesForIntersectionsWithRect(const TextRun& run, const FloatPoint& textOrigin, const FloatRect& lineExtents) const
</del><ins>+DashArray FontCascade::dashesForIntersectionsWithRect(const TextRun& run, const FloatPoint& textOrigin, const FloatRect& lineExtents) const
</ins><span class="cx"> {
</span><span class="cx"> if (isLoadingCustomFonts())
</span><span class="cx"> return DashArray();
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> glyphBuffer.saveOffsetsInString();
</span><span class="cx"> float deltaX;
</span><del>- if (codePath(run) != Font::Complex)
</del><ins>+ if (codePath(run) != FontCascade::Complex)
</ins><span class="cx"> deltaX = getGlyphsAndAdvancesForSimpleText(run, 0, run.length(), glyphBuffer);
</span><span class="cx"> else
</span><span class="cx"> deltaX = getGlyphsAndAdvancesForComplexText(run, 0, run.length(), glyphBuffer);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoFontCairoHarfbuzzNGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "HarfBuzzShaper.h"
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx">
</span><del>-float Font::getGlyphsAndAdvancesForComplexText(const TextRun& run, int, int, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot /* forTextEmphasis */) const
</del><ins>+float FontCascade::getGlyphsAndAdvancesForComplexText(const TextRun& run, int, int, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot /* forTextEmphasis */) const
</ins><span class="cx"> {
</span><span class="cx"> HarfBuzzShaper shaper(this, run);
</span><span class="cx"> if (!shaper.shape(&glyphBuffer)) {
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> // FIXME: Mac returns an initial advance here.
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</del><ins>+float FontCascade::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -68,22 +68,22 @@
</span><span class="cx"> return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun& /* run */, const AtomicString& /* mark */, const FloatPoint& /* point */, int /* from */, int /* to */) const
</del><ins>+void FontCascade::drawEmphasisMarksForComplexText(GraphicsContext* /* context */, const TextRun& /* run */, const AtomicString& /* mark */, const FloatPoint& /* point */, int /* from */, int /* to */) const
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Font::canReturnFallbackFontsForComplexText()
</del><ins>+bool FontCascade::canReturnFallbackFontsForComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Font::canExpandAroundIdeographsInComplexText()
</del><ins>+bool FontCascade::canExpandAroundIdeographsInComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const
</del><ins>+float FontCascade::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const
</ins><span class="cx"> {
</span><span class="cx"> HarfBuzzShaper shaper(this, run);
</span><span class="cx"> if (shaper.shape())
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::offsetForPositionForComplexText(const TextRun& run, float x, bool) const
</del><ins>+int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool) const
</ins><span class="cx"> {
</span><span class="cx"> HarfBuzzShaper shaper(this, run);
</span><span class="cx"> if (shaper.shape())
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</del><ins>+void FontCascade::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> HarfBuzzShaper shaper(this, run);
</span><span class="cx"> if (shaper.shape()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfreetypeFontCacheFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FontCache.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><span class="cx"> #include "OwnPtrCairo.h"
</span><span class="cx"> #include "RefPtrCairo.h"
</span><span class="cx"> #include "SimpleFontData.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx">
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "FloatRect.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "GlyphBuffer.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "HarfBuzzShaper.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "HarfBuzzFace.h"
</span><span class="cx"> #include "SurrogatePairAwareTextIterator.h"
</span><span class="cx"> #include <hb-icu.h>
</span><span class="lines">@@ -173,9 +173,9 @@
</span><span class="cx"> int nextPosition = position;
</span><span class="cx"> U16_NEXT(source, nextPosition, length, character);
</span><span class="cx"> // Don't normalize tabs as they are not treated as spaces for word-end.
</span><del>- if (Font::treatAsSpace(character) && character != '\t')
</del><ins>+ if (FontCascade::treatAsSpace(character) && character != '\t')
</ins><span class="cx"> character = ' ';
</span><del>- else if (Font::treatAsZeroWidthSpaceInComplexScript(character))
</del><ins>+ else if (FontCascade::treatAsZeroWidthSpaceInComplexScript(character))
</ins><span class="cx"> character = zeroWidthSpace;
</span><span class="cx"> U16_APPEND(destination, position, length, character, error);
</span><span class="cx"> ASSERT_UNUSED(error, !error);
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HarfBuzzShaper::HarfBuzzShaper(const Font* font, const TextRun& run)
</del><ins>+HarfBuzzShaper::HarfBuzzShaper(const FontCascade* font, const TextRun& run)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> , m_normalizedBufferLength(0)
</span><span class="cx"> , m_run(run)
</span><span class="lines">@@ -214,9 +214,9 @@
</span><span class="cx"> int nextPosition = position;
</span><span class="cx"> U16_NEXT(source, nextPosition, length, character);
</span><span class="cx"> // Don't normalize tabs as they are not treated as spaces for word-end
</span><del>- if (Font::treatAsSpace(character) && character != '\t')
</del><ins>+ if (FontCascade::treatAsSpace(character) && character != '\t')
</ins><span class="cx"> character = ' ';
</span><del>- else if (Font::treatAsZeroWidthSpace(character))
</del><ins>+ else if (FontCascade::treatAsZeroWidthSpace(character))
</ins><span class="cx"> character = zeroWidthSpace;
</span><span class="cx"> else if (normalizeMode == HarfBuzzShaper::NormalizeMirrorChars)
</span><span class="cx"> character = u_charMirror(character);
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx"> UScriptCode currentScript = nextScript;
</span><span class="cx">
</span><span class="cx"> for (iterator.advance(clusterLength); iterator.consume(character, clusterLength); iterator.advance(clusterLength)) {
</span><del>- if (Font::treatAsZeroWidthSpace(character))
</del><ins>+ if (FontCascade::treatAsZeroWidthSpace(character))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> if (U_GET_GC_MASK(character) & U_GC_M_MASK) {
</span><span class="lines">@@ -536,7 +536,7 @@
</span><span class="cx">
</span><span class="cx"> glyphToCharacterIndexes[i] = glyphInfos[i].cluster;
</span><span class="cx">
</span><del>- if (isClusterEnd && !Font::treatAsZeroWidthSpace(m_normalizedBuffer[currentCharacterIndex]))
</del><ins>+ if (isClusterEnd && !FontCascade::treatAsZeroWidthSpace(m_normalizedBuffer[currentCharacterIndex]))
</ins><span class="cx"> spacing += m_letterSpacing;
</span><span class="cx">
</span><span class="cx"> if (isClusterEnd && isWordEnd(currentCharacterIndex))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShaperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class SimpleFontData;
</span><span class="cx">
</span><span class="cx"> class HarfBuzzShaper {
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> NormalizeMirrorChars
</span><span class="cx"> };
</span><span class="cx">
</span><del>- HarfBuzzShaper(const Font*, const TextRun&);
</del><ins>+ HarfBuzzShaper(const FontCascade*, const TextRun&);
</ins><span class="cx"> virtual ~HarfBuzzShaper();
</span><span class="cx">
</span><span class="cx"> bool shape(GlyphBuffer* = 0);
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx">
</span><span class="cx"> GlyphBufferAdvance createGlyphBufferAdvance(float, float);
</span><span class="cx">
</span><del>- const Font* m_font;
</del><ins>+ const FontCascade* m_font;
</ins><span class="cx"> std::unique_ptr<UChar[]> m_normalizedBuffer;
</span><span class="cx"> unsigned m_normalizedBufferLength;
</span><span class="cx"> const TextRun& m_run;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosFontCacheIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><span class="cx"> #import "CoreTextSPI.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "RenderThemeIOS.h"
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosSimpleFontDataIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx">
</span><span class="cx"> #import "BlockExceptions.h"
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><del>-#import "Font.h"
</del><span class="cx"> #import "FontCache.h"
</span><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "FontDescription.h"
</span><span class="cx"> #import "FontServicesIOS.h"
</span><span class="cx"> #import <CoreText/CoreText.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "ComplexTextController.h"
</span><span class="cx">
</span><span class="cx"> #include "FloatSize.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderBlock.h"
</span><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "TextBreakIterator.h"
</span><span class="lines">@@ -43,13 +43,13 @@
</span><span class="cx">
</span><span class="cx"> class TextLayout {
</span><span class="cx"> public:
</span><del>- static bool isNeeded(RenderText* text, const Font& font)
</del><ins>+ static bool isNeeded(RenderText* text, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> TextRun run = RenderBlock::constructTextRun(text, font, text, text->style());
</span><del>- return font.codePath(run) == Font::Complex;
</del><ins>+ return font.codePath(run) == FontCascade::Complex;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- TextLayout(RenderText* text, const Font& font, float xPos)
</del><ins>+ TextLayout(RenderText* text, const FontCascade& font, float xPos)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> , m_run(constructTextRun(text, font, xPos))
</span><span class="cx"> , m_controller(std::make_unique<ComplexTextController>(&m_font, m_run, true))
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_controller->advance(from, 0, ByWholeGlyphs, fallbackFonts);
</span><span class="cx"> float beforeWidth = m_controller->runWidthSoFar();
</span><del>- if (m_font.wordSpacing() && from && Font::treatAsSpace(m_run[from]))
</del><ins>+ if (m_font.wordSpacing() && from && FontCascade::treatAsSpace(m_run[from]))
</ins><span class="cx"> beforeWidth += m_font.wordSpacing();
</span><span class="cx"> m_controller->advance(from + len, 0, ByWholeGlyphs, fallbackFonts);
</span><span class="cx"> float afterWidth = m_controller->runWidthSoFar();
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- static TextRun constructTextRun(RenderText* text, const Font& font, float xPos)
</del><ins>+ static TextRun constructTextRun(RenderText* text, const FontCascade& font, float xPos)
</ins><span class="cx"> {
</span><span class="cx"> TextRun run = RenderBlock::constructTextRun(text, font, text, text->style());
</span><span class="cx"> run.setCharactersLength(text->textLength());
</span><span class="lines">@@ -78,25 +78,25 @@
</span><span class="cx"> return run;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // ComplexTextController has only references to its Font and TextRun so they must be kept alive here.
- Font m_font;
</del><ins>+ // ComplexTextController has only references to its FontCascade and TextRun so they must be kept alive here.
+ FontCascade m_font;
</ins><span class="cx"> TextRun m_run;
</span><span class="cx"> std::unique_ptr<ComplexTextController> m_controller;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-PassOwnPtr<TextLayout> Font::createLayout(RenderText* text, float xPos, bool collapseWhiteSpace) const
</del><ins>+PassOwnPtr<TextLayout> FontCascade::createLayout(RenderText* text, float xPos, bool collapseWhiteSpace) const
</ins><span class="cx"> {
</span><span class="cx"> if (!collapseWhiteSpace || !TextLayout::isNeeded(text, *this))
</span><span class="cx"> return nullptr;
</span><span class="cx"> return adoptPtr(new TextLayout(text, *this, xPos));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::deleteLayout(TextLayout* layout)
</del><ins>+void FontCascade::deleteLayout(TextLayout* layout)
</ins><span class="cx"> {
</span><span class="cx"> delete layout;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::width(TextLayout& layout, unsigned from, unsigned len, HashSet<const SimpleFontData*>* fallbackFonts)
</del><ins>+float FontCascade::width(TextLayout& layout, unsigned from, unsigned len, HashSet<const SimpleFontData*>* fallbackFonts)
</ins><span class="cx"> {
</span><span class="cx"> return layout.width(from, len, fallbackFonts);
</span><span class="cx"> }
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> return static_cast<CGFloat>(ceil(f));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ComplexTextController::ComplexTextController(const Font* font, const TextRun& run, bool mayUseNaturalWritingDirection, HashSet<const SimpleFontData*>* fallbackFonts, bool forTextEmphasis)
</del><ins>+ComplexTextController::ComplexTextController(const FontCascade* font, const TextRun& run, bool mayUseNaturalWritingDirection, HashSet<const SimpleFontData*>* fallbackFonts, bool forTextEmphasis)
</ins><span class="cx"> : m_font(*font)
</span><span class="cx"> , m_run(run)
</span><span class="cx"> , m_isLTROnly(true)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> m_expansionPerOpportunity = 0;
</span><span class="cx"> else {
</span><span class="cx"> bool isAfterExpansion = m_afterExpansion;
</span><del>- unsigned expansionOpportunityCount = Font::expansionOpportunityCount(m_run.text(), m_run.ltr() ? LTR : RTL, isAfterExpansion);
</del><ins>+ unsigned expansionOpportunityCount = FontCascade::expansionOpportunityCount(m_run.text(), m_run.ltr() ? LTR : RTL, isAfterExpansion);
</ins><span class="cx"> if (isAfterExpansion && !m_run.allowsTrailingExpansion())
</span><span class="cx"> expansionOpportunityCount--;
</span><span class="cx">
</span><span class="lines">@@ -615,7 +615,7 @@
</span><span class="cx"> else
</span><span class="cx"> nextCh = *(m_complexTextRuns[r + 1]->characters() + m_complexTextRuns[r + 1]->indexAt(0));
</span><span class="cx">
</span><del>- bool treatAsSpace = Font::treatAsSpace(ch);
</del><ins>+ bool treatAsSpace = FontCascade::treatAsSpace(ch);
</ins><span class="cx"> CGGlyph glyph = treatAsSpace ? fontData.spaceGlyph() : glyphs[i];
</span><span class="cx"> CGSize advance = treatAsSpace ? CGSizeMake(spaceWidth, advances[i].height) : advances[i];
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -625,7 +625,7 @@
</span><span class="cx">
</span><span class="cx"> if (ch == '\t' && m_run.allowTabs())
</span><span class="cx"> advance.width = m_font.tabWidth(fontData, m_run.tabSize(), m_run.xPos() + m_totalWidth + widthSinceLastCommit);
</span><del>- else if (Font::treatAsZeroWidthSpace(ch) && !treatAsSpace) {
</del><ins>+ else if (FontCascade::treatAsZeroWidthSpace(ch) && !treatAsSpace) {
</ins><span class="cx"> advance.width = 0;
</span><span class="cx"> glyph = fontData.spaceGlyph();
</span><span class="cx"> }
</span><span class="lines">@@ -651,7 +651,7 @@
</span><span class="cx"> advance.width += m_font.letterSpacing();
</span><span class="cx">
</span><span class="cx"> // Handle justification and word-spacing.
</span><del>- if (treatAsSpace || Font::isCJKIdeographOrSymbol(ch)) {
</del><ins>+ if (treatAsSpace || FontCascade::isCJKIdeographOrSymbol(ch)) {
</ins><span class="cx"> // Distribute the run's total expansion evenly over all expansion opportunities in the run.
</span><span class="cx"> if (m_expansion) {
</span><span class="cx"> float previousExpansion = m_expansion;
</span><span class="lines">@@ -685,12 +685,13 @@
</span><span class="cx"> // We adjust the width of the last character of a "word" to ensure an integer width.
</span><span class="cx"> // Force characters that are used to determine word boundaries for the rounding hack
</span><span class="cx"> // to be integer width, so the following words will start on an integer boundary.
</span><del>- if (m_run.applyWordRounding() && Font::isRoundingHackCharacter(ch))
</del><ins>+ if (m_run.applyWordRounding() && FontCascade::isRoundingHackCharacter(ch))
</ins><span class="cx"> advance.width = ceilCGFloat(advance.width);
</span><span class="cx">
</span><span class="cx"> // Check to see if the next character is a "rounding hack character", if so, adjust the
</span><del>- // width so that the total run width will be on an integer boundary.
- if ((m_run.applyWordRounding() && !lastGlyph && Font::isRoundingHackCharacter(nextCh)) || (m_run.applyRunRounding() && lastGlyph)) {
</del><ins>+ // width so that the total run width will be on an integer boundary.
+ bool needsRoundingForCharacter = m_run.applyWordRounding() && !lastGlyph && FontCascade::isRoundingHackCharacter(nextCh);
+ if (needsRoundingForCharacter || (m_run.applyRunRounding() && lastGlyph)) {
</ins><span class="cx"> CGFloat totalWidth = widthSinceLastCommit + advance.width;
</span><span class="cx"> widthSinceLastCommit = ceilCGFloat(totalWidth);
</span><span class="cx"> CGFloat extraWidth = widthSinceLastCommit - totalWidth;
</span><span class="lines">@@ -709,7 +710,7 @@
</span><span class="cx"> widthSinceLastCommit += advance.width;
</span><span class="cx">
</span><span class="cx"> // FIXME: Combining marks should receive a text emphasis mark if they are combine with a space.
</span><del>- if (m_forTextEmphasis && (!Font::canReceiveTextEmphasis(ch) || (U_GET_GC_MASK(ch) & U_GC_M_MASK)))
</del><ins>+ if (m_forTextEmphasis && (!FontCascade::canReceiveTextEmphasis(ch) || (U_GET_GC_MASK(ch) & U_GC_M_MASK)))
</ins><span class="cx"> glyph = 0;
</span><span class="cx">
</span><span class="cx"> advance.height *= -1;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class SimpleFontData;
</span><span class="cx"> class TextRun;
</span><span class="cx">
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> // complex scripts on OS X.
</span><span class="cx"> class ComplexTextController {
</span><span class="cx"> public:
</span><del>- ComplexTextController(const Font*, const TextRun&, bool mayUseNaturalWritingDirection = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, bool forTextEmphasis = false);
</del><ins>+ ComplexTextController(const FontCascade*, const TextRun&, bool mayUseNaturalWritingDirection = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, bool forTextEmphasis = false);
</ins><span class="cx">
</span><span class="cx"> // Advance and emit glyphs up to the specified character.
</span><span class="cx"> void advance(unsigned to, GlyphBuffer* = 0, GlyphIterationStyle = IncludePartialGlyphs, HashSet<const SimpleFontData*>* fallbackFonts = 0);
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> Vector<unsigned, 16> m_runIndices;
</span><span class="cx"> Vector<unsigned, 16> m_glyphCountFromStartToIndex;
</span><span class="cx">
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> const TextRun& m_run;
</span><span class="cx"> bool m_isLTROnly;
</span><span class="cx"> bool m_mayUseNaturalWritingDirection;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllerCoreTextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx"> #include "ComplexTextController.h"
</span><span class="cx">
</span><span class="cx"> #include "CoreTextSPI.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "TextRun.h"
</span><span class="cx"> #include "WebCoreSystemInterface.h"
</span><span class="cx">
</span><span class="lines">@@ -40,19 +40,19 @@
</span><span class="cx">
</span><span class="cx"> @interface WebCascadeList : NSArray {
</span><span class="cx"> @private
</span><del>- const WebCore::Font* _font;
</del><ins>+ const WebCore::FontCascade* _font;
</ins><span class="cx"> UChar32 _character;
</span><span class="cx"> NSUInteger _count;
</span><span class="cx"> Vector<RetainPtr<CTFontDescriptorRef>, 16> _fontDescriptors;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithFont:(const WebCore::Font*)font character:(UChar32)character;
</del><ins>+- (id)initWithFont:(const WebCore::FontCascade*)font character:(UChar32)character;
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @implementation WebCascadeList
</span><span class="cx">
</span><del>-- (id)initWithFont:(const WebCore::Font*)font character:(UChar32)character
</del><ins>+- (id)initWithFont:(const WebCore::FontCascade*)font character:(UChar32)character
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super init]))
</span><span class="cx"> return nil;
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> _font = font;
</span><span class="cx"> _character = character;
</span><span class="cx">
</span><del>- // By the time a WebCascadeList is used, the Font has already been asked to realize all of its
</del><ins>+ // By the time a WebCascadeList is used, the FontCascade has already been asked to realize all of its
</ins><span class="cx"> // FontData, so this loop does not hit the FontCache.
</span><span class="cx"> while (!_font->fallbackRangesAt(_count).isNull())
</span><span class="cx"> _count++;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "SimpleFontData.h"
</span><span class="cx"> #import "FontPlatformData.h"
</span><span class="cx"> #import "NSFontSPI.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontComplexTextMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "ComplexTextController.h"
</span><span class="cx"> #include "FontGlyphs.h"
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</del><ins>+void FontCascade::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> ComplexTextController controller(this, run);
</span><span class="cx"> controller.advance(from);
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> selectionRect.setWidth(afterWidth - beforeWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::getGlyphsAndAdvancesForComplexText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float FontCascade::getGlyphsAndAdvancesForComplexText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx"> float initialAdvance;
</span><span class="cx">
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> return initialAdvance;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</del><ins>+float FontCascade::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</del><ins>+void FontCascade::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> drawEmphasisMarks(context, run, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</del><ins>+float FontCascade::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</ins><span class="cx"> {
</span><span class="cx"> ComplexTextController controller(this, run, true, fallbackFonts);
</span><span class="cx"> if (glyphOverflow) {
</span><span class="lines">@@ -116,13 +116,13 @@
</span><span class="cx"> return controller.totalWidth();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::offsetForPositionForComplexText(const TextRun& run, float x, bool includePartialGlyphs) const
</del><ins>+int FontCascade::offsetForPositionForComplexText(const TextRun& run, float x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx"> ComplexTextController controller(this, run);
</span><span class="cx"> return controller.offsetForPosition(x, includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* characters, size_t length, FontDataVariant variant) const
</del><ins>+const SimpleFontData* FontCascade::fontDataForCombiningCharacterSequence(const UChar* characters, size_t length, FontDataVariant variant) const
</ins><span class="cx"> {
</span><span class="cx"> UChar32 baseCharacter;
</span><span class="cx"> size_t baseCharacterLength = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/FontMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import "config.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><span class="cx"> #import "CoreTextSPI.h"
</span><span class="lines">@@ -58,12 +58,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool Font::canReturnFallbackFontsForComplexText()
</del><ins>+bool FontCascade::canReturnFallbackFontsForComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Font::canExpandAroundIdeographsInComplexText()
</del><ins>+bool FontCascade::canExpandAroundIdeographsInComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& anchorPoint) const
</del><ins>+void FontCascade::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& anchorPoint) const
</ins><span class="cx"> {
</span><span class="cx"> const FontPlatformData& platformData = font->platformData();
</span><span class="cx"> if (!platformData.size())
</span><span class="lines">@@ -526,7 +526,7 @@
</span><span class="cx"> } while (m_fontData->isSVGFont() && m_index < m_glyphBuffer.size());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DashArray Font::dashesForIntersectionsWithRect(const TextRun& run, const FloatPoint& textOrigin, const FloatRect& lineExtents) const
</del><ins>+DashArray FontCascade::dashesForIntersectionsWithRect(const TextRun& run, const FloatPoint& textOrigin, const FloatRect& lineExtents) const
</ins><span class="cx"> {
</span><span class="cx"> if (isLoadingCustomFonts())
</span><span class="cx"> return DashArray();
</span><span class="lines">@@ -534,7 +534,7 @@
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> glyphBuffer.saveOffsetsInString();
</span><span class="cx"> float deltaX;
</span><del>- if (codePath(run) != Font::Complex)
</del><ins>+ if (codePath(run) != FontCascade::Complex)
</ins><span class="cx"> deltaX = getGlyphsAndAdvancesForSimpleText(run, 0, run.length(), glyphBuffer);
</span><span class="cx"> else
</span><span class="cx"> deltaX = getGlyphsAndAdvancesForComplexText(run, 0, run.length(), glyphBuffer);
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-bool Font::primaryFontDataIsSystemFont() const
</del><ins>+bool FontCascade::primaryFontDataIsSystemFont() const
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED > 1090
</span><span class="cx"> const auto& fontData = primaryFontData();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacGlyphPageMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/GlyphPageMac.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">
</span><span class="cx"> #include "CoreGraphicsSPI.h"
</span><span class="cx"> #include "CoreTextSPI.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "SimpleFontData.h"
</span><span class="cx"> #include "WebCoreSystemInterface.h"
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> if (fontData->platformData().widthVariant() != RegularWidth || fontData->hasVerticalGlyphs()) {
</span><span class="cx"> // Ideographs don't have a vertical variant or width variants.
</span><span class="cx"> for (unsigned i = 0; i < bufferLength; ++i) {
</span><del>- if (!Font::isCJKIdeograph(buffer[i]))
</del><ins>+ if (!FontCascade::isCJKIdeograph(buffer[i]))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacSimpleFontDataMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><span class="cx"> #import "CoreTextSPI.h"
</span><span class="cx"> #import "FloatRect.h"
</span><del>-#import "Font.h"
</del><span class="cx"> #import "FontCache.h"
</span><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "FontDescription.h"
</span><span class="cx"> #import "SharedBuffer.h"
</span><span class="cx"> #import "WebCoreSystemInterface.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/FontCGWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "AffineTransform.h"
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> return path;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
</del><ins>+void FontCascade::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
</ins><span class="cx"> int from, int numGlyphs, const FloatPoint& point) const
</span><span class="cx"> {
</span><span class="cx"> CGContextRef cgContext = graphicsContext->platformContext();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontCacheWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include <winsock2.h>
</span><span class="cx"> #include "FontCache.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "HWndDC.h"
</span><span class="cx"> #include "SimpleFontData.h"
</span><span class="cx"> #include <mlang.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinFontWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/FontWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/FontWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/FontWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx">
</span><span class="cx"> #include "FontGlyphs.h"
</span><span class="cx"> #include "GlyphBuffer.h"
</span><span class="lines">@@ -41,17 +41,17 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool Font::canReturnFallbackFontsForComplexText()
</del><ins>+bool FontCascade::canReturnFallbackFontsForComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Font::canExpandAroundIdeographsInComplexText()
</del><ins>+bool FontCascade::canExpandAroundIdeographsInComplexText()
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</del><ins>+void FontCascade::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> UniscribeController it(this, run);
</span><span class="cx"> it.advance(from);
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> selectionRect.setWidth(afterWidth - beforeWidth);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::getGlyphsAndAdvancesForComplexText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</del><ins>+float FontCascade::getGlyphsAndAdvancesForComplexText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
</ins><span class="cx"> {
</span><span class="cx"> if (forTextEmphasis) {
</span><span class="cx"> // FIXME: Add forTextEmphasis paremeter to UniscribeController and use it.
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> return beforeWidth;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</del><ins>+float FontCascade::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> return startPoint.x() - startX;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</del><ins>+void FontCascade::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="cx"> float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> drawEmphasisMarks(context, run, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</del><ins>+float FontCascade::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</ins><span class="cx"> {
</span><span class="cx"> UniscribeController controller(this, run, fallbackFonts);
</span><span class="cx"> controller.advance(run.length());
</span><span class="lines">@@ -133,10 +133,10 @@
</span><span class="cx"> return controller.runWidthSoFar();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int Font::offsetForPositionForComplexText(const TextRun& run, float xFloat, bool includePartialGlyphs) const
</del><ins>+int FontCascade::offsetForPositionForComplexText(const TextRun& run, float xFloat, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: This truncation is not a problem for HTML, but only affects SVG, which passes floating-point numbers
</span><del>- // to Font::offsetForPosition(). Bug http://webkit.org/b/40673 tracks fixing this problem.
</del><ins>+ // to FontCascade::offsetForPosition(). Bug http://webkit.org/b/40673 tracks fixing this problem.
</ins><span class="cx"> int x = static_cast<int>(xFloat);
</span><span class="cx">
</span><span class="cx"> UniscribeController controller(this, run);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include "SimpleFontData.h"
</span><span class="cx">
</span><span class="cx"> #include "FloatRect.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "GlyphPage.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataCairoWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx">
</span><span class="cx"> #include <windows.h>
</span><span class="cx">
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "HWndDC.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SimpleFontData.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "FloatRect.h"
</span><span class="cx"> #include "FontDescription.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinUniscribeControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "UniscribeController.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "HWndDC.h"
</span><span class="cx"> #include "SimpleFontData.h"
</span><span class="cx"> #include "TextRun.h"
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> // that does stuff in that method instead of doing everything in the constructor. Have advance()
</span><span class="cx"> // take the GlyphBuffer as an arg so that we don't have to populate the glyph buffer when
</span><span class="cx"> // measuring.
</span><del>-UniscribeController::UniscribeController(const Font* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts)
</del><ins>+UniscribeController::UniscribeController(const FontCascade* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts)
</ins><span class="cx"> : m_font(*font)
</span><span class="cx"> , m_run(run)
</span><span class="cx"> , m_fallbackFonts(fallbackFonts)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> else {
</span><span class="cx"> float numSpaces = 0;
</span><span class="cx"> for (int s = 0; s < m_run.length(); s++) {
</span><del>- if (Font::treatAsSpace(m_run[s]))
</del><ins>+ if (FontCascade::treatAsSpace(m_run[s]))
</ins><span class="cx"> numSpaces++;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -287,8 +287,8 @@
</span><span class="cx">
</span><span class="cx"> for (int k = 0; k < len; k++) {
</span><span class="cx"> UChar ch = *(str + k);
</span><del>- bool treatAsSpace = Font::treatAsSpace(ch);
- bool treatAsZeroWidthSpace = Font::treatAsZeroWidthSpace(ch);
</del><ins>+ bool treatAsSpace = FontCascade::treatAsSpace(ch);
+ bool treatAsZeroWidthSpace = FontCascade::treatAsZeroWidthSpace(ch);
</ins><span class="cx"> if (treatAsSpace || treatAsZeroWidthSpace) {
</span><span class="cx"> // Substitute in the space glyph at the appropriate place in the glyphs
</span><span class="cx"> // array.
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> else
</span><span class="cx"> candidateSpace = *(m_run.data16(characterIndex - 1));
</span><span class="cx">
</span><del>- if (!Font::treatAsSpace(candidateSpace))
</del><ins>+ if (!FontCascade::treatAsSpace(candidateSpace))
</ins><span class="cx"> advance += m_font.wordSpacing();
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinUniscribeControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/UniscribeController.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/UniscribeController.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/graphics/win/UniscribeController.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,16 +26,16 @@
</span><span class="cx"> #ifndef UniscribeController_h
</span><span class="cx"> #define UniscribeController_h
</span><span class="cx">
</span><ins>+#include "FontCascade.h"
+#include "GlyphBuffer.h"
</ins><span class="cx"> #include <usp10.h>
</span><del>-#include "Font.h"
-#include "GlyphBuffer.h"
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class UniscribeController {
</span><span class="cx"> public:
</span><del>- UniscribeController(const Font*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0);
</del><ins>+ UniscribeController(const FontCascade*, const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0);
</ins><span class="cx">
</span><span class="cx"> // Advance and measure/place up to the specified character.
</span><span class="cx"> void advance(unsigned to, GlyphBuffer* = 0);
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> Vector<WORD>& glyphs, Vector<WORD>& clusters,
</span><span class="cx"> Vector<SCRIPT_VISATTR>& visualAttributes);
</span><span class="cx">
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> const TextRun& m_run;
</span><span class="cx"> HashSet<const SimpleFontData*>* m_fallbackFonts;
</span><span class="cx"> FloatPoint m_glyphOrigin;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWidgetIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WidgetIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WidgetIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/ios/WidgetIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #import "BlockExceptions.h"
</span><span class="cx"> #import "Cursor.h"
</span><span class="cx"> #import "Document.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "GraphicsContext.h"
</span><span class="cx"> #import "Page.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformioswakWKGraphicsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/wak/WKGraphics.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/wak/WKGraphics.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/ios/wak/WKGraphics.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "WebCoreSystemInterface.h"
</span><span class="cx"> #import "WebCoreThread.h"
</span><span class="cx"> #import <ImageIO/ImageIO.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacDragImageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/DragImageMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/DragImageMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/mac/DragImageMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #import "BitmapImage.h"
</span><span class="cx"> #import "CoreGraphicsSPI.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "FontDescription.h"
</span><span class="cx"> #import "FontSelector.h"
</span><span class="cx"> #import "GraphicsContext.h"
</span><span class="lines">@@ -157,10 +157,10 @@
</span><span class="cx">
</span><span class="cx"> // FIXME - we should move all the functionality of NSString extras to WebCore
</span><span class="cx">
</span><del>-static Font& fontFromNSFont(NSFont *font)
</del><ins>+static FontCascade& fontFromNSFont(NSFont *font)
</ins><span class="cx"> {
</span><span class="cx"> static NSFont *currentFont;
</span><del>- DEPRECATED_DEFINE_STATIC_LOCAL(Font, currentRenderer, ());
</del><ins>+ DEPRECATED_DEFINE_STATIC_LOCAL(FontCascade, currentRenderer, ());
</ins><span class="cx">
</span><span class="cx"> if ([font isEqual:currentFont])
</span><span class="cx"> return currentRenderer;
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> currentFont = font;
</span><span class="cx"> CFRetain(currentFont);
</span><span class="cx"> FontPlatformData f(font, [font pointSize]);
</span><del>- currentRenderer = Font(f, ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</del><ins>+ currentRenderer = FontCascade(f, ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</ins><span class="cx"> return currentRenderer;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> [string getCharacters:buffer.data()];
</span><span class="cx">
</span><span class="cx"> if (canUseFastRenderer(buffer.data(), length)) {
</span><del>- Font webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</del><ins>+ FontCascade webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</ins><span class="cx"> TextRun run(buffer.data(), length);
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="cx"> return webCoreFont.width(run);
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> if (!flipped)
</span><span class="cx"> CGContextScaleCTM(cgContext, 1, -1);
</span><span class="cx">
</span><del>- Font webCoreFont(FontPlatformData(font, [font pointSize]), ![nsContext isDrawingToScreen], Antialiased);
</del><ins>+ FontCascade webCoreFont(FontPlatformData(font, [font pointSize]), ![nsContext isDrawingToScreen], Antialiased);
</ins><span class="cx"> TextRun run(buffer.data(), length);
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -41,13 +41,13 @@
</span><span class="cx">
</span><span class="cx"> virtual int baselinePositionAdjustment(ControlPart) const;
</span><span class="cx">
</span><del>- virtual FontDescription controlFont(ControlPart, const Font&, float zoomFactor) const;
</del><ins>+ virtual FontDescription controlFont(ControlPart, const FontCascade&, float zoomFactor) const;
</ins><span class="cx">
</span><del>- virtual LengthSize controlSize(ControlPart, const Font&, const LengthSize&, float zoomFactor) const;
- virtual LengthSize minimumControlSize(ControlPart, const Font&, float zoomFactor) const;
</del><ins>+ virtual LengthSize controlSize(ControlPart, const FontCascade&, const LengthSize&, float zoomFactor) const;
+ virtual LengthSize minimumControlSize(ControlPart, const FontCascade&, float zoomFactor) const;
</ins><span class="cx">
</span><del>- virtual LengthBox controlPadding(ControlPart, const Font&, const LengthBox& zoomedBox, float zoomFactor) const;
- virtual LengthBox controlBorder(ControlPart, const Font&, const LengthBox& zoomedBox, float zoomFactor) const;
</del><ins>+ virtual LengthBox controlPadding(ControlPart, const FontCascade&, const LengthBox& zoomedBox, float zoomFactor) const;
+ virtual LengthBox controlBorder(ControlPart, const FontCascade&, const LengthBox& zoomedBox, float zoomFactor) const;
</ins><span class="cx">
</span><span class="cx"> virtual bool controlRequiresPreWhiteSpace(ControlPart part) const { return part == PushButtonPart; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">
</span><span class="cx"> // Helper functions used by a bunch of different control parts.
</span><span class="cx">
</span><del>-static NSControlSize controlSizeForFont(const Font& font)
</del><ins>+static NSControlSize controlSizeForFont(const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> int fontSize = font.pixelSize();
</span><span class="cx"> if (fontSize >= 16)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, float zoomFactor, const std::array<IntSize, 3>& sizes)
</del><ins>+static LengthSize sizeFromFont(const FontCascade& font, const LengthSize& zoomedSize, float zoomFactor, const std::array<IntSize, 3>& sizes)
</ins><span class="cx"> {
</span><span class="cx"> return sizeFromNSControlSize(controlSizeForFont(font), zoomedSize, zoomFactor, sizes);
</span><span class="cx"> }
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx"> return margins[controlSize];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static LengthSize checkboxSize(const Font& font, const LengthSize& zoomedSize, float zoomFactor)
</del><ins>+static LengthSize checkboxSize(const FontCascade& font, const LengthSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><span class="cx"> // If the width and height are both specified, then we have nothing to do.
</span><span class="cx"> if (!zoomedSize.width().isIntrinsicOrAuto() && !zoomedSize.height().isIntrinsicOrAuto())
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> return margins[controlSize];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static LengthSize radioSize(const Font& font, const LengthSize& zoomedSize, float zoomFactor)
</del><ins>+static LengthSize radioSize(const FontCascade& font, const LengthSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><span class="cx"> // If the width and height are both specified, then we have nothing to do.
</span><span class="cx"> if (!zoomedSize.width().isIntrinsicOrAuto() && !zoomedSize.height().isIntrinsicOrAuto())
</span><span class="lines">@@ -593,7 +593,7 @@
</span><span class="cx">
</span><span class="cx"> // We don't use controlSizeForFont() for steppers because the stepper height
</span><span class="cx"> // should be equal to or less than the corresponding text field height,
</span><del>-static NSControlSize stepperControlSizeForFont(const Font& font)
</del><ins>+static NSControlSize stepperControlSizeForFont(const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> int fontSize = font.pixelSize();
</span><span class="cx"> if (fontSize >= 18)
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx"> return Theme::baselinePositionAdjustment(part);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FontDescription ThemeMac::controlFont(ControlPart part, const Font& font, float zoomFactor) const
</del><ins>+FontDescription ThemeMac::controlFont(ControlPart part, const FontCascade& font, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case PushButtonPart: {
</span><span class="lines">@@ -691,7 +691,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LengthSize ThemeMac::controlSize(ControlPart part, const Font& font, const LengthSize& zoomedSize, float zoomFactor) const
</del><ins>+LengthSize ThemeMac::controlSize(ControlPart part, const FontCascade& font, const LengthSize& zoomedSize, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case CheckboxPart:
</span><span class="lines">@@ -710,7 +710,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LengthSize ThemeMac::minimumControlSize(ControlPart part, const Font& font, float zoomFactor) const
</del><ins>+LengthSize ThemeMac::minimumControlSize(ControlPart part, const FontCascade& font, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case SquareButtonPart:
</span><span class="lines">@@ -727,7 +727,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LengthBox ThemeMac::controlBorder(ControlPart part, const Font& font, const LengthBox& zoomedBox, float zoomFactor) const
</del><ins>+LengthBox ThemeMac::controlBorder(ControlPart part, const FontCascade& font, const LengthBox& zoomedBox, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case SquareButtonPart:
</span><span class="lines">@@ -739,7 +739,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LengthBox ThemeMac::controlPadding(ControlPart part, const Font& font, const LengthBox& zoomedBox, float zoomFactor) const
</del><ins>+LengthBox ThemeMac::controlPadding(ControlPart part, const FontCascade& font, const LengthBox& zoomedBox, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case PushButtonPart: {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWidgetMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WidgetMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WidgetMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/mac/WidgetMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #import "Chrome.h"
</span><span class="cx"> #import "Cursor.h"
</span><span class="cx"> #import "Document.h"
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameView.h"
</span><span class="cx"> #import "GraphicsContext.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextPlatformLocaleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/PlatformLocale.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/PlatformLocale.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/text/PlatformLocale.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> class Locale {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextiosLocalizedDateCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #define LocalizedDateCache_h
</span><span class="cx">
</span><span class="cx"> #include "DateComponents.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> class LocalizedDateCache {
</span><span class="cx"> public:
</span><span class="cx"> NSDateFormatter *formatterForDateType(DateComponents::Type);
</span><del>- float maximumWidthForDateType(DateComponents::Type, const Font&, const MeasureTextClient&);
</del><ins>+ float maximumWidthForDateType(DateComponents::Type, const FontCascade&, const MeasureTextClient&);
</ins><span class="cx"> void localeChanged();
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> typedef HashMap<int, float> DateTypeMaxWidthMap;
</span><span class="cx"> DateTypeFormatterMap m_formatterMap;
</span><span class="cx"> DateTypeMaxWidthMap m_maxWidthMap;
</span><del>- Font m_font;
</del><ins>+ FontCascade m_font;
</ins><span class="cx">
</span><span class="cx"> friend LocalizedDateCache& localizedDateCache();
</span><span class="cx"> friend NeverDestroyed<LocalizedDateCache>;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextiosLocalizedDateCachemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/platform/text/ios/LocalizedDateCache.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "LocalizedDateCache.h"
</span><span class="cx">
</span><del>-#import "Font.h"
</del><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "TextRun.h"
</span><span class="cx"> #import <math.h>
</span><span class="cx"> #import <wtf/Assertions.h>
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LocalizedDateCache::LocalizedDateCache()
</span><del>- : m_font(Font())
</del><span class="cx"> {
</span><span class="cx"> // Listen to CF Notifications for locale change, and clear the cache when it does.
</span><span class="cx"> CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), (void*)this, _localeChanged,
</span><span class="lines">@@ -84,14 +83,14 @@
</span><span class="cx"> return dateFormatter;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float LocalizedDateCache::maximumWidthForDateType(DateComponents::Type type, const Font& font, const MeasureTextClient& measurer)
</del><ins>+float LocalizedDateCache::maximumWidthForDateType(DateComponents::Type type, const FontCascade& font, const MeasureTextClient& measurer)
</ins><span class="cx"> {
</span><span class="cx"> int key = static_cast<int>(type);
</span><span class="cx"> if (m_font == font) {
</span><span class="cx"> if (m_maxWidthMap.contains(key))
</span><span class="cx"> return m_maxWidthMap.get(key);
</span><span class="cx"> } else {
</span><del>- m_font = Font(font);
</del><ins>+ m_font = FontCascade(font);
</ins><span class="cx"> m_maxWidthMap.clear();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingEllipsisBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/EllipsisBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/EllipsisBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/EllipsisBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #include "EllipsisBox.h"
</span><span class="cx">
</span><span class="cx"> #include "Document.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "HitTestResult.h"
</span><span class="cx"> #include "InlineTextBox.h"
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> setShadow = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Font& font = lineStyle.font();
</del><ins>+ const FontCascade& font = lineStyle.fontCascade();
</ins><span class="cx"> if (selectionState() != RenderObject::SelectionNone) {
</span><span class="cx"> paintSelection(context, paintOffset, lineStyle, font);
</span><span class="cx">
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> IntRect EllipsisBox::selectionRect()
</span><span class="cx"> {
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><del>- const Font& font = lineStyle.font();
</del><ins>+ const FontCascade& font = lineStyle.fontCascade();
</ins><span class="cx"> const RootInlineBox& rootBox = root();
</span><span class="cx"> // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
</span><span class="cx"> LayoutRect selectionRect = LayoutRect(x(), y() + rootBox.selectionTopAdjustedForPrecedingBlock(), 0, rootBox.selectionHeightAdjustedForPrecedingBlock());
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> return enclosingIntRect(selectionRect);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void EllipsisBox::paintSelection(GraphicsContext* context, const LayoutPoint& paintOffset, const RenderStyle& style, const Font& font)
</del><ins>+void EllipsisBox::paintSelection(GraphicsContext* context, const LayoutPoint& paintOffset, const RenderStyle& style, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> Color textColor = style.visitedDependentColor(CSSPropertyColor);
</span><span class="cx"> Color c = blockFlow().selectionBackgroundColor();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingEllipsisBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/EllipsisBox.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/EllipsisBox.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/EllipsisBox.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle&);
</span><span class="cx"> int height() const { return m_height; }
</span><span class="cx"> virtual RenderObject::SelectionState selectionState() override { return m_selectionState; }
</span><del>- void paintSelection(GraphicsContext*, const LayoutPoint&, const RenderStyle&, const Font&);
</del><ins>+ void paintSelection(GraphicsContext*, const LayoutPoint&, const RenderStyle&, const FontCascade&);
</ins><span class="cx"> InlineBox* markupBox() const;
</span><span class="cx">
</span><span class="cx"> bool m_shouldPaintMarkupBox;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "EllipsisBox.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "InlineTextBox.h"
</span><span class="cx"> #include "HitTestResult.h"
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx"> shouldClearDescendantsHaveSameLineHeightAndBaseline = true;
</span><span class="cx"> else if (child->behavesLikeText()) {
</span><span class="cx"> if (child->renderer().isLineBreak() || child->renderer().parent() != &renderer()) {
</span><del>- if (!parentStyle.font().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.font().fontMetrics())
</del><ins>+ if (!parentStyle.fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics())
</ins><span class="cx"> || parentStyle.lineHeight() != childStyle.lineHeight()
</span><span class="cx"> || (parentStyle.verticalAlign() != BASELINE && !isRootInlineBox()) || childStyle.verticalAlign() != BASELINE)
</span><span class="cx"> shouldClearDescendantsHaveSameLineHeightAndBaseline = true;
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> auto& childFlowBox = downcast<InlineFlowBox>(*child);
</span><span class="cx"> // Check the child's bit, and then also check for differences in font, line-height, vertical-align
</span><span class="cx"> if (!childFlowBox.descendantsHaveSameLineHeightAndBaseline()
</span><del>- || !parentStyle.font().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.font().fontMetrics())
</del><ins>+ || !parentStyle.fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics())
</ins><span class="cx"> || parentStyle.lineHeight() != childStyle.lineHeight()
</span><span class="cx"> || (parentStyle.verticalAlign() != BASELINE && !isRootInlineBox()) || childStyle.verticalAlign() != BASELINE
</span><span class="cx"> || childStyle.hasBorder() || childStyle.hasPadding() || childStyle.hasTextCombine())
</span><span class="lines">@@ -388,7 +388,7 @@
</span><span class="cx"> RenderText& renderText = textBox.renderer();
</span><span class="cx"> if (renderText.textLength()) {
</span><span class="cx"> if (needsWordSpacing && isSpaceOrNewline(renderText.characterAt(textBox.start())))
</span><del>- logicalLeft += textBox.lineStyle().font().wordSpacing();
</del><ins>+ logicalLeft += textBox.lineStyle().fontCascade().wordSpacing();
</ins><span class="cx"> needsWordSpacing = !isSpaceOrNewline(renderText.characterAt(textBox.end()));
</span><span class="cx"> }
</span><span class="cx"> textBox.setLogicalLeft(logicalLeft);
</span><span class="lines">@@ -449,7 +449,7 @@
</span><span class="cx">
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><span class="cx"> if (lineStyle.fontDescription().nonCJKGlyphOrientation() == NonCJKGlyphOrientationUpright
</span><del>- || lineStyle.font().primaryFontData().hasVerticalGlyphs())
</del><ins>+ || lineStyle.fontCascade().primaryFontData().hasVerticalGlyphs())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
</span><span class="lines">@@ -460,7 +460,7 @@
</span><span class="cx"> if (downcast<InlineFlowBox>(*child).requiresIdeographicBaseline(textBoxDataMap))
</span><span class="cx"> return true;
</span><span class="cx"> } else {
</span><del>- if (child->lineStyle().font().primaryFontData().hasVerticalGlyphs())
</del><ins>+ if (child->lineStyle().fontCascade().primaryFontData().hasVerticalGlyphs())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> const Vector<const SimpleFontData*>* usedFonts = nullptr;
</span><span class="lines">@@ -873,7 +873,7 @@
</span><span class="cx">
</span><span class="cx"> bool emphasisMarkIsAbove;
</span><span class="cx"> if (lineStyle.textEmphasisMark() != TextEmphasisMarkNone && textBox.emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkIsAbove)) {
</span><del>- int emphasisMarkHeight = lineStyle.font().emphasisMarkHeight(lineStyle.textEmphasisMarkString());
</del><ins>+ int emphasisMarkHeight = lineStyle.fontCascade().emphasisMarkHeight(lineStyle.textEmphasisMarkString());
</ins><span class="cx"> if (emphasisMarkIsAbove == !lineStyle.isFlippedLinesWritingMode())
</span><span class="cx"> topGlyphOverflow = std::min(topGlyphOverflow, -emphasisMarkHeight);
</span><span class="cx"> else
</span><span class="lines">@@ -882,7 +882,7 @@
</span><span class="cx">
</span><span class="cx"> // If letter-spacing is negative, we should factor that into right layout overflow. (Even in RTL, letter-spacing is
</span><span class="cx"> // applied to the right, so this is not an issue with left overflow.
</span><del>- rightGlyphOverflow -= std::min(0, (int)lineStyle.font().letterSpacing());
</del><ins>+ rightGlyphOverflow -= std::min(0, (int)lineStyle.fontCascade().letterSpacing());
</ins><span class="cx">
</span><span class="cx"> LayoutUnit textShadowLogicalTop;
</span><span class="cx"> LayoutUnit textShadowLogicalBottom;
</span><span class="lines">@@ -1534,10 +1534,10 @@
</span><span class="cx"> bool emphasisMarkIsAbove;
</span><span class="cx"> if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove) && emphasisMarkIsAbove) {
</span><span class="cx"> if (!childLineStyle.isFlippedLinesWritingMode()) {
</span><del>- int topOfEmphasisMark = child->logicalTop() - childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</del><ins>+ int topOfEmphasisMark = child->logicalTop() - childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</ins><span class="cx"> result = std::max(result, allowedPosition - topOfEmphasisMark);
</span><span class="cx"> } else {
</span><del>- int bottomOfEmphasisMark = child->logicalBottom() + childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</del><ins>+ int bottomOfEmphasisMark = child->logicalBottom() + childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</ins><span class="cx"> result = std::max(result, bottomOfEmphasisMark - allowedPosition);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1583,10 +1583,10 @@
</span><span class="cx"> downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove);
</span><span class="cx"> if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && !emphasisMarkIsAbove) {
</span><span class="cx"> if (!childLineStyle.isFlippedLinesWritingMode()) {
</span><del>- LayoutUnit bottomOfEmphasisMark = child->logicalBottom() + childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</del><ins>+ LayoutUnit bottomOfEmphasisMark = child->logicalBottom() + childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</ins><span class="cx"> result = std::max(result, bottomOfEmphasisMark - allowedPosition);
</span><span class="cx"> } else {
</span><del>- LayoutUnit topOfEmphasisMark = child->logicalTop() - childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</del><ins>+ LayoutUnit topOfEmphasisMark = child->logicalTop() - childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</ins><span class="cx"> result = std::max(result, allowedPosition - topOfEmphasisMark);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -245,14 +245,14 @@
</span><span class="cx"> return state;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static const Font& fontToUse(const RenderStyle& style, const RenderText& renderer)
</del><ins>+static const FontCascade& fontToUse(const RenderStyle& style, const RenderText& renderer)
</ins><span class="cx"> {
</span><span class="cx"> if (style.hasTextCombine() && is<RenderCombineText>(renderer)) {
</span><span class="cx"> const auto& textCombineRenderer = downcast<RenderCombineText>(renderer);
</span><span class="cx"> if (textCombineRenderer.isCombined())
</span><span class="cx"> return textCombineRenderer.textCombineFont();
</span><span class="cx"> }
</span><del>- return style.font();
</del><ins>+ return style.fontCascade();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos) const
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> LayoutUnit selectionTop = this->selectionTop();
</span><span class="cx"> LayoutUnit selectionHeight = this->selectionHeight();
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><del>- const Font& font = fontToUse(lineStyle, renderer());
</del><ins>+ const FontCascade& font = fontToUse(lineStyle, renderer());
</ins><span class="cx">
</span><span class="cx"> String hyphenatedStringBuffer;
</span><span class="cx"> bool respectHyphen = ePos == m_len && hasHyphen();
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx"> selectionPaintStyle = textPaintStyle;
</span><span class="cx">
</span><span class="cx"> // Set our font.
</span><del>- const Font& font = fontToUse(lineStyle, renderer());
</del><ins>+ const FontCascade& font = fontToUse(lineStyle, renderer());
</ins><span class="cx"> // 1. Paint backgrounds behind text if needed. Examples of such backgrounds include selection
</span><span class="cx"> // and composition underlines.
</span><span class="cx"> if (paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseTextClip && !isPrinting) {
</span><span class="lines">@@ -678,7 +678,7 @@
</span><span class="cx"> ePos = std::min(endPos - m_start, (int)m_len);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintSelection(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const Font& font, Color textColor)
</del><ins>+void InlineTextBox::paintSelection(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const FontCascade& font, Color textColor)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(TEXT_SELECTION)
</span><span class="cx"> if (context.paintingDisabled())
</span><span class="lines">@@ -737,7 +737,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintCompositionBackground(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const Font& font, int startPos, int endPos)
</del><ins>+void InlineTextBox::paintCompositionBackground(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const FontCascade& font, int startPos, int endPos)
</ins><span class="cx"> {
</span><span class="cx"> int offset = m_start;
</span><span class="cx"> int sPos = std::max(startPos - offset, 0);
</span><span class="lines">@@ -1058,7 +1058,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintDocumentMarker(GraphicsContext& context, const FloatPoint& boxOrigin, RenderedDocumentMarker& marker, const RenderStyle& style, const Font& font, bool grammar)
</del><ins>+void InlineTextBox::paintDocumentMarker(GraphicsContext& context, const FloatPoint& boxOrigin, RenderedDocumentMarker& marker, const RenderStyle& style, const FontCascade& font, bool grammar)
</ins><span class="cx"> {
</span><span class="cx"> // Never print spelling/grammar markers (5327887)
</span><span class="cx"> if (renderer().document().printing())
</span><span class="lines">@@ -1128,7 +1128,7 @@
</span><span class="cx"> context.drawLineForDocumentMarker(FloatPoint(boxOrigin.x() + start, boxOrigin.y() + underlineOffset), width, lineStyleForMarkerType(marker.type()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintTextMatchMarker(GraphicsContext& context, const FloatPoint& boxOrigin, RenderedDocumentMarker& marker, const RenderStyle& style, const Font& font)
</del><ins>+void InlineTextBox::paintTextMatchMarker(GraphicsContext& context, const FloatPoint& boxOrigin, RenderedDocumentMarker& marker, const RenderStyle& style, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> LayoutUnit selectionHeight = this->selectionHeight();
</span><span class="cx">
</span><span class="lines">@@ -1159,7 +1159,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::computeRectForReplacementMarker(RenderedDocumentMarker& marker, const RenderStyle& style, const Font& font)
</del><ins>+void InlineTextBox::computeRectForReplacementMarker(RenderedDocumentMarker& marker, const RenderStyle& style, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> // Replacement markers are not actually drawn, but their rects need to be computed for hit testing.
</span><span class="cx"> LayoutUnit top = selectionTop();
</span><span class="lines">@@ -1177,7 +1177,7 @@
</span><span class="cx"> marker.setRenderedRect(markerRect);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintDocumentMarkers(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const Font& font, bool background)
</del><ins>+void InlineTextBox::paintDocumentMarkers(GraphicsContext& context, const FloatPoint& boxOrigin, const RenderStyle& style, const FontCascade& font, bool background)
</ins><span class="cx"> {
</span><span class="cx"> if (!renderer().textNode())
</span><span class="cx"> return;
</span><span class="lines">@@ -1329,7 +1329,7 @@
</span><span class="cx"> return isLeftToRightDirection() ? 0 : len();
</span><span class="cx">
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><del>- const Font& font = fontToUse(lineStyle, renderer());
</del><ins>+ const FontCascade& font = fontToUse(lineStyle, renderer());
</ins><span class="cx"> return font.offsetForPosition(constructTextRun(lineStyle, font), lineOffset - logicalLeft(), includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1342,7 +1342,7 @@
</span><span class="cx"> return logicalLeft();
</span><span class="cx">
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><del>- const Font& font = fontToUse(lineStyle, renderer());
</del><ins>+ const FontCascade& font = fontToUse(lineStyle, renderer());
</ins><span class="cx"> int from = !isLeftToRightDirection() ? offset - m_start : 0;
</span><span class="cx"> int to = !isLeftToRightDirection() ? m_len : offset - m_start;
</span><span class="cx"> // FIXME: Do we need to add rightBearing here?
</span><span class="lines">@@ -1352,7 +1352,7 @@
</span><span class="cx"> return snapRectToDevicePixelsWithWritingDirection(selectionRect, renderer().document().deviceScaleFactor(), run.ltr()).maxX();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun InlineTextBox::constructTextRun(const RenderStyle& style, const Font& font, String* hyphenatedStringBuffer) const
</del><ins>+TextRun InlineTextBox::constructTextRun(const RenderStyle& style, const FontCascade& font, String* hyphenatedStringBuffer) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(renderer().text());
</span><span class="cx">
</span><span class="lines">@@ -1366,7 +1366,7 @@
</span><span class="cx"> return constructTextRun(style, font, string, renderer().textLength() - startPos, hyphenatedStringBuffer);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun InlineTextBox::constructTextRun(const RenderStyle& style, const Font& font, String string, unsigned maximumLength, String* hyphenatedStringBuffer) const
</del><ins>+TextRun InlineTextBox::constructTextRun(const RenderStyle& style, const FontCascade& font, String string, unsigned maximumLength, String* hyphenatedStringBuffer) const
</ins><span class="cx"> {
</span><span class="cx"> unsigned length = string.length();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -104,8 +104,8 @@
</span><span class="cx"> LayoutUnit selectionBottom() const;
</span><span class="cx"> LayoutUnit selectionHeight() const;
</span><span class="cx">
</span><del>- TextRun constructTextRun(const RenderStyle&, const Font&, String* hyphenatedStringBuffer = nullptr) const;
- TextRun constructTextRun(const RenderStyle&, const Font&, String, unsigned maximumLength, String* hyphenatedStringBuffer = nullptr) const;
</del><ins>+ TextRun constructTextRun(const RenderStyle&, const FontCascade&, String* hyphenatedStringBuffer = nullptr) const;
+ TextRun constructTextRun(const RenderStyle&, const FontCascade&, String, unsigned maximumLength, String* hyphenatedStringBuffer = nullptr) const;
</ins><span class="cx">
</span><span class="cx"> public:
</span><span class="cx"> virtual FloatRect calculateBoundaries() const { return FloatRect(x(), y(), width(), height()); }
</span><span class="lines">@@ -148,17 +148,17 @@
</span><span class="cx"> virtual float positionForOffset(int offset) const;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void paintCompositionBackground(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const Font&, int startPos, int endPos);
- void paintDocumentMarkers(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const Font&, bool background);
</del><ins>+ void paintCompositionBackground(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const FontCascade&, int startPos, int endPos);
+ void paintDocumentMarkers(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const FontCascade&, bool background);
</ins><span class="cx"> void paintCompositionUnderline(GraphicsContext&, const FloatPoint& boxOrigin, const CompositionUnderline&);
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void paintDecoration(GraphicsContext&, const FloatPoint& boxOrigin, TextDecoration, TextDecorationStyle, const ShadowData*, TextPainter&);
</span><del>- void paintSelection(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const Font&, Color textColor);
- void paintDocumentMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const Font&, bool grammar);
- void paintTextMatchMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const Font&);
</del><ins>+ void paintSelection(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const FontCascade&, Color textColor);
+ void paintDocumentMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const FontCascade&, bool grammar);
+ void paintTextMatchMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const FontCascade&);
</ins><span class="cx">
</span><del>- void computeRectForReplacementMarker(RenderedDocumentMarker&, const RenderStyle&, const Font&);
</del><ins>+ void computeRectForReplacementMarker(RenderedDocumentMarker&, const RenderStyle&, const FontCascade&);
</ins><span class="cx">
</span><span class="cx"> TextRun::ExpansionBehavior expansionBehavior() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -2325,7 +2325,7 @@
</span><span class="cx"> return left;
</span><span class="cx">
</span><span class="cx"> // FIXME: Should letter-spacing apply? This is complicated since it doesn't apply at the edge?
</span><del>- float maxCharWidth = lineGrid->style().font().primaryFontData().maxCharWidth();
</del><ins>+ float maxCharWidth = lineGrid->style().fontCascade().primaryFontData().maxCharWidth();
</ins><span class="cx"> if (!maxCharWidth)
</span><span class="cx"> return left;
</span><span class="cx">
</span><span class="lines">@@ -2365,7 +2365,7 @@
</span><span class="cx"> return right;
</span><span class="cx">
</span><span class="cx"> // FIXME: Should letter-spacing apply? This is complicated since it doesn't apply at the edge?
</span><del>- float maxCharWidth = lineGrid->style().font().primaryFontData().maxCharWidth();
</del><ins>+ float maxCharWidth = lineGrid->style().fontCascade().primaryFontData().maxCharWidth();
</ins><span class="cx"> if (!maxCharWidth)
</span><span class="cx"> return right;
</span><span class="cx">
</span><span class="lines">@@ -3003,7 +3003,7 @@
</span><span class="cx"> newFontDescription.setSpecifiedSize(startingFontSize);
</span><span class="cx"> newFontDescription.setComputedSize(startingFontSize);
</span><span class="cx"> pseudoStyle->setFontDescription(newFontDescription);
</span><del>- pseudoStyle->font().update(pseudoStyle->font().fontSelector());
</del><ins>+ pseudoStyle->fontCascade().update(pseudoStyle->fontCascade().fontSelector());
</ins><span class="cx">
</span><span class="cx"> int desiredCapHeight = (pseudoStyle->initialLetterHeight() - 1) * lineHeight + paragraph->style().fontMetrics().capHeight();
</span><span class="cx"> int actualCapHeight = pseudoStyle->fontMetrics().capHeight();
</span><span class="lines">@@ -3012,7 +3012,7 @@
</span><span class="cx"> newFontDescription.setSpecifiedSize(newFontDescription.specifiedSize() - 1);
</span><span class="cx"> newFontDescription.setComputedSize(newFontDescription.computedSize() -1);
</span><span class="cx"> pseudoStyle->setFontDescription(newFontDescription);
</span><del>- pseudoStyle->font().update(pseudoStyle->font().fontSelector());
</del><ins>+ pseudoStyle->fontCascade().update(pseudoStyle->fontCascade().fontSelector());
</ins><span class="cx"> actualCapHeight = pseudoStyle->fontMetrics().capHeight();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -3693,7 +3693,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename CharacterType>
</span><del>-static inline TextRun constructTextRunInternal(RenderObject* context, const Font& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</del><ins>+static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> TextDirection textDirection = LTR;
</span><span class="cx"> bool directionalOverride = style.rtlOrdering() == VisualOrder;
</span><span class="lines">@@ -3708,7 +3708,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename CharacterType>
</span><del>-static inline TextRun constructTextRunInternal(RenderObject* context, const Font& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
</del><ins>+static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
</ins><span class="cx"> {
</span><span class="cx"> TextDirection textDirection = LTR;
</span><span class="cx"> bool directionalOverride = style.rtlOrdering() == VisualOrder;
</span><span class="lines">@@ -3727,24 +3727,24 @@
</span><span class="cx"> return run;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const LChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const LChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> return constructTextRunInternal(context, font, characters, length, style, expansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const UChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const UChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> return constructTextRunInternal(context, font, characters, length, style, expansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> if (text->is8Bit())
</span><span class="cx"> return constructTextRunInternal(context, font, text->characters8(), text->textLength(), style, expansion);
</span><span class="cx"> return constructTextRunInternal(context, font, text->characters16(), text->textLength(), style, expansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(offset + length <= text->textLength());
</span><span class="cx"> if (text->is8Bit())
</span><span class="lines">@@ -3752,7 +3752,7 @@
</span><span class="cx"> return constructTextRunInternal(context, font, text->characters16() + offset, length, style, expansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const String& string, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
</del><ins>+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const String& string, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
</ins><span class="cx"> {
</span><span class="cx"> unsigned length = string.length();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -202,22 +202,22 @@
</span><span class="cx"> return obj->isFloating() || (obj->isOutOfFlowPositioned() && !obj->style().isOriginalDisplayInlineType() && !obj->container()->isRenderInline());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const String&, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const String&, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const RenderText*, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const RenderText*, unsigned offset, unsigned length, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, unsigned offset, unsigned length, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const RenderText*, unsigned offset, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, unsigned offset, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const LChar* characters, int length, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const LChar* characters, int length, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
</span><span class="cx">
</span><del>- static TextRun constructTextRun(RenderObject* context, const Font&, const UChar* characters, int length, const RenderStyle&,
</del><ins>+ static TextRun constructTextRun(RenderObject* context, const FontCascade&, const UChar* characters, int length, const RenderStyle&,
</ins><span class="cx"> TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
</span><span class="cx">
</span><span class="cx"> LayoutUnit paginationStrut() const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -3947,7 +3947,7 @@
</span><span class="cx"> // Collapse away the trailing space at the end of a block.
</span><span class="cx"> RenderText& renderText = downcast<RenderText>(*trailingSpaceChild);
</span><span class="cx"> const UChar space = ' ';
</span><del>- const Font& font = renderText.style().font(); // FIXME: This ignores first-line.
</del><ins>+ const FontCascade& font = renderText.style().fontCascade(); // FIXME: This ignores first-line.
</ins><span class="cx"> float spaceWidth = font.width(RenderBlock::constructTextRun(&renderText, font, &space, 1, renderText.style()));
</span><span class="cx"> inlineMax -= spaceWidth + font.wordSpacing();
</span><span class="cx"> if (inlineMin > inlineMax)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx"> HashSet<const SimpleFontData*> fallbackFonts;
</span><span class="cx"> GlyphOverflow glyphOverflow;
</span><span class="cx">
</span><del>- const Font& font = lineStyle(*renderer->parent(), lineInfo).font();
</del><ins>+ const FontCascade& font = lineStyle(*renderer->parent(), lineInfo).fontCascade();
</ins><span class="cx"> // Always compute glyph overflow if the block's line-box-contain value is "glyphs".
</span><span class="cx"> if (lineBox->fitsToGlyphs()) {
</span><span class="cx"> // If we don't stick out of the root line's font box, then don't bother computing our glyph overflow. This optimization
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx"> &wordMeasurement.fallbackFonts, &overflow);
</span><span class="cx"> UChar c = renderer->characterAt(wordMeasurement.startOffset);
</span><span class="cx"> if (i > 0 && wordLength == 1 && (c == ' ' || c == '\t'))
</span><del>- measuredWidth += renderer->style().font().wordSpacing();
</del><ins>+ measuredWidth += renderer->style().fontCascade().wordSpacing();
</ins><span class="cx"> } else
</span><span class="cx"> measuredWidth += wordMeasurement.width;
</span><span class="cx"> if (!wordMeasurement.fallbackFonts.isEmpty()) {
</span><span class="lines">@@ -743,14 +743,14 @@
</span><span class="cx"> if (textAlign == JUSTIFY && run != trailingSpaceRun) {
</span><span class="cx"> if (!isAfterExpansion)
</span><span class="cx"> downcast<InlineTextBox>(*run->box()).setCanHaveLeadingExpansion(true);
</span><del>- unsigned opportunitiesInRun = Font::expansionOpportunityCount(renderText.stringView(run->m_start, run->m_stop), run->box()->direction(), isAfterExpansion);
</del><ins>+ unsigned opportunitiesInRun = FontCascade::expansionOpportunityCount(renderText.stringView(run->m_start, run->m_stop), run->box()->direction(), isAfterExpansion);
</ins><span class="cx"> expansionOpportunities.append(opportunitiesInRun);
</span><span class="cx"> expansionOpportunityCount += opportunitiesInRun;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (int length = renderText.textLength()) {
</span><span class="cx"> if (!run->m_start && needsWordSpacing && isSpaceOrNewline(renderText.characterAt(run->m_start)))
</span><del>- totalLogicalWidth += lineStyle(*renderText.parent(), lineInfo).font().wordSpacing();
</del><ins>+ totalLogicalWidth += lineStyle(*renderText.parent(), lineInfo).fontCascade().wordSpacing();
</ins><span class="cx"> needsWordSpacing = !isSpaceOrNewline(renderText.characterAt(run->m_stop - 1)) && run->m_stop == length;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -768,7 +768,7 @@
</span><span class="cx"> downcast<InlineTextBox>(*leafChild).setCanHaveLeadingExpansion(true);
</span><span class="cx"> encounteredJustifiedRuby = true;
</span><span class="cx"> auto& renderText = downcast<RenderText>(leafChild->renderer());
</span><del>- unsigned opportunitiesInRun = Font::expansionOpportunityCount(renderText.stringView(), leafChild->direction(), isAfterExpansion);
</del><ins>+ unsigned opportunitiesInRun = FontCascade::expansionOpportunityCount(renderText.stringView(), leafChild->direction(), isAfterExpansion);
</ins><span class="cx"> expansionOpportunities.append(opportunitiesInRun);
</span><span class="cx"> expansionOpportunityCount += opportunitiesInRun;
</span><span class="cx"> }
</span><span class="lines">@@ -1907,9 +1907,9 @@
</span><span class="cx"> {
</span><span class="cx"> // Determine the width of the ellipsis using the current font.
</span><span class="cx"> // FIXME: CSS3 says this is configurable, also need to use 0x002E (FULL STOP) if horizontal ellipsis is "not renderable"
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1));
</span><del>- const Font& firstLineFont = firstLineStyle().font();
</del><ins>+ const FontCascade& firstLineFont = firstLineStyle().fontCascade();
</ins><span class="cx"> float firstLineEllipsisWidth = firstLineFont.width(constructTextRun(this, firstLineFont, &horizontalEllipsis, 1, firstLineStyle()));
</span><span class="cx"> float ellipsisWidth = (font == firstLineFont) ? firstLineEllipsisWidth : font.width(constructTextRun(this, font, &horizontalEllipsis, 1, style()));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderCombineText.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> m_needsFontUpdate = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float RenderCombineText::width(unsigned from, unsigned length, const Font& font, float xPosition, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</del><ins>+float RenderCombineText::width(unsigned from, unsigned length, const FontCascade& font, float xPosition, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_isCombined)
</span><span class="cx"> return font.size();
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> float combinedTextWidth = width(0, textLength(), originalFont(), 0, nullptr, &glyphOverflow);
</span><span class="cx"> m_isCombined = combinedTextWidth <= emWidth;
</span><span class="cx">
</span><del>- FontSelector* fontSelector = style().font().fontSelector();
</del><ins>+ FontSelector* fontSelector = style().fontCascade().fontSelector();
</ins><span class="cx">
</span><span class="cx"> if (m_isCombined)
</span><span class="cx"> shouldUpdateFont = m_combineFontStyle->setFontDescription(description); // Need to change font orientation to horizontal.
</span><span class="lines">@@ -117,7 +117,8 @@
</span><span class="cx"> static const FontWidthVariant widthVariants[] = { HalfWidth, ThirdWidth, QuarterWidth };
</span><span class="cx"> for (size_t i = 0 ; i < WTF_ARRAY_LENGTH(widthVariants) ; ++i) {
</span><span class="cx"> description.setWidthVariant(widthVariants[i]);
</span><del>- Font compressedFont = Font(description, style().font().letterSpacing(), style().font().wordSpacing());
</del><ins>+
+ FontCascade compressedFont(description, style().fontCascade().letterSpacing(), style().fontCascade().wordSpacing());
</ins><span class="cx"> compressedFont.update(fontSelector);
</span><span class="cx">
</span><span class="cx"> float runWidth = RenderText::width(0, textLength(), compressedFont, 0, nullptr, &glyphOverflow);
</span><span class="lines">@@ -136,7 +137,7 @@
</span><span class="cx"> shouldUpdateFont = m_combineFontStyle->setFontDescription(originalFont().fontDescription());
</span><span class="cx">
</span><span class="cx"> if (shouldUpdateFont)
</span><del>- m_combineFontStyle->font().update(fontSelector);
</del><ins>+ m_combineFontStyle->fontCascade().update(fontSelector);
</ins><span class="cx">
</span><span class="cx"> if (m_isCombined) {
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectReplacementCharacter, 1));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderCombineText.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #ifndef RenderCombineText_h
</span><span class="cx"> #define RenderCombineText_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderElement.h"
</span><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "Text.h"
</span><span class="lines">@@ -38,15 +38,15 @@
</span><span class="cx"> void adjustTextOrigin(FloatPoint& textOrigin, const FloatRect& boxRect) const;
</span><span class="cx"> void getStringToRender(int, String&, int& length) const;
</span><span class="cx"> bool isCombined() const { return m_isCombined; }
</span><del>- float combinedTextWidth(const Font& font) const { return font.size(); }
- const Font& originalFont() const { return parent()->style().font(); }
- const Font& textCombineFont() const { return m_combineFontStyle->font(); }
</del><ins>+ float combinedTextWidth(const FontCascade& font) const { return font.size(); }
+ const FontCascade& originalFont() const { return parent()->style().fontCascade(); }
+ const FontCascade& textCombineFont() const { return m_combineFontStyle->fontCascade(); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void node() const = delete;
</span><span class="cx">
</span><span class="cx"> virtual bool isCombineText() const override { return true; }
</span><del>- virtual float width(unsigned from, unsigned length, const Font&, float xPosition, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const override;
</del><ins>+ virtual float width(unsigned from, unsigned length, const FontCascade&, float xPosition, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const override;
</ins><span class="cx"> virtual const char* renderName() const override { return "RenderCombineText"; }
</span><span class="cx"> virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</span><span class="cx"> virtual void setRenderedText(const String&) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderDeprecatedFlexibleBox.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "LayoutRepainter.h"
</span><span class="cx"> #include "RenderLayer.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="lines">@@ -997,7 +997,7 @@
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace, 2));
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1));
</span><span class="cx"> const RenderStyle& lineStyle = numVisibleLines == 1 ? firstLineStyle() : style();
</span><del>- const Font& font = lineStyle.font();
</del><ins>+ const FontCascade& font = lineStyle.fontCascade();
</ins><span class="cx">
</span><span class="cx"> // Get ellipsis width, and if the last child is an anchor, it will go after the ellipsis, so add in a space and the anchor width too
</span><span class="cx"> LayoutUnit totalWidth;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderEmbeddedObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "ChromeClient.h"
</span><span class="cx"> #include "Cursor.h"
</span><span class="cx"> #include "EventHandler.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FontSelector.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameLoaderClient.h"
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> FloatRect indicatorRect;
</span><span class="cx"> FloatRect replacementTextRect;
</span><span class="cx"> FloatRect arrowRect;
</span><del>- Font font;
</del><ins>+ FontCascade font;
</ins><span class="cx"> TextRun run("");
</span><span class="cx"> float textWidth;
</span><span class="cx"> if (!getReplacementTextGeometry(paintOffset, contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth))
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx"> repaint();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderEmbeddedObject::getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, FloatRect& indicatorRect, FloatRect& replacementTextRect, FloatRect& arrowRect, Font& font, TextRun& run, float& textWidth) const
</del><ins>+bool RenderEmbeddedObject::getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, FloatRect& indicatorRect, FloatRect& replacementTextRect, FloatRect& arrowRect, FontCascade& font, TextRun& run, float& textWidth) const
</ins><span class="cx"> {
</span><span class="cx"> bool includesArrow = shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason);
</span><span class="cx">
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx"> fontDescription.setWeight(FontWeightBold);
</span><span class="cx"> fontDescription.setRenderingMode(frame().settings().fontRenderingMode());
</span><span class="cx"> fontDescription.setComputedSize(12);
</span><del>- font = Font(fontDescription, 0, 0);
</del><ins>+ font = FontCascade(fontDescription, 0, 0);
</ins><span class="cx"> font.update(0);
</span><span class="cx">
</span><span class="cx"> run = TextRun(m_unavailablePluginReplacementText);
</span><span class="lines">@@ -391,7 +391,7 @@
</span><span class="cx"> FloatRect indicatorRect;
</span><span class="cx"> FloatRect replacementTextRect;
</span><span class="cx"> FloatRect arrowRect;
</span><del>- Font font;
</del><ins>+ FontCascade font;
</ins><span class="cx"> TextRun run("", 0);
</span><span class="cx"> float textWidth;
</span><span class="cx"> if (getReplacementTextGeometry(accumulatedOffset, contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth))
</span><span class="lines">@@ -582,7 +582,7 @@
</span><span class="cx"> FloatRect indicatorRect;
</span><span class="cx"> FloatRect replacementTextRect;
</span><span class="cx"> FloatRect arrowRect;
</span><del>- Font font;
</del><ins>+ FontCascade font;
</ins><span class="cx"> TextRun run("");
</span><span class="cx"> float textWidth;
</span><span class="cx"> return getReplacementTextGeometry(IntPoint(), contentRect, indicatorRect, replacementTextRect, arrowRect, font, run, textWidth)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderEmbeddedObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> void setUnavailablePluginIndicatorIsPressed(bool);
</span><span class="cx"> bool isInUnavailablePluginIndicator(const MouseEvent&) const;
</span><span class="cx"> bool isInUnavailablePluginIndicator(const FloatPoint&) const;
</span><del>- bool getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, FloatRect& indicatorRect, FloatRect& replacementTextRect, FloatRect& arrowRect, Font&, TextRun&, float& textWidth) const;
</del><ins>+ bool getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, FloatRect& indicatorRect, FloatRect& replacementTextRect, FloatRect& arrowRect, FontCascade&, TextRun&, float& textWidth) const;
</ins><span class="cx"> LayoutRect unavailablePluginIndicatorBounds(const LayoutPoint&) const;
</span><span class="cx">
</span><span class="cx"> virtual bool canHaveChildren() const override final;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFileUploadControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> #include "RenderFileUploadControl.h"
</span><span class="cx">
</span><span class="cx"> #include "FileList.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "HTMLInputElement.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">
</span><span class="cx"> if (paintInfo.phase == PaintPhaseForeground) {
</span><span class="cx"> const String& displayedFilename = fileTextValue();
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun textRun = constructTextRun(this, font, displayedFilename, style(), TextRun::AllowTrailingExpansion, RespectDirection | RespectDirectionOverride);
</span><span class="cx"> textRun.disableRoundingHacks();
</span><span class="cx">
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> // (using "0" as the nominal character).
</span><span class="cx"> const UChar character = '0';
</span><span class="cx"> const String characterAsString = String(&character, 1);
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> // FIXME: Remove the need for this const_cast by making constructTextRun take a const RenderObject*.
</span><span class="cx"> RenderFileUploadControl* renderer = const_cast<RenderFileUploadControl*>(this);
</span><span class="cx"> float minDefaultLabelWidth = defaultWidthNumChars * font.width(constructTextRun(renderer, font, characterAsString, style(), TextRun::AllowTrailingExpansion));
</span><span class="lines">@@ -271,9 +271,9 @@
</span><span class="cx"> ASSERT(inputElement().files());
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (inputElement().files()->length())
</span><del>- return StringTruncator::rightTruncate(inputElement().displayString(), maxFilenameWidth(), style().font(), StringTruncator::EnableRoundingHacks);
</del><ins>+ return StringTruncator::rightTruncate(inputElement().displayString(), maxFilenameWidth(), style().fontCascade(), StringTruncator::EnableRoundingHacks);
</ins><span class="cx"> #endif
</span><del>- return theme().fileListNameForWidth(inputElement().files(), style().font(), maxFilenameWidth(), inputElement().multiple());
</del><ins>+ return theme().fileListNameForWidth(inputElement().files(), style().fontCascade(), maxFilenameWidth(), inputElement().multiple());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> newStyle.get().setTop(Length(0, Fixed));
</span><span class="cx"> newStyle.get().setWidth(Length(100, Percent));
</span><span class="cx"> newStyle.get().setHeight(Length(100, Percent));
</span><del>- newStyle.get().font().update(0);
</del><ins>+ newStyle.get().fontCascade().update(nullptr);
</ins><span class="cx"> return newStyle;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFullScreencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> fullscreenStyle.get().setZIndex(INT_MAX);
</span><span class="cx">
</span><span class="cx"> fullscreenStyle.get().setFontDescription(FontDescription());
</span><del>- fullscreenStyle.get().font().update(0);
</del><ins>+ fullscreenStyle.get().fontCascade().update(nullptr);
</ins><span class="cx">
</span><span class="cx"> fullscreenStyle.get().setDisplay(FLEX);
</span><span class="cx"> fullscreenStyle.get().setJustifyContent(JustifyCenter);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx">
</span><span class="cx"> #include "BitmapImage.h"
</span><span class="cx"> #include "CachedImage.h"
</span><del>-#include "Font.h"
</del><span class="cx"> #include "FontCache.h"
</span><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameSelection.h"
</span><span class="cx"> #include "GeometryUtilities.h"
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">
</span><span class="cx"> // we have an alt and the user meant it (its not a text we invented)
</span><span class="cx"> if (!m_altText.isEmpty()) {
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> IntSize paddedTextSize(paddingWidth + std::min(ceilf(font.width(RenderBlock::constructTextRun(this, font, m_altText, style()))), maxAltTextWidth), paddingHeight + std::min(font.fontMetrics().height(), maxAltTextHeight));
</span><span class="cx"> imageSize = imageSize.expandedTo(paddedTextSize);
</span><span class="cx"> }
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx"> if (!m_altText.isEmpty()) {
</span><span class="cx"> String text = document().displayStringModifiedByEncoding(m_altText);
</span><span class="cx"> context->setFillColor(style().visitedDependentColor(CSSPropertyColor), style().colorSpace());
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> const FontMetrics& fontMetrics = font.fontMetrics();
</span><span class="cx"> LayoutUnit ascent = fontMetrics.ascent();
</span><span class="cx"> LayoutPoint altTextOffset = paintOffset;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx"> || (parentRenderInline && parentStyle->verticalAlign() != BASELINE)
</span><span class="cx"> || style().verticalAlign() != BASELINE
</span><span class="cx"> || style().textEmphasisMark() != TextEmphasisMarkNone
</span><del>- || (checkFonts && (!parentStyle->font().fontMetrics().hasIdenticalAscentDescentAndLineGap(style().font().fontMetrics())
</del><ins>+ || (checkFonts && (!parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(style().fontCascade().fontMetrics())
</ins><span class="cx"> || parentStyle->lineHeight() != style().lineHeight()))
</span><span class="cx"> || (flowThread && flowThread->isRenderNamedFlowThread()); // FIXME: Enable the optimization once we make overflow computation for culled inlines in regions.
</span><span class="cx">
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> // Have to check the first line style as well.
</span><span class="cx"> parentStyle = &parent()->firstLineStyle();
</span><span class="cx"> RenderStyle& childStyle = firstLineStyle();
</span><del>- alwaysCreateLineBoxes = !parentStyle->font().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.font().fontMetrics())
</del><ins>+ alwaysCreateLineBoxes = !parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics())
</ins><span class="cx"> || childStyle.verticalAlign() != BASELINE
</span><span class="cx"> || parentStyle->lineHeight() != childStyle.lineHeight();
</span><span class="cx"> }
</span><span class="lines">@@ -574,8 +574,8 @@
</span><span class="cx"> if (renderBox.inlineBoxWrapper()) {
</span><span class="cx"> const RootInlineBox& rootBox = renderBox.inlineBoxWrapper()->root();
</span><span class="cx"> const RenderStyle& containerStyle = rootBox.isFirstLine() ? container->firstLineStyle() : container->style();
</span><del>- int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().font().fontMetrics().ascent() - containerStyle.font().fontMetrics().ascent());
- int logicalHeight = containerStyle.font().fontMetrics().height();
</del><ins>+ int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().fontCascade().fontMetrics().ascent() - containerStyle.fontCascade().fontMetrics().ascent());
+ int logicalHeight = containerStyle.fontCascade().fontMetrics().height();
</ins><span class="cx"> if (isHorizontal)
</span><span class="cx"> context.addRect(FloatRect(renderBox.inlineBoxWrapper()->x() - renderBox.marginLeft(), logicalTop, renderBox.width() + renderBox.horizontalMarginExtent(), logicalHeight));
</span><span class="cx"> else
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx"> for (InlineFlowBox* childLine = renderInline.firstLineBox(); childLine; childLine = childLine->nextLineBox()) {
</span><span class="cx"> const RootInlineBox& rootBox = childLine->root();
</span><span class="cx"> const RenderStyle& containerStyle = rootBox.isFirstLine() ? container->firstLineStyle() : container->style();
</span><del>- int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().font().fontMetrics().ascent() - containerStyle.font().fontMetrics().ascent());
</del><ins>+ int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().fontCascade().fontMetrics().ascent() - containerStyle.fontCascade().fontMetrics().ascent());
</ins><span class="cx"> int logicalHeight = containerStyle.fontMetrics().height();
</span><span class="cx"> if (isHorizontal) {
</span><span class="cx"> context.addRect(FloatRect(childLine->x() - childLine->marginLogicalLeft(),
</span><span class="lines">@@ -610,8 +610,8 @@
</span><span class="cx"> for (InlineTextBox* childText = currText.firstTextBox(); childText; childText = childText->nextTextBox()) {
</span><span class="cx"> const RootInlineBox& rootBox = childText->root();
</span><span class="cx"> const RenderStyle& containerStyle = rootBox.isFirstLine() ? container->firstLineStyle() : container->style();
</span><del>- int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().font().fontMetrics().ascent() - containerStyle.font().fontMetrics().ascent());
- int logicalHeight = containerStyle.font().fontMetrics().height();
</del><ins>+ int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().fontCascade().fontMetrics().ascent() - containerStyle.fontCascade().fontMetrics().ascent());
+ int logicalHeight = containerStyle.fontCascade().fontMetrics().height();
</ins><span class="cx"> if (isHorizontal)
</span><span class="cx"> context.addRect(FloatRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight));
</span><span class="cx"> else
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx"> // FIXME: This could use a helper to share these with text path.
</span><span class="cx"> const RootInlineBox& rootBox = inlineBox->root();
</span><span class="cx"> const RenderStyle& containerStyle = rootBox.isFirstLine() ? container->firstLineStyle() : container->style();
</span><del>- int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().font().fontMetrics().ascent() - containerStyle.font().fontMetrics().ascent());
</del><ins>+ int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().fontCascade().fontMetrics().ascent() - containerStyle.fontCascade().fontMetrics().ascent());
</ins><span class="cx"> int logicalHeight = containerStyle.fontMetrics().height();
</span><span class="cx"> if (isHorizontal)
</span><span class="cx"> context.addRect(FloatRect(inlineBox->x(), logicalTop, inlineBox->logicalWidth(), logicalHeight));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -112,14 +112,14 @@
</span><span class="cx"> for (int i = 0; i < size; ++i) {
</span><span class="cx"> HTMLElement* element = listItems[i];
</span><span class="cx"> String text;
</span><del>- Font itemFont = style().font();
</del><ins>+ FontCascade itemFont = style().fontCascade();
</ins><span class="cx"> if (is<HTMLOptionElement>(*element))
</span><span class="cx"> text = downcast<HTMLOptionElement>(*element).textIndentedToRespectGroupLabel();
</span><span class="cx"> else if (is<HTMLOptGroupElement>(*element)) {
</span><span class="cx"> text = downcast<HTMLOptGroupElement>(*element).groupLabelText();
</span><span class="cx"> FontDescription d = itemFont.fontDescription();
</span><span class="cx"> d.setWeight(d.bolderWeight());
</span><del>- itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
</del><ins>+ itemFont = FontCascade(d, itemFont.letterSpacing(), itemFont.wordSpacing());
</ins><span class="cx"> itemFont.update(document().ensureStyleResolver().fontSelector());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static LayoutSize itemOffsetForAlignment(TextRun textRun, RenderStyle* itemStyle, Font itemFont, LayoutRect itemBoudingBox)
</del><ins>+static LayoutSize itemOffsetForAlignment(TextRun textRun, RenderStyle* itemStyle, FontCascade itemFont, LayoutRect itemBoudingBox)
</ins><span class="cx"> {
</span><span class="cx"> ETextAlign actualAlignment = itemStyle->textAlign();
</span><span class="cx"> // FIXME: Firefox doesn't respect JUSTIFY. Should we?
</span><span class="lines">@@ -400,14 +400,14 @@
</span><span class="cx"> paintInfo.context->setFillColor(textColor, colorSpace);
</span><span class="cx">
</span><span class="cx"> TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), isOverride(itemStyle->unicodeBidi()), true, TextRun::NoRounding);
</span><del>- Font itemFont = style().font();
</del><ins>+ FontCascade itemFont = style().fontCascade();
</ins><span class="cx"> LayoutRect r = itemBoundingBoxRect(paintOffset, listIndex);
</span><span class="cx"> r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r));
</span><span class="cx">
</span><span class="cx"> if (is<HTMLOptGroupElement>(*listItemElement)) {
</span><span class="cx"> FontDescription d = itemFont.fontDescription();
</span><span class="cx"> d.setWeight(d.bolderWeight());
</span><del>- itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
</del><ins>+ itemFont = FontCascade(d, itemFont.letterSpacing(), itemFont.wordSpacing());
</ins><span class="cx"> itemFont.update(document().ensureStyleResolver().fontSelector());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListMarker.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "RenderListMarker.h"
</span><span class="cx">
</span><span class="cx"> #include "Document.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "InlineElementBox.h"
</span><span class="cx"> #include "RenderLayer.h"
</span><span class="lines">@@ -1314,7 +1314,7 @@
</span><span class="cx"> if (m_text.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun textRun = RenderBlock::constructTextRun(this, font, m_text, style());
</span><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*context, false);
</span><span class="lines">@@ -1529,7 +1529,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx">
</span><span class="cx"> LayoutUnit logicalWidth = 0;
</span><span class="cx"> EListStyleType type = style().listStyleType();
</span><span class="lines">@@ -1757,7 +1757,7 @@
</span><span class="cx"> switch (type) {
</span><span class="cx"> case Asterisks:
</span><span class="cx"> case Footnotes: {
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
</span><span class="cx"> relativeRect = IntRect(0, 0, font.width(run), font.fontMetrics().height());
</span><span class="cx"> break;
</span><span class="lines">@@ -1851,7 +1851,7 @@
</span><span class="cx"> case Urdu:
</span><span class="cx"> if (m_text.isEmpty())
</span><span class="cx"> return IntRect();
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
</span><span class="cx"> int itemWidth = font.width(run);
</span><span class="cx"> UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' };
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx"> if (m_innerBlock) // RenderBlock handled updating the anonymous block's style.
</span><span class="cx"> adjustInnerStyle();
</span><span class="cx">
</span><del>- bool fontChanged = !oldStyle || oldStyle->font() != style().font();
</del><ins>+ bool fontChanged = !oldStyle || oldStyle->fontCascade() != style().fontCascade();
</ins><span class="cx"> if (fontChanged) {
</span><span class="cx"> updateOptionsWidth();
</span><span class="cx"> m_needsOptionsWidthUpdate = false;
</span><span class="lines">@@ -222,13 +222,13 @@
</span><span class="cx"> if (RenderStyle* optionStyle = element->computedStyle())
</span><span class="cx"> optionWidth += minimumValueForLength(optionStyle->textIndent(), 0);
</span><span class="cx"> if (!text.isEmpty()) {
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun run = RenderBlock::constructTextRun(this, font, text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
</span><span class="cx"> optionWidth += font.width(run);
</span><span class="cx"> }
</span><span class="cx"> maxOptionWidth = std::max(maxOptionWidth, optionWidth);
</span><span class="cx"> } else if (!text.isEmpty()) {
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun run = RenderBlock::constructTextRun(this, font, text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
</span><span class="cx"> maxOptionWidth = std::max(maxOptionWidth, font.width(run));
</span><span class="cx"> }
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx"> getItemBackgroundColor(listIndex, itemBackgroundColor, itemHasCustomBackgroundColor);
</span><span class="cx">
</span><span class="cx"> RenderStyle* style = element->renderStyle() ? element->renderStyle() : element->computedStyle();
</span><del>- return style ? PopupMenuStyle(style->visitedDependentColor(CSSPropertyColor), itemBackgroundColor, style->font(), style->visibility() == VISIBLE,
</del><ins>+ return style ? PopupMenuStyle(style->visitedDependentColor(CSSPropertyColor), itemBackgroundColor, style->fontCascade(), style->visibility() == VISIBLE,
</ins><span class="cx"> style->display() == NONE, true, style->textIndent(), style->direction(), isOverride(style->unicodeBidi()),
</span><span class="cx"> itemHasCustomBackgroundColor ? PopupMenuStyle::CustomBackgroundColor : PopupMenuStyle::DefaultBackgroundColor) : menuStyle();
</span><span class="cx"> }
</span><span class="lines">@@ -564,7 +564,7 @@
</span><span class="cx"> const RenderStyle& styleToUse = m_innerBlock ? m_innerBlock->style() : style();
</span><span class="cx"> IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
</span><span class="cx"> return PopupMenuStyle(styleToUse.visitedDependentColor(CSSPropertyColor), styleToUse.visitedDependentColor(CSSPropertyBackgroundColor),
</span><del>- styleToUse.font(), styleToUse.visibility() == VISIBLE, styleToUse.display() == NONE,
</del><ins>+ styleToUse.fontCascade(), styleToUse.visibility() == VISIBLE, styleToUse.display() == NONE,
</ins><span class="cx"> style().hasAppearance() && style().appearance() == MenulistPart, styleToUse.textIndent(),
</span><span class="cx"> style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::DefaultBackgroundColor,
</span><span class="cx"> PopupMenuStyle::SelectPopup, theme().popupMenuSize(styleToUse, absBounds));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRubyRuncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRubyRun.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRubyRun.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderRubyRun.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -254,8 +254,8 @@
</span><span class="cx"> if (isHorizontalWritingMode() && rt->style().rubyPosition() == RubyPositionInterCharacter) {
</span><span class="cx"> // Bopomofo. We need to move the RenderRubyText over to the right side and center it
</span><span class="cx"> // vertically relative to the base.
</span><del>- const Font& font = style().font();
- float distanceBetweenBase = max(font.letterSpacing(), 2.0f * rt->style().font().fontMetrics().height());
</del><ins>+ const FontCascade& font = style().fontCascade();
+ float distanceBetweenBase = max(font.letterSpacing(), 2.0f * rt->style().fontCascade().fontMetrics().height());
</ins><span class="cx"> setWidth(width() + distanceBetweenBase - font.letterSpacing());
</span><span class="cx"> if (RenderRubyBase* rb = rubyBase()) {
</span><span class="cx"> LayoutUnit firstLineTop = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderSearchField.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -260,7 +260,7 @@
</span><span class="cx">
</span><span class="cx"> PopupMenuStyle RenderSearchField::menuStyle() const
</span><span class="cx"> {
</span><del>- return PopupMenuStyle(style().visitedDependentColor(CSSPropertyColor), style().visitedDependentColor(CSSPropertyBackgroundColor), style().font(), style().visibility() == VISIBLE,
</del><ins>+ return PopupMenuStyle(style().visitedDependentColor(CSSPropertyColor), style().visitedDependentColor(CSSPropertyBackgroundColor), style().fontCascade(), style().visibility() == VISIBLE,
</ins><span class="cx"> style().display() == NONE, true, style().textIndent(), style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::CustomBackgroundColor);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -229,8 +229,8 @@
</span><span class="cx"> bool RenderText::computeUseBackslashAsYenSymbol() const
</span><span class="cx"> {
</span><span class="cx"> const RenderStyle& style = this->style();
</span><del>- const FontDescription& fontDescription = style.font().fontDescription();
- if (style.font().useBackslashAsYenSymbol())
</del><ins>+ const FontDescription& fontDescription = style.fontCascade().fontDescription();
+ if (style.fontCascade().useBackslashAsYenSymbol())
</ins><span class="cx"> return true;
</span><span class="cx"> if (fontDescription.isSpecifiedFont())
</span><span class="cx"> return false;
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx"> if (!oldStyle) {
</span><span class="cx"> m_useBackslashAsYenSymbol = computeUseBackslashAsYenSymbol();
</span><span class="cx"> needsResetText = m_useBackslashAsYenSymbol;
</span><del>- } else if (oldStyle->font().useBackslashAsYenSymbol() != newStyle.font().useBackslashAsYenSymbol()) {
</del><ins>+ } else if (oldStyle->fontCascade().useBackslashAsYenSymbol() != newStyle.fontCascade().useBackslashAsYenSymbol()) {
</ins><span class="cx"> m_useBackslashAsYenSymbol = computeUseBackslashAsYenSymbol();
</span><span class="cx"> needsResetText = true;
</span><span class="cx"> }
</span><span class="lines">@@ -451,7 +451,7 @@
</span><span class="cx"> return box.root().computeCaretRect(left, caretWidth, extraWidthToEndOfLine);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle& style) const
</del><ins>+ALWAYS_INLINE float RenderText::widthFromCache(const FontCascade& f, int start, int len, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle& style) const
</ins><span class="cx"> {
</span><span class="cx"> if (style.hasTextCombine() && is<RenderCombineText>(*this)) {
</span><span class="cx"> const RenderCombineText& combineText = downcast<RenderCombineText>(*this);
</span><span class="lines">@@ -544,7 +544,7 @@
</span><span class="cx"> ASSERT(m_text);
</span><span class="cx"> StringImpl& text = *m_text.impl();
</span><span class="cx"> if (text[0] == ' ' || (text[0] == '\n' && !style.preserveNewline()) || text[0] == '\t') {
</span><del>- const Font& font = style.font(); // FIXME: This ignores first-line.
</del><ins>+ const FontCascade& font = style.fontCascade(); // FIXME: This ignores first-line.
</ins><span class="cx"> if (stripFrontSpaces) {
</span><span class="cx"> const UChar space = ' ';
</span><span class="cx"> float spaceWidth = font.width(RenderBlock::constructTextRun(this, font, &space, 1, style));
</span><span class="lines">@@ -560,7 +560,7 @@
</span><span class="cx">
</span><span class="cx"> // Compute our max widths by scanning the string for newlines.
</span><span class="cx"> if (hasBreak) {
</span><del>- const Font& f = style.font(); // FIXME: This ignores first-line.
</del><ins>+ const FontCascade& f = style.fontCascade(); // FIXME: This ignores first-line.
</ins><span class="cx"> bool firstLine = true;
</span><span class="cx"> beginMaxW = maxW;
</span><span class="cx"> endMaxW = maxW;
</span><span class="lines">@@ -637,13 +637,13 @@
</span><span class="cx"> m_knownToHaveNoOverflowAndNoFallbackFonts = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline float hyphenWidth(RenderText* renderer, const Font& font)
</del><ins>+static inline float hyphenWidth(RenderText* renderer, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> const RenderStyle& style = renderer->style();
</span><span class="cx"> return font.width(RenderBlock::constructTextRun(renderer, font, style.hyphenString().string(), style));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static float maxWordFragmentWidth(RenderText* renderer, const RenderStyle& style, const Font& font, StringView word, int minimumPrefixLength, unsigned minimumSuffixLength, int& suffixStart, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow& glyphOverflow)
</del><ins>+static float maxWordFragmentWidth(RenderText* renderer, const RenderStyle& style, const FontCascade& font, StringView word, int minimumPrefixLength, unsigned minimumSuffixLength, int& suffixStart, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow& glyphOverflow)
</ins><span class="cx"> {
</span><span class="cx"> suffixStart = 0;
</span><span class="cx"> if (word.length() <= minimumSuffixLength)
</span><span class="lines">@@ -701,7 +701,7 @@
</span><span class="cx"> m_hasEndWS = false;
</span><span class="cx">
</span><span class="cx"> const RenderStyle& style = this->style();
</span><del>- const Font& font = style.font(); // FIXME: This ignores first-line.
</del><ins>+ const FontCascade& font = style.fontCascade(); // FIXME: This ignores first-line.
</ins><span class="cx"> float wordSpacing = font.wordSpacing();
</span><span class="cx"> int len = textLength();
</span><span class="cx"> LazyLineBreakIterator breakIterator(m_text, style.locale(), mapLineBreakToIteratorMode(style.lineBreak()));
</span><span class="lines">@@ -1215,10 +1215,10 @@
</span><span class="cx"> len = textLength() - from;
</span><span class="cx">
</span><span class="cx"> const RenderStyle& lineStyle = firstLine ? firstLineStyle() : style();
</span><del>- return width(from, len, lineStyle.font(), xPos, fallbackFonts, glyphOverflow);
</del><ins>+ return width(from, len, lineStyle.fontCascade(), xPos, fallbackFonts, glyphOverflow);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-float RenderText::width(unsigned from, unsigned len, const Font& f, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</del><ins>+float RenderText::width(unsigned from, unsigned len, const FontCascade& f, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(from + len <= textLength());
</span><span class="cx"> if (!textLength())
</span><span class="lines">@@ -1226,7 +1226,7 @@
</span><span class="cx">
</span><span class="cx"> const RenderStyle& style = this->style();
</span><span class="cx"> float w;
</span><del>- if (&f == &style.font()) {
</del><ins>+ if (&f == &style.fontCascade()) {
</ins><span class="cx"> if (!style.preserveNewline() && !from && len == textLength() && (!glyphOverflow || !glyphOverflow->computeBounds)) {
</span><span class="cx"> if (fallbackFonts) {
</span><span class="cx"> ASSERT(glyphOverflow);
</span><span class="lines">@@ -1556,7 +1556,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (isAllASCII() || m_text.is8Bit())
</span><span class="cx"> return true;
</span><del>- return Font::characterRangeCodePath(characters16(), length()) == Font::Simple;
</del><ins>+ return FontCascade::characterRangeCodePath(characters16(), length()) == FontCascade::Simple;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderText::momentarilyRevealLastTypedCharacter(unsigned offsetAfterLastTypedCharacter)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderText.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> unsigned textLength() const { return m_text.impl()->length(); } // non virtual implementation of length()
</span><span class="cx"> void positionLineBox(InlineTextBox&);
</span><span class="cx">
</span><del>- virtual float width(unsigned from, unsigned len, const Font&, float xPos, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
</del><ins>+ virtual float width(unsigned from, unsigned len, const FontCascade&, float xPos, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
</ins><span class="cx"> virtual float width(unsigned from, unsigned len, float xPos, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
</span><span class="cx">
</span><span class="cx"> float minLogicalWidth() const;
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) override final { ASSERT_NOT_REACHED(); return false; }
</span><span class="cx">
</span><span class="cx"> bool containsOnlyWhitespace(unsigned from, unsigned len) const;
</span><del>- float widthFromCache(const Font&, int start, int len, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow*, const RenderStyle&) const;
</del><ins>+ float widthFromCache(const FontCascade&, int start, int len, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow*, const RenderStyle&) const;
</ins><span class="cx"> bool isAllASCII() const { return m_isAllASCII; }
</span><span class="cx"> bool computeUseBackslashAsYenSymbol() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControl.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -174,12 +174,12 @@
</span><span class="cx"> float RenderTextControl::getAverageCharWidth()
</span><span class="cx"> {
</span><span class="cx"> float width;
</span><del>- if (style().font().fastAverageCharWidthIfAvailable(width))
</del><ins>+ if (style().fontCascade().fastAverageCharWidthIfAvailable(width))
</ins><span class="cx"> return width;
</span><span class="cx">
</span><span class="cx"> const UChar ch = '0';
</span><span class="cx"> const String str = String(&ch, 1);
</span><del>- const Font& font = style().font();
</del><ins>+ const FontCascade& font = style().fontCascade();
</ins><span class="cx"> TextRun textRun = constructTextRun(this, font, str, style(), TextRun::AllowTrailingExpansion);
</span><span class="cx"> textRun.disableRoundingHacks();
</span><span class="cx"> return font.width(textRun);
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> {
</span><span class="cx"> // This matches the unitsPerEm value for MS Shell Dlg and Courier New from the "head" font table.
</span><span class="cx"> float unitsPerEm = 2048.0f;
</span><del>- return roundf(style().font().size() * x / unitsPerEm);
</del><ins>+ return roundf(style().fontCascade().size() * x / unitsPerEm);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderTextControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlMultiLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> // Since Lucida Grande is the default font, we want this to match the width
</span><span class="cx"> // of Courier New, the default font for textareas in IE, Firefox and Safari Win.
</span><span class="cx"> // 1229 is the avgCharWidth value in the OS/2 table for Courier New.
</span><del>- if (style().font().firstFamily() == "Lucida Grande")
</del><ins>+ if (style().fontCascade().firstFamily() == "Lucida Grande")
</ins><span class="cx"> return scaleEmToUnits(1229);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlSingleLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx"> // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and
</span><span class="cx"> // IE for some encodings (in IE, the default font is encoding specific).
</span><span class="cx"> // 901 is the avgCharWidth value in the OS/2 table for MS Shell Dlg.
</span><del>- if (style().font().firstFamily() == "Lucida Grande")
</del><ins>+ if (style().fontCascade().firstFamily() == "Lucida Grande")
</ins><span class="cx"> return scaleEmToUnits(901);
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -338,15 +338,15 @@
</span><span class="cx"> float maxCharWidth = 0.f;
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- const AtomicString& family = style().font().firstFamily();
</del><ins>+ const AtomicString& family = style().fontCascade().firstFamily();
</ins><span class="cx"> // Since Lucida Grande is the default font, we want this to match the width
</span><span class="cx"> // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and
</span><span class="cx"> // IE for some encodings (in IE, the default font is encoding specific).
</span><span class="cx"> // 4027 is the (xMax - xMin) value in the "head" font table for MS Shell Dlg.
</span><span class="cx"> if (family == "Lucida Grande")
</span><span class="cx"> maxCharWidth = scaleEmToUnits(4027);
</span><del>- else if (style().font().hasValidAverageCharWidth())
- maxCharWidth = roundf(style().font().primaryFontData().maxCharWidth());
</del><ins>+ else if (style().fontCascade().hasValidAverageCharWidth())
+ maxCharWidth = roundf(style().fontCascade().primaryFontData().maxCharWidth());
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // For text inputs, IE adds some extra width.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> case ButtonPart: {
</span><span class="cx"> // Border
</span><span class="cx"> LengthBox borderBox(style.borderTopWidth(), style.borderRightWidth(), style.borderBottomWidth(), style.borderLeftWidth());
</span><del>- borderBox = m_theme->controlBorder(part, style.font(), borderBox, style.effectiveZoom());
</del><ins>+ borderBox = m_theme->controlBorder(part, style.fontCascade(), borderBox, style.effectiveZoom());
</ins><span class="cx"> if (borderBox.top().value() != static_cast<int>(style.borderTopWidth())) {
</span><span class="cx"> if (borderBox.top().value())
</span><span class="cx"> style.setBorderTopWidth(borderBox.top().value());
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Padding
</span><del>- LengthBox paddingBox = m_theme->controlPadding(part, style.font(), style.paddingBox(), style.effectiveZoom());
</del><ins>+ LengthBox paddingBox = m_theme->controlPadding(part, style.fontCascade(), style.paddingBox(), style.effectiveZoom());
</ins><span class="cx"> if (paddingBox != style.paddingBox())
</span><span class="cx"> style.setPaddingBox(paddingBox);
</span><span class="cx">
</span><span class="lines">@@ -154,25 +154,25 @@
</span><span class="cx"> // Width / Height
</span><span class="cx"> // The width and height here are affected by the zoom.
</span><span class="cx"> // FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
</span><del>- LengthSize controlSize = m_theme->controlSize(part, style.font(), LengthSize(style.width(), style.height()), style.effectiveZoom());
</del><ins>+ LengthSize controlSize = m_theme->controlSize(part, style.fontCascade(), LengthSize(style.width(), style.height()), style.effectiveZoom());
</ins><span class="cx"> if (controlSize.width() != style.width())
</span><span class="cx"> style.setWidth(controlSize.width());
</span><span class="cx"> if (controlSize.height() != style.height())
</span><span class="cx"> style.setHeight(controlSize.height());
</span><span class="cx">
</span><span class="cx"> // Min-Width / Min-Height
</span><del>- LengthSize minControlSize = m_theme->minimumControlSize(part, style.font(), style.effectiveZoom());
</del><ins>+ LengthSize minControlSize = m_theme->minimumControlSize(part, style.fontCascade(), style.effectiveZoom());
</ins><span class="cx"> if (minControlSize.width() != style.minWidth())
</span><span class="cx"> style.setMinWidth(minControlSize.width());
</span><span class="cx"> if (minControlSize.height() != style.minHeight())
</span><span class="cx"> style.setMinHeight(minControlSize.height());
</span><span class="cx">
</span><span class="cx"> // Font
</span><del>- FontDescription controlFont = m_theme->controlFont(part, style.font(), style.effectiveZoom());
- if (controlFont != style.font().fontDescription()) {
</del><ins>+ FontDescription controlFont = m_theme->controlFont(part, style.fontCascade(), style.effectiveZoom());
+ if (controlFont != style.fontCascade().fontDescription()) {
</ins><span class="cx"> // Now update our font.
</span><span class="cx"> if (style.setFontDescription(controlFont))
</span><del>- style.font().update(0);
</del><ins>+ style.fontCascade().update(0);
</ins><span class="cx"> }
</span><span class="cx"> // Reset our line-height
</span><span class="cx"> style.setLineHeight(RenderStyle::initialLineHeight());
</span><span class="lines">@@ -1257,7 +1257,7 @@
</span><span class="cx"> return fileButtonNoFileSelectedLabel();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String RenderTheme::fileListNameForWidth(const FileList* fileList, const Font& font, int width, bool multipleFilesAllowed) const
</del><ins>+String RenderTheme::fileListNameForWidth(const FileList* fileList, const FontCascade& font, int width, bool multipleFilesAllowed) const
</ins><span class="cx"> {
</span><span class="cx"> if (width <= 0)
</span><span class="cx"> return String();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderTheme.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> virtual bool popsMenuBySpaceOrReturn() const { return false; }
</span><span class="cx">
</span><span class="cx"> virtual String fileListDefaultLabel(bool multipleFilesAllowed) const;
</span><del>- virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const;
</del><ins>+ virtual String fileListNameForWidth(const FileList*, const FontCascade&, int width, bool multipleFilesAllowed) const;
</ins><span class="cx">
</span><span class="cx"> enum FileUploadDecorations { SingleFile, MultipleFiles };
</span><span class="cx"> virtual bool paintFileUploadIconDecorations(const RenderObject& /*inputRenderer*/, const RenderObject& /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1643,7 +1643,7 @@
</span><span class="cx"> return progressRect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String RenderThemeGtk::fileListNameForWidth(const FileList* fileList, const Font& font, int width, bool multipleFilesAllowed) const
</del><ins>+String RenderThemeGtk::fileListNameForWidth(const FileList* fileList, const FontCascade& font, int width, bool multipleFilesAllowed) const
</ins><span class="cx"> {
</span><span class="cx"> if (width <= 0)
</span><span class="cx"> return String();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeGtkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeGtk.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> virtual void adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
</span><span class="cx"> virtual bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
</span><span class="cx">
</span><del>- virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const override;
</del><ins>+ virtual String fileListNameForWidth(const FileList*, const FontCascade&, int width, bool multipleFilesAllowed) const override;
</ins><span class="cx">
</span><span class="cx"> static void setTextInputBorders(RenderStyle&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx"> #import "DateComponents.h"
</span><span class="cx"> #import "Document.h"
</span><span class="cx"> #import "FloatRoundedRect.h"
</span><del>-#import "Font.h"
</del><span class="cx"> #import "FontCache.h"
</span><ins>+#import "FontCascade.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameView.h"
</span><span class="cx"> #import "Gradient.h"
</span><span class="lines">@@ -545,7 +545,7 @@
</span><span class="cx">
</span><span class="cx"> class RenderThemeMeasureTextClient : public MeasureTextClient {
</span><span class="cx"> public:
</span><del>- RenderThemeMeasureTextClient(const Font& font, RenderObject& renderObject, const RenderStyle& style)
</del><ins>+ RenderThemeMeasureTextClient(const FontCascade& font, RenderObject& renderObject, const RenderStyle& style)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> , m_renderObject(renderObject)
</span><span class="cx"> , m_style(style)
</span><span class="lines">@@ -557,7 +557,7 @@
</span><span class="cx"> return m_font.width(run);
</span><span class="cx"> }
</span><span class="cx"> private:
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> RenderObject& m_renderObject;
</span><span class="cx"> const RenderStyle& m_style;
</span><span class="cx"> };
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Enforce the width and set the box-sizing to content-box to not conflict with the padding.
</span><del>- Font font = style.font();
</del><ins>+ FontCascade font = style.fontCascade();
</ins><span class="cx">
</span><span class="cx"> RenderObject* renderer = inputElement.renderer();
</span><span class="cx"> if (font.primaryFontData().isSVGFont() && !renderer)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> virtual bool paintSnapshottedPluginOverlay(const RenderObject&, const PaintInfo&, const IntRect&) override;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const override;
</del><ins>+ virtual String fileListNameForWidth(const FileList*, const FontCascade&, int width, bool multipleFilesAllowed) const override;
</ins><span class="cx">
</span><span class="cx"> FloatRect convertToPaintingRect(const RenderObject& inputRenderer, const RenderObject& partRenderer, const FloatRect& inputRect, const IntRect&) const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -817,7 +817,7 @@
</span><span class="cx"> style.setLineHeight(RenderStyle::initialLineHeight());
</span><span class="cx">
</span><span class="cx"> if (style.setFontDescription(fontDescription))
</span><del>- style.font().update(0);
</del><ins>+ style.fontCascade().update(0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSControlSize RenderThemeMac::controlSizeForSystemFont(RenderStyle& style) const
</span><span class="lines">@@ -1997,7 +1997,7 @@
</span><span class="cx"> return m_textField.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String RenderThemeMac::fileListNameForWidth(const FileList* fileList, const Font& font, int width, bool multipleFilesAllowed) const
</del><ins>+String RenderThemeMac::fileListNameForWidth(const FileList* fileList, const FontCascade& font, int width, bool multipleFilesAllowed) const
</ins><span class="cx"> {
</span><span class="cx"> if (width <= 0)
</span><span class="cx"> return String();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -901,7 +901,7 @@
</span><span class="cx">
</span><span class="cx"> const RenderStyle& boxLineStyle = box.lineStyle();
</span><span class="cx"> if (usedFonts && !usedFonts->isEmpty() && (includeFont || (boxLineStyle.lineHeight().isNegative() && includeLeading))) {
</span><del>- usedFonts->append(&boxLineStyle.font().primaryFontData());
</del><ins>+ usedFonts->append(&boxLineStyle.fontCascade().primaryFontData());
</ins><span class="cx"> for (size_t i = 0; i < usedFonts->size(); ++i) {
</span><span class="cx"> const FontMetrics& fontMetrics = usedFonts->at(i)->fontMetrics();
</span><span class="cx"> int usedFontAscent = fontMetrics.ascent(baselineType());
</span><span class="lines">@@ -1017,7 +1017,7 @@
</span><span class="cx">
</span><span class="cx"> if (verticalAlign != BASELINE) {
</span><span class="cx"> const RenderStyle& parentLineStyle = firstLine ? parent->firstLineStyle() : parent->style();
</span><del>- const Font& font = parentLineStyle.font();
</del><ins>+ const FontCascade& font = parentLineStyle.fontCascade();
</ins><span class="cx"> const FontMetrics& fontMetrics = font.fontMetrics();
</span><span class="cx"> int fontSize = font.pixelSize();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSimpleLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -184,17 +184,17 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if (style.font().primaryFontData().isSVGFont())
</del><ins>+ if (style.fontCascade().primaryFontData().isSVGFont())
</ins><span class="cx"> return false;
</span><span class="cx"> // We assume that all lines have metrics based purely on the primary font.
</span><del>- auto& primaryFontData = style.font().primaryFontData();
</del><ins>+ auto& primaryFontData = style.fontCascade().primaryFontData();
</ins><span class="cx"> if (primaryFontData.isLoading())
</span><span class="cx"> return false;
</span><span class="cx"> for (const auto& textRenderer : childrenOfType<RenderText>(flow)) {
</span><span class="cx"> if (textRenderer.isCombineText() || textRenderer.isCounter() || textRenderer.isQuote() || textRenderer.isTextFragment()
</span><span class="cx"> || textRenderer.isSVGInlineText())
</span><span class="cx"> return false;
</span><del>- if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple)
</del><ins>+ if (style.fontCascade().codePath(TextRun(textRenderer.text())) != FontCascade::Simple)
</ins><span class="cx"> return false;
</span><span class="cx"> if (!canUseForText(textRenderer, primaryFontData))
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSimpleLineLayoutFlowContentscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> namespace SimpleLineLayout {
</span><span class="cx">
</span><span class="cx"> FlowContents::Style::Style(const RenderStyle& style)
</span><del>- : font(style.font())
</del><ins>+ : font(style.fontCascade())
</ins><span class="cx"> , textAlign(style.textAlign())
</span><span class="cx"> , collapseWhitespace(style.collapseWhiteSpace())
</span><span class="cx"> , preserveNewline(style.preserveNewline())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSimpleLineLayoutFlowContentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef SimpleLineLayoutFlowContents_h
</span><span class="cx"> #define SimpleLineLayoutFlowContents_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderStyle.h"
</span><span class="cx"> #include "TextBreakIterator.h"
</span><span class="cx"> #include "break_lines.h"
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> struct Style {
</span><span class="cx"> explicit Style(const RenderStyle&);
</span><span class="cx">
</span><del>- const Font& font;
</del><ins>+ const FontCascade& font;
</ins><span class="cx"> ETextAlign textAlign;
</span><span class="cx"> bool collapseWhitespace;
</span><span class="cx"> bool preserveNewline;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSimpleLineLayoutFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> bool debugBordersEnabled = flow.frame().settings().simpleLineLayoutDebugBordersEnabled();
</span><span class="cx">
</span><span class="cx"> GraphicsContext& context = *paintInfo.context;
</span><del>- const Font& font = style.font();
</del><ins>+ const FontCascade& font = style.fontCascade();
</ins><span class="cx"> TextPaintStyle textPaintStyle = computeTextPaintStyle(flow.frame(), style, paintInfo);
</span><span class="cx"> GraphicsContextStateSaver stateSaver(context, textPaintStyle.strokeWidth > 0);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingSimpleLineLayoutResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -120,8 +120,8 @@
</span><span class="cx"> , m_lineHeight(lineHeightFromFlow(flow))
</span><span class="cx"> , m_baseline(baselineFromFlow(flow))
</span><span class="cx"> , m_borderAndPaddingBefore(flow.borderAndPaddingBefore())
</span><del>- , m_ascent(flow.style().font().fontMetrics().ascent())
- , m_descent(flow.style().font().fontMetrics().descent())
</del><ins>+ , m_ascent(flow.style().fontCascade().fontMetrics().ascent())
+ , m_descent(flow.style().fontCascade().fontMetrics().descent())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextAutoSizingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextAutoSizing.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextAutoSizing.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/TextAutoSizing.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx"> FontDescription fontDescription = style->fontDescription();
</span><span class="cx"> fontDescription.setComputedSize(averageSize);
</span><span class="cx"> style->setFontDescription(fontDescription);
</span><del>- style->font().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</del><ins>+ style->fontCascade().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</ins><span class="cx"> text->parent()->setStyle(style.releaseNonNull());
</span><span class="cx">
</span><span class="cx"> RenderElement* parentRenderer = text->parent();
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx"> if (listMarkerRenderer->isListMarker()) {
</span><span class="cx"> RefPtr<RenderStyle> style = cloneRenderStyleWithState(listMarkerRenderer->style());
</span><span class="cx"> style->setFontDescription(fontDescription);
</span><del>- style->font().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</del><ins>+ style->fontCascade().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</ins><span class="cx"> downcast<RenderListMarker>(*listMarkerRenderer).setStyle(style.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx"> newParentStyle->setLineHeight(Length(lineHeight, Fixed));
</span><span class="cx"> newParentStyle->setSpecifiedLineHeight(lineHeightLength);
</span><span class="cx"> newParentStyle->setFontDescription(fontDescription);
</span><del>- newParentStyle->font().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</del><ins>+ newParentStyle->fontCascade().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</ins><span class="cx"> parentRenderer->setStyle(newParentStyle.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> fontDescription.setComputedSize(originalSize);
</span><span class="cx"> RefPtr<RenderStyle> style = cloneRenderStyleWithState(text->style());
</span><span class="cx"> style->setFontDescription(fontDescription);
</span><del>- style->font().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</del><ins>+ style->fontCascade().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</ins><span class="cx"> text->parent()->setStyle(style.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx"> // Reset the line height of the parent.
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx"> RefPtr<RenderStyle> newParentStyle = cloneRenderStyleWithState(parentStyle);
</span><span class="cx"> newParentStyle->setLineHeight(originalLineHeight);
</span><span class="cx"> newParentStyle->setFontDescription(fontDescription);
</span><del>- newParentStyle->font().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</del><ins>+ newParentStyle->fontCascade().update(autoSizingNode->document().ensureStyleResolver().fontSelector());
</ins><span class="cx"> parentRenderer->setStyle(newParentStyle.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextPaintercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextPainter.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-TextPainter::TextPainter(GraphicsContext& context, bool paintSelectedTextOnly, bool paintSelectedTextSeparately, const Font& font,
</del><ins>+TextPainter::TextPainter(GraphicsContext& context, bool paintSelectedTextOnly, bool paintSelectedTextSeparately, const FontCascade& font,
</ins><span class="cx"> int startPositionInTextRun, int endPositionInTextBoxString, int length, const AtomicString& emphasisMark, RenderCombineText* combinedText, TextRun& textRun,
</span><span class="cx"> FloatRect& boxRect, FloatPoint& textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow,
</span><span class="cx"> bool textBoxIsHorizontal, TextPaintStyle& textPaintStyle, TextPaintStyle& selectionPaintStyle)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void drawTextOrEmphasisMarks(GraphicsContext& context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark,
</del><ins>+static void drawTextOrEmphasisMarks(GraphicsContext& context, const FontCascade& font, const TextRun& textRun, const AtomicString& emphasisMark,
</ins><span class="cx"> int emphasisMarkOffset, const FloatPoint& point, const int from, const int to)
</span><span class="cx"> {
</span><span class="cx"> if (emphasisMark.isEmpty())
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> m_context.clearShadow();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void paintTextWithShadows(GraphicsContext& context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark,
</del><ins>+static void paintTextWithShadows(GraphicsContext& context, const FontCascade& font, const TextRun& textRun, const AtomicString& emphasisMark,
</ins><span class="cx"> int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const FloatPoint& textOrigin, const FloatRect& boxRect,
</span><span class="cx"> const ShadowData* shadow, bool stroked, bool horizontal)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextPainterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextPainter.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextPainter.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/TextPainter.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> class TextPainter {
</span><span class="cx"> public:
</span><del>- TextPainter(GraphicsContext&, bool paintSelectedTextOnly, bool paintSelectedTextSeparately, const Font&,
</del><ins>+ TextPainter(GraphicsContext&, bool paintSelectedTextOnly, bool paintSelectedTextSeparately, const FontCascade&,
</ins><span class="cx"> int startPositionInTextRun, int endPositionInTextBoxString, int length, const AtomicString& emphasisMark, RenderCombineText*,
</span><span class="cx"> TextRun&, FloatRect& boxRect, FloatPoint& textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow,
</span><span class="cx"> bool textBoxIsHorizontal, TextPaintStyle& nonSelectionPaintStyle, TextPaintStyle& selectionPaintStyle);
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> const ShadowData* m_selectionShadow;
</span><span class="cx"> bool m_paintSelectedTextOnly;
</span><span class="cx"> bool m_paintSelectedTextSeparately;
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> int m_startPositionInTextRun;
</span><span class="cx"> int m_endPositionInTextRun;
</span><span class="cx"> int m_length;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineBreakingContextInlineHeadersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -486,13 +486,13 @@
</span><span class="cx"> downcast<RenderCounter>(renderText).updateCounter();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline float measureHyphenWidth(RenderText* renderer, const Font& font, HashSet<const SimpleFontData*>* fallbackFonts = 0)
</del><ins>+inline float measureHyphenWidth(RenderText* renderer, const FontCascade& font, HashSet<const SimpleFontData*>* fallbackFonts = 0)
</ins><span class="cx"> {
</span><span class="cx"> const RenderStyle& style = renderer->style();
</span><span class="cx"> return font.width(RenderBlock::constructTextRun(renderer, font, style.hyphenString().string(), style), fallbackFonts);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE float textWidth(RenderText* text, unsigned from, unsigned len, const Font& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const SimpleFontData*>& fallbackFonts, TextLayout* layout = 0)
</del><ins>+ALWAYS_INLINE float textWidth(RenderText* text, unsigned from, unsigned len, const FontCascade& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const SimpleFontData*>& fallbackFonts, TextLayout* layout = 0)
</ins><span class="cx"> {
</span><span class="cx"> const RenderStyle& style = text->style();
</span><span class="cx">
</span><span class="lines">@@ -501,7 +501,7 @@
</span><span class="cx"> return text->width(from, len, font, xPos, &fallbackFonts, &glyphOverflow);
</span><span class="cx">
</span><span class="cx"> if (layout)
</span><del>- return Font::width(*layout, from, len, &fallbackFonts);
</del><ins>+ return FontCascade::width(*layout, from, len, &fallbackFonts);
</ins><span class="cx">
</span><span class="cx"> TextRun run = RenderBlock::constructTextRun(text, font, text, from, len, style);
</span><span class="cx"> run.setCharactersLength(text->textLength() - from);
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx"> lineMidpointState.stopIgnoringSpaces(InlineIterator(0, textParagraphSeparator.renderer(), textParagraphSeparator.offset()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline void tryHyphenating(RenderText* text, const Font& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
</del><ins>+inline void tryHyphenating(RenderText* text, const FontCascade& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
</ins><span class="cx"> {
</span><span class="cx"> // Map 'hyphenate-limit-{before,after}: auto;' to 2.
</span><span class="cx"> unsigned minimumPrefixLength;
</span><span class="lines">@@ -615,12 +615,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const RenderStyle& style = lineStyle(*renderText.parent(), m_lineInfo);
</span><del>- const Font& font = style.font();
</del><ins>+ const FontCascade& font = style.fontCascade();
</ins><span class="cx"> bool isFixedPitch = font.isFixedPitch();
</span><span class="cx"> bool canHyphenate = style.hyphens() == HyphensAuto && WebCore::canHyphenate(style.locale());
</span><span class="cx">
</span><span class="cx"> unsigned lastSpace = m_current.offset();
</span><del>- float wordSpacing = m_currentStyle->font().wordSpacing();
</del><ins>+ float wordSpacing = m_currentStyle->fontCascade().wordSpacing();
</ins><span class="cx"> float lastSpaceWordSpacing = 0;
</span><span class="cx"> float wordSpacingForWordMeasurement = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineBreakerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineBreaker.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineBreaker.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> RenderText* m_text;
</span><span class="cx"> OwnPtr<TextLayout> m_layout;
</span><span class="cx"> LazyLineBreakIterator m_lineBreakIterator;
</span><del>- const Font* m_font;
</del><ins>+ const FontCascade* m_font;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class LineBreaker {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineInlineHeadersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineInlineHeaders.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineInlineHeaders.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/line/LineInlineHeaders.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> const RenderStyle& parentStyle = lineStyle(*parent, lineInfo);
</span><span class="cx"> if (flowStyle.lineHeight() != parentStyle.lineHeight()
</span><span class="cx"> || flowStyle.verticalAlign() != parentStyle.verticalAlign()
</span><del>- || !parentStyle.font().fontMetrics().hasIdenticalAscentDescentAndLineGap(flowStyle.font().fontMetrics()))
</del><ins>+ || !parentStyle.fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(flowStyle.fontCascade().fontMetrics()))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (unit == "em") {
</span><del>- lengthValue = floatValue * style->font().size();
</del><ins>+ lengthValue = floatValue * style->fontCascade().size();
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (unit == "ex") {
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx"> length = -7;
</span><span class="cx"> }
</span><span class="cx"> if (length) {
</span><del>- lengthValue = length * style->font().size() / 18;
</del><ins>+ lengthValue = length * style->fontCascade().size() / 18;
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1191,8 +1191,8 @@
</span><span class="cx"> m_operatorFlags = entry->flags;
</span><span class="cx">
</span><span class="cx"> // Leading and trailing space is specified as multiple of 1/18em.
</span><del>- m_leadingSpace = entry->lspace * style().font().size() / 18;
- m_trailingSpace = entry->rspace * style().font().size() / 18;
</del><ins>+ m_leadingSpace = entry->lspace * style().fontCascade().size() / 18;
+ m_trailingSpace = entry->rspace * style().fontCascade().size() / 18;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderMathMLOperator::setOperatorProperties()
</span><span class="lines">@@ -1229,9 +1229,9 @@
</span><span class="cx"> m_operatorFlags &= MathMLOperatorDictionary::Fence | MathMLOperatorDictionary::Separator; // This resets all but the Fence and Separator properties.
</span><span class="cx"> else
</span><span class="cx"> m_operatorFlags = 0; // This resets all the operator properties.
</span><del>- m_leadingSpace = 5 * style().font().size() / 18; // This sets leading space to "thickmathspace".
- m_trailingSpace = 5 * style().font().size() / 18; // This sets trailing space to "thickmathspace".
- m_minSize = style().font().size(); // This sets minsize to "1em".
</del><ins>+ m_leadingSpace = 5 * style().fontCascade().size() / 18; // This sets leading space to "thickmathspace".
+ m_trailingSpace = 5 * style().fontCascade().size() / 18; // This sets trailing space to "thickmathspace".
+ m_minSize = style().fontCascade().size(); // This sets minsize to "1em".
</ins><span class="cx"> m_maxSize = intMaxForLayoutUnit; // This sets maxsize to "infinity".
</span><span class="cx">
</span><span class="cx"> if (m_textContent) {
</span><span class="lines">@@ -1355,7 +1355,7 @@
</span><span class="cx"> RenderMathMLToken::computePreferredLogicalWidths();
</span><span class="cx"> if (isInvisibleOperator()) {
</span><span class="cx"> // In some fonts, glyphs for invisible operators have nonzero width. Consequently, we subtract that width here to avoid wide gaps.
</span><del>- GlyphData data = style().font().glyphDataForCharacter(m_textContent, false);
</del><ins>+ GlyphData data = style().fontCascade().glyphDataForCharacter(m_textContent, false);
</ins><span class="cx"> float glyphWidth = advanceForGlyph(data);
</span><span class="cx"> ASSERT(glyphWidth <= m_minPreferredLogicalWidth);
</span><span class="cx"> m_minPreferredLogicalWidth -= glyphWidth;
</span><span class="lines">@@ -1364,7 +1364,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- GlyphData data = style().font().glyphDataForCharacter(m_textContent, !style().isLeftToRightDirection());
</del><ins>+ GlyphData data = style().fontCascade().glyphDataForCharacter(m_textContent, !style().isLeftToRightDirection());
</ins><span class="cx"> float maximumGlyphWidth = advanceForGlyph(data);
</span><span class="cx"> if (!m_isVertical) {
</span><span class="cx"> if (maximumGlyphWidth < stretchSize())
</span><span class="lines">@@ -1521,7 +1521,7 @@
</span><span class="cx"> if (!bottom.glyph)
</span><span class="cx"> bottom.glyph = extension.glyph;
</span><span class="cx">
</span><del>- top.fontData = &style().font().primaryFontData();
</del><ins>+ top.fontData = &style().fontCascade().primaryFontData();
</ins><span class="cx"> extension.fontData = top.fontData;
</span><span class="cx"> bottom.fontData = top.fontData;
</span><span class="cx"> if (middle.glyph)
</span><span class="lines">@@ -1538,8 +1538,8 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(m_isVertical && isLargeOperatorInDisplayStyle());
</span><span class="cx">
</span><del>- const auto& primaryFontData = style().font().primaryFontData();
- GlyphData baseGlyph = style().font().glyphDataForCharacter(character, !style().isLeftToRightDirection());
</del><ins>+ const auto& primaryFontData = style().fontCascade().primaryFontData();
+ GlyphData baseGlyph = style().fontCascade().glyphDataForCharacter(character, !style().isLeftToRightDirection());
</ins><span class="cx"> if (!primaryFontData.mathData() || baseGlyph.fontData != &primaryFontData)
</span><span class="cx"> return data;
</span><span class="cx">
</span><span class="lines">@@ -1570,8 +1570,8 @@
</span><span class="cx"> StretchyData data;
</span><span class="cx"> StretchyData assemblyData;
</span><span class="cx">
</span><del>- const auto& primaryFontData = style().font().primaryFontData();
- GlyphData baseGlyph = style().font().glyphDataForCharacter(character, !style().isLeftToRightDirection());
</del><ins>+ const auto& primaryFontData = style().fontCascade().primaryFontData();
+ GlyphData baseGlyph = style().fontCascade().glyphDataForCharacter(character, !style().isLeftToRightDirection());
</ins><span class="cx">
</span><span class="cx"> if (primaryFontData.mathData() && baseGlyph.fontData == &primaryFontData) {
</span><span class="cx"> Vector<Glyph> sizeVariants;
</span><span class="lines">@@ -1618,12 +1618,12 @@
</span><span class="cx"> return data;
</span><span class="cx">
</span><span class="cx"> // We convert the list of Unicode characters into a list of glyph data.
</span><del>- GlyphData top = style().font().glyphDataForCharacter(stretchyCharacter->topChar, false);
- GlyphData extension = style().font().glyphDataForCharacter(stretchyCharacter->extensionChar, false);
- GlyphData bottom = style().font().glyphDataForCharacter(stretchyCharacter->bottomChar, false);
</del><ins>+ GlyphData top = style().fontCascade().glyphDataForCharacter(stretchyCharacter->topChar, false);
+ GlyphData extension = style().fontCascade().glyphDataForCharacter(stretchyCharacter->extensionChar, false);
+ GlyphData bottom = style().fontCascade().glyphDataForCharacter(stretchyCharacter->bottomChar, false);
</ins><span class="cx"> GlyphData middle;
</span><span class="cx"> if (stretchyCharacter->middleChar)
</span><del>- middle = style().font().glyphDataForCharacter(stretchyCharacter->middleChar, false);
</del><ins>+ middle = style().fontCascade().glyphDataForCharacter(stretchyCharacter->middleChar, false);
</ins><span class="cx"> assemblyData.setGlyphAssemblyMode(top, extension, bottom, middle);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1680,7 +1680,7 @@
</span><span class="cx"> m_stretchyData = getDisplayStyleLargeOperator(m_textContent);
</span><span class="cx"> else {
</span><span class="cx"> // We do not stretch if the base glyph is large enough.
</span><del>- GlyphData baseGlyph = style().font().glyphDataForCharacter(m_textContent, !style().isLeftToRightDirection());
</del><ins>+ GlyphData baseGlyph = style().fontCascade().glyphDataForCharacter(m_textContent, !style().isLeftToRightDirection());
</ins><span class="cx"> float baseSize = m_isVertical ? heightForGlyph(baseGlyph) : advanceForGlyph(baseGlyph);
</span><span class="cx"> if (stretchSize() <= baseSize)
</span><span class="cx"> return;
</span><span class="lines">@@ -1802,7 +1802,7 @@
</span><span class="cx">
</span><span class="cx"> GlyphBuffer buffer;
</span><span class="cx"> buffer.add(data.glyph, data.fontData, advanceForGlyph(data));
</span><del>- info.context->drawGlyphs(style().font(), *data.fontData, buffer, 0, 1, origin);
</del><ins>+ info.context->drawGlyphs(style().fontCascade(), *data.fontData, buffer, 0, 1, origin);
</ins><span class="cx">
</span><span class="cx"> return glyphPaintRect;
</span><span class="cx"> }
</span><span class="lines">@@ -1898,7 +1898,7 @@
</span><span class="cx"> LayoutPoint operatorTopLeft = ceiledIntPoint(paintOffset + location());
</span><span class="cx"> FloatRect glyphBounds = boundsForGlyph(m_stretchyData.variant());
</span><span class="cx"> LayoutPoint operatorOrigin(operatorTopLeft.x(), operatorTopLeft.y() - glyphBounds.y());
</span><del>- info.context->drawGlyphs(style().font(), *m_stretchyData.variant().fontData, buffer, 0, 1, operatorOrigin);
</del><ins>+ info.context->drawGlyphs(style().fontCascade(), *m_stretchyData.variant().fontData, buffer, 0, 1, operatorOrigin);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1980,7 +1980,7 @@
</span><span class="cx">
</span><span class="cx"> LayoutUnit RenderMathMLOperator::trailingSpaceError()
</span><span class="cx"> {
</span><del>- const auto& primaryFontData = style().font().primaryFontData();
</del><ins>+ const auto& primaryFontData = style().fontCascade().primaryFontData();
</ins><span class="cx"> if (!primaryFontData.mathData())
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="lines">@@ -1989,7 +1989,7 @@
</span><span class="cx"> LayoutUnit width = logicalWidth();
</span><span class="cx">
</span><span class="cx"> if (m_stretchyData.mode() == DrawNormal) {
</span><del>- GlyphData data = style().font().glyphDataForCharacter(textContent(), !style().isLeftToRightDirection());
</del><ins>+ GlyphData data = style().fontCascade().glyphDataForCharacter(textContent(), !style().isLeftToRightDirection());
</ins><span class="cx"> return width - advanceForGlyph(data);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRadicalOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderMathMLRadicalOperator::stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline)
</span><span class="cx"> {
</span><del>- if (!style().font().primaryFontData().mathData()) {
</del><ins>+ if (!style().fontCascade().primaryFontData().mathData()) {
</ins><span class="cx"> // If we do not have an OpenType MATH font, we always make the radical depth a bit larger than the target.
</span><span class="cx"> depthBelowBaseline += gRadicalBottomPointLower;
</span><span class="cx"> }
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(preferredLogicalWidthsDirty());
</span><span class="cx">
</span><del>- if (style().font().primaryFontData().mathData()) {
</del><ins>+ if (style().fontCascade().primaryFontData().mathData()) {
</ins><span class="cx"> RenderMathMLOperator::computePreferredLogicalWidths();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderMathMLRadicalOperator::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
</span><span class="cx"> {
</span><del>- if (style().font().primaryFontData().mathData()) {
</del><ins>+ if (style().fontCascade().primaryFontData().mathData()) {
</ins><span class="cx"> RenderMathMLOperator::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (style().font().primaryFontData().mathData()) {
</del><ins>+ if (style().fontCascade().primaryFontData().mathData()) {
</ins><span class="cx"> RenderMathMLOperator::paint(info, paintOffset);
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -199,17 +199,17 @@
</span><span class="cx">
</span><span class="cx"> // We set some constants to draw the radical, as defined in the OpenType MATH tables.
</span><span class="cx">
</span><del>- m_ruleThickness = 0.05f * style().font().size();
</del><ins>+ m_ruleThickness = 0.05f * style().fontCascade().size();
</ins><span class="cx">
</span><span class="cx"> // FIXME: The recommended default for m_verticalGap in displaystyle is rule thickness + 1/4 x-height (https://bugs.webkit.org/show_bug.cgi?id=118737).
</span><span class="cx"> m_verticalGap = 11 * m_ruleThickness / 4;
</span><span class="cx"> m_extraAscender = m_ruleThickness;
</span><del>- LayoutUnit kernBeforeDegree = 5 * style().font().size() / 18;
- LayoutUnit kernAfterDegree = -10 * style().font().size() / 18;
</del><ins>+ LayoutUnit kernBeforeDegree = 5 * style().fontCascade().size() / 18;
+ LayoutUnit kernAfterDegree = -10 * style().fontCascade().size() / 18;
</ins><span class="cx"> m_degreeBottomRaisePercent = 0.6f;
</span><span class="cx">
</span><del>- const auto& primaryFontData = style().font().primaryFontData();
- if (auto* mathData = style().font().primaryFontData().mathData()) {
</del><ins>+ const auto& primaryFontData = style().fontCascade().primaryFontData();
+ if (auto* mathData = style().fontCascade().primaryFontData().mathData()) {
</ins><span class="cx"> // FIXME: m_verticalGap should use RadicalDisplayStyleVertical in display mode (https://bugs.webkit.org/show_bug.cgi?id=118737).
</span><span class="cx"> m_verticalGap = mathData->getMathConstant(primaryFontData, OpenTypeMathData::RadicalVerticalGap);
</span><span class="cx"> m_ruleThickness = mathData->getMathConstant(primaryFontData, OpenTypeMathData::RadicalRuleThickness);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLTokencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -88,11 +88,11 @@
</span><span class="cx"> // This tries to emulate the default mathvariant value on <mi> using the CSS font-style property.
</span><span class="cx"> // FIXME: This should be revised when mathvariant is implemented (http://wkbug/85735) and when fonts with Mathematical Alphanumeric Symbols characters are more popular.
</span><span class="cx"> FontDescription fontDescription(newStyle.get().fontDescription());
</span><del>- FontSelector* fontSelector = newStyle.get().font().fontSelector();
</del><ins>+ FontSelector* fontSelector = newStyle.get().fontCascade().fontSelector();
</ins><span class="cx"> if (!m_containsElement && element().textContent().stripWhiteSpace().simplifyWhiteSpace().length() == 1 && !tokenElement.hasAttribute(mathvariantAttr))
</span><span class="cx"> fontDescription.setItalic(FontItalicOn);
</span><span class="cx"> if (newStyle.get().setFontDescription(fontDescription))
</span><del>- newStyle.get().font().update(fontSelector);
</del><ins>+ newStyle.get().fontCascade().update(fontSelector);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> wrapper->setStyle(WTF::move(newStyle));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #include "CursorList.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "FloatRoundedRect.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "FontSelector.h"
</span><span class="cx"> #include "InlineTextBoxStyle.h"
</span><span class="cx"> #include "Pagination.h"
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><del>-inline unsigned computeFontHash(const Font& font)
</del><ins>+inline unsigned computeFontHash(const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> unsigned hashCodes[2] = {
</span><span class="cx"> CaseFoldingHash::hash(font.fontDescription().firstFamily().impl()),
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx"> hash ^= rareInheritedData->nbspMode;
</span><span class="cx"> hash ^= rareInheritedData->lineBreak;
</span><span class="cx"> hash ^= WTF::FloatHash<float>::hash(inherited->specifiedLineHeight.value());
</span><del>- hash ^= computeFontHash(inherited->font);
</del><ins>+ hash ^= computeFontHash(inherited->fontCascade);
</ins><span class="cx"> hash ^= inherited->horizontal_border_spacing;
</span><span class="cx"> hash ^= inherited->vertical_border_spacing;
</span><span class="cx"> hash ^= inherited_flags._box_direction;
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> && rareInheritedData->lineBreak == other->rareInheritedData->lineBreak
</span><span class="cx"> && rareInheritedData->textSecurity == other->rareInheritedData->textSecurity
</span><span class="cx"> && inherited->specifiedLineHeight == other->inherited->specifiedLineHeight
</span><del>- && inherited->font.equalForTextAutoSizing(other->inherited->font)
</del><ins>+ && inherited->fontCascade.equalForTextAutoSizing(other->inherited->fontCascade)
</ins><span class="cx"> && inherited->horizontal_border_spacing == other->inherited->horizontal_border_spacing
</span><span class="cx"> && inherited->vertical_border_spacing == other->inherited->vertical_border_spacing
</span><span class="cx"> && inherited_flags._box_direction == other->inherited_flags._box_direction
</span><span class="lines">@@ -551,7 +551,7 @@
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> || inherited->specifiedLineHeight != other.inherited->specifiedLineHeight
</span><span class="cx"> #endif
</span><del>- || inherited->font != other.inherited->font
</del><ins>+ || inherited->fontCascade != other.inherited->fontCascade
</ins><span class="cx"> || inherited->horizontal_border_spacing != other.inherited->horizontal_border_spacing
</span><span class="cx"> || inherited->vertical_border_spacing != other.inherited->vertical_border_spacing
</span><span class="cx"> || inherited_flags._box_direction != other.inherited_flags._box_direction
</span><span class="lines">@@ -1184,7 +1184,7 @@
</span><span class="cx"> // FIXME: This should depend on locale.
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphenMinus, 1));
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, hyphenString, (&hyphen, 1));
</span><del>- return font().primaryFontData().glyphForCharacter(hyphen) ? hyphenString : hyphenMinusString;
</del><ins>+ return fontCascade().primaryFontData().glyphForCharacter(hyphen) ? hyphenString : hyphenMinusString;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const AtomicString& RenderStyle::textEmphasisMarkString() const
</span><span class="lines">@@ -1340,20 +1340,20 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const Font& RenderStyle::font() const { return inherited->font; }
-const FontMetrics& RenderStyle::fontMetrics() const { return inherited->font.fontMetrics(); }
-const FontDescription& RenderStyle::fontDescription() const { return inherited->font.fontDescription(); }
</del><ins>+const FontCascade& RenderStyle::fontCascade() const { return inherited->fontCascade; }
+const FontMetrics& RenderStyle::fontMetrics() const { return inherited->fontCascade.fontMetrics(); }
+const FontDescription& RenderStyle::fontDescription() const { return inherited->fontCascade.fontDescription(); }
</ins><span class="cx"> float RenderStyle::specifiedFontSize() const { return fontDescription().specifiedSize(); }
</span><span class="cx"> float RenderStyle::computedFontSize() const { return fontDescription().computedSize(); }
</span><del>-int RenderStyle::fontSize() const { return inherited->font.pixelSize(); }
</del><ins>+int RenderStyle::fontSize() const { return inherited->fontCascade.pixelSize(); }
</ins><span class="cx">
</span><span class="cx"> const Length& RenderStyle::wordSpacing() const { return rareInheritedData->wordSpacing; }
</span><del>-float RenderStyle::letterSpacing() const { return inherited->font.letterSpacing(); }
</del><ins>+float RenderStyle::letterSpacing() const { return inherited->fontCascade.letterSpacing(); }
</ins><span class="cx">
</span><span class="cx"> bool RenderStyle::setFontDescription(const FontDescription& v)
</span><span class="cx"> {
</span><del>- if (inherited->font.fontDescription() != v) {
- inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing());
</del><ins>+ if (inherited->fontCascade.fontDescription() != v) {
+ inherited.access()->fontCascade = FontCascade(v, inherited->fontCascade.letterSpacing(), inherited->fontCascade.wordSpacing());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -1404,7 +1404,7 @@
</span><span class="cx"> fontWordSpacing = 0;
</span><span class="cx"> break;
</span><span class="cx"> case Percent:
</span><del>- fontWordSpacing = value.percent() * font().spaceWidth() / 100;
</del><ins>+ fontWordSpacing = value.percent() * fontCascade().spaceWidth() / 100;
</ins><span class="cx"> break;
</span><span class="cx"> case Fixed:
</span><span class="cx"> fontWordSpacing = value.value();
</span><span class="lines">@@ -1417,11 +1417,11 @@
</span><span class="cx"> fontWordSpacing = 0;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- inherited.access()->font.setWordSpacing(fontWordSpacing);
</del><ins>+ inherited.access()->fontCascade.setWordSpacing(fontWordSpacing);
</ins><span class="cx"> rareInheritedData.access()->wordSpacing = WTF::move(value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderStyle::setLetterSpacing(float v) { inherited.access()->font.setLetterSpacing(v); }
</del><ins>+void RenderStyle::setLetterSpacing(float v) { inherited.access()->fontCascade.setLetterSpacing(v); }
</ins><span class="cx">
</span><span class="cx"> void RenderStyle::setFontSize(float size)
</span><span class="cx"> {
</span><span class="lines">@@ -1434,7 +1434,7 @@
</span><span class="cx"> else
</span><span class="cx"> size = std::min(maximumAllowedFontSize, size);
</span><span class="cx">
</span><del>- FontSelector* currentFontSelector = font().fontSelector();
</del><ins>+ FontSelector* currentFontSelector = fontCascade().fontSelector();
</ins><span class="cx"> FontDescription desc(fontDescription());
</span><span class="cx"> desc.setSpecifiedSize(size);
</span><span class="cx"> desc.setComputedSize(size);
</span><span class="lines">@@ -1448,7 +1448,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> setFontDescription(desc);
</span><del>- font().update(currentFontSelector);
</del><ins>+ fontCascade().update(currentFontSelector);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderStyle::getShadowExtent(const ShadowData* shadow, LayoutUnit &top, LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> class CounterContent;
</span><span class="cx"> class CursorList;
</span><span class="cx"> class FilterOperations;
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class FontMetrics;
</span><span class="cx"> class IntRect;
</span><span class="cx"> class MaskImageOperation;
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx"> EClear clear() const { return noninherited_flags.clear(); }
</span><span class="cx"> ETableLayout tableLayout() const { return noninherited_flags.tableLayout(); }
</span><span class="cx">
</span><del>- WEBCORE_EXPORT const Font& font() const;
</del><ins>+ WEBCORE_EXPORT const FontCascade& fontCascade() const;
</ins><span class="cx"> WEBCORE_EXPORT const FontMetrics& fontMetrics() const;
</span><span class="cx"> WEBCORE_EXPORT const FontDescription& fontDescription() const;
</span><span class="cx"> float specifiedFontSize() const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleInheritedData.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleInheritedData.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/style/StyleInheritedData.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> , specifiedLineHeight(o.specifiedLineHeight)
</span><span class="cx"> #endif
</span><del>- , font(o.font)
</del><ins>+ , fontCascade(o.fontCascade)
</ins><span class="cx"> , color(o.color)
</span><span class="cx"> , visitedLinkColor(o.visitedLinkColor)
</span><span class="cx"> {
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> && specifiedLineHeight == o.specifiedLineHeight
</span><span class="cx"> #endif
</span><del>- && font == o.font
</del><ins>+ && fontCascade == o.fontCascade
</ins><span class="cx"> && color == o.color
</span><span class="cx"> && visitedLinkColor == o.visitedLinkColor
</span><span class="cx"> && horizontal_border_spacing == o.horizontal_border_spacing
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleInheritedData.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleInheritedData.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/style/StyleInheritedData.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #define StyleInheritedData_h
</span><span class="cx">
</span><span class="cx"> #include "Color.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "Length.h"
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> Length specifiedLineHeight;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- Font font;
</del><ins>+ FontCascade fontCascade;
</ins><span class="cx"> Color color;
</span><span class="cx"> Color visitedLinkColor;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -225,13 +225,13 @@
</span><span class="cx"> computeNewScaledFontForStyle(*this, style(), m_scalingFactor, m_scaledFont);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderSVGInlineText::computeNewScaledFontForStyle(const RenderObject& renderer, const RenderStyle& style, float& scalingFactor, Font& scaledFont)
</del><ins>+void RenderSVGInlineText::computeNewScaledFontForStyle(const RenderObject& renderer, const RenderStyle& style, float& scalingFactor, FontCascade& scaledFont)
</ins><span class="cx"> {
</span><span class="cx"> // Alter font-size to the right on-screen value to avoid scaling the glyphs themselves, except when GeometricPrecision is specified
</span><span class="cx"> scalingFactor = SVGRenderingContext::calculateScreenFontSizeScalingFactor(renderer);
</span><span class="cx"> if (scalingFactor == 1 || !scalingFactor || style.fontDescription().textRenderingMode() == GeometricPrecision) {
</span><span class="cx"> scalingFactor = 1;
</span><del>- scaledFont = style.font();
</del><ins>+ scaledFont = style.fontCascade();
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
</span><span class="cx"> fontDescription.setComputedSize(Style::computedFontSizeFromSpecifiedSizeForSVGInlineText(fontDescription.computedSize(), fontDescription.isAbsoluteSize(), scalingFactor, renderer.document()));
</span><span class="cx">
</span><del>- scaledFont = Font(fontDescription, 0, 0);
</del><ins>+ scaledFont = FontCascade(fontDescription, 0, 0);
</ins><span class="cx"> scaledFont.update(renderer.document().ensureStyleResolver().fontSelector());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> #ifndef RenderSVGInlineText_h
</span><span class="cx"> #define RenderSVGInlineText_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "SVGTextLayoutAttributes.h"
</span><span class="cx"> #include "Text.h"
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx"> SVGTextLayoutAttributes* layoutAttributes() { return &m_layoutAttributes; }
</span><span class="cx">
</span><span class="cx"> float scalingFactor() const { return m_scalingFactor; }
</span><del>- const Font& scaledFont() const { return m_scaledFont; }
</del><ins>+ const FontCascade& scaledFont() const { return m_scaledFont; }
</ins><span class="cx"> void updateScaledFont();
</span><del>- static void computeNewScaledFontForStyle(const RenderObject&, const RenderStyle&, float& scalingFactor, Font& scaledFont);
</del><ins>+ static void computeNewScaledFontForStyle(const RenderObject&, const RenderStyle&, float& scalingFactor, FontCascade& scaledFont);
</ins><span class="cx">
</span><span class="cx"> // Preserves floating point precision for the use in DRT. It knows how to round and does a better job than enclosingIntRect.
</span><span class="cx"> FloatRect floatLinesBoundingBox() const;
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> virtual std::unique_ptr<InlineTextBox> createTextBox() override;
</span><span class="cx">
</span><span class="cx"> float m_scalingFactor;
</span><del>- Font m_scaledFont;
</del><ins>+ FontCascade m_scaledFont;
</ins><span class="cx"> SVGTextLayoutAttributes m_layoutAttributes;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> float scalingFactor = renderer().scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><del>- const Font& scaledFont = renderer().scaledFont();
</del><ins>+ const FontCascade& scaledFont = renderer().scaledFont();
</ins><span class="cx"> const FontMetrics& scaledFontMetrics = scaledFont.fontMetrics();
</span><span class="cx"> FloatPoint textOrigin(fragment.x, fragment.y);
</span><span class="cx"> if (scalingFactor != 1)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool textShouldBePainted(const RenderSVGInlineText& textRenderer)
</span><span class="cx"> {
</span><del>- // Font::pixelSize(), returns FontDescription::computedPixelSize(), which returns "int(x + 0.5)".
</del><ins>+ // FontCascade::pixelSize(), returns FontDescription::computedPixelSize(), which returns "int(x + 0.5)".
</ins><span class="cx"> // If the absolute font size on screen is below x=0.5, don't render anything.
</span><span class="cx"> return textRenderer.scaledFont().pixelSize();
</span><span class="cx"> }
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx"> , direction()
</span><span class="cx"> , dirOverride() || style->rtlOrdering() == VisualOrder /* directionalOverride */);
</span><span class="cx">
</span><del>- if (style->font().primaryFontData().isSVGFont())
</del><ins>+ if (style->fontCascade().primaryFontData().isSVGFont())
</ins><span class="cx"> run.setRenderingContext(SVGTextRunRenderingContext::create(renderer()));
</span><span class="cx">
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx"> return 0.0f;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline float thicknessForDecoration(TextDecoration, const Font& font)
</del><ins>+static inline float thicknessForDecoration(TextDecoration, const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: For SVG Fonts we need to use the attributes defined in the <font-face> if specified.
</span><span class="cx"> // Compatible with Batik/Opera
</span><span class="lines">@@ -535,7 +535,7 @@
</span><span class="cx"> RenderStyle& decorationStyle = decorationRenderer.style();
</span><span class="cx">
</span><span class="cx"> float scalingFactor = 1;
</span><del>- Font scaledFont;
</del><ins>+ FontCascade scaledFont;
</ins><span class="cx"> RenderSVGInlineText::computeNewScaledFontForStyle(decorationRenderer, decorationStyle, scalingFactor, scaledFont);
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><span class="lines">@@ -570,7 +570,7 @@
</span><span class="cx"> float scalingFactor = renderer().scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><del>- const Font& scaledFont = renderer().scaledFont();
</del><ins>+ const FontCascade& scaledFont = renderer().scaledFont();
</ins><span class="cx"> const ShadowData* shadow = style->textShadow();
</span><span class="cx">
</span><span class="cx"> FloatPoint textOrigin(fragment.x, fragment.y);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEnginecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -439,7 +439,7 @@
</span><span class="cx">
</span><span class="cx"> auto upconvertedCharacters = StringView(text->text()).upconvertedCharacters();
</span><span class="cx"> const UChar* characters = upconvertedCharacters;
</span><del>- const Font& font = style->font();
</del><ins>+ const FontCascade& font = style->fontCascade();
</ins><span class="cx">
</span><span class="cx"> SVGTextLayoutEngineSpacing spacingLayout(font);
</span><span class="cx"> SVGTextLayoutEngineBaseline baselineLayout(font);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEngineBaselinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SVGTextLayoutEngineBaseline.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderElement.h"
</span><span class="cx"> #include "SVGLengthContext.h"
</span><span class="cx"> #include "SVGRenderStyle.h"
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-SVGTextLayoutEngineBaseline::SVGTextLayoutEngineBaseline(const Font& font)
</del><ins>+SVGTextLayoutEngineBaseline::SVGTextLayoutEngineBaseline(const FontCascade& font)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEngineBaselineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class RenderObject;
</span><span class="cx"> class SVGElement;
</span><span class="cx"> class SVGRenderStyle;
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> class SVGTextLayoutEngineBaseline {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngineBaseline);
</span><span class="cx"> public:
</span><del>- SVGTextLayoutEngineBaseline(const Font&);
</del><ins>+ SVGTextLayoutEngineBaseline(const FontCascade&);
</ins><span class="cx">
</span><span class="cx"> float calculateBaselineShift(const SVGRenderStyle*, SVGElement* lengthContext) const;
</span><span class="cx"> float calculateAlignmentBaselineShift(bool isVerticalText, const RenderObject* textRenderer) const;
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> private:
</span><span class="cx"> EAlignmentBaseline dominantBaselineToAlignmentBaseline(bool isVerticalText, const RenderObject* textRenderer) const;
</span><span class="cx">
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEngineSpacingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SVGTextLayoutEngineSpacing.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "SVGLengthContext.h"
</span><span class="cx"> #include "SVGRenderStyle.h"
</span><span class="cx">
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-SVGTextLayoutEngineSpacing::SVGTextLayoutEngineSpacing(const Font& font)
</del><ins>+SVGTextLayoutEngineSpacing::SVGTextLayoutEngineSpacing(const FontCascade& font)
</ins><span class="cx"> : m_font(font)
</span><span class="cx"> , m_lastCharacter(0)
</span><span class="cx"> {
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">
</span><span class="cx"> float spacing = m_font.letterSpacing() + kerning;
</span><span class="cx"> if (currentCharacter && lastCharacter && m_font.wordSpacing()) {
</span><del>- if (Font::treatAsSpace(*currentCharacter) && !Font::treatAsSpace(*lastCharacter))
</del><ins>+ if (FontCascade::treatAsSpace(*currentCharacter) && !FontCascade::treatAsSpace(*lastCharacter))
</ins><span class="cx"> spacing += m_font.wordSpacing();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEngineSpacingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class Font;
</del><ins>+class FontCascade;
</ins><span class="cx"> class SVGRenderStyle;
</span><span class="cx"> class SVGElement;
</span><span class="cx">
</span><span class="lines">@@ -32,13 +32,13 @@
</span><span class="cx"> class SVGTextLayoutEngineSpacing {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(SVGTextLayoutEngineSpacing);
</span><span class="cx"> public:
</span><del>- SVGTextLayoutEngineSpacing(const Font&);
</del><ins>+ SVGTextLayoutEngineSpacing(const FontCascade&);
</ins><span class="cx">
</span><span class="cx"> float calculateSVGKerning(bool isVerticalText, const SVGTextMetrics::Glyph& currentGlyph);
</span><span class="cx"> float calculateCSSKerningAndSpacing(const SVGRenderStyle*, SVGElement* lengthContext, const UChar* currentCharacter);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- const Font& m_font;
</del><ins>+ const FontCascade& m_font;
</ins><span class="cx"> const UChar* m_lastCharacter;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextMetricscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextMetrics.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextMetrics.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextMetrics.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> float scalingFactor = textRenderer.scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><del>- const Font& scaledFont = textRenderer.scaledFont();
</del><ins>+ const FontCascade& scaledFont = textRenderer.scaledFont();
</ins><span class="cx"> int length = 0;
</span><span class="cx">
</span><span class="cx"> // Calculate width/height using the scaled font, divide this result by the scalingFactor afterwards.
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> , style.direction()
</span><span class="cx"> , isOverride(style.unicodeBidi()) /* directionalOverride */);
</span><span class="cx">
</span><del>- if (style.font().primaryFontData().isSVGFont())
</del><ins>+ if (style.fontCascade().primaryFontData().isSVGFont())
</ins><span class="cx"> run.setRenderingContext(SVGTextRunRenderingContext::create(text));
</span><span class="cx">
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">
</span><span class="cx"> SVGTextMetrics::SVGTextMetrics(RenderSVGInlineText& text, unsigned position, unsigned length, float width, const String& glyphName)
</span><span class="cx"> {
</span><del>- bool needsContext = text.style().font().primaryFontData().isSVGFont();
</del><ins>+ bool needsContext = text.style().fontCascade().primaryFontData().isSVGFont();
</ins><span class="cx"> float scalingFactor = text.scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextMetricsBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -100,9 +100,9 @@
</span><span class="cx"> m_complexStartToCurrentMetrics = SVGTextMetrics();
</span><span class="cx"> m_totalWidth = 0;
</span><span class="cx">
</span><del>- const Font& scaledFont = text.scaledFont();
</del><ins>+ const FontCascade& scaledFont = text.scaledFont();
</ins><span class="cx"> m_run = SVGTextMetrics::constructTextRun(text);
</span><del>- m_isComplexText = scaledFont.codePath(m_run) == Font::Complex;
</del><ins>+ m_isComplexText = scaledFont.codePath(m_run) == FontCascade::Complex;
</ins><span class="cx">
</span><span class="cx"> if (m_isComplexText)
</span><span class="cx"> m_simpleWidthIterator = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextRunRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> return svgFontData;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float SVGTextRunRenderingContext::floatWidthUsingSVGFont(const Font& font, const TextRun& run, int& charsConsumed, String& glyphName) const
</del><ins>+float SVGTextRunRenderingContext::floatWidthUsingSVGFont(const FontCascade& font, const TextRun& run, int& charsConsumed, String& glyphName) const
</ins><span class="cx"> {
</span><span class="cx"> WidthIterator it(&font, run);
</span><span class="cx"> GlyphBuffer glyphBuffer;
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static GlyphData missingGlyphForFont(const Font& font)
</del><ins>+static GlyphData missingGlyphForFont(const FontCascade& font)
</ins><span class="cx"> {
</span><span class="cx"> const SimpleFontData& primaryFontData = font.primaryFontData();
</span><span class="cx"> if (!primaryFontData.isSVGFont())
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx"> return GlyphData(fontElement->missingGlyph(), &primaryFontData);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GlyphData SVGTextRunRenderingContext::glyphDataForCharacter(const Font& font, WidthIterator& iterator, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache)
</del><ins>+GlyphData SVGTextRunRenderingContext::glyphDataForCharacter(const FontCascade& font, WidthIterator& iterator, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache)
</ins><span class="cx"> {
</span><span class="cx"> GlyphData glyphData = font.glyphDataForCharacter(character, mirror, AutoVariant);
</span><span class="cx"> if (!glyphData.glyph)
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx"> // The behavior does not seem to be specified. For simplicity we don't try to resolve font fallbacks context-sensitively.
</span><span class="cx"> FontDescription fallbackDescription = font.fontDescription();
</span><span class="cx"> fallbackDescription.setFamilies(Vector<AtomicString> { sansSerifFamily });
</span><del>- Font fallbackFont(fallbackDescription, font.letterSpacing(), font.wordSpacing());
</del><ins>+ FontCascade fallbackFont(fallbackDescription, font.letterSpacing(), font.wordSpacing());
</ins><span class="cx"> fallbackFont.update(font.fontSelector());
</span><span class="cx">
</span><span class="cx"> return fallbackFont.glyphDataForCharacter(character, mirror, AutoVariant);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextRunRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #ifndef SVGTextRunRenderingContext_h
</span><span class="cx"> #define SVGTextRunRenderingContext_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "TextRun.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -42,9 +42,9 @@
</span><span class="cx"> RenderSVGResource* activePaintingResource() const { return m_activePaintingResource; }
</span><span class="cx"> void setActivePaintingResource(RenderSVGResource* object) { m_activePaintingResource = object; }
</span><span class="cx">
</span><del>- virtual GlyphData glyphDataForCharacter(const Font&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache) override;
</del><ins>+ virtual GlyphData glyphDataForCharacter(const FontCascade&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength, String& normalizedSpacesStringCache) override;
</ins><span class="cx"> virtual void drawSVGGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const override;
</span><del>- virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& charsConsumed, String& glyphName) const override;
</del><ins>+ virtual float floatWidthUsingSVGFont(const FontCascade&, const TextRun&, int& charsConsumed, String& glyphName) const override;
</ins><span class="cx"> virtual bool applySVGKerning(const SimpleFontData*, WidthIterator&, GlyphBuffer*, int from) const override;
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorestyleInlineTextBoxStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "InlineTextBoxStyle.h"
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "InlineTextBox.h"
</span><span class="cx"> #include "RootInlineBox.h"
</span><span class="cx">
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> float wavyOffset;
</span><span class="cx">
</span><span class="cx"> TextDecorationStyle decorationStyle = lineStyle.textDecorationStyle();
</span><del>- float height = lineStyle.font().fontMetrics().floatHeight();
</del><ins>+ float height = lineStyle.fontCascade().fontMetrics().floatHeight();
</ins><span class="cx"> GlyphOverflow overflowResult;
</span><span class="cx">
</span><span class="cx"> if (decorationStyle == TextDecorationStyleWavy) {
</span></span></pre></div>
<a id="trunkSourceWebCorestyleInlineTextBoxStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.h (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/InlineTextBoxStyle.h        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.h        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef InlineTextBoxStyle_h
</span><span class="cx"> #define InlineTextBoxStyle_h
</span><span class="cx">
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "RenderStyle.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveForDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveForDocument.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveForDocument.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/style/StyleResolveForDocument.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> documentStyle.get().setFontDescription(fontDescription);
</span><span class="cx">
</span><span class="cx"> CSSFontSelector* fontSelector = document.styleResolverIfExists() ? document.styleResolverIfExists()->fontSelector() : nullptr;
</span><del>- documentStyle.get().font().update(fontSelector);
</del><ins>+ documentStyle.get().fontCascade().update(fontSelector);
</ins><span class="cx">
</span><span class="cx"> return documentStyle;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -978,7 +978,7 @@
</span><span class="cx"> if (Settings* settings = document.settings()) {
</span><span class="cx"> StyleResolver* styleResolver = document.styleResolverIfExists();
</span><span class="cx"> if (settings->fontFallbackPrefersPictographs() && styleResolver)
</span><del>- documentStyle.get().font().update(styleResolver->fontSelector());
</del><ins>+ documentStyle.get().fontCascade().update(styleResolver->fontSelector());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Style::Change documentChange = determineChange(documentStyle.get(), document.renderView()->style());
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/svg/SVGFontData.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -280,9 +280,9 @@
</span><span class="cx"> if (normalizedSpacesStringCache.length() == static_cast<unsigned>(run.charactersLength()))
</span><span class="cx"> return;
</span><span class="cx"> if (run.is8Bit())
</span><del>- normalizedSpacesStringCache = Font::normalizeSpaces(run.characters8(), run.charactersLength());
</del><ins>+ normalizedSpacesStringCache = FontCascade::normalizeSpaces(run.characters8(), run.charactersLength());
</ins><span class="cx"> else
</span><del>- normalizedSpacesStringCache = Font::normalizeSpaces(run.characters16(), run.charactersLength());
</del><ins>+ normalizedSpacesStringCache = FontCascade::normalizeSpaces(run.characters16(), run.charactersLength());
</ins><span class="cx"> if (mirror)
</span><span class="cx"> normalizedSpacesStringCache = createStringWithMirroredCharacters(normalizedSpacesStringCache);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontElement.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontElement.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/svg/SVGFontElement.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ElementIterator.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "SVGGlyphElement.h"
</span><span class="cx"> #include "SVGHKernElement.h"
</span><span class="cx"> #include "SVGMissingGlyphElement.h"
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include "CSSValueList.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ElementIterator.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FontCascade.h"
</ins><span class="cx"> #include "SVGDocumentExtensions.h"
</span><span class="cx"> #include "SVGFontElement.h"
</span><span class="cx"> #include "SVGFontFaceSrcElement.h"
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebKitNSStringExtrasmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit/mac/Misc/WebKitNSStringExtras.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #import "WebKitNSStringExtras.h"
</span><span class="cx">
</span><span class="cx"> #import <WebCore/CoreGraphicsSPI.h>
</span><del>-#import <WebCore/Font.h>
</del><ins>+#import <WebCore/FontCascade.h>
</ins><span class="cx"> #import <WebCore/GraphicsContext.h>
</span><span class="cx"> #import <WebCore/TextRun.h>
</span><span class="cx"> #import <WebCore/WebCoreNSStringExtras.h>
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> if (!flipped)
</span><span class="cx"> CGContextScaleCTM(cgContext, 1, -1);
</span><span class="cx">
</span><del>- Font webCoreFont(FontPlatformData(font, [font pointSize]), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased);
</del><ins>+ FontCascade webCoreFont(FontPlatformData(font, [font pointSize]), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased);
</ins><span class="cx"> TextRun run(buffer.data(), length);
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="cx">
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> [self getCharacters:buffer.data()];
</span><span class="cx">
</span><span class="cx"> if (canUseFastRenderer(buffer.data(), length)) {
</span><del>- Font webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</del><ins>+ FontCascade webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</ins><span class="cx"> TextRun run(buffer.data(), length);
</span><span class="cx"> run.disableRoundingHacks();
</span><span class="cx"> return webCoreFont.width(run);
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebStringTruncatormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebStringTruncator.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebStringTruncator.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit/mac/Misc/WebStringTruncator.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -29,21 +29,21 @@
</span><span class="cx"> #import "WebStringTruncator.h"
</span><span class="cx">
</span><span class="cx"> #import "WebSystemInterface.h"
</span><del>-#import <WebCore/Font.h>
</del><ins>+#import <WebCore/FontCascade.h>
</ins><span class="cx"> #import <WebCore/FontPlatformData.h>
</span><span class="cx"> #import <WebCore/StringTruncator.h>
</span><span class="cx"> #import <runtime/InitializeThreading.h>
</span><span class="cx"> #import <wtf/MainThread.h>
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><del>-static WebCore::Font& fontFromNSFont(NSFont *font)
</del><ins>+static WebCore::FontCascade& fontFromNSFont(NSFont *font)
</ins><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<RetainPtr<NSFont>> currentNSFont;
</span><del>- static NeverDestroyed<WebCore::Font> currentFont;
</del><ins>+ static NeverDestroyed<WebCore::FontCascade> currentFont;
</ins><span class="cx"> if ([font isEqual:currentNSFont.get().get()])
</span><span class="cx"> return currentFont;
</span><span class="cx"> currentNSFont.get() = font;
</span><del>- currentFont.get() = WebCore::Font(WebCore::FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</del><ins>+ currentFont.get() = WebCore::FontCascade(WebCore::FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</ins><span class="cx"> return currentFont;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportPopupMenuMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit/mac/WebCoreSupport/PopupMenuMac.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">
</span><span class="cx"> PopupMenuStyle style = m_client->itemStyle(i);
</span><span class="cx"> RetainPtr<NSMutableDictionary> attributes = adoptNS([[NSMutableDictionary alloc] init]);
</span><del>- if (style.font() != Font()) {
</del><ins>+ if (style.font() != FontCascade()) {
</ins><span class="cx"> NSFont *font = style.font().primaryFontData().getNSFont();
</span><span class="cx"> if (!font) {
</span><span class="cx"> CGFloat size = style.font().primaryFontData().platformData().size();
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -1490,7 +1490,7 @@
</span><span class="cx">
</span><span class="cx"> + (void)_setAlwaysUsesComplexTextCodePath:(BOOL)f
</span><span class="cx"> {
</span><del>- Font::setCodePath(f ? Font::Complex : Font::Auto);
</del><ins>+ FontCascade::setCodePath(f ? FontCascade::Complex : FontCascade::Auto);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (void)_setAllowsRoundingHacks:(BOOL)allowsRoundingHacks
</span><span class="lines">@@ -3168,12 +3168,12 @@
</span><span class="cx">
</span><span class="cx"> + (void)_setShouldUseFontSmoothing:(BOOL)f
</span><span class="cx"> {
</span><del>- Font::setShouldUseSmoothing(f);
</del><ins>+ FontCascade::setShouldUseSmoothing(f);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (BOOL)_shouldUseFontSmoothing
</span><span class="cx"> {
</span><del>- return Font::shouldUseSmoothing();
</del><ins>+ return FontCascade::shouldUseSmoothing();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -4710,7 +4710,7 @@
</span><span class="cx"> grammarCheckingEnabled = [defaults boolForKey:WebGrammarCheckingEnabled];
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- Font::setDefaultTypesettingFeatures([defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey] ? Kerning | Ligatures : 0);
</del><ins>+ FontCascade::setDefaultTypesettingFeatures([defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey] ? Kerning | Ligatures : 0);
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> automaticQuoteSubstitutionEnabled = [self _shouldAutomaticQuoteSubstitutionBeEnabled];
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -802,7 +802,7 @@
</span><span class="cx"> if (!selection.isNone()) {
</span><span class="cx"> Node* nodeToRemove;
</span><span class="cx"> if (RenderStyle* style = Editor::styleForSelectionStart(&frame, nodeToRemove)) {
</span><del>- CTFontRef font = style->font().primaryFontData().getCTFont();
</del><ins>+ CTFontRef font = style->fontCascade().primaryFontData().getCTFont();
</ins><span class="cx"> CTFontSymbolicTraits traits = font ? CTFontGetSymbolicTraits(font) : 0;
</span><span class="cx">
</span><span class="cx"> if (traits & kCTFontTraitBold)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -66,8 +66,8 @@
</span><span class="cx"> #include <WebCore/ApplicationCacheStorage.h>
</span><span class="cx"> #include <WebCore/AuthenticationChallenge.h>
</span><span class="cx"> #include <WebCore/CrossOriginPreflightResultCache.h>
</span><del>-#include <WebCore/Font.h>
</del><span class="cx"> #include <WebCore/FontCache.h>
</span><ins>+#include <WebCore/FontCascade.h>
</ins><span class="cx"> #include <WebCore/Frame.h>
</span><span class="cx"> #include <WebCore/FrameLoader.h>
</span><span class="cx"> #include <WebCore/GCController.h>
</span><span class="lines">@@ -463,12 +463,12 @@
</span><span class="cx">
</span><span class="cx"> void WebProcess::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText)
</span><span class="cx"> {
</span><del>- WebCore::Font::setCodePath(alwaysUseComplexText ? WebCore::Font::Complex : WebCore::Font::Auto);
</del><ins>+ WebCore::FontCascade::setCodePath(alwaysUseComplexText ? WebCore::FontCascade::Complex : WebCore::FontCascade::Auto);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::setShouldUseFontSmoothing(bool useFontSmoothing)
</span><span class="cx"> {
</span><del>- WebCore::Font::setShouldUseSmoothing(useFontSmoothing);
</del><ins>+ WebCore::FontCascade::setShouldUseSmoothing(useFontSmoothing);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::userPreferredLanguagesChanged(const Vector<String>& languages) const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (178509 => 178510)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-01-15 13:07:42 UTC (rev 178509)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-01-15 14:19:56 UTC (rev 178510)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> #import <WebCore/AXObjectCache.h>
</span><span class="cx"> #import <WebCore/CFNetworkSPI.h>
</span><span class="cx"> #import <WebCore/FileSystem.h>
</span><del>-#import <WebCore/Font.h>
</del><ins>+#import <WebCore/FontCascade.h>
</ins><span class="cx"> #import <WebCore/LocalizedStrings.h>
</span><span class="cx"> #import <WebCore/MemoryCache.h>
</span><span class="cx"> #import <WebCore/MemoryPressureHandler.h>
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> m_compositingRenderServerPort = WTF::move(parameters.acceleratedCompositingPort);
</span><span class="cx"> m_presenterApplicationPid = parameters.presenterApplicationPid;
</span><span class="cx"> m_shouldForceScreenFontSubstitution = parameters.shouldForceScreenFontSubstitution;
</span><del>- Font::setDefaultTypesettingFeatures(parameters.shouldEnableKerningAndLigaturesByDefault ? Kerning | Ligatures : 0);
</del><ins>+ FontCascade::setDefaultTypesettingFeatures(parameters.shouldEnableKerningAndLigaturesByDefault ? Kerning | Ligatures : 0);
</ins><span class="cx">
</span><span class="cx"> MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>