<!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>[196738] 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/196738">196738</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-02-17 18:13:37 -0800 (Wed, 17 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebKitCSSMatrix transformList with calculated relative length crashes Safari.
https://bugs.webkit.org/show_bug.cgi?id=153333
&lt;rdar://problem/17198383&gt;

Reviewed by Simon Fraser.

Source/WebCore:

WebKitCSSMatrix objects should fail to construct when not
using absolute lengths.

Updated existing tests:
- transforms/cssmatrix-2d-interface.xhtml
- transforms/cssmatrix-3d-interface.xhtml

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTransform): Tell transformsForValue
that we don't require absolute lengths.
* css/TransformFunctions.cpp:
(WebCore::convertToFloatLength): Add an optional parameter that will
cause the conversion to fail if the primitive value has a non-absolute
length.
(WebCore::transformsForValue): Pass the parameter for requiring an
absolute length on to convertToFloatLength when necessary.
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue): In this case we do
require all transform strings to have absolute lengths, not ones
that depend on the font size or are calculated.

LayoutTests:

Update existing tests to exercise the non-absolute lengths for translation
and perspective functions.

* transforms/cssmatrix-2d-interface-expected.txt:
* transforms/cssmatrix-2d-interface.xhtml:
* transforms/cssmatrix-3d-interface-expected.txt:
* transforms/cssmatrix-3d-interface.xhtml:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTeststransformscssmatrix2dinterfaceexpectedtxt">trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt</a></li>
<li><a href="#trunkLayoutTeststransformscssmatrix2dinterfacexhtml">trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml</a></li>
<li><a href="#trunkLayoutTeststransformscssmatrix3dinterfaceexpectedtxt">trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt</a></li>
<li><a href="#trunkLayoutTeststransformscssmatrix3dinterfacexhtml">trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionscpp">trunk/Source/WebCore/css/TransformFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionsh">trunk/Source/WebCore/css/TransformFunctions.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixcpp">trunk/Source/WebCore/css/WebKitCSSMatrix.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/LayoutTests/ChangeLog        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-02-17  Dean Jackson  &lt;dino@apple.com&gt;
+
+        WebKitCSSMatrix transformList with calculated relative length crashes Safari.
+        https://bugs.webkit.org/show_bug.cgi?id=153333
+        &lt;rdar://problem/17198383&gt;
+
+        Reviewed by Simon Fraser.
+
+        Update existing tests to exercise the non-absolute lengths for translation
+        and perspective functions.
+
+        * transforms/cssmatrix-2d-interface-expected.txt:
+        * transforms/cssmatrix-2d-interface.xhtml:
+        * transforms/cssmatrix-3d-interface-expected.txt:
+        * transforms/cssmatrix-3d-interface.xhtml:
+
</ins><span class="cx"> 2016-02-17  Keith Miller  &lt;keith_miller@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Spread operator should be allowed when not the first argument of parameter list
</span></span></pre></div>
<a id="trunkLayoutTeststransformscssmatrix2dinterfaceexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/LayoutTests/transforms/cssmatrix-2d-interface-expected.txt        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -22,8 +22,17 @@
</span><span class="cx"> PASS parseFloat(a3[0]) is 0
</span><span class="cx"> PASS a3[1] is &quot;&quot;
</span><span class="cx"> 
</span><del>-Test bad input to string constructor
</del><ins>+Test bad input to constructor
</ins><span class="cx"> PASS new WebKitCSSMatrix(&quot;banana&quot;) threw exception Error: SyntaxError: DOM Exception 12.
</span><ins>+PASS new WebKitCSSMatrix(&quot;translate(1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate(10px, 1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate(10px, calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate(1ex)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate(1%)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatex(1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatex(calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatey(1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatey(calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
</ins><span class="cx"> 
</span><span class="cx"> Test attributes on default matrix
</span><span class="cx"> PASS m.a is 1
</span></span></pre></div>
<a id="trunkLayoutTeststransformscssmatrix2dinterfacexhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/LayoutTests/transforms/cssmatrix-2d-interface.xhtml        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -40,8 +40,17 @@
</span><span class="cx"> shouldBe('a3[1]', '&quot;&quot;');
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><del>-debug(&quot;Test bad input to string constructor&quot;);
</del><ins>+debug(&quot;Test bad input to constructor&quot;);
</ins><span class="cx"> shouldThrow('new WebKitCSSMatrix(&quot;banana&quot;)');
</span><ins>+shouldThrow('new WebKitCSSMatrix(&quot;translate(1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate(10px, 1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate(10px, calc(10px))&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate(1ex)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate(1%)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatex(1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatex(calc(10px))&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatey(1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatey(calc(10px))&quot;)');
</ins><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test attributes on default matrix&quot;);
</span></span></pre></div>
<a id="trunkLayoutTeststransformscssmatrix3dinterfaceexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/LayoutTests/transforms/cssmatrix-3d-interface-expected.txt        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -28,8 +28,21 @@
</span><span class="cx"> PASS parseFloat(a3[0]) is 1
</span><span class="cx"> PASS a3[1] is &quot;&quot;
</span><span class="cx"> 
</span><del>-Test bad input to string constructor
</del><ins>+Test bad input to constructor
</ins><span class="cx"> PASS new WebKitCSSMatrix(&quot;banana&quot;) threw exception Error: SyntaxError: DOM Exception 12.
</span><ins>+PASS new WebKitCSSMatrix(&quot;translate3d(1em, 0, 0)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate3d(10px, 1em, 0)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate3d(10px, 10px, calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate3d(calc(10px), 10px, 10px)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate3d(10px, calc(10px), 10px)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate3d(1ex, 0, 0)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatez(1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translatez(calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;translate(1%, 0, 0)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;perspective(1em)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;perspective(calc(10px))&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;perspective(1ex)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS new WebKitCSSMatrix(&quot;perspective(1%)&quot;) threw exception Error: SyntaxError: DOM Exception 12.
</ins><span class="cx"> 
</span><span class="cx"> Test attributes on default matrix
</span><span class="cx"> PASS m.m11 is 1
</span></span></pre></div>
<a id="trunkLayoutTeststransformscssmatrix3dinterfacexhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/LayoutTests/transforms/cssmatrix-3d-interface.xhtml        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -59,8 +59,21 @@
</span><span class="cx"> shouldBe('a3[1]', '&quot;&quot;');
</span><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><del>-debug(&quot;Test bad input to string constructor&quot;);
</del><ins>+debug(&quot;Test bad input to constructor&quot;);
</ins><span class="cx"> shouldThrow('new WebKitCSSMatrix(&quot;banana&quot;)');
</span><ins>+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(1em, 0, 0)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(10px, 1em, 0)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(10px, 10px, calc(10px))&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(calc(10px), 10px, 10px)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(10px, calc(10px), 10px)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate3d(1ex, 0, 0)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatez(1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translatez(calc(10px))&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;translate(1%, 0, 0)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;perspective(1em)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;perspective(calc(10px))&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;perspective(1ex)&quot;)');
+shouldThrow('new WebKitCSSMatrix(&quot;perspective(1%)&quot;)');
</ins><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test attributes on default matrix&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/Source/WebCore/ChangeLog        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2016-02-17  Dean Jackson  &lt;dino@apple.com&gt;
+
+        WebKitCSSMatrix transformList with calculated relative length crashes Safari.
+        https://bugs.webkit.org/show_bug.cgi?id=153333
+        &lt;rdar://problem/17198383&gt;
+
+        Reviewed by Simon Fraser.
+
+        WebKitCSSMatrix objects should fail to construct when not
+        using absolute lengths.
+
+        Updated existing tests:
+        - transforms/cssmatrix-2d-interface.xhtml
+        - transforms/cssmatrix-3d-interface.xhtml
+
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertTransform): Tell transformsForValue
+        that we don't require absolute lengths.
+        * css/TransformFunctions.cpp:
+        (WebCore::convertToFloatLength): Add an optional parameter that will
+        cause the conversion to fail if the primitive value has a non-absolute
+        length.
+        (WebCore::transformsForValue): Pass the parameter for requiring an
+        absolute length on to convertToFloatLength when necessary.
+        * css/TransformFunctions.h:
+        * css/WebKitCSSMatrix.cpp:
+        (WebCore::WebKitCSSMatrix::setMatrixValue): In this case we do
+        require all transform strings to have absolute lengths, not ones
+        that depend on the font size or are calculated.
+
</ins><span class="cx"> 2016-02-17  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r196712.
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -355,7 +355,7 @@
</span><span class="cx"> inline TransformOperations StyleBuilderConverter::convertTransform(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span><span class="cx"> {
</span><span class="cx">     TransformOperations operations;
</span><del>-    transformsForValue(value, styleResolver.state().cssToLengthConversionData(), operations);
</del><ins>+    transformsForValue(value, styleResolver.state().cssToLengthConversionData(), TransformConversion::Auto, operations);
</ins><span class="cx">     return operations;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.cpp        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -76,12 +76,14 @@
</span><span class="cx">     return TransformOperation::NONE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Length convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData&amp; conversionData)
</del><ins>+Length convertToFloatLength(const CSSPrimitiveValue* primitiveValue, const CSSToLengthConversionData&amp; conversionData, TransformConversion transformConversion)
</ins><span class="cx"> {
</span><del>-    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion | CalculatedConversion&gt;(conversionData) : Length(Undefined);
</del><ins>+    if (transformConversion == TransformConversion::RequiresAbsoluteLength &amp;&amp; !primitiveValue-&gt;isFontIndependentLength())
+        return Length(Undefined);
+    return primitiveValue ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion&gt;(conversionData) : Length(Undefined);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool transformsForValue(CSSValue&amp; value, const CSSToLengthConversionData&amp; conversionData, TransformOperations&amp; outOperations)
</del><ins>+bool transformsForValue(CSSValue&amp; value, const CSSToLengthConversionData&amp; conversionData, TransformConversion transformConversion, TransformOperations&amp; outOperations)
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;CSSValueList&gt;(value)) {
</span><span class="cx">         outOperations.clear();
</span><span class="lines">@@ -162,13 +164,13 @@
</span><span class="cx">             Length tx = Length(0, Fixed);
</span><span class="cx">             Length ty = Length(0, Fixed);
</span><span class="cx">             if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
</span><del>-                ty = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                ty = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">             else {
</span><del>-                tx = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                tx = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">                 if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
</span><span class="cx">                     if (transformValue.length() &gt; 1) {
</span><span class="cx">                         CSSPrimitiveValue&amp; secondValue = downcast&lt;CSSPrimitiveValue&gt;(*transformValue.itemWithoutBoundsCheck(1));
</span><del>-                        ty = convertToFloatLength(&amp;secondValue, conversionData);
</del><ins>+                        ty = convertToFloatLength(&amp;secondValue, conversionData, transformConversion);
</ins><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -185,19 +187,19 @@
</span><span class="cx">             Length ty = Length(0, Fixed);
</span><span class="cx">             Length tz = Length(0, Fixed);
</span><span class="cx">             if (transformValue.operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
</span><del>-                tz = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                tz = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">             else if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
</span><del>-                ty = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                ty = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">             else {
</span><del>-                tx = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                tx = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">                 if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
</span><span class="cx">                     if (transformValue.length() &gt; 2) {
</span><span class="cx">                         CSSPrimitiveValue&amp; thirdValue = downcast&lt;CSSPrimitiveValue&gt;(*transformValue.itemWithoutBoundsCheck(2));
</span><del>-                        tz = convertToFloatLength(&amp;thirdValue, conversionData);
</del><ins>+                        tz = convertToFloatLength(&amp;thirdValue, conversionData, transformConversion);
</ins><span class="cx">                     }
</span><span class="cx">                     if (transformValue.length() &gt; 1) {
</span><span class="cx">                         CSSPrimitiveValue&amp; secondValue = downcast&lt;CSSPrimitiveValue&gt;(*transformValue.itemWithoutBoundsCheck(1));
</span><del>-                        ty = convertToFloatLength(&amp;secondValue, conversionData);
</del><ins>+                        ty = convertToFloatLength(&amp;secondValue, conversionData, transformConversion);
</ins><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -300,7 +302,7 @@
</span><span class="cx">         case WebKitCSSTransformValue::PerspectiveTransformOperation: {
</span><span class="cx">             Length p = Length(0, Fixed);
</span><span class="cx">             if (firstValue.isLength())
</span><del>-                p = convertToFloatLength(&amp;firstValue, conversionData);
</del><ins>+                p = convertToFloatLength(&amp;firstValue, conversionData, transformConversion);
</ins><span class="cx">             else {
</span><span class="cx">                 // This is a quirk that should go away when 3d transforms are finalized.
</span><span class="cx">                 double val = firstValue.getDoubleValue();
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.h (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.h        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/Source/WebCore/css/TransformFunctions.h        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -42,8 +42,13 @@
</span><span class="cx"> 
</span><span class="cx"> struct Length;
</span><span class="cx"> 
</span><del>-bool transformsForValue(CSSValue&amp;, const CSSToLengthConversionData&amp;, TransformOperations&amp;);
-Length convertToFloatLength(const CSSPrimitiveValue*, const CSSToLengthConversionData&amp;);
</del><ins>+enum class TransformConversion {
+    Auto,
+    RequiresAbsoluteLength
+};
</ins><span class="cx"> 
</span><ins>+bool transformsForValue(CSSValue&amp;, const CSSToLengthConversionData&amp;, TransformConversion transformConversion, TransformOperations&amp;);
+Length convertToFloatLength(const CSSPrimitiveValue*, const CSSToLengthConversionData&amp;, TransformConversion transformConversion = TransformConversion::Auto);
+
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (196737 => 196738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-02-18 02:04:40 UTC (rev 196737)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-02-18 02:13:37 UTC (rev 196738)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         TransformOperations operations;
</span><del>-        if (!transformsForValue(*value, CSSToLengthConversionData(), operations)) {
</del><ins>+        if (!transformsForValue(*value, CSSToLengthConversionData(), TransformConversion::RequiresAbsoluteLength, operations)) {
</ins><span class="cx">             ec = SYNTAX_ERR;
</span><span class="cx">             return;
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>