<!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>[176298] trunk</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/176298">176298</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2014-11-18 17:19:43 -0800 (Tue, 18 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/176263">r176263</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/176273">r176273</a>.
https://bugs.webkit.org/show_bug.cgi?id=138854
Underlines are hideous. (Requested by litherum on #webkit).
Reverted changesets:
"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263
"iOS build fix."
http://trac.webkit.org/changeset/176273
Patch by Commit Queue <commit-queue@webkit.org> on 2014-11-18# Please enter the commit message for your changes. Lines starting</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontMetricsh">trunk/Source/WebCore/platform/graphics/FontMetrics.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsSimpleFontDatah">trunk/Source/WebCore/platform/graphics/SimpleFontData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp">trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosSimpleFontDataIOSmm">trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacSimpleFontDataMacmm">trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm</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="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</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="#trunkSourceWebCoresvgSVGFontDatacpp">trunk/Source/WebCore/svg/SVGFontData.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcss3textcss3textdecorationtextdecorationthicknessexpectedhtml">trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcss3textcss3textdecorationtextdecorationthicknesshtml">trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknessexpectedhtml">trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknesshtml">trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/LayoutTests/ChangeLog        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-11-18 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r176263 and r176273.
+ https://bugs.webkit.org/show_bug.cgi?id=138854
+
+ Underlines are hideous. (Requested by litherum on #webkit).
+
+ Reverted changesets:
+
+ "Use underlining metrics from the font file"
+ https://bugs.webkit.org/show_bug.cgi?id=138762
+ http://trac.webkit.org/changeset/176263
+
+ "iOS build fix."
+ http://trac.webkit.org/changeset/176273
+
</ins><span class="cx"> 2014-11-18 David Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textcss3textdecorationtextdecorationthicknessexpectedhtmlfromrev176297trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknessexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html (from rev 176297, trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html) (0 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+</style>
+</head>
+<body>
+This test draws underlined text at a very large font size. It then positions and clips
+the text so that the underline should fill a box if the underline grows in proportion
+to text size. The comparison is to a box that has its background color set.
+<div style="position: relative; width: 600px; height: 600px; background: #000">
+</div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcss3textcss3textdecorationtextdecorationthicknesshtmlfromrev176297trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknesshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness.html (from rev 176297, trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html) (0 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness.html         (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness.html        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test draws underlined text at a very large font size. It then positions and clips
+the text so that the underline should fill a box if the underline grows in proportion
+to text size. The comparison is to a box that has its background color set.
+<div style="position: relative; width: 600px; height: 600px; overflow: hidden;">
+<div style="font-family: Ahem; text-decoration: underline; font-size: 10000px; position: absolute; left: 0px; top: -8350px;">&nbsp;</div>
+</div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknessexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<style>
-</style>
-</head>
-<body>
-This test draws underlined text at a very large font size. It then positions and clips
-the text so that the underline should fill a box if the underline grows in proportion
-to text size. The comparison is to a box that has its background color set.
-<div style="position: relative; width: 600px; height: 600px; background: #000">
-</div>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastcss3textcss3textdecorationtextdecorationthicknesshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/LayoutTests/platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-This test draws underlined text at a very large font size. It then positions and clips
-the text so that the underline should fill a box if the underline grows in proportion
-to text size. The comparison is to a box that has its background color set.
-<div style="position: relative; width: 600px; height: 600px; overflow: hidden;">
-<div style="font-family: Ahem; text-decoration: underline; font-size: 31000px; position: absolute; left: 0px; top: -28925px;">&nbsp;</div>
-</div>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/ChangeLog        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-11-18 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r176263 and r176273.
+ https://bugs.webkit.org/show_bug.cgi?id=138854
+
+ Underlines are hideous. (Requested by litherum on #webkit).
+
+ Reverted changesets:
+
+ "Use underlining metrics from the font file"
+ https://bugs.webkit.org/show_bug.cgi?id=138762
+ http://trac.webkit.org/changeset/176263
+
+ "iOS build fix."
+ http://trac.webkit.org/changeset/176273
+
</ins><span class="cx"> 2014-11-18 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Add a setting to toggle DOMTimer throttling support
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontMetricsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontMetrics.h (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontMetrics.h        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/FontMetrics.h        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -37,8 +37,6 @@
</span><span class="cx"> , m_lineSpacing(0)
</span><span class="cx"> , m_xHeight(0)
</span><span class="cx"> , m_zeroWidth(0)
</span><del>- , m_decorationThickness(1)
- , m_underlinePosition(1)
</del><span class="cx"> , m_hasXHeight(false)
</span><span class="cx"> , m_hasZeroWidth(false)
</span><span class="cx"> {
</span><span class="lines">@@ -134,12 +132,6 @@
</span><span class="cx"> bool hasZeroWidth() const { return m_hasZeroWidth; }
</span><span class="cx"> void setHasZeroWidth(bool hasZeroWidth) { m_hasZeroWidth = hasZeroWidth; }
</span><span class="cx">
</span><del>- float decorationThickness() const { return m_decorationThickness; }
- void setDecorationThickness(float decorationThickness) { m_decorationThickness = decorationThickness; }
-
- float underlinePosition() const { return m_underlinePosition; }
- void setUnderlinePosition(float underlinePosition) { m_underlinePosition = underlinePosition; }
-
</del><span class="cx"> private:
</span><span class="cx"> friend class SimpleFontData;
</span><span class="cx">
</span><span class="lines">@@ -162,8 +154,6 @@
</span><span class="cx"> float m_xHeight;
</span><span class="cx"> float m_capHeight;
</span><span class="cx"> float m_zeroWidth;
</span><del>- float m_decorationThickness;
- float m_underlinePosition;
</del><span class="cx"> bool m_hasXHeight;
</span><span class="cx"> bool m_hasCapHeight;
</span><span class="cx"> bool m_hasZeroWidth;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsSimpleFontDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.h (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.h        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -362,14 +362,6 @@
</span><span class="cx"> return width;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void populateDecorationMetrics(float fontSize, float& decorationThickness, float& underlinePosition)
-{
- // Decoration underlines should be proportional to the font size
- decorationThickness = fontSize / 16.0f;
- // An amount to lower the underline below the baseline
- underlinePosition = std::max(1.0f, ceilf(decorationThickness / 2.0));
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SimpleFontData)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfreetypeSimpleFontDataFreeTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -65,15 +65,10 @@
</span><span class="cx"> float descent = narrowPrecisionToFloat(fontExtents.descent);
</span><span class="cx"> float capHeight = narrowPrecisionToFloat(fontExtents.height);
</span><span class="cx"> float lineGap = narrowPrecisionToFloat(fontExtents.height - fontExtents.ascent - fontExtents.descent);
</span><del>- float decorationThickness;
- float underlinePosition;
- populateDecorationMetrics(m_platformData.m_size, decorationThickness, underlinePosition);
</del><span class="cx">
</span><span class="cx"> m_fontMetrics.setAscent(ascent);
</span><span class="cx"> m_fontMetrics.setDescent(descent);
</span><span class="cx"> m_fontMetrics.setCapHeight(capHeight);
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx"> m_fontMetrics.setLineSpacing(ascent + descent + lineGap);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosSimpleFontDataIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -79,8 +79,6 @@
</span><span class="cx"> float lineGap;
</span><span class="cx"> float lineSpacing;
</span><span class="cx"> float xHeight;
</span><del>- float decorationThickness;
- float underlinePosition;
</del><span class="cx"> RetainPtr<CFStringRef> familyName;
</span><span class="cx"> if (CTFontRef ctFont = m_platformData.font()) {
</span><span class="cx"> FontServicesIOS fontService(ctFont);
</span><span class="lines">@@ -89,8 +87,6 @@
</span><span class="cx"> lineSpacing = fontService.lineSpacing();
</span><span class="cx"> lineGap = fontService.lineGap();
</span><span class="cx"> xHeight = fontService.xHeight();
</span><del>- decorationThickness = CTFontGetUnderlineThickness(ctFont);
- underlinePosition = -CTFontGetUnderlinePosition(ctFont);
</del><span class="cx"> capHeight = fontService.capHeight();
</span><span class="cx"> unitsPerEm = fontService.unitsPerEm();
</span><span class="cx"> familyName = adoptCF(CTFontCopyFamilyName(ctFont));
</span><span class="lines">@@ -105,7 +101,6 @@
</span><span class="cx"> lineGap = lroundf(scaleEmToUnits(CGFontGetLeading(cgFont), unitsPerEm) * pointSize);
</span><span class="cx"> xHeight = scaleEmToUnits(CGFontGetXHeight(cgFont), unitsPerEm) * pointSize;
</span><span class="cx"> capHeight = scaleEmToUnits(CGFontGetCapHeight(cgFont), unitsPerEm) * pointSize;
</span><del>- populateDecorationMetrics(m_platformData.size(), decorationThickness, underlinePosition);
</del><span class="cx">
</span><span class="cx"> lineSpacing = ascent + descent + lineGap;
</span><span class="cx"> familyName = adoptCF(CGFontCopyFamilyName(cgFont));
</span><span class="lines">@@ -118,8 +113,6 @@
</span><span class="cx"> m_fontMetrics.setLineSpacing(lineSpacing);
</span><span class="cx"> m_fontMetrics.setXHeight(xHeight);
</span><span class="cx"> m_fontMetrics.setCapHeight(capHeight);
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx"> m_shouldNotBeUsedForArabic = fontFamilyShouldNotBeUsedForArabic(familyName.get());
</span><span class="cx">
</span><span class="cx"> if (platformData().orientation() == Vertical && !isTextOrientationFallback())
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacSimpleFontDataMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -193,8 +193,6 @@
</span><span class="cx"> float capHeight = scaleEmToUnits(iCapHeight, unitsPerEm) * pointSize;
</span><span class="cx">
</span><span class="cx"> float lineGap = scaleEmToUnits(iLineGap, unitsPerEm) * pointSize;
</span><del>- float decorationThickness = CTFontGetUnderlineThickness(m_platformData.ctFont());
- float underlinePosition = -CTFontGetUnderlinePosition(m_platformData.ctFont());
</del><span class="cx">
</span><span class="cx"> // We need to adjust Times, Helvetica, and Courier to closely match the
</span><span class="cx"> // vertical metrics of their Microsoft counterparts that are the de facto
</span><span class="lines">@@ -238,8 +236,6 @@
</span><span class="cx"> m_fontMetrics.setCapHeight(capHeight);
</span><span class="cx"> m_fontMetrics.setLineGap(lineGap);
</span><span class="cx"> m_fontMetrics.setXHeight(xHeight);
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static CFDataRef copyFontTableForTag(FontPlatformData& platformData, FourCharCode tableName)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -69,9 +69,6 @@
</span><span class="cx"> float fDescent = -scaleEmToUnits(iDescent, unitsPerEm) * pointSize;
</span><span class="cx"> float fCapHeight = scaleEmToUnits(iCapHeight, unitsPerEm) * pointSize;
</span><span class="cx"> float fLineGap = scaleEmToUnits(iLineGap, unitsPerEm) * pointSize;
</span><del>- float decorationThickness;
- float underlinePosition;
- populateDecorationMetrics(m_platformData.size(), decorationThickness, underlinePosition);
</del><span class="cx">
</span><span class="cx"> if (!isCustomFont()) {
</span><span class="cx"> HWndDC dc(0);
</span><span class="lines">@@ -90,8 +87,6 @@
</span><span class="cx"> m_fontMetrics.setCapHeight(fCapHeight);
</span><span class="cx"> m_fontMetrics.setLineGap(fLineGap);
</span><span class="cx"> m_fontMetrics.setLineSpacing(lroundf(fAscent) + lroundf(fDescent) + lroundf(fLineGap));
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx">
</span><span class="cx"> GlyphPage* glyphPageZero = GlyphPageTreeNode::getRootChild(this, 0)->page();
</span><span class="cx"> Glyph xGlyph = glyphPageZero ? glyphPageZero->glyphDataForCharacter('x').glyph : 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataCairoWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -76,9 +76,6 @@
</span><span class="cx"> float descent = textMetrics.tmDescent * metricsMultiplier;
</span><span class="cx"> float xHeight = ascent * 0.56f; // Best guess for xHeight for non-Truetype fonts.
</span><span class="cx"> float lineGap = textMetrics.tmExternalLeading * metricsMultiplier;
</span><del>- float decorationThickness;
- float underlinePosition;
- populateDecorationMetrics(m_platformData.size(), decorationThickness, underlinePosition);
</del><span class="cx">
</span><span class="cx"> int faceLength = ::GetTextFace(dc, 0, 0);
</span><span class="cx"> Vector<WCHAR> faceName(faceLength);
</span><span class="lines">@@ -91,8 +88,6 @@
</span><span class="cx"> m_fontMetrics.setDescent(descent);
</span><span class="cx"> m_fontMetrics.setLineGap(lineGap);
</span><span class="cx"> m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx"> m_avgCharWidth = textMetrics.tmAveCharWidth * metricsMultiplier;
</span><span class="cx"> m_maxCharWidth = textMetrics.tmMaxCharWidth * metricsMultiplier;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinSimpleFontDataWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -89,15 +89,10 @@
</span><span class="cx"> float ascent = textMetrics.tmAscent;
</span><span class="cx"> float descent = textMetrics.tmDescent;
</span><span class="cx"> float lineGap = textMetrics.tmExternalLeading;
</span><del>- float decorationThickness;
- float underlinePosition;
- populateDecorationMetrics(m_platformData.size(), decorationThickness, underlinePosition);
</del><span class="cx"> m_fontMetrics.setAscent(ascent);
</span><span class="cx"> m_fontMetrics.setDescent(descent);
</span><span class="cx"> m_fontMetrics.setLineGap(lineGap);
</span><span class="cx"> m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
</span><del>- m_fontMetrics.setDecorationThickness(decorationThickness);
- m_fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx"> m_avgCharWidth = textMetrics.tmAveCharWidth;
</span><span class="cx"> m_maxCharWidth = textMetrics.tmMaxCharWidth;
</span><span class="cx"> float xHeight = ascent * 0.56f; // Best guess for xHeight if no x glyph is present.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -925,7 +925,7 @@
</span><span class="cx"> // Use a special function for underlines to get the positioning exactly right.
</span><span class="cx"> bool isPrinting = renderer().document().printing();
</span><span class="cx">
</span><del>- float textDecorationThickness = renderer().style().fontMetrics().decorationThickness();
</del><ins>+ float textDecorationThickness = textDecorationStrokeThickness(renderer().style().fontSize());
</ins><span class="cx"> context.setStrokeThickness(textDecorationThickness);
</span><span class="cx">
</span><span class="cx"> bool linesAreOpaque = !isPrinting && (!(decoration & TextDecorationUnderline) || underline.alpha() == 255) && (!(decoration & TextDecorationOverline) || overline.alpha() == 255) && (!(decoration & TextDecorationLineThrough) || linethrough.alpha() == 255);
</span><span class="lines">@@ -977,7 +977,7 @@
</span><span class="cx"> // These decorations should match the visual overflows computed in visualOverflowForDecorations()
</span><span class="cx"> if (decoration & TextDecorationUnderline) {
</span><span class="cx"> context.setStrokeColor(underline, colorSpace);
</span><del>- const int underlineOffset = computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), this);
</del><ins>+ const int underlineOffset = computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), this, textDecorationThickness);
</ins><span class="cx">
</span><span class="cx"> switch (decorationStyle) {
</span><span class="cx"> case TextDecorationStyleWavy: {
</span></span></pre></div>
<a id="trunkSourceWebCorestyleInlineTextBoxStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -32,10 +32,10 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-int computeUnderlineOffset(TextUnderlinePosition underlinePosition, const FontMetrics& fontMetrics, InlineTextBox* inlineTextBox)
</del><ins>+int computeUnderlineOffset(TextUnderlinePosition underlinePosition, const FontMetrics& fontMetrics, InlineTextBox* inlineTextBox, int textDecorationThickness)
</ins><span class="cx"> {
</span><span class="cx"> // This represents the gap between the baseline and the closest edge of the underline.
</span><del>- float gap = fontMetrics.underlinePosition();
</del><ins>+ int gap = std::max<int>(1, ceilf(textDecorationThickness / 2.0));
</ins><span class="cx">
</span><span class="cx"> // According to the specification TextUnderlinePositionAuto should default to 'alphabetic' for horizontal text
</span><span class="cx"> // and to 'under Left' for vertical text (e.g. japanese). We support only horizontal text for now.
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> if (decoration == TextDecorationNone)
</span><span class="cx"> return GlyphOverflow();
</span><span class="cx">
</span><del>- float strokeThickness = lineStyle.fontMetrics().decorationThickness();
</del><ins>+ float strokeThickness = textDecorationStrokeThickness(lineStyle.fontSize());
</ins><span class="cx"> float controlPointDistance;
</span><span class="cx"> float step;
</span><span class="cx"> float wavyOffset;
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">
</span><span class="cx"> // These metrics must match where underlines get drawn.
</span><span class="cx"> if (decoration & TextDecorationUnderline) {
</span><del>- float underlineOffset = computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), inlineTextBox);
</del><ins>+ float underlineOffset = computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), inlineTextBox, strokeThickness);
</ins><span class="cx"> if (decorationStyle == TextDecorationStyleWavy) {
</span><span class="cx"> extendIntToFloat(overflowResult.bottom, underlineOffset + wavyOffset + controlPointDistance + strokeThickness - height);
</span><span class="cx"> extendIntToFloat(overflowResult.top, -(underlineOffset + wavyOffset - controlPointDistance - strokeThickness));
</span></span></pre></div>
<a id="trunkSourceWebCorestyleInlineTextBoxStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.h (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/InlineTextBoxStyle.h        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.h        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -33,6 +33,12 @@
</span><span class="cx">
</span><span class="cx"> class InlineTextBox;
</span><span class="cx">
</span><ins>+inline float textDecorationStrokeThickness(float fontSize)
+{
+ const float textDecorationBaseFontSize = 16;
+ return fontSize / textDecorationBaseFontSize;
+}
+
</ins><span class="cx"> inline float wavyOffsetFromDecoration()
</span><span class="cx"> {
</span><span class="cx"> return 2;
</span><span class="lines">@@ -40,7 +46,7 @@
</span><span class="cx">
</span><span class="cx"> GlyphOverflow visualOverflowForDecorations(const RenderStyle& lineStyle, InlineTextBox*);
</span><span class="cx"> void getWavyStrokeParameters(float strokeThickness, float& controlPointDistance, float& step);
</span><del>-int computeUnderlineOffset(TextUnderlinePosition, const FontMetrics&, InlineTextBox*);
</del><ins>+int computeUnderlineOffset(TextUnderlinePosition, const FontMetrics&, InlineTextBox*, int textDecorationThickness);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.cpp (176297 => 176298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.cpp        2014-11-19 00:56:33 UTC (rev 176297)
+++ trunk/Source/WebCore/svg/SVGFontData.cpp        2014-11-19 01:19:43 UTC (rev 176298)
</span><span class="lines">@@ -79,9 +79,6 @@
</span><span class="cx"> float ascent = svgFontFaceElement->ascent() * scale;
</span><span class="cx"> float descent = svgFontFaceElement->descent() * scale;
</span><span class="cx"> float lineGap = 0.1f * fontSize;
</span><del>- float decorationThickness;
- float underlinePosition;
- populateDecorationMetrics(fontSize, decorationThickness, underlinePosition);
</del><span class="cx">
</span><span class="cx"> GlyphPage* glyphPageZero = GlyphPageTreeNode::getRootChild(fontData, 0)->page();
</span><span class="cx">
</span><span class="lines">@@ -98,8 +95,6 @@
</span><span class="cx"> fontMetrics.setLineGap(lineGap);
</span><span class="cx"> fontMetrics.setLineSpacing(roundf(ascent) + roundf(descent) + roundf(lineGap));
</span><span class="cx"> fontMetrics.setXHeight(xHeight);
</span><del>- fontMetrics.setDecorationThickness(decorationThickness);
- fontMetrics.setUnderlinePosition(underlinePosition);
</del><span class="cx">
</span><span class="cx"> if (!glyphPageZero) {
</span><span class="cx"> fontData->setSpaceGlyph(0);
</span></span></pre>
</div>
</div>
</body>
</html>