<!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>[163764] 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/163764">163764</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-09 22:02:42 -0800 (Sun, 09 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>-webkit-clip-path should support fill, stroke, view-box keywords
https://bugs.webkit.org/show_bug.cgi?id=128393

Source/WebCore:

Patch by Dirk Schulze &lt;dschulze@chromium.org&gt; on 2014-02-09
Reviewed by Dean Jackson.

CSS Masking uses the keywords fill, stroke and view-box for SVG shapes.
This patch updates the parser, style resolver and SVG implementation of
the prefixed clip-path property.

Remove the unexposed and obsolete keyword bounding-box.

Tests: svg/clip-path/clip-path-shape-fill-expected.svg
       svg/clip-path/clip-path-shape-fill.svg
       svg/clip-path/clip-path-shape-stroke-expected.svg
       svg/clip-path/clip-path-shape-stroke.svg
       svg/clip-path/clip-path-shape-view-box-expected.svg
       svg/clip-path/clip-path-shape-view-box.svg

* css/CSSParser.cpp: Parse fill, stroke, view-box. Remove bounding-box.
(WebCore::isBoxValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LayoutBox):
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
* rendering/RenderLayer.cpp:
(WebCore::computeReferenceBox):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::logicalTopOffset):
(WebCore::ShapeInfo::logicalLeftOffset):
* rendering/style/RenderStyleConstants.h:
* rendering/svg/SVGRenderingContext.cpp: Use different reference boxes per keyword.
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:

Patch by Dirk Schulze &lt;krit@webkit.org&gt; on 2014-02-09
Reviewed by Dean Jackson.

Update or add new tests for changed clip-path keywords.

* css3/masking/clip-path-circle-bounding-box.html: Removed.
* fast/masking/parsing-clip-path-shape.html:
* platform/mac/css3/masking/clip-path-circle-bounding-box-expected.png: Removed.
* platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt: Removed.
* svg/clip-path/clip-path-shape-fill-expected.svg: Added.
* svg/clip-path/clip-path-shape-fill.svg: Added.
* svg/clip-path/clip-path-shape-stroke-expected.svg: Added.
* svg/clip-path/clip-path-shape-stroke.svg: Added.
* svg/clip-path/clip-path-shape-view-box-expected.svg: Added.
* svg/clip-path/clip-path-shape-view-box.svg: Added.</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="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.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>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfoh">trunk/Source/WebCore/rendering/shapes/ShapeInfo.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgclippathclippathshapefillexpectedsvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-fill-expected.svg</a></li>
<li><a href="#trunkLayoutTestssvgclippathclippathshapefillsvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg</a></li>
<li><a href="#trunkLayoutTestssvgclippathclippathshapestrokeexpectedsvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke-expected.svg</a></li>
<li><a href="#trunkLayoutTestssvgclippathclippathshapestrokesvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg</a></li>
<li><a href="#trunkLayoutTestssvgclippathclippathshapeviewboxexpectedsvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box-expected.svg</a></li>
<li><a href="#trunkLayoutTestssvgclippathclippathshapeviewboxsvg">trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box.svg</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3maskingclippathcircleboundingboxhtml">trunk/LayoutTests/css3/masking/clip-path-circle-bounding-box.html</a></li>
<li><a href="#trunkLayoutTestsplatformmaccss3maskingclippathcircleboundingboxexpectedpng">trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmaccss3maskingclippathcircleboundingboxexpectedtxt">trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/LayoutTests/ChangeLog        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-02-09  Dirk Schulze  &lt;krit@webkit.org&gt;
+
+        -webkit-clip-path should support fill, stroke, view-box keywords
+        https://bugs.webkit.org/show_bug.cgi?id=128393
+
+        Reviewed by Dean Jackson.
+
+        Update or add new tests for changed clip-path keywords.
+
+        * css3/masking/clip-path-circle-bounding-box.html: Removed.
+        * fast/masking/parsing-clip-path-shape.html:
+        * platform/mac/css3/masking/clip-path-circle-bounding-box-expected.png: Removed.
+        * platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt: Removed.
+        * svg/clip-path/clip-path-shape-fill-expected.svg: Added.
+        * svg/clip-path/clip-path-shape-fill.svg: Added.
+        * svg/clip-path/clip-path-shape-stroke-expected.svg: Added.
+        * svg/clip-path/clip-path-shape-stroke.svg: Added.
+        * svg/clip-path/clip-path-shape-view-box-expected.svg: Added.
+        * svg/clip-path/clip-path-shape-view-box.svg: Added.
+
</ins><span class="cx"> 2014-02-09  Carlos Garnacho  &lt;carlosg@gnome.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Enable touch features
</span></span></pre></div>
<a id="trunkLayoutTestscss3maskingclippathcircleboundingboxhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/css3/masking/clip-path-circle-bounding-box.html (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/masking/clip-path-circle-bounding-box.html        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/LayoutTests/css3/masking/clip-path-circle-bounding-box.html        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html lang=&quot;en&quot;&gt;
-&lt;head&gt;
-&lt;style&gt;
-#content {
-    width: 200px;
-    height: 200px;
-    margin: 0;
-    padding: 0;
-    background-color: green;
-}
-#clip {
-    width: 200px;
-    height: 200px;
-        margin: 10px;
-        padding: 10px;
-        border: 10px solid blue;
-    -webkit-clip-path: circle(50% at 50% 50%) bounding-box;
-    background-color: yellow;
-}
-&lt;/style&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;div id=&quot;clip&quot;&gt;
-        &lt;div id=&quot;content&quot;&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmaskingparsingclippathshapeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -52,22 +52,26 @@
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;) is &quot;padding-box&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;) is &quot;border-box&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;) is &quot;margin-box&quot;
</span><del>-PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;) is &quot;bounding-box&quot;
</del><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;fill&quot;) is &quot;fill&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;stroke&quot;) is &quot;stroke&quot;
+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;view-box&quot;) is &quot;view-box&quot;
</ins><span class="cx"> 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;
</span><span class="cx"> 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;
</span><span class="cx"> 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;
</span><span class="cx"> 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;
</span><del>-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;
</del><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) view-box&quot;) is &quot;circle(50% at 50% 50%) view-box&quot;
</ins><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;content-box&quot;) is &quot;content-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;) is &quot;padding-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;) is &quot;border-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;) is &quot;margin-box&quot;
</span><del>-PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;) is &quot;bounding-box&quot;
</del><ins>+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;fill&quot;) is &quot;fill&quot;
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;stroke&quot;) is &quot;stroke&quot;
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;view-box&quot;) is &quot;view-box&quot;
</ins><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box&quot;) is &quot;circle(50% at 50% 50%) content-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;) is &quot;circle(50% at 50% 50%) padding-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;) is &quot;circle(50% at 50% 50%) margin-box&quot;
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;border-box circle(50% at 50% 50%)&quot;) is &quot;circle(50% at 50% 50%) border-box&quot;
</span><del>-PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;) is &quot;circle(50% at 50% 50%) bounding-box&quot;
</del><ins>+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) fill&quot;) is &quot;circle(50% at 50% 50%) fill&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">@@ -100,14 +104,14 @@
</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><del>-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;
</del><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;fill circle(50% at 50% 50%) content-box&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;fill circle(50% at 50% 50%) content-box&quot;) is &quot;none&quot;
</ins><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;) is &quot;none&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;) is &quot;none&quot;
</span><del>-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;
</del><ins>+PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box stroke&quot;) is null
+PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box stroke&quot;) is &quot;none&quot;
</ins><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;) is null
</span><span class="cx"> PASS computedStyle(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;) is &quot;none&quot;
</span><span class="cx"> PASS innerStyle(&quot;-webkit-clip-path&quot;, &quot;none content-box&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 (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/LayoutTests/fast/masking/parsing-clip-path-shape.html        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -111,23 +111,27 @@
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;, &quot;padding-box&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;, &quot;border-box&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;, &quot;margin-box&quot;);
</span><del>-testInner(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;, &quot;bounding-box&quot;);
</del><ins>+testInner(&quot;-webkit-clip-path&quot;, &quot;fill&quot;, &quot;fill&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;stroke&quot;, &quot;stroke&quot;);
+testInner(&quot;-webkit-clip-path&quot;, &quot;view-box&quot;, &quot;view-box&quot;);
</ins><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box&quot;, &quot;circle(50% at 50% 50%) content-box&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;);
</span><span class="cx"> testInner(&quot;-webkit-clip-path&quot;, &quot;border-box circle(50% at 50% 50%)&quot;, &quot;border-box circle(50% at 50% 50%)&quot;);
</span><del>-testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;);
</del><ins>+testInner(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) view-box&quot;, &quot;circle(50% at 50% 50%) view-box&quot;);
</ins><span class="cx"> 
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;content-box&quot;, &quot;content-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;padding-box&quot;, &quot;padding-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;border-box&quot;, &quot;border-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;margin-box&quot;, &quot;margin-box&quot;);
</span><del>-testComputed(&quot;-webkit-clip-path&quot;, &quot;bounding-box&quot;, &quot;bounding-box&quot;);
</del><ins>+testComputed(&quot;-webkit-clip-path&quot;, &quot;fill&quot;, &quot;fill&quot;);
+testComputed(&quot;-webkit-clip-path&quot;, &quot;stroke&quot;, &quot;stroke&quot;);
+testComputed(&quot;-webkit-clip-path&quot;, &quot;view-box&quot;, &quot;view-box&quot;);
</ins><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box&quot;, &quot;circle(50% at 50% 50%) content-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;, &quot;circle(50% at 50% 50%) padding-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;margin-box circle(50% at 50% 50%)&quot;, &quot;circle(50% at 50% 50%) margin-box&quot;);
</span><span class="cx"> testComputed(&quot;-webkit-clip-path&quot;, &quot;border-box circle(50% at 50% 50%)&quot;, &quot;circle(50% at 50% 50%) border-box&quot;);
</span><del>-testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;, &quot;circle(50% at 50% 50%) bounding-box&quot;);
</del><ins>+testComputed(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) fill&quot;, &quot;circle(50% at 50% 50%) fill&quot;);
</ins><span class="cx"> 
</span><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="lines">@@ -153,10 +157,10 @@
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;);
</span><span class="cx"> 
</span><span class="cx"> // reject multiple &lt;box&gt; values
</span><del>-negativeTest(&quot;-webkit-clip-path&quot;, &quot;bounding-box circle(50% at 50% 50%) content-box&quot;);
</del><ins>+negativeTest(&quot;-webkit-clip-path&quot;, &quot;fill circle(50% at 50% 50%) content-box&quot;);
</ins><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;margin-box padding-box&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;padding-box border-box circle(50% at 50% 50%)&quot;);
</span><del>-negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box bounding-box&quot;);
</del><ins>+negativeTest(&quot;-webkit-clip-path&quot;, &quot;circle(50% at 50% 50%) content-box stroke&quot;);
</ins><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;content-box margin-box padding-box&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;none content-box&quot;);
</span><span class="cx"> negativeTest(&quot;-webkit-clip-path&quot;, &quot;url(#test) padding-box&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaccss3maskingclippathcircleboundingboxexpectedpng"></a>
<div class="binary"><h4>Deleted: trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaccss3maskingclippathcircleboundingboxexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/LayoutTests/platform/mac/css3/masking/clip-path-circle-bounding-box-expected.txt        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x260
-  RenderBlock {HTML} at (0,0) size 800x260
-    RenderBody {BODY} at (8,10) size 784x240
-layer at (18,10) size 240x240
-  RenderBlock {DIV} at (10,0) size 240x240 [bgcolor=#FFFF00] [border: (10px solid #0000FF)]
-    RenderBlock {DIV} at (20,20) size 200x200 [bgcolor=#008000]
</del></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapefillexpectedsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-fill-expected.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-fill-expected.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-fill-expected.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+&lt;rect width=&quot;200&quot; height=&quot;200&quot; fill=&quot;green&quot; stroke=&quot;green&quot; stroke-width=&quot;10&quot; style=&quot;-webkit-clip-path: circle();&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapefillsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-fill.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+&lt;rect width=&quot;200&quot; height=&quot;200&quot; fill=&quot;green&quot; stroke=&quot;green&quot; stroke-width=&quot;10&quot; style=&quot;-webkit-clip-path: circle() fill;&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapestrokeexpectedsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke-expected.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke-expected.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke-expected.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+&lt;defs&gt;
+    &lt;clipPath id=&quot;clip&quot;&gt;
+        &lt;circle cx=&quot;100&quot; cy=&quot;100&quot; r=&quot;100&quot;/&gt;
+    &lt;/clipPath&gt;
+&lt;/defs&gt;
+&lt;rect x=&quot;10&quot; y=&quot;10&quot; width=&quot;180&quot; height=&quot;180&quot; fill=&quot;green&quot; stroke=&quot;green&quot; stroke-width=&quot;20&quot; style=&quot;-webkit-clip-path: circle() stroke;&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapestrokesvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-stroke.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400&quot; height=&quot;400&quot;&gt;
+&lt;rect x=&quot;10&quot; y=&quot;10&quot; width=&quot;180&quot; height=&quot;180&quot; fill=&quot;green&quot; stroke=&quot;green&quot; stroke-width=&quot;20&quot; style=&quot;-webkit-clip-path: circle() stroke;&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapeviewboxexpectedsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box-expected.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box-expected.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box-expected.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+&lt;defs&gt;
+    &lt;clipPath id=&quot;clip&quot;&gt;
+        &lt;circle cx=&quot;200&quot; cy=&quot;200&quot; r=&quot;200&quot;/&gt;
+    &lt;/clipPath&gt;
+&lt;/defs&gt;
+&lt;rect width=&quot;200&quot; height=&quot;200&quot; fill=&quot;green&quot; clip-path=&quot;url(#clip)&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgclippathclippathshapeviewboxsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box.svg (0 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box.svg                                (rev 0)
+++ trunk/LayoutTests/svg/clip-path/clip-path-shape-view-box.svg        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400&quot; height=&quot;400&quot;&gt;
+&lt;rect width=&quot;200&quot; height=&quot;200&quot; fill=&quot;green&quot; style=&quot;-webkit-clip-path: circle() view-box;&quot;/&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/ChangeLog        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-02-09  Dirk Schulze  &lt;dschulze@chromium.org&gt;
+
+        -webkit-clip-path should support fill, stroke, view-box keywords
+        https://bugs.webkit.org/show_bug.cgi?id=128393
+
+        Reviewed by Dean Jackson.
+
+        CSS Masking uses the keywords fill, stroke and view-box for SVG shapes.
+        This patch updates the parser, style resolver and SVG implementation of
+        the prefixed clip-path property.
+
+        Remove the unexposed and obsolete keyword bounding-box.
+
+        Tests: svg/clip-path/clip-path-shape-fill-expected.svg
+               svg/clip-path/clip-path-shape-fill.svg
+               svg/clip-path/clip-path-shape-stroke-expected.svg
+               svg/clip-path/clip-path-shape-stroke.svg
+               svg/clip-path/clip-path-shape-view-box-expected.svg
+               svg/clip-path/clip-path-shape-view-box.svg
+
+        * css/CSSParser.cpp: Parse fill, stroke, view-box. Remove bounding-box.
+        (WebCore::isBoxValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator LayoutBox):
+        * css/CSSValueKeywords.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyClipPath::applyValue):
+        * rendering/RenderLayer.cpp:
+        (WebCore::computeReferenceBox):
+        * rendering/shapes/ShapeInfo.h:
+        (WebCore::ShapeInfo::setShapeSize):
+        (WebCore::ShapeInfo::logicalTopOffset):
+        (WebCore::ShapeInfo::logicalLeftOffset):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/svg/SVGRenderingContext.cpp: Use different reference boxes per keyword.
+        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
+
</ins><span class="cx"> 2014-02-09  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebGL] Remove state restorer code
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -5821,7 +5821,9 @@
</span><span class="cx">     case CSSValueBorderBox:
</span><span class="cx">     case CSSValueMarginBox:
</span><span class="cx">         return true;
</span><del>-    case CSSValueBoundingBox:
</del><ins>+    case CSSValueFill:
+    case CSSValueStroke:
+    case CSSValueViewBox:
</ins><span class="cx">         return propId == CSSPropertyWebkitClipPath;
</span><span class="cx">     default: break;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -5126,9 +5126,6 @@
</span><span class="cx"> {
</span><span class="cx">     m_primitiveUnitType = CSS_VALUE_ID;
</span><span class="cx">     switch (layoutBox) {
</span><del>-    case BoundingBox:
-        m_value.valueID = CSSValueBoundingBox;
-        break;
</del><span class="cx">     case MarginBox:
</span><span class="cx">         m_value.valueID = CSSValueMarginBox;
</span><span class="cx">         break;
</span><span class="lines">@@ -5141,6 +5138,15 @@
</span><span class="cx">     case ContentBox:
</span><span class="cx">         m_value.valueID = CSSValueContentBox;
</span><span class="cx">         break;
</span><ins>+    case Fill:
+        m_value.valueID = CSSValueFill;
+        break;
+    case Stroke:
+        m_value.valueID = CSSValueStroke;
+        break;
+    case ViewBox:
+        m_value.valueID = CSSValueViewBox;
+        break;
</ins><span class="cx">     case BoxMissing:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         m_value.valueID = CSSValueNone;
</span><span class="lines">@@ -5151,8 +5157,6 @@
</span><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::operator LayoutBox() const
</span><span class="cx"> {
</span><span class="cx">     switch (getValueID()) {
</span><del>-    case CSSValueBoundingBox:
-        return BoundingBox;
</del><span class="cx">     case CSSValueMarginBox:
</span><span class="cx">         return MarginBox;
</span><span class="cx">     case CSSValueBorderBox:
</span><span class="lines">@@ -5161,6 +5165,13 @@
</span><span class="cx">         return PaddingBox;
</span><span class="cx">     case CSSValueContentBox:
</span><span class="cx">         return ContentBox;
</span><ins>+    // The following are used in an SVG context.
+    case CSSValueFill:
+        return Fill;
+    case CSSValueStroke:
+        return Stroke;
+    case CSSValueViewBox:
+        return ViewBox;
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -745,7 +745,7 @@
</span><span class="cx"> margin-box
</span><span class="cx"> 
</span><span class="cx"> // clip-path
</span><del>-bounding-box
</del><ins>+view-box
</ins><span class="cx"> 
</span><span class="cx"> //
</span><span class="cx"> // background-size
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -2139,7 +2139,9 @@
</span><span class="cx">                 || primitiveValue.getValueID() == CSSValueBorderBox
</span><span class="cx">                 || primitiveValue.getValueID() == CSSValuePaddingBox
</span><span class="cx">                 || primitiveValue.getValueID() == CSSValueMarginBox
</span><del>-                || primitiveValue.getValueID() == CSSValueBoundingBox)
</del><ins>+                || primitiveValue.getValueID() == CSSValueFill
+                || primitiveValue.getValueID() == CSSValueStroke
+                || primitiveValue.getValueID() == CSSValueViewBox)
</ins><span class="cx">                 &amp;&amp; referenceBox == BoxMissing)
</span><span class="cx">                 referenceBox = LayoutBox(primitiveValue);
</span><span class="cx">             else
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -3790,6 +3790,10 @@
</span><span class="cx">                 referenceBox = box.paddingBoxRect();
</span><span class="cx">                 referenceBox.moveBy(rootRelativeBounds.location());
</span><span class="cx">                 break;
</span><ins>+            // fill, stroke, view-box compute to border-box for HTML elements.
+            case Fill:
+            case Stroke:
+            case ViewBox:
</ins><span class="cx">             case BorderBox:
</span><span class="cx">                 referenceBox = box.borderBoxRect();
</span><span class="cx">                 referenceBox.moveBy(rootRelativeBounds.location());
</span><span class="lines">@@ -3797,7 +3801,6 @@
</span><span class="cx">             case MarginBox:
</span><span class="cx">                 // FIXME: Support margin-box. Use bounding client rect for now.
</span><span class="cx">                 // https://bugs.webkit.org/show_bug.cgi?id=127984
</span><del>-            case BoundingBox:
</del><span class="cx">             case BoxMissing:
</span><span class="cx">                 // FIXME: If no reference box was specified the spec demands to use
</span><span class="cx">                 // the border-box. However, the current prefixed version of clip-path uses
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.h (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -89,7 +89,9 @@
</span><span class="cx">             logicalHeight -= m_renderer.borderAndPaddingLogicalHeight();
</span><span class="cx">             logicalWidth -= m_renderer.borderAndPaddingLogicalWidth();
</span><span class="cx">             break;
</span><del>-        case BoundingBox:
</del><ins>+        case Fill:
+        case Stroke:
+        case ViewBox:
</ins><span class="cx">         case BoxMissing:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             break;
</span><span class="lines">@@ -176,7 +178,9 @@
</span><span class="cx">         case BorderBox: return LayoutUnit();
</span><span class="cx">         case PaddingBox: return m_renderer.borderBefore();
</span><span class="cx">         case ContentBox: return m_renderer.borderAndPaddingBefore();
</span><del>-        case BoundingBox: break;
</del><ins>+        case Fill: break;
+        case Stroke: break;
+        case ViewBox: break;
</ins><span class="cx">         case BoxMissing: break;
</span><span class="cx">         }
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="lines">@@ -193,7 +197,9 @@
</span><span class="cx">         case BorderBox: return LayoutUnit();
</span><span class="cx">         case PaddingBox: return m_renderer.borderStart();
</span><span class="cx">         case ContentBox: return m_renderer.borderAndPaddingStart();
</span><del>-        case BoundingBox: break;
</del><ins>+        case Fill: break;
+        case Stroke: break;
+        case ViewBox: break;
</ins><span class="cx">         case BoxMissing: break;
</span><span class="cx">         }
</span><span class="cx">         ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -544,7 +544,8 @@
</span><span class="cx"> enum TextIndentType { TextIndentNormal, TextIndentHanging };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-enum LayoutBox { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, BoundingBox };
</del><ins>+// Fill, Stroke, ViewBox are just used for SVG.
+enum LayoutBox { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox };
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (163763 => 163764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-02-10 05:40:34 UTC (rev 163763)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-02-10 06:02:42 UTC (rev 163764)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;RenderSVGResourceFilter.h&quot;
</span><span class="cx"> #include &quot;RenderSVGResourceMasker.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><ins>+#include &quot;SVGLengthContext.h&quot;
</ins><span class="cx"> #include &quot;SVGResources.h&quot;
</span><span class="cx"> #include &quot;SVGResourcesCache.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -121,8 +122,19 @@
</span><span class="cx"> 
</span><span class="cx">     ClipPathOperation* clipPathOperation = style.clipPath();
</span><span class="cx">     if (clipPathOperation &amp;&amp; clipPathOperation-&gt;type() == ClipPathOperation::Shape) {
</span><del>-        ShapeClipPathOperation* clipPath = static_cast&lt;ShapeClipPathOperation*&gt;(clipPathOperation);
-        m_paintInfo-&gt;context-&gt;clipPath(clipPath-&gt;pathForReferenceRect(renderer.objectBoundingBox()), clipPath-&gt;windRule());
</del><ins>+        ShapeClipPathOperation&amp; clipPath = toShapeClipPathOperation(*clipPathOperation);
+        FloatRect referenceBox;
+        if (clipPath.referenceBox() == Stroke)
+            // FIXME: strokeBoundingBox() takes dasharray into account but shouldn't.
+            referenceBox = renderer.strokeBoundingBox();
+        else if (clipPath.referenceBox() == ViewBox &amp;&amp; renderer.element()) {
+            FloatSize viewportSize;
+            SVGLengthContext(toSVGElement(renderer.element())).determineViewport(viewportSize);
+            referenceBox.setWidth(viewportSize.width());
+            referenceBox.setHeight(viewportSize.height());
+        } else
+            referenceBox = renderer.objectBoundingBox();
+        m_paintInfo-&gt;context-&gt;clipPath(clipPath.pathForReferenceRect(referenceBox), clipPath.windRule());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*m_renderer);
</span></span></pre>
</div>
</div>

</body>
</html>