<!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) -> 5ms
Because we would assume the unit is CSS_MS without actually
checking.
This patch is inspired by the following Blink revision
by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
patch from <tmeszaros.u-szeged@partner.samsung.com>:
https://src.chromium.org/viewvc/blink?view=rev&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 <cdumez@apple.com>
+
+ 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 <dabates@apple.com>
</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 "PASS" messages, followed by "TEST COMPLETE".
+
+
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg/2))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(150deg))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(150deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300rad/2))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(150rad))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(8594.366926962348deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300grad/2))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(150grad))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(135deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(3turn/2))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(1.5turn))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(540deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(1turn + 10deg))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(370deg))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(370deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg + 30deg))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(330deg))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(330deg)"
+testDiv.style['-webkit-filter'] = 'hue-rotate(calc(2turn + 1turn))'
+PASS testDiv.style['-webkit-filter'] is "hue-rotate(calc(3turn))"
+PASS window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter') is "hue-rotate(1080deg)"
+testDiv.style['transition-delay'] = 'calc(300ms/2)'
+PASS testDiv.style['transition-delay'] is "calc(150ms)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "0.15s"
+testDiv.style['transition-delay'] = 'calc(300s/2)'
+PASS testDiv.style['transition-delay'] is "calc(150s)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "150s"
+testDiv.style['transition-delay'] = 'calc(10s + 100ms)'
+PASS testDiv.style['transition-delay'] is "calc(10100ms)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "10.1s"
+testDiv.style['transition-delay'] = 'calc(100ms + 10s)'
+PASS testDiv.style['transition-delay'] is "calc(10100ms)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "10.1s"
+testDiv.style['transition-delay'] = 'calc(4s + 1s)'
+PASS testDiv.style['transition-delay'] is "calc(5s)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "5s"
+testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'
+PASS testDiv.style['transition-delay'] is "calc(5ms)"
+PASS window.getComputedStyle(testDiv).getPropertyValue('transition-delay') is "0.005s"
+testDiv.style['width'] = 'calc(300Hz/2)'
+PASS testDiv.style['width'] is ""
+testDiv.style['width'] = 'calc(300kHz/2)'
+PASS testDiv.style['width'] is ""
+testDiv.style['width'] = 'calc(10Hz + 20Hz)'
+PASS testDiv.style['width'] is ""
+testDiv.style['width'] = 'calc(10kHz + 20kHz)'
+PASS testDiv.style['width'] is ""
+testDiv.style['width'] = 'calc(10kHz + 200Hz)'
+PASS testDiv.style['width'] is ""
+testDiv.style['width'] = 'calc(200Hz + 10kHz)'
+PASS testDiv.style['width'] is ""
+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>+<!DOCTYPE html>
</ins><span class="cx"> <html>
</span><del>- <head>
</del><ins>+ <body>
+ <script src="../../resources/js-test-pre.js"></script>
+ <div id="testDiv"></div>
</ins><span class="cx"> <script>
</span><del>- if (window.testRunner)
- testRunner.dumpAsText();
- </script>
- <style>
- * {
- width: calc(300deg/2);
- width: calc(300rad/2);
- width: calc(300grad/2);
- width: calc(300turn/2);
</del><ins>+ description("Tests that using angle, time and frequency units in calc() is working as intended.");
</ins><span class="cx">
</span><del>- width: calc(300ms/2);
- width: calc(300s/2);
</del><ins>+ var testDiv = document.getElementById("testDiv");
</ins><span class="cx">
</span><del>- width: calc(300hz/2);
- width: calc(300khz/2);
- }
- </style>
- </head>
- <body>
- This test passes if it does not crash.
</del><ins>+ // Angle units.
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg/2))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(150deg))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(150deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300rad/2))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(150rad))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(8594.366926962348deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300grad/2))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(150grad))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(135deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(3turn/2))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(1.5turn))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(540deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(1turn + 10deg))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(370deg))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(370deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(300deg + 30deg))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(330deg))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(330deg)");
+
+ evalAndLog("testDiv.style['-webkit-filter'] = 'hue-rotate(calc(2turn + 1turn))'");
+ shouldBeEqualToString("testDiv.style['-webkit-filter']", "hue-rotate(calc(3turn))");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('-webkit-filter')", "hue-rotate(1080deg)");
+
+ // Time units.
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(300ms/2)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150ms)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "0.15s");
+
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(300s/2)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(150s)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "150s");
+
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(10s + 100ms)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10100ms)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "10.1s");
+
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(100ms + 10s)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(10100ms)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "10.1s");
+
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(4s + 1s)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(5s)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "5s");
+
+ evalAndLog("testDiv.style['transition-delay'] = 'calc(4ms + 1ms)'");
+ shouldBeEqualToString("testDiv.style['transition-delay']", "calc(5ms)");
+ shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('transition-delay')", "0.005s");
+
+ // Frequency units.
+ // NOTE: Since there is no CSS property that uses frequency at the moment we only test the parsing.
+ evalAndLog("testDiv.style['width'] = 'calc(300Hz/2)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+
+ evalAndLog("testDiv.style['width'] = 'calc(300kHz/2)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+
+ evalAndLog("testDiv.style['width'] = 'calc(10Hz + 20Hz)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+
+ evalAndLog("testDiv.style['width'] = 'calc(10kHz + 20kHz)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+
+ evalAndLog("testDiv.style['width'] = 'calc(10kHz + 200Hz)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+
+ evalAndLog("testDiv.style['width'] = 'calc(200Hz + 10kHz)'");
+ shouldBeEqualToString("testDiv.style['width']", "");
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</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 <cdumez@apple.com>
</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) -> 5ms
+
+ Because we would assume the unit is CSS_MS without actually
+ checking.
+
+ This patch is inspired by the following Blink revision
+ by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
+ patch from <tmeszaros.u-szeged@partner.samsung.com>:
+ https://src.chromium.org/viewvc/blink?view=rev&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 <cdumez@apple.com>
+
</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->doubleValue() < 0; }
</span><span class="cx"> bool isPositive() const { return m_expression->doubleValue() > 0; }
</span><span class="cx"> double computeLengthPx(const CSSToLengthConversionData&) const;
</span><ins>+ unsigned short primitiveType() const { return m_expression->primitiveType(); }
</ins><span class="cx">
</span><span class="cx"> Ref<CalculationValue> createCalculationValue(const CSSToLengthConversionData&) 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->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>