<!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  &lt;hyatt@apple.com&gt;
+        
+        Wrong element's style is used for text-decoration-style.
+        https://bugs.webkit.org/show_bug.cgi?id=141673
+        &lt;rdar://problem/19876774&gt;
+
+        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  &lt;mmaxfield@apple.com&gt;
</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>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
+&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:ibooks=&quot;http://apple.com/ibooks/html-extensions&quot; xmlns:epub=&quot;http://www.idpf.org/2007/ops&quot;&gt;
+&lt;body style=&quot;overflow:hidden&quot;&gt;
+&lt;p&gt;Test to make sure the dotted style is properly obtained from an enclosing ancestor.
+&lt;/p&gt;
+
+&lt;p style=&quot;text-decoration:underline;-webkit-text-decoration-style:double; color:green; -webkit-text-decoration-color:blue&quot;&gt;This text should have a double blue underline.&lt;/p&gt;
</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>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
+&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:ibooks=&quot;http://apple.com/ibooks/html-extensions&quot; xmlns:epub=&quot;http://www.idpf.org/2007/ops&quot;&gt;
+&lt;body style=&quot;overflow:hidden&quot;&gt;
+&lt;p&gt;Test to make sure the dotted style is properly obtained from an enclosing ancestor.
+&lt;/p&gt;
+
+&lt;p style=&quot;text-decoration:underline;-webkit-text-decoration-style:double; color:blue;&quot;&gt;&lt;span style=&quot;-webkit-text-decoration-style:wavy; color:green&quot;&gt;This text should have a double blue underline.&lt;/p&gt;
</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  &lt;hyatt@apple.com&gt;
+
+        Wrong element's style is used for text-decoration-style.
+        https://bugs.webkit.org/show_bug.cgi?id=141673
+        &lt;rdar://problem/19876774&gt;
+
+        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  &lt;ddkilzer@apple.com&gt;
</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 &amp; (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-&gt;getTextDecorationColors(decor, underline, overline, linethrough);
</del><ins>+        Color underlineColor, overlineColor, linethroughColor;
+        TextDecorationStyle underlineStyle, overlineStyle, linethroughStyle;
+        renderer-&gt;getTextDecorationColorsAndStyles(decor, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle);
</ins><span class="cx">         
</span><span class="cx">         if (decor &amp; 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 &amp; (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-&gt;getTextDecorationColors(decor, underline, overline, linethrough);
</del><ins>+        // FIXME: Should the underline style be reported here?
+        Color underlineColor, overlineColor, linethroughColor;
+        TextDecorationStyle underlineStyle, overlineStyle, linethroughStyle;
+        renderer-&gt;getTextDecorationColorsAndStyles(decor, underlineColor, overlineColor, linethroughColor, underlineStyle, overlineStyle, linethroughStyle);
</ins><span class="cx">         
</span><span class="cx">         if ((decor &amp; 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 &amp; 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&amp; context, const FloatPoint&amp; boxOrigin, TextDecoration decoration, TextDecorationStyle decorationStyle, const ShadowData* shadow, TextPainter&amp; textPainter)
</del><ins>+void InlineTextBox::paintDecoration(GraphicsContext&amp; context, const FloatPoint&amp; boxOrigin, TextDecoration decoration, const ShadowData* shadow, TextPainter&amp; 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 &amp;&amp; (!(decoration &amp; TextDecorationUnderline) || underline.alpha() == 255) &amp;&amp; (!(decoration &amp; TextDecorationOverline) || overline.alpha() == 255) &amp;&amp; (!(decoration &amp; TextDecorationLineThrough) || linethrough.alpha() == 255);
</del><ins>+    bool linesAreOpaque = !isPrinting &amp;&amp; (!(decoration &amp; TextDecorationUnderline) || underlineColor.alpha() == 255) &amp;&amp; (!(decoration &amp; TextDecorationOverline) || overlineColor.alpha() == 255) &amp;&amp; (!(decoration &amp; TextDecorationLineThrough) || linethroughColor.alpha() == 255);
</ins><span class="cx"> 
</span><span class="cx">     const RenderStyle&amp; lineStyle = this-&gt;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 &amp; 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) &amp;&amp; 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 &amp; 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) &amp;&amp; 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 &amp; 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&amp;, const FloatPoint&amp; boxOrigin, const CompositionUnderline&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void paintDecoration(GraphicsContext&amp;, const FloatPoint&amp; boxOrigin, TextDecoration, TextDecorationStyle, const ShadowData*, TextPainter&amp;);
</del><ins>+    void paintDecoration(GraphicsContext&amp;, const FloatPoint&amp; boxOrigin, TextDecoration, const ShadowData*, TextPainter&amp;);
</ins><span class="cx">     void paintSelection(GraphicsContext&amp;, const FloatPoint&amp; boxOrigin, const RenderStyle&amp;, const FontCascade&amp;, Color textColor);
</span><span class="cx">     void paintDocumentMarker(GraphicsContext&amp;, const FloatPoint&amp; boxOrigin, RenderedDocumentMarker&amp;, const RenderStyle&amp;, const FontCascade&amp;, bool grammar);
</span><span class="cx">     void paintTextMatchMarker(GraphicsContext&amp;, const FloatPoint&amp; boxOrigin, RenderedDocumentMarker&amp;, const RenderStyle&amp;, const FontCascade&amp;);
</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&amp; underline, Color&amp; overline, Color&amp; linethrough, bool firstlineStyle)
</del><ins>+void RenderObject::getTextDecorationColorsAndStyles(int decorations, Color&amp; underlineColor, Color&amp; overlineColor, Color&amp; linethroughColor,
+    TextDecorationStyle&amp; underlineStyle, TextDecorationStyle&amp; overlineStyle, TextDecorationStyle&amp; 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 &amp; TextDecorationUnderline) {
</span><span class="cx">                 decorations &amp;= ~TextDecorationUnderline;
</span><del>-                underline = resultColor;
</del><ins>+                underlineColor = resultColor;
+                underlineStyle = styleToUse-&gt;textDecorationStyle();
</ins><span class="cx">             }
</span><span class="cx">             if (currDecs &amp; TextDecorationOverline) {
</span><span class="cx">                 decorations &amp;= ~TextDecorationOverline;
</span><del>-                overline = resultColor;
</del><ins>+                overlineColor = resultColor;
+                overlineStyle = styleToUse-&gt;textDecorationStyle();
</ins><span class="cx">             }
</span><span class="cx">             if (currDecs &amp; TextDecorationLineThrough) {
</span><span class="cx">                 decorations &amp;= ~TextDecorationLineThrough;
</span><del>-                linethrough = resultColor;
</del><ins>+                linethroughColor = resultColor;
+                linethroughStyle = styleToUse-&gt;textDecorationStyle();
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         if (current-&gt;isRubyText())
</span><span class="lines">@@ -2146,12 +2150,18 @@
</span><span class="cx">     if (decorations &amp;&amp; current) {
</span><span class="cx">         styleToUse = firstlineStyle ? &amp;current-&gt;firstLineStyle() : &amp;current-&gt;style();
</span><span class="cx">         resultColor = decorationColor(styleToUse);
</span><del>-        if (decorations &amp; TextDecorationUnderline)
-            underline = resultColor;
-        if (decorations &amp; TextDecorationOverline)
-            overline = resultColor;
-        if (decorations &amp; TextDecorationLineThrough)
-            linethrough = resultColor;
</del><ins>+        if (decorations &amp; TextDecorationUnderline) {
+            underlineColor = resultColor;
+            underlineStyle = styleToUse-&gt;textDecorationStyle();
+        }
+        if (decorations &amp; TextDecorationOverline) {
+            overlineColor = resultColor;
+            overlineStyle = styleToUse-&gt;textDecorationStyle();
+        }
+        if (decorations &amp; TextDecorationLineThrough) {
+            linethroughColor = resultColor;
+            linethroughStyle = styleToUse-&gt;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&amp;, Cursor&amp;) const;
</span><span class="cx"> 
</span><del>-    void getTextDecorationColors(int decorations, Color&amp; underline, Color&amp; overline, Color&amp; linethrough, bool firstlineStyle = false);
</del><ins>+    void getTextDecorationColorsAndStyles(int decorations, Color&amp; underlineColor, Color&amp; overlineColor, Color&amp; linethroughColor,
+        TextDecorationStyle&amp; underlineStyle, TextDecorationStyle&amp; overlineStyle, TextDecorationStyle&amp; 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>