<!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>[160770] 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/160770">160770</a></dd>
<dt>Author</dt> <dd>rwlbuis@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-18 09:27:58 -0800 (Wed, 18 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>2013-12-18  Rob Buis  &lt;rob.buis@samsung.com&gt;

        [CSS Shapes] Implement interpolation between keywords in basic shapes
        https://bugs.webkit.org/show_bug.cgi?id=125108

        Reviewed by Simon Fraser.

        Allow blending for all center coordinates since top/left and bottom/right default to correct
        Length values of 0% and 100%. For mixed keyword and value positions compute the length's used
        for blending to percentages. This is possible since we compute the reference box bounds given the
        renderer.

        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc): Pass additional RenderBox parameter.
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShape::canBlend): Don't check circle/ellipse center anymore, but do check that both
        shapes use the same reference box.
        (WebCore::BasicShape::referenceBoxSize): Compute box dimension depending on reference box.
        (WebCore::BasicShapeCenterCoordinate::lengthForBlending): Convert to percentage for Bottom/Right.
        (WebCore::BasicShapeRectangle::blend):
        (WebCore::DeprecatedBasicShapeCircle::blend):
        (WebCore::BasicShapeCircle::blend):
        (WebCore::DeprecatedBasicShapeEllipse::blend):
        (WebCore::BasicShapeEllipse::blend):
        (WebCore::BasicShapePolygon::blend):
        (WebCore::BasicShapeInsetRectangle::blend):
        (WebCore::BasicShapeInset::blend):
        * rendering/style/BasicShapes.h:
        (WebCore::BasicShapeCenterCoordinate::blend): Use new lengthForBlending.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingshapeinsideexpectedtxt">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingshapeoutsideexpectedtxt">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingtestutilsjs">trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js</a></li>
<li><a href="#trunkLayoutTestsfastshapesshapeoutsidefloatsshapeoutsideanimationexpectedtxt">trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastshapesshapeoutsidefloatsshapeoutsideanimationhtml">trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBasicShapescpp">trunk/Source/WebCore/rendering/style/BasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBasicShapesh">trunk/Source/WebCore/rendering/style/BasicShapes.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/ChangeLog        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2013-12-18  Rob Buis  &lt;rob.buis@samsung.com&gt;
+
+        [CSS Shapes] Implement interpolation between keywords in basic shapes
+        https://bugs.webkit.org/show_bug.cgi?id=125108
+
+        Reviewed by Simon Fraser.
+
+        Add tests to shape-outside-animation when animating using keywords for the circle/ellipse center positions.
+        Also add tests for invalid mixing of keyword and values in the center coordinate to parsing-test-utils.js.
+
+        * fast/shapes/parsing/parsing-shape-inside-expected.txt:
+        * fast/shapes/parsing/parsing-shape-outside-expected.txt:
+        * fast/shapes/parsing/parsing-test-utils.js:
+        * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
+        * fast/shapes/shape-outside-floats/shape-outside-animation.html:
+
</ins><span class="cx"> 2013-12-18  Dániel Bátyai  &lt;dbatyai.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS: Null-pointer dereference with negative 'orphans' value.
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapeinsideexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -191,6 +191,8 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at center center 10px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at 10% left)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at 10% left)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px 10px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px at center)&quot;) is &quot;&quot;
</span><span class="lines">@@ -211,6 +213,8 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 10px at 10% left)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 10px at 10% left)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapeoutsideexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -189,6 +189,8 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at center center 10px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at 10% left)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at 10% left)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px 10px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px at center)&quot;) is &quot;&quot;
</span><span class="lines">@@ -209,6 +211,8 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 10px at 10% left)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 10px at 10% left)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingtestutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -117,6 +117,7 @@
</span><span class="cx">     &quot;circle(10px at 10px 10px 10px)&quot;,
</span><span class="cx">     &quot;circle(10px at 10px 10px at center)&quot;,
</span><span class="cx">     &quot;circle(10px at center center 10px)&quot;,
</span><ins>+    &quot;circle(10px at 10% left)&quot;,
</ins><span class="cx">     &quot;circle(at 10px 10px 10px)&quot;,
</span><span class="cx">     &quot;circle(at 10px 10px at center)&quot;,
</span><span class="cx">     &quot;circle(at center center 10px)&quot;,
</span><span class="lines">@@ -129,6 +130,7 @@
</span><span class="cx">     &quot;ellipse(10px at 10px 10px 10px)&quot;,
</span><span class="cx">     &quot;ellipse(10px at 10px 10px at center)&quot;,
</span><span class="cx">     &quot;ellipse(10px at center center 10px)&quot;,
</span><ins>+    &quot;ellipse(10px 10px at 10% left)&quot;,
</ins><span class="cx">     &quot;ellipse(10px 20px 30px at center center 10px)&quot;,
</span><span class="cx">     &quot;ellipse(at 10px 10px 10px)&quot;,
</span><span class="cx">     &quot;ellipse(at 10px 10px at center)&quot;,
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesshapeoutsidefloatsshapeoutsideanimationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -4,10 +4,24 @@
</span><span class="cx"> Moving Text
</span><span class="cx"> Moving Text
</span><span class="cx"> Moving Text
</span><ins>+Moving Text
+Moving Text
+Moving Text
+Moving Text
+Moving Text
+Moving Text
+Moving Text
</ins><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;rectangle-box&quot; element at 1s saw something close to: rectangle(10%, 10%, 80%, 80%, 0px, 0px)
</span><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-box&quot; element at 1s saw something close to: circle(35% at 35% 35%)
</span><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;ellipse-box&quot; element at 1s saw something close to: ellipse(35% 30% at 35% 35%)
</span><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;polygon-box&quot; element at 1s saw something close to: polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)
</span><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;polygon2-box&quot; element at 1s saw something close to: polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)
</span><span class="cx"> PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-auto-box&quot; element at 1s saw something close to: circle(50% at 50% 50%)
</span><ins>+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-topleft-box&quot; element at 1s saw something close to: circle(35% at 25% 25%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-topleft-box&quot; element at 1s saw something close to: circle(35% at 25% 25%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-bottomright-using-keyword-box&quot; element at 1s saw something close to: circle(35% at 75% 75%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-bottomright-using-keyword-box&quot; element at 1s saw something close to: circle(35% at 75% 75%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-bottomright-extended-box&quot; element at 1s saw something close to: circle(35% at 75% 75%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-bottomright-extended-using-keyword-box&quot; element at 1s saw something close to: circle(35% at 70% 70%)
+PASS - &quot;webkitShapeOutside&quot; property for &quot;circle-to-bottomright-extended-using-keyword-2-box&quot; element at 1s saw something close to: circle(35% at 70% 70%)
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesshapeoutsidefloatsshapeoutsideanimationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">     .box {
</span><span class="cx">         height: 100px;
</span><span class="cx">         width: 100px;
</span><del>-        margin: 10px;
</del><ins>+        margin: 50px;
</ins><span class="cx">         float: left;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -38,6 +38,34 @@
</span><span class="cx">       -webkit-animation: circle-auto-anim 2s linear
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    #circle-to-topleft-box {
+      -webkit-animation: circle-to-topleft-anim 2s linear
+    }
+
+    #circle-to-topleft-using-keyword-box {
+      -webkit-animation: circle-to-topleft-using-keyword-anim 2s linear
+    }
+
+    #circle-to-bottomright-box {
+      -webkit-animation: circle-to-bottomright-anim 2s linear
+    }
+
+    #circle-to-bottomright-using-keyword-box {
+      -webkit-animation: circle-to-bottomright-using-keyword-anim 2s linear
+    }
+
+    #circle-to-bottomright-extended-box {
+      -webkit-animation: circle-to-bottomright-extended-anim 2s linear
+    }
+
+    #circle-to-bottomright-extended-using-keyword-box {
+      -webkit-animation: circle-to-bottomright-extended-using-keyword-anim 2s linear
+    }
+
+    #circle-to-bottomright-extended-using-keyword-2-box {
+      -webkit-animation: circle-to-bottomright-extended-using-keyword-2-anim 2s linear
+    }
+
</ins><span class="cx">     @-webkit-keyframes rectangle-anim {
</span><span class="cx">         from { -webkit-shape-outside: rectangle(0%, 0%, 100%, 100%); }
</span><span class="cx">         to   { -webkit-shape-outside: rectangle(20%, 20%, 60%, 60%); }
</span><span class="lines">@@ -68,6 +96,40 @@
</span><span class="cx">         to   { -webkit-shape-outside: circle(50% at 50% 50%); }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    @-webkit-keyframes circle-to-topleft-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at 0% 0%); }
+    }
+
+    @-webkit-keyframes circle-to-topleft-using-keyword-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at left top); }
+    }
+
+    @-webkit-keyframes circle-to-bottomright-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at 100% 100%); }
+    }
+
+    @-webkit-keyframes circle-to-bottomright-using-keyword-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at right bottom); }
+    }
+
+    @-webkit-keyframes circle-to-bottomright-extended-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at 100% 100%); }
+    }
+
+    @-webkit-keyframes circle-to-bottomright-extended-using-keyword-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%); }
+        to   { -webkit-shape-outside: circle(20% at right 10% bottom 20px); }
+    }
+
+    @-webkit-keyframes circle-to-bottomright-extended-using-keyword-2-anim {
+        from { -webkit-shape-outside: circle(50% at 50% 50%) border-box; }
+        to   { -webkit-shape-outside: circle(20% at right 10% bottom 10px) border-box; }
+    }
</ins><span class="cx">   &lt;/style&gt;
</span><span class="cx">   &lt;script src=&quot;../../../animations/resources/animation-test-helpers.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">   &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="lines">@@ -79,6 +141,13 @@
</span><span class="cx">       [&quot;polygon-anim&quot;,  1, &quot;polygon-box&quot;, &quot;webkitShapeOutside&quot;, &quot;polygon(nonzero, 10% 10%, 90% 10%, 90% 90%, 10% 90%)&quot;, 0.05],
</span><span class="cx">       [&quot;polygon2-anim&quot;,  1, &quot;polygon2-box&quot;, &quot;webkitShapeOutside&quot;, &quot;polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)&quot;, 0.05],
</span><span class="cx">       [&quot;circle-auto-anim&quot;,  1, &quot;circle-auto-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(50% at 50% 50%)&quot;, 0.05],
</span><ins>+      [&quot;circle-to-topleft-anim&quot;,  1, &quot;circle-to-topleft-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 25% 25%)&quot;, 0.05],
+      [&quot;circle-to-topleft-anim&quot;,  1, &quot;circle-to-topleft-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 25% 25%)&quot;, 0.05],
+      [&quot;circle-to-bottomright-using-keyword-anim&quot;,  1, &quot;circle-to-bottomright-using-keyword-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 75% 75%)&quot;, 0.05],
+      [&quot;circle-to-bottomright-using-keyword-anim&quot;,  1, &quot;circle-to-bottomright-using-keyword-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 75% 75%)&quot;, 0.05],
+      [&quot;circle-to-bottomright-extended-anim&quot;,  1, &quot;circle-to-bottomright-extended-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 75% 75%)&quot;, 0.05],
+      [&quot;circle-to-bottomright-extended-using-keyword-anim&quot;,  1, &quot;circle-to-bottomright-extended-using-keyword-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 70% 70%)&quot;, 0.01],
+      [&quot;circle-to-bottomright-extended-using-keyword-2-anim&quot;,  1, &quot;circle-to-bottomright-extended-using-keyword-2-box&quot;, &quot;webkitShapeOutside&quot;, &quot;circle(35% at 70% 70%)&quot;, 0.01],
</ins><span class="cx">     ];
</span><span class="cx">     
</span><span class="cx">     runAnimationTest(expectedValues);
</span><span class="lines">@@ -110,6 +179,34 @@
</span><span class="cx">   &lt;div class=&quot;box&quot; id=&quot;circle-auto-box&quot;&gt;&lt;/div&gt;
</span><span class="cx">   Moving Text
</span><span class="cx"> &lt;/div&gt;
</span><ins>+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-topleft-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-topleft-using-keyword-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-bottomright-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-bottomright-using-keyword-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-bottomright-extended-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-bottomright-extended-using-keyword-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
+&lt;div class='container'&gt;
+  &lt;div class=&quot;box&quot; id=&quot;circle-to-bottomright-extended-using-keyword-2-box&quot;&gt;&lt;/div&gt;
+  Moving Text
+&lt;/div&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;div id=&quot;result&quot;&gt;
</span><span class="cx"> &lt;/div&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/Source/WebCore/ChangeLog        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2013-12-18  Rob Buis  &lt;rob.buis@samsung.com&gt;
+
+        [CSS Shapes] Implement interpolation between keywords in basic shapes
+        https://bugs.webkit.org/show_bug.cgi?id=125108
+
+        Reviewed by Simon Fraser.
+
+        Allow blending for all center coordinates since top/left and bottom/right default to correct
+        Length values of 0% and 100%. For mixed keyword and value positions compute the length's used
+        for blending to percentages. This is possible since we compute the reference box bounds given the
+        renderer.
+
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFunc): Pass additional RenderBox parameter.
+        * rendering/style/BasicShapes.cpp:
+        (WebCore::BasicShape::canBlend): Don't check circle/ellipse center anymore, but do check that both
+        shapes use the same reference box.
+        (WebCore::BasicShape::referenceBoxSize): Compute box dimension depending on reference box.
+        (WebCore::BasicShapeCenterCoordinate::lengthForBlending): Convert to percentage for Bottom/Right.
+        (WebCore::BasicShapeRectangle::blend):
+        (WebCore::DeprecatedBasicShapeCircle::blend):
+        (WebCore::BasicShapeCircle::blend):
+        (WebCore::DeprecatedBasicShapeEllipse::blend):
+        (WebCore::BasicShapeEllipse::blend):
+        (WebCore::BasicShapePolygon::blend):
+        (WebCore::BasicShapeInsetRectangle::blend):
+        (WebCore::BasicShapeInset::blend):
+        * rendering/style/BasicShapes.h:
+        (WebCore::BasicShapeCenterCoordinate::blend): Use new lengthForBlending.
+
</ins><span class="cx"> 2013-12-18  Dániel Bátyai  &lt;dbatyai.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS: Null-pointer dereference with negative 'orphans' value.
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     return to.blendByUsingMatrixInterpolation(from, progress, anim-&gt;renderer()-&gt;isBox() ? toRenderBox(anim-&gt;renderer())-&gt;borderBoxRect().size() : LayoutSize());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline PassRefPtr&lt;ClipPathOperation&gt; blendFunc(const AnimationBase*, ClipPathOperation* from, ClipPathOperation* to, double progress)
</del><ins>+static inline PassRefPtr&lt;ClipPathOperation&gt; blendFunc(const AnimationBase* anim, ClipPathOperation* from, ClipPathOperation* to, double progress)
</ins><span class="cx"> {
</span><span class="cx">     if (!from || !to)
</span><span class="cx">         return to;
</span><span class="lines">@@ -140,11 +140,12 @@
</span><span class="cx">     if (!fromShape-&gt;canBlend(toShape))
</span><span class="cx">         return to;
</span><span class="cx"> 
</span><del>-    return ShapeClipPathOperation::create(toShape-&gt;blend(fromShape, progress));
</del><ins>+    ASSERT(anim-&gt;renderer()-&gt;isBox());
+    return ShapeClipPathOperation::create(toShape-&gt;blend(fromShape, progress, *toRenderBox(anim-&gt;renderer())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>-static inline PassRefPtr&lt;ShapeValue&gt; blendFunc(const AnimationBase*, ShapeValue* from, ShapeValue* to, double progress)
</del><ins>+static inline PassRefPtr&lt;ShapeValue&gt; blendFunc(const AnimationBase* anim, ShapeValue* from, ShapeValue* to, double progress)
</ins><span class="cx"> {
</span><span class="cx">     if (!from || !to)
</span><span class="cx">         return to;
</span><span class="lines">@@ -159,7 +160,8 @@
</span><span class="cx">     if (!fromShape-&gt;canBlend(toShape))
</span><span class="cx">         return to;
</span><span class="cx"> 
</span><del>-    return ShapeValue::createShapeValue(toShape-&gt;blend(fromShape, progress));
</del><ins>+    ASSERT(anim-&gt;renderer()-&gt;isBox());
+    return ShapeValue::createShapeValue(toShape-&gt;blend(fromShape, progress, *toRenderBox(anim-&gt;renderer())));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;FloatRect.h&quot;
</span><span class="cx"> #include &quot;LengthFunctions.h&quot;
</span><span class="cx"> #include &quot;Path.h&quot;
</span><ins>+#include &quot;RenderBox.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -44,34 +45,63 @@
</span><span class="cx">     if (type() != other-&gt;type())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    // Both shapes must use the same reference box.
+    if (box() != other-&gt;box())
+        return false;
+
</ins><span class="cx">     // Just polygons with same number of vertices can be animated.
</span><span class="cx">     if (type() == BasicShape::BasicShapePolygonType
</span><span class="cx">         &amp;&amp; (static_cast&lt;const BasicShapePolygon*&gt;(this)-&gt;values().size() != static_cast&lt;const BasicShapePolygon*&gt;(other)-&gt;values().size()
</span><span class="cx">         || static_cast&lt;const BasicShapePolygon*&gt;(this)-&gt;windRule() != static_cast&lt;const BasicShapePolygon*&gt;(other)-&gt;windRule()))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    // Circles with keywords for radii or center coordinates cannot be animated.
</del><ins>+    // Circles with keywords for radii coordinates cannot be animated.
</ins><span class="cx">     if (type() == BasicShape::BasicShapeCircleType) {
</span><span class="cx">         const BasicShapeCircle* thisCircle = static_cast&lt;const BasicShapeCircle*&gt;(this);
</span><span class="cx">         const BasicShapeCircle* otherCircle = static_cast&lt;const BasicShapeCircle*&gt;(other);
</span><del>-        if (!thisCircle-&gt;radius().canBlend(otherCircle-&gt;radius())
-            || !thisCircle-&gt;centerX().canBlend(otherCircle-&gt;centerX())
-            || !thisCircle-&gt;centerY().canBlend(otherCircle-&gt;centerY()))
</del><ins>+        if (!thisCircle-&gt;radius().canBlend(otherCircle-&gt;radius()))
</ins><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Ellipses with keywords for radii or center coordinates cannot be animated.
</del><ins>+    // Ellipses with keywords for radii coordinates cannot be animated.
</ins><span class="cx">     if (type() != BasicShape::BasicShapeEllipseType)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     const BasicShapeEllipse* thisEllipse = static_cast&lt;const BasicShapeEllipse*&gt;(this);
</span><span class="cx">     const BasicShapeEllipse* otherEllipse = static_cast&lt;const BasicShapeEllipse*&gt;(other);
</span><span class="cx">     return (thisEllipse-&gt;radiusX().canBlend(otherEllipse-&gt;radiusX())
</span><del>-        &amp;&amp; thisEllipse-&gt;radiusY().canBlend(otherEllipse-&gt;radiusY())
-        &amp;&amp; thisEllipse-&gt;centerX().canBlend(otherEllipse-&gt;centerX())
-        &amp;&amp; thisEllipse-&gt;centerY().canBlend(otherEllipse-&gt;centerY()));
</del><ins>+        &amp;&amp; thisEllipse-&gt;radiusY().canBlend(otherEllipse-&gt;radiusY()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FloatSize BasicShape::referenceBoxSize(const RenderBox&amp; renderer) const
+{
+    switch (box()) {
+    case ContentBox:
+        return renderer.contentBoxRect().size();
+    case PaddingBox:
+        return renderer.paddingBoxRect().size();
+    case BorderBox:
+        return renderer.size();
+    case None: // If &lt;box&gt; is not supplied, then the reference box defaults to margin-box.
+    case MarginBox:
+        return FloatSize(renderer.marginLeft() + renderer.width() + renderer.marginRight(),
+            renderer.marginTop() + renderer.height() + renderer.marginBottom());
+    }
+
+    ASSERT_NOT_REACHED();
+    return FloatSize();
+}
+
+Length BasicShapeCenterCoordinate::lengthForBlending(const FloatSize&amp; boxSize) const
+{
+    Length length = this-&gt;length();
+    if (keyword() == Right)
+        return Length(100 - (length.isPercent() ? length.percent() : 100.f * (length.value() / boxSize.width())), Percent);
+    if (keyword() == Bottom)
+        return Length(100 - (length.isPercent() ? length.percent() : 100.f * (length.value() / boxSize.height())), Percent);
+    return length;
+}
+
</ins><span class="cx"> void BasicShapeRectangle::path(Path&amp; path, const FloatRect&amp; boundingBox)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="lines">@@ -89,7 +119,7 @@
</span><span class="cx">     );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapeRectangle::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapeRectangle::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span><span class="lines">@@ -119,7 +149,7 @@
</span><span class="cx">     ));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; DeprecatedBasicShapeCircle::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; DeprecatedBasicShapeCircle::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span><span class="lines">@@ -161,14 +191,15 @@
</span><span class="cx">     ));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapeCircle::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapeCircle::blend(const BasicShape* other, double progress, const RenderBox&amp; renderer) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx">     const BasicShapeCircle* o = static_cast&lt;const BasicShapeCircle*&gt;(other);
</span><span class="cx">     RefPtr&lt;BasicShapeCircle&gt; result =  BasicShapeCircle::create();
</span><span class="cx"> 
</span><del>-    result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress));
-    result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress));
</del><ins>+    FloatSize boxSize = referenceBoxSize(renderer);
+    result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress, boxSize));
+    result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress, boxSize));
</ins><span class="cx">     result-&gt;setRadius(m_radius.blend(o-&gt;radius(), progress));
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="lines">@@ -188,7 +219,7 @@
</span><span class="cx">     ));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; DeprecatedBasicShapeEllipse::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; DeprecatedBasicShapeEllipse::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span><span class="lines">@@ -228,7 +259,7 @@
</span><span class="cx">         radiusY * 2));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapeEllipse::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapeEllipse::blend(const BasicShape* other, double progress, const RenderBox&amp; renderer) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx">     const BasicShapeEllipse* o = static_cast&lt;const BasicShapeEllipse*&gt;(other);
</span><span class="lines">@@ -243,8 +274,9 @@
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress));
-    result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress));
</del><ins>+    FloatSize boxSize = referenceBoxSize(renderer);
+    result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress, boxSize));
+    result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress, boxSize));
</ins><span class="cx">     result-&gt;setRadiusX(m_radiusX.blend(o-&gt;radiusX(), progress));
</span><span class="cx">     result-&gt;setRadiusY(m_radiusY.blend(o-&gt;radiusY(), progress));
</span><span class="cx">     return result.release();
</span><span class="lines">@@ -268,7 +300,7 @@
</span><span class="cx">     path.closeSubpath();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapePolygon::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapePolygon::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span><span class="lines">@@ -310,7 +342,7 @@
</span><span class="cx">     );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapeInsetRectangle::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapeInsetRectangle::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span><span class="lines">@@ -356,7 +388,7 @@
</span><span class="cx">     );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;BasicShape&gt; BasicShapeInset::blend(const BasicShape* other, double progress) const
</del><ins>+PassRefPtr&lt;BasicShape&gt; BasicShapeInset::blend(const BasicShape* other, double progress, const RenderBox&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.h (160769 => 160770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-18 17:26:21 UTC (rev 160769)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-18 17:27:58 UTC (rev 160770)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> class FloatRect;
</span><span class="cx"> class Path;
</span><ins>+class RenderBox;
</ins><span class="cx"> 
</span><span class="cx"> class BasicShape : public RefCounted&lt;BasicShape&gt; {
</span><span class="cx"> public:
</span><span class="lines">@@ -69,7 +70,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) = 0;
</span><span class="cx">     virtual WindRule windRule() const { return RULE_NONZERO; }
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const = 0;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const = 0;
</span><span class="cx"> 
</span><span class="lines">@@ -82,6 +83,8 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    FloatSize referenceBoxSize(const RenderBox&amp;) const;
+
</ins><span class="cx"> private:
</span><span class="cx">     ReferenceBox m_box;
</span><span class="cx"> };
</span><span class="lines">@@ -113,7 +116,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return BasicShapeRectangleType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -143,21 +146,13 @@
</span><span class="cx"> 
</span><span class="cx">     Keyword keyword() const { return m_keyword; }
</span><span class="cx">     const Length&amp; length() const { return m_length; }
</span><ins>+    Length lengthForBlending(const FloatSize&amp;) const;
</ins><span class="cx"> 
</span><del>-    bool canBlend(const BasicShapeCenterCoordinate&amp; other) const
</del><ins>+    BasicShapeCenterCoordinate blend(const BasicShapeCenterCoordinate&amp; other, double progress, const FloatSize&amp; boxSize) const
</ins><span class="cx">     {
</span><del>-        // FIXME determine how to interpolate between keywords. See bug 125108.
-        return m_keyword == None &amp;&amp; other.keyword() == None;
</del><ins>+        return BasicShapeCenterCoordinate(lengthForBlending(boxSize).blend(other.lengthForBlending(boxSize), progress));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    BasicShapeCenterCoordinate blend(const BasicShapeCenterCoordinate&amp; other, double progress) const
-    {
-        if (m_keyword != None || other.keyword() != None)
-            return BasicShapeCenterCoordinate(other);
-
-        return BasicShapeCenterCoordinate(m_length.blend(other.length(), progress));
-    }
-
</del><span class="cx"> private:
</span><span class="cx">     Keyword m_keyword;
</span><span class="cx">     Length m_length;
</span><span class="lines">@@ -212,7 +207,7 @@
</span><span class="cx">     void setRadius(BasicShapeRadius radius) { m_radius = std::move(radius); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return BasicShapeCircleType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -236,7 +231,7 @@
</span><span class="cx">     void setRadius(Length radius) { m_radius = std::move(radius); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return DeprecatedBasicShapeCircleType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -263,7 +258,7 @@
</span><span class="cx">     void setRadiusY(BasicShapeRadius radiusY) { m_radiusY = std::move(radiusY); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return BasicShapeEllipseType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -290,7 +285,7 @@
</span><span class="cx">     void setRadiusY(Length radiusY) { m_radiusY = std::move(radiusY); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return DeprecatedBasicShapeEllipseType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -314,7 +309,7 @@
</span><span class="cx">     void appendPoint(Length x, Length y) { m_values.append(std::move(x)); m_values.append(std::move(y)); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual WindRule windRule() const OVERRIDE { return m_windRule; }
</span><span class="cx"> 
</span><span class="lines">@@ -355,7 +350,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return BasicShapeInsetRectangleType; }
</span><span class="cx"> private:
</span><span class="lines">@@ -394,7 +389,7 @@
</span><span class="cx">     void setBottomLeftRadius(LengthSize radius) { m_bottomLeftRadius = std::move(radius); }
</span><span class="cx"> 
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</del><ins>+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double, const RenderBox&amp;) const OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual Type type() const OVERRIDE { return BasicShapeInsetType; }
</span><span class="cx"> private:
</span></span></pre>
</div>
</div>

</body>
</html>