<!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 <box> 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 <krit@webkit.org>
+
+ Support <box> 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 <rniwa@webkit.org>
</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("-webkit-clip-path", "rectangle(45%, 45%, 90%, 60%, 25%, 10%)") is "rectangle(45%, 45%, 90%, 60%, 25%, 10%)"
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "ellipse(100%, 100%, 100%, 100%)") is "ellipse(100%, 100%, 100%, 100%)"
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "polygon(10% 20%, 30% 40%, 40% 50%)") is "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)"
</span><ins>+PASS innerStyle("-webkit-clip-path", "content-box") is "content-box"
+PASS innerStyle("-webkit-clip-path", "padding-box") is "padding-box"
+PASS innerStyle("-webkit-clip-path", "border-box") is "border-box"
+PASS innerStyle("-webkit-clip-path", "margin-box") is "margin-box"
+PASS innerStyle("-webkit-clip-path", "bounding-box") is "bounding-box"
+PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box") is "circle(50% at 50% 50%) content-box"
+PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) padding-box") is "circle(50% at 50% 50%) padding-box"
+PASS innerStyle("-webkit-clip-path", "margin-box circle(50% at 50% 50%)") is "margin-box circle(50% at 50% 50%)"
+PASS innerStyle("-webkit-clip-path", "border-box circle(50% at 50% 50%)") is "border-box circle(50% at 50% 50%)"
+PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) bounding-box") is "circle(50% at 50% 50%) bounding-box"
</ins><span class="cx"> PASS innerStyle("-webkit-clip-path", "circle(1px, 1px, 1)") is null
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "circle(1px, 1px, 1)") is "none"
</span><span class="cx"> PASS innerStyle("-webkit-clip-path", "circle(1px, 1px, px)") is null
</span><span class="lines">@@ -80,6 +90,20 @@
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is "none"
</span><span class="cx"> PASS innerStyle("-webkit-clip-path", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is null
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is "none"
</span><ins>+PASS innerStyle("-webkit-clip-path", "bounding-box circle(50% at 50% 50%) content-box") is null
+PASS computedStyle("-webkit-clip-path", "bounding-box circle(50% at 50% 50%) content-box") is "none"
+PASS innerStyle("-webkit-clip-path", "margin-box padding-box") is null
+PASS computedStyle("-webkit-clip-path", "margin-box padding-box") is "none"
+PASS innerStyle("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)") is null
+PASS computedStyle("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)") is "none"
+PASS innerStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box bounding-box") is null
+PASS computedStyle("-webkit-clip-path", "circle(50% at 50% 50%) content-box bounding-box") is "none"
+PASS innerStyle("-webkit-clip-path", "content-box margin-box padding-box") is null
+PASS computedStyle("-webkit-clip-path", "content-box margin-box padding-box") is "none"
+PASS innerStyle("-webkit-clip-path", "none content-box") is null
+PASS computedStyle("-webkit-clip-path", "none content-box") is "none"
+PASS innerStyle("-webkit-clip-path", "url(#test) padding-box") is null
+PASS computedStyle("-webkit-clip-path", "url(#test) padding-box") is "none"
</ins><span class="cx"> PASS innerStyle("-webkit-clip-path", "circle(0, 0)") is null
</span><span class="cx"> PASS computedStyle("-webkit-clip-path", "circle(0, 0)") is "none"
</span><span class="cx"> PASS innerStyle("-webkit-clip-path", "polygon(0, 0)") 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("-webkit-clip-path", "ellipse(100%, 100%, 100%, 100%)", "ellipse(100%, 100%, 100%, 100%)");
</span><span class="cx"> testComputed("-webkit-clip-path", "polygon(10% 20%, 30% 40%, 40% 50%)", "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)");
</span><span class="cx">
</span><ins>+// boxes
+testInner("-webkit-clip-path", "content-box", "content-box");
+testInner("-webkit-clip-path", "padding-box", "padding-box");
+testInner("-webkit-clip-path", "border-box", "border-box");
+testInner("-webkit-clip-path", "margin-box", "margin-box");
+testInner("-webkit-clip-path", "bounding-box", "bounding-box");
+testInner("-webkit-clip-path", "circle(50% at 50% 50%) content-box", "circle(50% at 50% 50%) content-box");
+testInner("-webkit-clip-path", "circle(50% at 50% 50%) padding-box", "circle(50% at 50% 50%) padding-box");
+testInner("-webkit-clip-path", "margin-box circle(50% at 50% 50%)", "margin-box circle(50% at 50% 50%)");
+testInner("-webkit-clip-path", "border-box circle(50% at 50% 50%)", "border-box circle(50% at 50% 50%)");
+testInner("-webkit-clip-path", "circle(50% at 50% 50%) bounding-box", "circle(50% at 50% 50%) bounding-box");
+
</ins><span class="cx"> // reject non-lengths
</span><span class="cx"> negativeTest("-webkit-clip-path", "circle(1px, 1px, 1)");
</span><span class="cx"> negativeTest("-webkit-clip-path", "circle(1px, 1px, px)");
</span><span class="lines">@@ -129,6 +141,15 @@
</span><span class="cx"> negativeTest("-webkit-clip-path", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)");
</span><span class="cx"> negativeTest("-webkit-clip-path", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)");
</span><span class="cx">
</span><ins>+// reject multiple <box> values
+negativeTest("-webkit-clip-path", "bounding-box circle(50% at 50% 50%) content-box");
+negativeTest("-webkit-clip-path", "margin-box padding-box");
+negativeTest("-webkit-clip-path", "padding-box border-box circle(50% at 50% 50%)");
+negativeTest("-webkit-clip-path", "circle(50% at 50% 50%) content-box bounding-box");
+negativeTest("-webkit-clip-path", "content-box margin-box padding-box");
+negativeTest("-webkit-clip-path", "none content-box");
+negativeTest("-webkit-clip-path", "url(#test) padding-box");
+
</ins><span class="cx"> // general negative tests
</span><span class="cx"> negativeTest("-webkit-clip-path", "circle(0, 0)");
</span><span class="cx"> negativeTest("-webkit-clip-path", "polygon(0, 0)");
</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 <krit@webkit.org>
+
+ Support <box> 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 <ddkilzer@apple.com>
</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->unit == CSSParserValue::Function) {
- RefPtr<CSSBasicShape> shapeValue = parseBasicShape();
- if (shapeValue)
- parsedValue = cssValuePool().createValue(shapeValue.release());
- }
-#if ENABLE(SVG)
- else if (value->unit == CSSPrimitiveValue::CSS_URI) {
- parsedValue = CSSPrimitiveValue::create(value->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<CSSValue> CSSParser::parseClipPath()
+{
+ CSSParserValue* value = m_valueList->current();
+ CSSValueID valueId = value->id;
+
+ if (valueId == CSSValueNone) {
+ m_valueList->next();
+ return parseValidPrimitive(valueId, value);
+ }
+#if ENABLE(SVG)
+ if (value->unit == CSSPrimitiveValue::CSS_URI) {
+ m_valueList->next();
+ return CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::CSS_URI);
+ }
+#endif
+
+ bool shapeFound = false;
+ bool boxFound = false;
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ for (unsigned i = 0; i < 2; ++i) {
+ if (!value)
+ break;
+ valueId = value->id;
+ if (value->unit == CSSParserValue::Function && !shapeFound) {
+ // parseBasicShape already asks for the next value list item.
+ RefPtr<CSSBasicShape> shapeValue = parseBasicShape();
+ if (!shapeValue)
+ return nullptr;
+ list->append(cssValuePool().createValue(shapeValue.release()));
+ shapeFound = true;
+ } else if ((isBoxValue(valueId) || valueId == CSSValueBoundingBox) && !boxFound) {
+ list->append(parseValidPrimitive(valueId, value));
+ boxFound = true;
+ m_valueList->next();
+ } else
+ return nullptr;
+ value = m_valueList->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<CSSValue> 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->isPrimitiveValue()) {
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueNone)
</del><ins>+ auto& primitiveValue = toCSSPrimitiveValue(*value);
+ if (primitiveValue.getValueID() == CSSValueNone)
</ins><span class="cx"> setValue(styleResolver->style(), 0);
</span><del>- else if (primitiveValue->isShape()) {
- setValue(styleResolver->style(), ShapeClipPathOperation::create(basicShapeForValue(styleResolver->style(), styleResolver->rootElementStyle(), primitiveValue->getShapeValue())));
- }
</del><span class="cx"> #if ENABLE(SVG)
</span><del>- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_URI) {
- String cssURLValue = primitiveValue->getStringValue();
</del><ins>+ else if (primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_URI) {
+ String cssURLValue = primitiveValue.getStringValue();
</ins><span class="cx"> URL url = styleResolver->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->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->isValueList())
+ return;
+ auto& valueList = toCSSValueList(*value);
+ for (unsigned i = 0; i < valueList.length(); ++i) {
+ // FIXME: <box> values are not supported yet.
+ // https://bugs.webkit.org/show_bug.cgi?id=126148
+ auto& primitiveValue = toCSSPrimitiveValue(*valueList.itemWithoutBoundsCheck(i));
+ if (!primitiveValue.isShape())
+ continue;
+ setValue(styleResolver->style(), ShapeClipPathOperation::create(basicShapeForValue(styleResolver->style(), styleResolver->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>