<!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>[178627] 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/178627">178627</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-01-17 09:18:23 -0800 (Sat, 17 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Converting time, angle and frequency units in CSS calc() function
https://bugs.webkit.org/show_bug.cgi?id=138356

Reviewed by Darin Adler.

Source/WebCore:

Update CSSPrimitiveValue::primitiveType() to actually query the
primitiveType of the CSSCalcValue instead of assuming a given
type based on its category (e.g. If category is CalcTime, then
assume type is CSS_MS, even though it would be CSS_S as well).

This would like to calculation errors such as:
calc(4s + 1s) -&gt; 5ms

Because we would assume the unit is CSS_MS without actually
checking.

This patch is inspired by the following Blink revision
by &lt;rhodovan.u-szeged@partner.samsung.com&gt; and initial WebKit
patch from &lt;tmeszaros.u-szeged@partner.samsung.com&gt;:
https://src.chromium.org/viewvc/blink?view=rev&amp;revision=179101

Test: fast/css/calc-with-angle-time-frequency.html

* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::primitiveType):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):

LayoutTests:

Update fast/css/calc-with-angle-time-frequency.html to include more
test cases and actually validate the result of the calculation,
instead of merely setting the CSS property and being happy if we don't
crash.

* fast/css/calc-with-angle-time-frequency-expected.txt:
* fast/css/calc-with-angle-time-frequency.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcsscalcwithangletimefrequencyexpectedtxt">trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsscalcwithangletimefrequencyhtml">trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValueh">trunk/Source/WebCore/css/CSSCalculationValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/LayoutTests/ChangeLog        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-01-17  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Converting time, angle and frequency units in CSS calc() function
+        https://bugs.webkit.org/show_bug.cgi?id=138356
+
+        Reviewed by Darin Adler.
+
+        Update fast/css/calc-with-angle-time-frequency.html to include more
+        test cases and actually validate the result of the calculation,
+        instead of merely setting the CSS property and being happy if we don't
+        crash.
+
+        * fast/css/calc-with-angle-time-frequency-expected.txt:
+        * fast/css/calc-with-angle-time-frequency.html:
+
</ins><span class="cx"> 2015-01-16  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update some expected results for iOS
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscalcwithangletimefrequencyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -1 +1,60 @@
</span><del>-This test passes if it does not crash.
</del><ins>+Tests that using angle, time and frequency units in calc() is working as intended.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg/2))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(150deg))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(150deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300rad/2))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(150rad))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(8594.366926962348deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300grad/2))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(150grad))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(135deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(3turn/2))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(1.5turn))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(540deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(1turn + 10deg))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(370deg))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(370deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg + 30deg))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(330deg))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(330deg)&quot;
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(2turn + 1turn))'
+PASS testDiv.style['-webkit-filter'] is &quot;hue-rotate(calc(3turn))&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is &quot;hue-rotate(1080deg)&quot;
+testDiv.style['transition-delay'] = 'calc(300ms/2)'
+PASS testDiv.style['transition-delay'] is &quot;calc(150ms)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;0.15s&quot;
+testDiv.style['transition-delay'] = 'calc(300s/2)'
+PASS testDiv.style['transition-delay'] is &quot;calc(150s)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;150s&quot;
+testDiv.style['transition-delay'] = 'calc(10s + 100ms)'
+PASS testDiv.style['transition-delay'] is &quot;calc(10100ms)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;10.1s&quot;
+testDiv.style['transition-delay'] = 'calc(100ms + 10s)'
+PASS testDiv.style['transition-delay'] is &quot;calc(10100ms)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;10.1s&quot;
+testDiv.style['transition-delay'] = 'calc(4s + 1s)'
+PASS testDiv.style['transition-delay'] is &quot;calc(5s)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;5s&quot;
+testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'
+PASS testDiv.style['transition-delay'] is &quot;calc(5ms)&quot;
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is &quot;0.005s&quot;
+testDiv.style['width'] = 'calc(300Hz/2)'
+PASS testDiv.style['width'] is &quot;&quot;
+testDiv.style['width'] = 'calc(300kHz/2)'
+PASS testDiv.style['width'] is &quot;&quot;
+testDiv.style['width'] = 'calc(10Hz + 20Hz)'
+PASS testDiv.style['width'] is &quot;&quot;
+testDiv.style['width'] = 'calc(10kHz + 20kHz)'
+PASS testDiv.style['width'] is &quot;&quot;
+testDiv.style['width'] = 'calc(10kHz + 200Hz)'
+PASS testDiv.style['width'] is &quot;&quot;
+testDiv.style['width'] = 'calc(200Hz + 10kHz)'
+PASS testDiv.style['width'] is &quot;&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscalcwithangletimefrequencyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/LayoutTests/fast/css/calc-with-angle-time-frequency.html        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -1,25 +1,87 @@
</span><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><del>-    &lt;head&gt;
</del><ins>+    &lt;body&gt;
+        &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+        &lt;div id=&quot;testDiv&quot;&gt;&lt;/div&gt;
</ins><span class="cx">         &lt;script&gt;
</span><del>-            if (window.testRunner)
-                testRunner.dumpAsText();
-        &lt;/script&gt;
-        &lt;style&gt;
-            * {
-                width: calc(300deg/2);
-                width: calc(300rad/2);
-                width: calc(300grad/2);
-                width: calc(300turn/2);
</del><ins>+            description(&quot;Tests that using angle, time and frequency units in calc() is working as intended.&quot;);
</ins><span class="cx"> 
</span><del>-                width: calc(300ms/2);
-                width: calc(300s/2);
</del><ins>+            var testDiv = document.getElementById(&quot;testDiv&quot;);
</ins><span class="cx"> 
</span><del>-                width: calc(300hz/2);
-                width: calc(300khz/2);
-            }
-        &lt;/style&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-        This test passes if it does not crash.
</del><ins>+            // Angle units.
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg/2))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(150deg))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(150deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300rad/2))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(150rad))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(8594.366926962348deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300grad/2))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(150grad))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(135deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(3turn/2))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(1.5turn))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(540deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(1turn + 10deg))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(370deg))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(370deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg + 30deg))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(330deg))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(330deg)&quot;);
+
+            evalAndLog(&quot;testDiv.style['-webkit-filter'] = 'hue-rotate(calc(2turn + 1turn))'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['-webkit-filter']&quot;, &quot;hue-rotate(calc(3turn))&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')&quot;, &quot;hue-rotate(1080deg)&quot;);
+
+            // Time units.
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(300ms/2)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(150ms)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;0.15s&quot;);
+
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(300s/2)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(150s)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;150s&quot;);
+
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(10s + 100ms)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(10100ms)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;10.1s&quot;);
+
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(100ms + 10s)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(10100ms)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;10.1s&quot;);
+
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(4s + 1s)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(5s)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;5s&quot;);
+
+            evalAndLog(&quot;testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['transition-delay']&quot;, &quot;calc(5ms)&quot;);
+            shouldBeEqualToString(&quot;window.getComputedStyle(testDiv).getPropertyValue('transition-delay')&quot;, &quot;0.005s&quot;);
+
+            // Frequency units.
+            // NOTE: Since there is no CSS property that uses frequency at the moment we only test the parsing.
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(300Hz/2)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(300kHz/2)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(10Hz + 20Hz)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(10kHz + 20kHz)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(10kHz + 200Hz)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+
+            evalAndLog(&quot;testDiv.style['width'] = 'calc(200Hz + 10kHz)'&quot;);
+            shouldBeEqualToString(&quot;testDiv.style['width']&quot;, &quot;&quot;);
+        &lt;/script&gt;
+        &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/Source/WebCore/ChangeLog        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2015-01-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Converting time, angle and frequency units in CSS calc() function
+        https://bugs.webkit.org/show_bug.cgi?id=138356
+
+        Reviewed by Darin Adler.
+
+        Update CSSPrimitiveValue::primitiveType() to actually query the
+        primitiveType of the CSSCalcValue instead of assuming a given
+        type based on its category (e.g. If category is CalcTime, then
+        assume type is CSS_MS, even though it would be CSS_S as well).
+
+        This would like to calculation errors such as:
+        calc(4s + 1s) -&gt; 5ms
+
+        Because we would assume the unit is CSS_MS without actually
+        checking.
+
+        This patch is inspired by the following Blink revision
+        by &lt;rhodovan.u-szeged@partner.samsung.com&gt; and initial WebKit
+        patch from &lt;tmeszaros.u-szeged@partner.samsung.com&gt;:
+        https://src.chromium.org/viewvc/blink?view=rev&amp;revision=179101
+
+        Test: fast/css/calc-with-angle-time-frequency.html
+
+        * css/CSSCalculationValue.h:
+        (WebCore::CSSCalcValue::primitiveType):
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::primitiveType):
+
+2015-01-17  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Generate shorthandForProperty() implementation from CSSPropertyNames.in
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=140556
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.h (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.h        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/Source/WebCore/css/CSSCalculationValue.h        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx">     bool isNegative() const { return m_expression-&gt;doubleValue() &lt; 0; }
</span><span class="cx">     bool isPositive() const { return m_expression-&gt;doubleValue() &gt; 0; }
</span><span class="cx">     double computeLengthPx(const CSSToLengthConversionData&amp;) const;
</span><ins>+    unsigned short primitiveType() const { return m_expression-&gt;primitiveType(); }
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;CalculationValue&gt; createCalculationValue(const CSSToLengthConversionData&amp;) const;
</span><span class="cx">     void setPermittedValueRange(CalculationPermittedValueRange);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (178626 => 178627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-01-17 16:54:33 UTC (rev 178626)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-01-17 17:18:23 UTC (rev 178627)
</span><span class="lines">@@ -198,11 +198,9 @@
</span><span class="cx">     case CalcPercentLength:
</span><span class="cx">         return CSSPrimitiveValue::CSS_CALC_PERCENTAGE_WITH_LENGTH;
</span><span class="cx">     case CalcAngle:
</span><del>-        return CSSPrimitiveValue::CSS_DEG;
</del><span class="cx">     case CalcTime:
</span><del>-        return CSSPrimitiveValue::CSS_MS;
</del><span class="cx">     case CalcFrequency:
</span><del>-        return CSSPrimitiveValue::CSS_HZ;
</del><ins>+        return m_value.calc-&gt;primitiveType();
</ins><span class="cx">     case CalcOther:
</span><span class="cx">         return CSSPrimitiveValue::CSS_UNKNOWN;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>