<!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>[180273] 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/180273">180273</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2015-02-18 11:00:49 -0800 (Wed, 18 Feb 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Wrong text-decoration-style used for underlines.</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="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</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="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttexttextunderlinestyleexpectedhtml">trunk/LayoutTests/fast/text/text-underline-style-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttexttextunderlinestylehtml">trunk/LayoutTests/fast/text/text-underline-style.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/LayoutTests/ChangeLog        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-02-16 David Hyatt <hyatt@apple.com>
+
+ Wrong element's style is used for text-decoration-style.
+ https://bugs.webkit.org/show_bug.cgi?id=141673
+ <rdar://problem/19876774>
+
+ Reviewed by Dean Jackson.
+
+ * fast/text/text-underline-style-expected.html: Added.
+ * fast/text/text-underline-style.html: Added.
+
</ins><span class="cx"> 2015-02-18 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Update more test expected results after r177774
</span></span></pre></div>
<a id="trunkLayoutTestsfasttexttextunderlinestyleexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/text-underline-style-expected.html (0 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/text-underline-style-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/text/text-underline-style-expected.html        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+<!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" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">
+<body style="overflow:hidden">
+<p>Test to make sure the dotted style is properly obtained from an enclosing ancestor.
+</p>
+
+<p style="text-decoration:underline;-webkit-text-decoration-style:double; color:green; -webkit-text-decoration-color:blue">This text should have a double blue underline.</p>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfasttexttextunderlinestylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/text-underline-style.html (0 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/text-underline-style.html         (rev 0)
+++ trunk/LayoutTests/fast/text/text-underline-style.html        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+<!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" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">
+<body style="overflow:hidden">
+<p>Test to make sure the dotted style is properly obtained from an enclosing ancestor.
+</p>
+
+<p style="text-decoration:underline;-webkit-text-decoration-style:double; color:blue;"><span style="-webkit-text-decoration-style:wavy; color:green">This text should have a double blue underline.</p>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/ChangeLog        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-02-16 David Hyatt <hyatt@apple.com>
+
+ Wrong element's style is used for text-decoration-style.
+ https://bugs.webkit.org/show_bug.cgi?id=141673
+ <rdar://problem/19876774>
+
+ Reviewed by Dean Jackson.
+
+ Added fast/text/text-underline-style.html
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (AXAttributeStringSetStyle):
+ Add arguments for fetching styles.
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+ (WebCore::InlineTextBox::paintDecoration):
+ * rendering/InlineTextBox.h:
+ Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
+ way it fetches the colors.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::getTextDecorationColorsAndStyles):
+ (WebCore::RenderObject::getTextDecorationColors): Deleted.
+ * rendering/RenderObject.h:
+ Add style fetching to the same function that fetches colors and rename it.
+
</ins><span class="cx"> 2015-02-18 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -1762,10 +1762,9 @@
</span><span class="cx">
</span><span class="cx"> int decor = style.textDecorationsInEffect();
</span><span class="cx"> if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) {
</span><del>- // find colors using quirk mode approach (strict mode would use current
- // color for all but the root line box, which would use getTextDecorationColors)
- Color underline, overline, linethrough;
- renderer->getTextDecorationColors(decor, underline, overline, linethrough);
</del><ins>+ Color underlineColor, overlineColor, linethroughColor;
+ TextDecorationStyle underlineStyle, overlineStyle, linethroughStyle;
+ renderer->getTextDecorationColorsAndStyles(decor, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle);
</ins><span class="cx">
</span><span class="cx"> if (decor & TextDecorationUnderline)
</span><span class="cx"> AXAttributeStringSetNumber(attrString, UIAccessibilityTokenUnderline, [NSNumber numberWithBool:YES], range);
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -882,19 +882,19 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) {
</span><del>- // find colors using quirk mode approach (strict mode would use current
- // color for all but the root line box, which would use getTextDecorationColors)
- Color underline, overline, linethrough;
- renderer->getTextDecorationColors(decor, underline, overline, linethrough);
</del><ins>+ // FIXME: Should the underline style be reported here?
+ Color underlineColor, overlineColor, linethroughColor;
+ TextDecorationStyle underlineStyle, overlineStyle, linethroughStyle;
+ renderer->getTextDecorationColorsAndStyles(decor, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle);
</ins><span class="cx">
</span><span class="cx"> if ((decor & TextDecorationUnderline) != 0) {
</span><span class="cx"> AXAttributeStringSetNumber(attrString, NSAccessibilityUnderlineTextAttribute, [NSNumber numberWithBool:YES], range);
</span><del>- AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, nsColor(underline), range);
</del><ins>+ AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, nsColor(underlineColor), range);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((decor & TextDecorationLineThrough) != 0) {
</span><span class="cx"> AXAttributeStringSetNumber(attrString, NSAccessibilityStrikethroughTextAttribute, [NSNumber numberWithBool:YES], range);
</span><del>- AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, nsColor(linethrough), range);
</del><ins>+ AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, nsColor(linethroughColor), range);
</ins><span class="cx"> }
</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 (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx"> updateGraphicsContext(context, textPaintStyle);
</span><span class="cx"> if (combinedText)
</span><span class="cx"> context.concatCTM(rotation(boxRect, Clockwise));
</span><del>- paintDecoration(context, boxOrigin, textDecorations, lineStyle.textDecorationStyle(), textShadow, textPainter);
</del><ins>+ paintDecoration(context, boxOrigin, textDecorations, textShadow, textPainter);
</ins><span class="cx"> if (combinedText)
</span><span class="cx"> context.concatCTM(rotation(boxRect, Counterclockwise));
</span><span class="cx"> }
</span><span class="lines">@@ -895,7 +895,7 @@
</span><span class="cx"> context.strokePath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InlineTextBox::paintDecoration(GraphicsContext& context, const FloatPoint& boxOrigin, TextDecoration decoration, TextDecorationStyle decorationStyle, const ShadowData* shadow, TextPainter& textPainter)
</del><ins>+void InlineTextBox::paintDecoration(GraphicsContext& context, const FloatPoint& boxOrigin, TextDecoration decoration, const ShadowData* shadow, TextPainter& textPainter)
</ins><span class="cx"> {
</span><span class="cx"> #if !ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
</span><span class="cx"> UNUSED_PARAM(textPainter);
</span><span class="lines">@@ -914,10 +914,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Get the text decoration colors.
</span><del>- Color underline, overline, linethrough;
- renderer().getTextDecorationColors(decoration, underline, overline, linethrough);
</del><ins>+ Color underlineColor, overlineColor, linethroughColor;
+ TextDecorationStyle underlineStyle, overlineStyle, linethroughStyle;
+ renderer().getTextDecorationColorsAndStyles(decoration, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle);
</ins><span class="cx"> if (isFirstLine())
</span><del>- renderer().getTextDecorationColors(decoration, underline, overline, linethrough, true);
</del><ins>+ renderer().getTextDecorationColorsAndStyles(decoration, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle, true);
</ins><span class="cx">
</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="lines">@@ -925,7 +926,7 @@
</span><span class="cx"> float textDecorationThickness = textDecorationStrokeThickness(renderer().style().fontSize());
</span><span class="cx"> context.setStrokeThickness(textDecorationThickness);
</span><span class="cx">
</span><del>- bool linesAreOpaque = !isPrinting && (!(decoration & TextDecorationUnderline) || underline.alpha() == 255) && (!(decoration & TextDecorationOverline) || overline.alpha() == 255) && (!(decoration & TextDecorationLineThrough) || linethrough.alpha() == 255);
</del><ins>+ bool linesAreOpaque = !isPrinting && (!(decoration & TextDecorationUnderline) || underlineColor.alpha() == 255) && (!(decoration & TextDecorationOverline) || overlineColor.alpha() == 255) && (!(decoration & TextDecorationLineThrough) || linethroughColor.alpha() == 255);
</ins><span class="cx">
</span><span class="cx"> const RenderStyle& lineStyle = this->lineStyle();
</span><span class="cx"> int baseline = lineStyle.fontMetrics().ascent();
</span><span class="lines">@@ -970,13 +971,13 @@
</span><span class="cx">
</span><span class="cx"> float wavyOffset = wavyOffsetFromDecoration();
</span><span class="cx">
</span><del>- context.setStrokeStyle(textDecorationStyleToStrokeStyle(decorationStyle));
</del><span class="cx"> // These decorations should match the visual overflows computed in visualOverflowForDecorations()
</span><span class="cx"> if (decoration & TextDecorationUnderline) {
</span><del>- context.setStrokeColor(underline, colorSpace);
</del><ins>+ context.setStrokeColor(underlineColor, colorSpace);
+ context.setStrokeStyle(textDecorationStyleToStrokeStyle(underlineStyle));
</ins><span class="cx"> const int underlineOffset = computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), this, textDecorationThickness);
</span><span class="cx">
</span><del>- switch (decorationStyle) {
</del><ins>+ switch (underlineStyle) {
</ins><span class="cx"> case TextDecorationStyleWavy: {
</span><span class="cx"> FloatPoint start(localOrigin.x(), localOrigin.y() + underlineOffset + wavyOffset);
</span><span class="cx"> FloatPoint end(localOrigin.x() + width, localOrigin.y() + underlineOffset + wavyOffset);
</span><span class="lines">@@ -987,17 +988,18 @@
</span><span class="cx"> #if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
</span><span class="cx"> if ((lineStyle.textDecorationSkip() == TextDecorationSkipInk || lineStyle.textDecorationSkip() == TextDecorationSkipAuto) && isHorizontal()) {
</span><span class="cx"> if (!context.paintingDisabled()) {
</span><del>- drawSkipInkUnderline(textPainter, context, localOrigin, underlineOffset, width, isPrinting, decorationStyle == TextDecorationStyleDouble);
</del><ins>+ drawSkipInkUnderline(textPainter, context, localOrigin, underlineOffset, width, isPrinting, underlineStyle == TextDecorationStyleDouble);
</ins><span class="cx"> }
</span><span class="cx"> } else
</span><span class="cx"> // FIXME: Need to support text-decoration-skip: none.
</span><span class="cx"> #endif // CSS3_TEXT_DECORATION_SKIP_INK
</span><del>- context.drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + underlineOffset), width, isPrinting, decorationStyle == TextDecorationStyleDouble);
</del><ins>+ context.drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + underlineOffset), width, isPrinting, underlineStyle == TextDecorationStyleDouble);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (decoration & TextDecorationOverline) {
</span><del>- context.setStrokeColor(overline, colorSpace);
- switch (decorationStyle) {
</del><ins>+ context.setStrokeColor(overlineColor, colorSpace);
+ context.setStrokeStyle(textDecorationStyleToStrokeStyle(overlineStyle));
+ switch (overlineStyle) {
</ins><span class="cx"> case TextDecorationStyleWavy: {
</span><span class="cx"> FloatPoint start(localOrigin.x(), localOrigin.y() - wavyOffset);
</span><span class="cx"> FloatPoint end(localOrigin.x() + width, localOrigin.y() - wavyOffset);
</span><span class="lines">@@ -1008,16 +1010,17 @@
</span><span class="cx"> #if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
</span><span class="cx"> if ((lineStyle.textDecorationSkip() == TextDecorationSkipInk || lineStyle.textDecorationSkip() == TextDecorationSkipAuto) && isHorizontal()) {
</span><span class="cx"> if (!context.paintingDisabled())
</span><del>- drawSkipInkUnderline(textPainter, context, localOrigin, 0, width, isPrinting, decorationStyle == TextDecorationStyleDouble);
</del><ins>+ drawSkipInkUnderline(textPainter, context, localOrigin, 0, width, isPrinting, overlineStyle == TextDecorationStyleDouble);
</ins><span class="cx"> } else
</span><span class="cx"> // FIXME: Need to support text-decoration-skip: none.
</span><span class="cx"> #endif // CSS3_TEXT_DECORATION_SKIP_INK
</span><del>- context.drawLineForText(localOrigin, width, isPrinting, decorationStyle == TextDecorationStyleDouble);
</del><ins>+ context.drawLineForText(localOrigin, width, isPrinting, overlineStyle == TextDecorationStyleDouble);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (decoration & TextDecorationLineThrough) {
</span><del>- context.setStrokeColor(linethrough, colorSpace);
- switch (decorationStyle) {
</del><ins>+ context.setStrokeColor(linethroughColor, colorSpace);
+ context.setStrokeStyle(textDecorationStyleToStrokeStyle(linethroughStyle));
+ switch (linethroughStyle) {
</ins><span class="cx"> case TextDecorationStyleWavy: {
</span><span class="cx"> FloatPoint start(localOrigin.x(), localOrigin.y() + 2 * baseline / 3);
</span><span class="cx"> FloatPoint end(localOrigin.x() + width, localOrigin.y() + 2 * baseline / 3);
</span><span class="lines">@@ -1025,7 +1028,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> default:
</span><del>- context.drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + 2 * baseline / 3), width, isPrinting, decorationStyle == TextDecorationStyleDouble);
</del><ins>+ context.drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + 2 * baseline / 3), width, isPrinting, linethroughStyle == TextDecorationStyleDouble);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } while (shadow);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> void paintCompositionUnderline(GraphicsContext&, const FloatPoint& boxOrigin, const CompositionUnderline&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- void paintDecoration(GraphicsContext&, const FloatPoint& boxOrigin, TextDecoration, TextDecorationStyle, const ShadowData*, TextPainter&);
</del><ins>+ void paintDecoration(GraphicsContext&, const FloatPoint& boxOrigin, TextDecoration, const ShadowData*, TextPainter&);
</ins><span class="cx"> void paintSelection(GraphicsContext&, const FloatPoint& boxOrigin, const RenderStyle&, const FontCascade&, Color textColor);
</span><span class="cx"> void paintDocumentMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const FontCascade&, bool grammar);
</span><span class="cx"> void paintTextMatchMarker(GraphicsContext&, const FloatPoint& boxOrigin, RenderedDocumentMarker&, const RenderStyle&, const FontCascade&);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -2110,7 +2110,8 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline, Color& linethrough, bool firstlineStyle)
</del><ins>+void RenderObject::getTextDecorationColorsAndStyles(int decorations, Color& underlineColor, Color& overlineColor, Color& linethroughColor,
+ TextDecorationStyle& underlineStyle, TextDecorationStyle& overlineStyle, TextDecorationStyle& linethroughStyle, bool firstlineStyle)
</ins><span class="cx"> {
</span><span class="cx"> RenderObject* current = this;
</span><span class="cx"> RenderStyle* styleToUse = nullptr;
</span><span class="lines">@@ -2124,15 +2125,18 @@
</span><span class="cx"> if (currDecs) {
</span><span class="cx"> if (currDecs & TextDecorationUnderline) {
</span><span class="cx"> decorations &= ~TextDecorationUnderline;
</span><del>- underline = resultColor;
</del><ins>+ underlineColor = resultColor;
+ underlineStyle = styleToUse->textDecorationStyle();
</ins><span class="cx"> }
</span><span class="cx"> if (currDecs & TextDecorationOverline) {
</span><span class="cx"> decorations &= ~TextDecorationOverline;
</span><del>- overline = resultColor;
</del><ins>+ overlineColor = resultColor;
+ overlineStyle = styleToUse->textDecorationStyle();
</ins><span class="cx"> }
</span><span class="cx"> if (currDecs & TextDecorationLineThrough) {
</span><span class="cx"> decorations &= ~TextDecorationLineThrough;
</span><del>- linethrough = resultColor;
</del><ins>+ linethroughColor = resultColor;
+ linethroughStyle = styleToUse->textDecorationStyle();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (current->isRubyText())
</span><span class="lines">@@ -2146,12 +2150,18 @@
</span><span class="cx"> if (decorations && current) {
</span><span class="cx"> styleToUse = firstlineStyle ? &current->firstLineStyle() : &current->style();
</span><span class="cx"> resultColor = decorationColor(styleToUse);
</span><del>- if (decorations & TextDecorationUnderline)
- underline = resultColor;
- if (decorations & TextDecorationOverline)
- overline = resultColor;
- if (decorations & TextDecorationLineThrough)
- linethrough = resultColor;
</del><ins>+ if (decorations & TextDecorationUnderline) {
+ underlineColor = resultColor;
+ underlineStyle = styleToUse->textDecorationStyle();
+ }
+ if (decorations & TextDecorationOverline) {
+ overlineColor = resultColor;
+ overlineStyle = styleToUse->textDecorationStyle();
+ }
+ if (decorations & TextDecorationLineThrough) {
+ linethroughColor = resultColor;
+ linethroughStyle = styleToUse->textDecorationStyle();
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (180272 => 180273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2015-02-18 19:00:16 UTC (rev 180272)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2015-02-18 19:00:49 UTC (rev 180273)
</span><span class="lines">@@ -706,7 +706,8 @@
</span><span class="cx">
</span><span class="cx"> virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const;
</span><span class="cx">
</span><del>- void getTextDecorationColors(int decorations, Color& underline, Color& overline, Color& linethrough, bool firstlineStyle = false);
</del><ins>+ void getTextDecorationColorsAndStyles(int decorations, Color& underlineColor, Color& overlineColor, Color& linethroughColor,
+ TextDecorationStyle& underlineStyle, TextDecorationStyle& overlineStyle, TextDecorationStyle& linethroughStyle, bool firstlineStyle = false);
</ins><span class="cx">
</span><span class="cx"> // Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0
</span><span class="cx"> // if painting is root-relative. This is the container that should be passed to the 'forRepaint'
</span></span></pre>
</div>
</div>
</body>
</html>