<!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>[172711] 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/172711">172711</a></dd>
<dt>Author</dt> <dd>krit@webkit.org</dd>
<dt>Date</dt> <dd>2014-08-18 11:18:16 -0700 (Mon, 18 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>calc() doesn't work for SVG CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136026

Reviewed by Andreas Kling.

Source/WebCore:

Make calc() work on SVG CSS properties as well. stroke-width and
stroke-dashoffset used SVGLength. SVGLength doesn't work together with
cross units length arguments like % and px (just returns 0 in these
cases). I moved these properties over to Length. All modified files
beside to SVGCSSParser are related to this switch.

Test: svg/css/parse-calc-length.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/RenderStyle.h:
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setStrokeWidth):
(WebCore::SVGRenderStyle::setStrokeDashOffset):
(WebCore::SVGRenderStyle::strokeWidth):
(WebCore::SVGRenderStyle::strokeDashOffset):
(WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted.
(WebCore::SVGRenderStyle::initialStrokeWidth): Deleted.
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleStrokeData::StyleStrokeData):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidth):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):

LayoutTests:

Test calc() on length properties for SVG.

* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/parse-calc-length-expected.txt: Added.
* svg/css/parse-calc-length.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSParsercpp">trunk/Source/WebCore/css/SVGCSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSStyleSelectorcpp">trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleh">trunk/Source/WebCore/rendering/style/SVGRenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp">trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleDefsh">trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGShapecpp">trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTextcpp">trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthContextcpp">trunk/Source/WebCore/svg/SVGLengthContext.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcssparsecalclengthexpectedtxt">trunk/LayoutTests/svg/css/parse-calc-length-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssparsecalclengthhtml">trunk/LayoutTests/svg/css/parse-calc-length.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/LayoutTests/ChangeLog        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-08-18  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        calc() doesn't work for SVG CSS properties
+        https://bugs.webkit.org/show_bug.cgi?id=136026
+
+        Reviewed by Andreas Kling.
+
+        Test calc() on length properties for SVG.
+
+        * svg/css/getComputedStyle-basic-expected.txt:
+        * svg/css/parse-calc-length-expected.txt: Added.
+        * svg/css/parse-calc-length.html: Added.
+
</ins><span class="cx"> 2014-08-18  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -240,12 +240,12 @@
</span><span class="cx"> shape-rendering: auto;
</span><span class="cx"> stroke: none;
</span><span class="cx"> stroke-dasharray: none;
</span><del>-stroke-dashoffset: 0;
</del><ins>+stroke-dashoffset: 0px;
</ins><span class="cx"> stroke-linecap: butt;
</span><span class="cx"> stroke-linejoin: miter;
</span><span class="cx"> stroke-miterlimit: 4;
</span><span class="cx"> stroke-opacity: 1;
</span><del>-stroke-width: 1;
</del><ins>+stroke-width: 1px;
</ins><span class="cx"> alignment-baseline: auto;
</span><span class="cx"> baseline-shift: baseline;
</span><span class="cx"> dominant-baseline: auto;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -239,12 +239,12 @@
</span><span class="cx"> shape-rendering: auto
</span><span class="cx"> stroke: none
</span><span class="cx"> stroke-dasharray: none
</span><del>-stroke-dashoffset: 0
</del><ins>+stroke-dashoffset: 0px
</ins><span class="cx"> stroke-linecap: butt
</span><span class="cx"> stroke-linejoin: miter
</span><span class="cx"> stroke-miterlimit: 4
</span><span class="cx"> stroke-opacity: 1
</span><del>-stroke-width: 1
</del><ins>+stroke-width: 1px
</ins><span class="cx"> alignment-baseline: auto
</span><span class="cx"> baseline-shift: baseline
</span><span class="cx"> dominant-baseline: auto
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -478,7 +478,7 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(stroke) : [object SVGPaint]
</span><span class="cx"> rect: style.getPropertyValue(stroke-dasharray) : none
</span><span class="cx"> rect: style.getPropertyCSSValue(stroke-dasharray) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(stroke-dashoffset) : 0
</del><ins>+rect: style.getPropertyValue(stroke-dashoffset) : 0px
</ins><span class="cx"> rect: style.getPropertyCSSValue(stroke-dashoffset) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(stroke-linecap) : butt
</span><span class="cx"> rect: style.getPropertyCSSValue(stroke-linecap) : [object CSSPrimitiveValue]
</span><span class="lines">@@ -990,7 +990,7 @@
</span><span class="cx"> g: style.getPropertyCSSValue(stroke) : [object SVGPaint]
</span><span class="cx"> g: style.getPropertyValue(stroke-dasharray) : none
</span><span class="cx"> g: style.getPropertyCSSValue(stroke-dasharray) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(stroke-dashoffset) : 0
</del><ins>+g: style.getPropertyValue(stroke-dashoffset) : 0px
</ins><span class="cx"> g: style.getPropertyCSSValue(stroke-dashoffset) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(stroke-linecap) : butt
</span><span class="cx"> g: style.getPropertyCSSValue(stroke-linecap) : [object CSSPrimitiveValue]
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssparsecalclengthexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/parse-calc-length-expected.txt (0 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-calc-length-expected.txt                                (rev 0)
+++ trunk/LayoutTests/svg/css/parse-calc-length-expected.txt        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute height=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute rx=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute ry=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute width=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute x=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute y=&quot;calc(500px - 400px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute height=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute rx=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute ry=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute width=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute x=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute y=&quot;calc(40px + 60px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute height=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute rx=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute ry=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute width=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute x=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute y=&quot;calc(0% + 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute height=&quot;calc(100% - 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute rx=&quot;calc(100% - 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute ry=&quot;calc(100% - 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute width=&quot;calc(100% - 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute x=&quot;calc(100% - 100px)&quot;
+CONSOLE MESSAGE: Error: Invalid value for &lt;rect&gt; attribute y=&quot;calc(100% - 100px)&quot;
+Test that length values for presentation attribute accept calc.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS computedStyle(&quot;baseline-shift&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;cx&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;cy&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;height&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;kerning&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;r&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;rx&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;ry&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;stroke-width&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;stroke-dashoffset&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;width&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;x&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;y&quot;, &quot;calc(500px - 400px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;baseline-shift&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;cx&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;cy&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;height&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;kerning&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;r&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;rx&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;ry&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;stroke-width&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;stroke-dashoffset&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;width&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;x&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;y&quot;, &quot;calc(40px + 60px)&quot;) is &quot;100px&quot;
+PASS computedStyle(&quot;baseline-shift&quot;, &quot;calc(0% + 100px)&quot;) is &quot;0&quot;
+PASS computedStyle(&quot;cx&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;cy&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;height&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;kerning&quot;, &quot;calc(0% + 100px)&quot;) is &quot;0&quot;
+PASS computedStyle(&quot;r&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;rx&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;ry&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;stroke-width&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;stroke-dashoffset&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;width&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;x&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;y&quot;, &quot;calc(0% + 100px)&quot;) is &quot;calc(0% + 100px)&quot;
+PASS computedStyle(&quot;baseline-shift&quot;, &quot;calc(100% - 100px)&quot;) is &quot;0&quot;
+PASS computedStyle(&quot;cx&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;cy&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;height&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;kerning&quot;, &quot;calc(100% - 100px)&quot;) is &quot;0&quot;
+PASS computedStyle(&quot;r&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;rx&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;ry&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;stroke-width&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;stroke-dashoffset&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;width&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;x&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;y&quot;, &quot;calc(100% - 100px)&quot;) is &quot;calc(100% - 100px)&quot;
+PASS computedStyle(&quot;stroke-miterlimit&quot;, &quot;calc(500 - 400)&quot;) is &quot;100&quot;
+PASS computedStyle(&quot;flood-opacity&quot;, &quot;calc(500 - 400)&quot;) is &quot;100&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssparsecalclengthhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/parse-calc-length.html (0 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-calc-length.html                                (rev 0)
+++ trunk/LayoutTests/svg/css/parse-calc-length.html        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;style&gt;
+* { font-size: 16px; }
+svg, rect { font-family: 'Ahem'; }
+div { font-size: 8px; } 
+&lt;/style&gt;
+&lt;html&gt;
+&lt;svg id=&quot;svg&quot; width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;/svg&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test that length values for presentation attribute accept calc.&quot;);
+
+function computedStyle(property, value) {
+    var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
+    document.getElementById('svg').appendChild(rect);
+    rect.setAttribute(property, value);
+    var computedValue = getComputedStyle(rect).getPropertyValue(property);
+    document.getElementById('svg').removeChild(rect);
+    return computedValue;
+}
+
+function testComputed(property, value, expected) {
+    shouldBeEqualToString('computedStyle(&quot;' + property + '&quot;, &quot;' + value + '&quot;)', expected);
+}
+
+function negativeTest(property, value) {
+    testComputed(property, value, &quot;auto&quot;);
+}
+
+function negativeTestZero(property, value) {
+    testComputed(property, value, &quot;0px&quot;);
+}
+
+// Test 'calc(500px - 400px)'.
+testComputed(&quot;baseline-shift&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;cx&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;cy&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;height&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;kerning&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;r&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;rx&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;ry&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;stroke-width&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;stroke-dashoffset&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;width&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;)
+testComputed(&quot;x&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+testComputed(&quot;y&quot;, &quot;calc(500px - 400px)&quot;, &quot;100px&quot;);
+
+// Test 'calc(40px + 60px)'.
+testComputed(&quot;baseline-shift&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;cx&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;cy&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;height&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;kerning&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;r&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;rx&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;ry&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;stroke-width&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;stroke-dashoffset&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;width&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;)
+testComputed(&quot;x&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+testComputed(&quot;y&quot;, &quot;calc(40px + 60px)&quot;, &quot;100px&quot;);
+
+// Test 'calc(0% + 100px)'.
+testComputed(&quot;baseline-shift&quot;, &quot;calc(0% + 100px)&quot;, &quot;0&quot;);
+testComputed(&quot;cx&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;cy&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;height&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;kerning&quot;, &quot;calc(0% + 100px)&quot;, &quot;0&quot;);
+testComputed(&quot;r&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;rx&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;ry&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;stroke-width&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;stroke-dashoffset&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;width&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;)
+testComputed(&quot;x&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+testComputed(&quot;y&quot;, &quot;calc(0% + 100px)&quot;, &quot;calc(0% + 100px)&quot;);
+
+// Test 'calc(100% - 100px)'.
+testComputed(&quot;baseline-shift&quot;, &quot;calc(100% - 100px)&quot;, &quot;0&quot;);
+testComputed(&quot;cx&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;cy&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;height&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;kerning&quot;, &quot;calc(100% - 100px)&quot;, &quot;0&quot;);
+testComputed(&quot;r&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;rx&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;ry&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;stroke-width&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;stroke-dashoffset&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;width&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;)
+testComputed(&quot;x&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+testComputed(&quot;y&quot;, &quot;calc(100% - 100px)&quot;, &quot;calc(100% - 100px)&quot;);
+
+// Number value properties.
+testComputed(&quot;stroke-miterlimit&quot;, &quot;calc(500 - 400)&quot;, &quot;100&quot;);
+testComputed(&quot;flood-opacity&quot;, &quot;calc(500 - 400)&quot;, &quot;100&quot;);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/ChangeLog        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2014-08-18  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        calc() doesn't work for SVG CSS properties
+        https://bugs.webkit.org/show_bug.cgi?id=136026
+
+        Reviewed by Andreas Kling.
+
+        Make calc() work on SVG CSS properties as well. stroke-width and
+        stroke-dashoffset used SVGLength. SVGLength doesn't work together with
+        cross units length arguments like % and px (just returns 0 in these
+        cases). I moved these properties over to Length. All modified files
+        beside to SVGCSSParser are related to this switch.
+
+        Test: svg/css/parse-calc-length.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        * css/SVGCSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::svgPropertyValue):
+        * css/SVGCSSParser.cpp:
+        (WebCore::CSSParser::parseSVGValue):
+        * css/SVGCSSStyleSelector.cpp:
+        (WebCore::StyleResolver::applySVGProperty):
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/SVGRenderStyle.h:
+        (WebCore::SVGRenderStyle::setStrokeWidth):
+        (WebCore::SVGRenderStyle::setStrokeDashOffset):
+        (WebCore::SVGRenderStyle::strokeWidth):
+        (WebCore::SVGRenderStyle::strokeDashOffset):
+        (WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted.
+        (WebCore::SVGRenderStyle::initialStrokeWidth): Deleted.
+        * rendering/style/SVGRenderStyleDefs.cpp:
+        (WebCore::StyleStrokeData::StyleStrokeData):
+        * rendering/style/SVGRenderStyleDefs.h:
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::strokeWidth):
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::strokeBoundingBox):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
+        * rendering/svg/SVGRenderTreeAsText.cpp:
+        (WebCore::writeStyle):
+        * svg/SVGLengthContext.cpp:
+        (WebCore::SVGLengthContext::valueForLength):
+
</ins><span class="cx"> 2014-08-18  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -2970,7 +2970,7 @@
</span><span class="cx">         case CSSPropertyBackgroundRepeatY:
</span><span class="cx">             break;
</span><span class="cx"> 
</span><del>-        // New positioning properties for SVG.
</del><ins>+        // Length properties for SVG.
</ins><span class="cx">         case CSSPropertyCx:
</span><span class="cx">             return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().cx(), style.get());
</span><span class="cx">         case CSSPropertyCy:
</span><span class="lines">@@ -2981,6 +2981,10 @@
</span><span class="cx">             return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().rx(), style.get());
</span><span class="cx">         case CSSPropertyRy:
</span><span class="cx">             return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().ry(), style.get());
</span><ins>+        case CSSPropertyStrokeWidth:
+            return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().strokeWidth(), style.get());
+        case CSSPropertyStrokeDashoffset:
+            return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().strokeDashOffset(), style.get());
</ins><span class="cx">         case CSSPropertyX:
</span><span class="cx">             return zoomAdjustedPixelValueForLength(style-&gt;svgStyle().x(), style.get());
</span><span class="cx">         case CSSPropertyY:
</span><span class="lines">@@ -3103,12 +3107,10 @@
</span><span class="cx">         case CSSPropertyShapeRendering:
</span><span class="cx">         case CSSPropertyStroke:
</span><span class="cx">         case CSSPropertyStrokeDasharray:
</span><del>-        case CSSPropertyStrokeDashoffset:
</del><span class="cx">         case CSSPropertyStrokeLinecap:
</span><span class="cx">         case CSSPropertyStrokeLinejoin:
</span><span class="cx">         case CSSPropertyStrokeMiterlimit:
</span><span class="cx">         case CSSPropertyStrokeOpacity:
</span><del>-        case CSSPropertyStrokeWidth:
</del><span class="cx">         case CSSPropertyAlignmentBaseline:
</span><span class="cx">         case CSSPropertyBaselineShift:
</span><span class="cx">         case CSSPropertyDominantBaseline:
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -2599,6 +2599,8 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyR, ApplyPropertyLength&lt;&amp;RenderStyle::r, &amp;RenderStyle::setR, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyRx, ApplyPropertyLength&lt;&amp;RenderStyle::rx, &amp;RenderStyle::setRx, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyRy, ApplyPropertyLength&lt;&amp;RenderStyle::ry, &amp;RenderStyle::setRy, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</span><ins>+    setPropertyHandler(CSSPropertyStrokeWidth, ApplyPropertyLength&lt;&amp;RenderStyle::strokeWidth, &amp;RenderStyle::setStrokeWidth, &amp;RenderStyle::initialOneLength&gt;::createHandler());
+    setPropertyHandler(CSSPropertyStrokeDashoffset, ApplyPropertyLength&lt;&amp;RenderStyle::strokeDashOffset, &amp;RenderStyle::setStrokeDashOffset, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</ins><span class="cx">     setPropertyHandler(CSSPropertyX, ApplyPropertyLength&lt;&amp;RenderStyle::x, &amp;RenderStyle::setX, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyY, ApplyPropertyLength&lt;&amp;RenderStyle::y, &amp;RenderStyle::setY, &amp;RenderStyle::initialZeroLength&gt;::createHandler());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -190,10 +190,6 @@
</span><span class="cx">             return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle.strokePaintType(), svgStyle.strokePaintUri(), svgStyle.strokePaintColor()), style);
</span><span class="cx">         case CSSPropertyStrokeDasharray:
</span><span class="cx">             return strokeDashArrayToCSSValueList(svgStyle.strokeDashArray());
</span><del>-        case CSSPropertyStrokeDashoffset:
-            return SVGLength::toCSSPrimitiveValue(svgStyle.strokeDashOffset());
-        case CSSPropertyStrokeWidth:
-            return SVGLength::toCSSPrimitiveValue(svgStyle.strokeWidth());
</del><span class="cx">         case CSSPropertyBaselineShift: {
</span><span class="cx">             switch (svgStyle.baselineShift()) {
</span><span class="cx">                 case BS_BASELINE:
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSParser.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -324,12 +324,8 @@
</span><span class="cx">             parsedValue = CSSPrimitiveValue::create(value-&gt;fValue, (CSSPrimitiveValue::UnitTypes) value-&gt;unit);
</span><span class="cx">         else if (value-&gt;unit &gt;= CSSParserValue::Q_EMS)
</span><span class="cx">             parsedValue = CSSPrimitiveValue::createAllowingMarginQuirk(value-&gt;fValue, CSSPrimitiveValue::CSS_EMS);
</span><del>-        if (isCalculation(value)) {
-            // FIXME calc() http://webkit.org/b/16662 : actually create a CSSPrimitiveValue here, ie
-            // parsedValue = CSSPrimitiveValue::create(m_parsedCalculation.release());
-            m_parsedCalculation.release();
-            parsedValue = 0;
-        }
</del><ins>+        if (isCalculation(value))
+            parsedValue = CSSPrimitiveValue::create(m_parsedCalculation.release());
</ins><span class="cx">         m_valueList-&gt;next();
</span><span class="cx">     }
</span><span class="cx">     if (!parsedValue || (m_valueList-&gt;current() &amp;&amp; !inShorthand()))
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSStyleSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -289,13 +289,6 @@
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        case CSSPropertyStrokeWidth:
-        {
-            HANDLE_INHERIT_AND_INITIAL(strokeWidth, StrokeWidth)
-            if (primitiveValue)
-                svgStyle.setStrokeWidth(SVGLength::fromCSSPrimitiveValue(primitiveValue));
-            break;
-        }
</del><span class="cx">         case CSSPropertyStrokeDasharray:
</span><span class="cx">         {
</span><span class="cx">             HANDLE_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray)
</span><span class="lines">@@ -320,13 +313,6 @@
</span><span class="cx">             svgStyle.setStrokeDashArray(array);
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        case CSSPropertyStrokeDashoffset:
-        {
-            HANDLE_INHERIT_AND_INITIAL(strokeDashOffset, StrokeDashOffset)
-            if (primitiveValue)
-                svgStyle.setStrokeDashOffset(SVGLength::fromCSSPrimitiveValue(primitiveValue));
-            break;
-        }
</del><span class="cx">         case CSSPropertyFillOpacity:
</span><span class="cx">         {
</span><span class="cx">             HANDLE_INHERIT_AND_INITIAL(fillOpacity, FillOpacity)
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -1251,9 +1251,7 @@
</span><span class="cx"> 
</span><span class="cx">         new PropertyWrapperSVGPaint(CSSPropertyStroke, &amp;RenderStyle::strokePaintType, &amp;RenderStyle::strokePaintColor, &amp;RenderStyle::setStrokePaintColor),
</span><span class="cx">         new PropertyWrapper&lt;float&gt;(CSSPropertyStrokeOpacity, &amp;RenderStyle::strokeOpacity, &amp;RenderStyle::setStrokeOpacity),
</span><del>-        new PropertyWrapper&lt;SVGLength&gt;(CSSPropertyStrokeWidth, &amp;RenderStyle::strokeWidth, &amp;RenderStyle::setStrokeWidth),
</del><span class="cx">         new PropertyWrapper&lt; Vector&lt;SVGLength&gt;&gt;(CSSPropertyStrokeDasharray, &amp;RenderStyle::strokeDashArray, &amp;RenderStyle::setStrokeDashArray),
</span><del>-        new PropertyWrapper&lt;SVGLength&gt;(CSSPropertyStrokeDashoffset, &amp;RenderStyle::strokeDashOffset, &amp;RenderStyle::setStrokeDashOffset),
</del><span class="cx">         new PropertyWrapper&lt;float&gt;(CSSPropertyStrokeMiterlimit, &amp;RenderStyle::strokeMiterLimit, &amp;RenderStyle::setStrokeMiterLimit),
</span><span class="cx"> 
</span><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyCx, &amp;RenderStyle::cx, &amp;RenderStyle::setCx),
</span><span class="lines">@@ -1261,6 +1259,8 @@
</span><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyR, &amp;RenderStyle::r, &amp;RenderStyle::setR),
</span><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyRx, &amp;RenderStyle::rx, &amp;RenderStyle::setRx),
</span><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyRy, &amp;RenderStyle::ry, &amp;RenderStyle::setRy),
</span><ins>+        new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyStrokeDashoffset, &amp;RenderStyle::strokeDashOffset, &amp;RenderStyle::setStrokeDashOffset),
+        new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyStrokeWidth, &amp;RenderStyle::strokeWidth, &amp;RenderStyle::setStrokeWidth),
</ins><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyX, &amp;RenderStyle::x, &amp;RenderStyle::setX),
</span><span class="cx">         new LengthPropertyWrapper&lt;Length&gt;(CSSPropertyY, &amp;RenderStyle::y, &amp;RenderStyle::setY),
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -1656,12 +1656,12 @@
</span><span class="cx">     void setStrokePaintColor(const Color&amp; c) { accessSVGStyle().setStrokePaint(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, c, &quot;&quot;); }
</span><span class="cx">     float strokeOpacity() const { return svgStyle().strokeOpacity(); }
</span><span class="cx">     void setStrokeOpacity(float f) { accessSVGStyle().setStrokeOpacity(f); }
</span><del>-    SVGLength strokeWidth() const { return svgStyle().strokeWidth(); }
-    void setStrokeWidth(SVGLength w) { accessSVGStyle().setStrokeWidth(w); }
</del><ins>+    const Length&amp; strokeWidth() const { return svgStyle().strokeWidth(); }
+    void setStrokeWidth(Length w) { accessSVGStyle().setStrokeWidth(w); }
</ins><span class="cx">     Vector&lt;SVGLength&gt; strokeDashArray() const { return svgStyle().strokeDashArray(); }
</span><span class="cx">     void setStrokeDashArray(Vector&lt;SVGLength&gt; array) { accessSVGStyle().setStrokeDashArray(array); }
</span><del>-    SVGLength strokeDashOffset() const { return svgStyle().strokeDashOffset(); }
-    void setStrokeDashOffset(SVGLength d) { accessSVGStyle().setStrokeDashOffset(d); }
</del><ins>+    const Length&amp; strokeDashOffset() const { return svgStyle().strokeDashOffset(); }
+    void setStrokeDashOffset(Length d) { accessSVGStyle().setStrokeDashOffset(d); }
</ins><span class="cx">     float strokeMiterLimit() const { return svgStyle().strokeMiterLimit(); }
</span><span class="cx">     void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); }
</span><span class="cx"> 
</span><span class="lines">@@ -1836,6 +1836,7 @@
</span><span class="cx">     static Length initialPadding() { return Length(Fixed); }
</span><span class="cx">     static Length initialTextIndent() { return Length(Fixed); }
</span><span class="cx">     static Length initialZeroLength() { return Length(Fixed); }
</span><ins>+    static Length initialOneLength() { return Length(1, Fixed); }
</ins><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
</span><span class="cx">     static TextIndentType initialTextIndentType() { return TextIndentNormal; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.h (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.h        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.h        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -112,20 +112,6 @@
</span><span class="cx">         return length;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static SVGLength initialStrokeDashOffset()
-    {
-        SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION);
-        return length;
-    }
-
-    static SVGLength initialStrokeWidth()
-    {
-        SVGLength length;
-        length.newValueSpecifiedUnits(LengthTypeNumber, 1, ASSERT_NO_EXCEPTION);
-        return length;
-    }
-
</del><span class="cx">     // SVG CSS Property setters
</span><span class="cx">     void setAlignmentBaseline(EAlignmentBaseline val) { svg_noninherited_flags.f._alignmentBaseline = val; }
</span><span class="cx">     void setDominantBaseline(EDominantBaseline val) { svg_noninherited_flags.f._dominantBaseline = val; }
</span><span class="lines">@@ -246,13 +232,13 @@
</span><span class="cx">             stroke.access()-&gt;miterLimit = obj;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void setStrokeWidth(const SVGLength&amp; obj)
</del><ins>+    void setStrokeWidth(const Length&amp; obj)
</ins><span class="cx">     {
</span><span class="cx">         if (!(stroke-&gt;width == obj))
</span><span class="cx">             stroke.access()-&gt;width = obj;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void setStrokeDashOffset(const SVGLength&amp; obj)
</del><ins>+    void setStrokeDashOffset(const Length&amp; obj)
</ins><span class="cx">     {
</span><span class="cx">         if (!(stroke-&gt;dashOffset == obj))
</span><span class="cx">             stroke.access()-&gt;dashOffset = obj;
</span><span class="lines">@@ -368,8 +354,8 @@
</span><span class="cx">     const String&amp; strokePaintUri() const { return stroke-&gt;paintUri; }
</span><span class="cx">     Vector&lt;SVGLength&gt; strokeDashArray() const { return stroke-&gt;dashArray; }
</span><span class="cx">     float strokeMiterLimit() const { return stroke-&gt;miterLimit; }
</span><del>-    SVGLength strokeWidth() const { return stroke-&gt;width; }
-    SVGLength strokeDashOffset() const { return stroke-&gt;dashOffset; }
</del><ins>+    const Length&amp; strokeWidth() const { return stroke-&gt;width; }
+    const Length&amp; strokeDashOffset() const { return stroke-&gt;dashOffset; }
</ins><span class="cx">     SVGLength kerning() const { return text-&gt;kerning; }
</span><span class="cx">     float stopOpacity() const { return stops-&gt;opacity; }
</span><span class="cx">     const Color&amp; stopColor() const { return stops-&gt;color; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -76,8 +76,8 @@
</span><span class="cx"> StyleStrokeData::StyleStrokeData()
</span><span class="cx">     : opacity(SVGRenderStyle::initialStrokeOpacity())
</span><span class="cx">     , miterLimit(SVGRenderStyle::initialStrokeMiterLimit())
</span><del>-    , width(SVGRenderStyle::initialStrokeWidth())
-    , dashOffset(SVGRenderStyle::initialStrokeDashOffset())
</del><ins>+    , width(RenderStyle::initialOneLength())
+    , dashOffset(RenderStyle::initialZeroLength())
</ins><span class="cx">     , dashArray(SVGRenderStyle::initialStrokeDashArray())
</span><span class="cx">     , paintType(SVGRenderStyle::initialStrokePaintType())
</span><span class="cx">     , paintColor(SVGRenderStyle::initialStrokePaintColor())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleDefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -153,8 +153,8 @@
</span><span class="cx">         float opacity;
</span><span class="cx">         float miterLimit;
</span><span class="cx"> 
</span><del>-        SVGLength width;
-        SVGLength dashOffset;
</del><ins>+        Length width;
+        Length dashOffset;
</ins><span class="cx">         Vector&lt;SVGLength&gt; dashArray;
</span><span class="cx"> 
</span><span class="cx">         SVGPaint::SVGPaintType paintType;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -432,7 +432,7 @@
</span><span class="cx"> float RenderSVGShape::strokeWidth() const
</span><span class="cx"> {
</span><span class="cx">     SVGLengthContext lengthContext(&amp;graphicsElement());
</span><del>-    return style().svgStyle().strokeWidth().value(lengthContext);
</del><ins>+    return lengthContext.valueForLength(style().svgStyle().strokeWidth());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderSVGShape::hasSmoothStroke() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx">         return strokeBoundaries;
</span><span class="cx"> 
</span><span class="cx">     SVGLengthContext lengthContext(&amp;textElement());
</span><del>-    strokeBoundaries.inflate(svgStyle.strokeWidth().value(lengthContext));
</del><ins>+    strokeBoundaries.inflate(lengthContext.valueForLength(svgStyle.strokeWidth()));
</ins><span class="cx">     return strokeBoundaries;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx">     const SVGRenderStyle&amp; svgStyle = style.svgStyle();
</span><span class="cx"> 
</span><span class="cx">     SVGLengthContext lengthContext(toSVGElement(renderer.element()));
</span><del>-    context-&gt;setStrokeThickness(svgStyle.strokeWidth().value(lengthContext));
</del><ins>+    context-&gt;setStrokeThickness(lengthContext.valueForLength(svgStyle.strokeWidth()));
</ins><span class="cx">     context-&gt;setLineCap(svgStyle.capStyle());
</span><span class="cx">     context-&gt;setLineJoin(svgStyle.joinStyle());
</span><span class="cx">     if (svgStyle.joinStyle() == MiterJoin)
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">         for (auto&amp; dash : dashes)
</span><span class="cx">             dashArray.uncheckedAppend(dash.value(lengthContext));
</span><span class="cx"> 
</span><del>-        context-&gt;setLineDash(dashArray, svgStyle.strokeDashOffset().value(lengthContext));
</del><ins>+        context-&gt;setLineDash(dashArray, lengthContext.valueForLength(svgStyle.strokeDashOffset()));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -268,8 +268,8 @@
</span><span class="cx">             writeSVGPaintingResource(ts, strokePaintingResource);
</span><span class="cx"> 
</span><span class="cx">             SVGLengthContext lengthContext(&amp;shape.graphicsElement());
</span><del>-            double dashOffset = svgStyle.strokeDashOffset().value(lengthContext);
-            double strokeWidth = svgStyle.strokeWidth().value(lengthContext);
</del><ins>+            double dashOffset = lengthContext.valueForLength(svgStyle.strokeDashOffset());
+            double strokeWidth = lengthContext.valueForLength(svgStyle.strokeWidth());
</ins><span class="cx">             const Vector&lt;SVGLength&gt;&amp; dashes = svgStyle.strokeDashArray();
</span><span class="cx"> 
</span><span class="cx">             DashArray dashArray;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLengthContext.cpp (172710 => 172711)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-08-18 17:55:05 UTC (rev 172710)
+++ trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-08-18 18:18:16 UTC (rev 172711)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx"> float SVGLengthContext::valueForLength(const Length&amp; length, SVGLengthMode mode)
</span><span class="cx"> {
</span><del>-    if (length.isPercent())
</del><ins>+    if (length.isPercent() &amp;&amp; !length.isCalculated())
</ins><span class="cx">         return convertValueFromPercentageToUserUnits(length.value() / 100, mode, IGNORE_EXCEPTION);
</span><span class="cx">     if (length.isAuto())
</span><span class="cx">         return 0;
</span></span></pre>
</div>
</div>

</body>
</html>