<!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>[161067] 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/161067">161067</a></dd>
<dt>Author</dt> <dd>krit@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-25 11:03:50 -0800 (Wed, 25 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Support &lt;box&gt; values parsing on 'clip-path' property
https://bugs.webkit.org/show_bug.cgi?id=126147

Reviewed by Ryosuke Niwa.

Source/WebCore:

Support parsing of the background reference boxes, margin-box and bounding-box.
A box will be a reference box and define the origin for a basic shape.
If no basic shape is specified, the box defines the clipping path itself.
The specification text follows the changes to CSS Shapes now.

https://dvcs.w3.org/hg/FXTF/raw-file/3f213145303e/css-masking-1/index.html#the-clip-path

Existing parsing test have been extended to test box values as well.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseClipPath):
* css/CSSParser.h:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):

LayoutTests:

Add test to check different combinations of the reference boxes
content-box, padding-box, border-box, margin-box and bounding-box
with other clip-path values.

* fast/masking/parsing-clip-path-shape.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmaskingparsingclippathshapeexpectedtxt">trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmaskingparsingclippathshapehtml">trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/LayoutTests/ChangeLog        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-12-25  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        Support &lt;box&gt; values parsing on 'clip-path' property
+        https://bugs.webkit.org/show_bug.cgi?id=126147
+
+        Reviewed by Ryosuke Niwa.
+
+        Add test to check different combinations of the reference boxes
+        content-box, padding-box, border-box, margin-box and bounding-box
+        with other clip-path values.
+
+        * fast/masking/parsing-clip-path-shape.html:
+
</ins><span class="cx"> 2013-12-24  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove the test expectations added after r161051 now that the changeset has been rolled out.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmaskingparsingclippathshapeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -48,6 +48,16 @@
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;) is &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;) is &quot;ellipse(100%, 100%, 100%, 100%)&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;) is &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;
</span><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;content-box&quot;) is &quot;content-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;) is &quot;padding-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;) is &quot;border-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;) is &quot;margin-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;) is &quot;bounding-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box&quot;) is &quot;circle(50% at 50% 50%) content-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;) is &quot;circle(50% at 50% 50%) padding-box&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;) is &quot;margin-box circle(50% at 50% 50%)&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;border-box circle(50% at 50% 50%)&quot;) is &quot;border-box circle(50% at 50% 50%)&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;) is &quot;circle(50% at 50% 50%) bounding-box&quot;
</ins><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1px, 1px, 1)&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1px, 1px, 1)&quot;) is &quot;none&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(1px, 1px, px)&quot;) is null
</span><span class="lines">@@ -80,6 +90,20 @@
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;) is &quot;none&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is &quot;none&quot;
</span><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;bounding-box circle(50% at 50% 50%) content-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;bounding-box circle(50% at 50% 50%) content-box&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box bounding-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box bounding-box&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;none content-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;none content-box&quot;) is &quot;none&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;url(#test) padding-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;url(#test) padding-box&quot;) is &quot;none&quot;
</ins><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(0, 0)&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(0, 0)&quot;) is &quot;none&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;polygon(0, 0)&quot;) is null
</span></span></pre></div>
<a id="trunkLayoutTestsfastmaskingparsingclippathshapehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -106,6 +106,18 @@
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;, &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;);
</span><span class="cx"> 
</span><ins>+// boxes
+testInner(&quot;-webkit-clip-path&quot;, &quot;content-box&quot;, &quot;content-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;, &quot;padding-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;, &quot;border-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;, &quot;margin-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;, &quot;bounding-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box&quot;, &quot;circle(50% at 50% 50%) content-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;border-box circle(50% at 50% 50%)&quot;, &quot;border-box circle(50% at 50% 50%)&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;);
+
</ins><span class="cx"> // reject non-lengths
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(1px, 1px, 1)&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(1px, 1px, px)&quot;);
</span><span class="lines">@@ -129,6 +141,15 @@
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;);
</span><span class="cx"> 
</span><ins>+// reject multiple &lt;box&gt; values
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;bounding-box circle(50% at 50% 50%) content-box&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box bounding-box&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;none content-box&quot;);
+negativeTest(&quot;-webkit-clip-path&quot;, &quot;url(#test) padding-box&quot;);
+
</ins><span class="cx"> // general negative tests
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(0, 0)&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;polygon(0, 0)&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/Source/WebCore/ChangeLog        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2013-12-25  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        Support &lt;box&gt; values parsing on 'clip-path' property
+        https://bugs.webkit.org/show_bug.cgi?id=126147
+
+        Reviewed by Ryosuke Niwa.
+
+        Support parsing of the background reference boxes, margin-box and bounding-box.
+        A box will be a reference box and define the origin for a basic shape.
+        If no basic shape is specified, the box defines the clipping path itself.
+        The specification text follows the changes to CSS Shapes now.
+
+        https://dvcs.w3.org/hg/FXTF/raw-file/3f213145303e/css-masking-1/index.html#the-clip-path
+
+        Existing parsing test have been extended to test box values as well.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseClipPath):
+        * css/CSSParser.h:
+        * css/CSSValueKeywords.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyClipPath::applyValue):
+
</ins><span class="cx"> 2013-12-25  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Upstream WebCore/pdf changes
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -2919,20 +2919,7 @@
</span><span class="cx">             return parseFontVariantLigatures(important);
</span><span class="cx">         break;
</span><span class="cx">     case CSSPropertyWebkitClipPath:
</span><del>-        if (id == CSSValueNone)
-            validPrimitive = true;
-        else if (value-&gt;unit == CSSParserValue::Function) {
-            RefPtr&lt;CSSBasicShape&gt; shapeValue =  parseBasicShape();
-            if (shapeValue)
-                parsedValue = cssValuePool().createValue(shapeValue.release());
-        }
-#if ENABLE(SVG)
-        else if (value-&gt;unit == CSSPrimitiveValue::CSS_URI) {
-            parsedValue = CSSPrimitiveValue::create(value-&gt;string, CSSPrimitiveValue::CSS_URI);
-            addProperty(propId, parsedValue.release(), important);
-            return true;
-        }
-#endif
</del><ins>+        parsedValue = parseClipPath();
</ins><span class="cx">         break;
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     case CSSPropertyWebkitShapeInside:
</span><span class="lines">@@ -5897,6 +5884,49 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;CSSValue&gt; CSSParser::parseClipPath()
+{
+    CSSParserValue* value = m_valueList-&gt;current();
+    CSSValueID valueId = value-&gt;id;
+
+    if (valueId == CSSValueNone) {
+        m_valueList-&gt;next();
+        return parseValidPrimitive(valueId, value);
+    }
+#if ENABLE(SVG)
+    if (value-&gt;unit == CSSPrimitiveValue::CSS_URI) {
+        m_valueList-&gt;next();
+        return CSSPrimitiveValue::create(value-&gt;string, CSSPrimitiveValue::CSS_URI);
+    }
+#endif
+
+    bool shapeFound = false;
+    bool boxFound = false;
+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    for (unsigned i = 0; i &lt; 2; ++i) {
+        if (!value)
+            break;
+        valueId = value-&gt;id;
+        if (value-&gt;unit == CSSParserValue::Function &amp;&amp; !shapeFound) {
+            // parseBasicShape already asks for the next value list item.
+            RefPtr&lt;CSSBasicShape&gt; shapeValue = parseBasicShape();
+            if (!shapeValue)
+                return nullptr;
+            list-&gt;append(cssValuePool().createValue(shapeValue.release()));
+            shapeFound = true;
+        } else if ((isBoxValue(valueId) || valueId == CSSValueBoundingBox) &amp;&amp; !boxFound) {
+            list-&gt;append(parseValidPrimitive(valueId, value));
+            boxFound = true;
+            m_valueList-&gt;next();
+        } else
+            return nullptr;
+        value = m_valueList-&gt;current();
+    }
+    if (value)
+        return nullptr;
+    return list.release();
+}
+
</ins><span class="cx"> // FIXME This function is temporary to allow for an orderly transition between
</span><span class="cx"> // the new CSS Shapes circle and ellipse syntax. It will be removed when the
</span><span class="cx"> // old syntax is removed.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/Source/WebCore/css/CSSParser.h        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -277,6 +277,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    PassRefPtr&lt;CSSValue&gt; parseClipPath();
+
</ins><span class="cx">     static bool isBlendMode(CSSValueID);
</span><span class="cx">     static bool isCompositeOperator(CSSValueID);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -730,6 +730,9 @@
</span><span class="cx"> // CSS_SHAPES
</span><span class="cx"> margin-box
</span><span class="cx"> 
</span><ins>+// clip-path
+bounding-box
+
</ins><span class="cx"> //
</span><span class="cx"> // background-size
</span><span class="cx"> //
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (161066 => 161067)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2013-12-25 18:58:00 UTC (rev 161066)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2013-12-25 19:03:50 UTC (rev 161067)
</span><span class="lines">@@ -2047,21 +2047,31 @@
</span><span class="cx">     static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx">     {
</span><span class="cx">         if (value-&gt;isPrimitiveValue()) {
</span><del>-            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
-            if (primitiveValue-&gt;getValueID() == CSSValueNone)
</del><ins>+            auto&amp; primitiveValue = toCSSPrimitiveValue(*value);
+            if (primitiveValue.getValueID() == CSSValueNone)
</ins><span class="cx">                 setValue(styleResolver-&gt;style(), 0);
</span><del>-            else if (primitiveValue-&gt;isShape()) {
-                setValue(styleResolver-&gt;style(), ShapeClipPathOperation::create(basicShapeForValue(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), primitiveValue-&gt;getShapeValue())));
-            }
</del><span class="cx"> #if ENABLE(SVG)
</span><del>-            else if (primitiveValue-&gt;primitiveType() == CSSPrimitiveValue::CSS_URI) {
-                String cssURLValue = primitiveValue-&gt;getStringValue();
</del><ins>+            else if (primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_URI) {
+                String cssURLValue = primitiveValue.getStringValue();
</ins><span class="cx">                 URL url = styleResolver-&gt;document().completeURL(cssURLValue);
</span><del>-                // FIXME: It doesn't work with forward or external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=90405)
</del><ins>+                // FIXME: It doesn't work with external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=126133)
</ins><span class="cx">                 setValue(styleResolver-&gt;style(), ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier()));
</span><span class="cx">             }
</span><span class="cx"> #endif
</span><ins>+            return;
</ins><span class="cx">         }
</span><ins>+        if (!value-&gt;isValueList())
+            return;
+        auto&amp; valueList = toCSSValueList(*value);
+        for (unsigned i = 0; i &lt; valueList.length(); ++i) {
+            // FIXME: &lt;box&gt; values are not supported yet.
+            // https://bugs.webkit.org/show_bug.cgi?id=126148
+            auto&amp; primitiveValue = toCSSPrimitiveValue(*valueList.itemWithoutBoundsCheck(i));
+            if (!primitiveValue.isShape())
+                continue;
+            setValue(styleResolver-&gt;style(), ShapeClipPathOperation::create(basicShapeForValue(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), primitiveValue.getShapeValue())));
+            break;
+        }
</ins><span class="cx">     }
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="cx">     {
</span></span></pre>
</div>
</div>

</body>
</html>