<!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>[159954] 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/159954">159954</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-02 12:52:11 -0800 (Mon, 02 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css shapes] Parse new ellipse shape syntax
https://bugs.webkit.org/show_bug.cgi?id=124620

Patch by Rob Buis &lt;rob.buis@samsung.com&gt; on 2013-12-02
Reviewed by Dirk Schulze.

Source/WebCore:

Implement parsing of the new ellipse shape syntax. This closely follows the patch
for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with
some refactoring of functionality shared by both.

Updated existing parsing tests to cover this.

* css/BasicShapeFunctions.cpp:
(WebCore::BasicShapeRadiusToCSSValue):
(WebCore::valueForBasicShape):
(WebCore::CSSValueToBasicShapeRadius):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::buildEllipseString):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::buildDeprecatedEllipseString):
(WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
(WebCore::CSSDeprecatedBasicShapeEllipse::equals):
* css/CSSBasicShapes.h:
(WebCore::CSSDeprecatedBasicShapeEllipse::create):
(WebCore::CSSDeprecatedBasicShapeEllipse::centerX):
(WebCore::CSSDeprecatedBasicShapeEllipse::centerY):
(WebCore::CSSDeprecatedBasicShapeEllipse::radiusX):
(WebCore::CSSDeprecatedBasicShapeEllipse::radiusY):
(WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX):
(WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY):
(WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX):
(WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY):
(WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseDeprecatedBasicShapeEllipse):
(WebCore::CSSParser::parseBasicShape):
* css/CSSParser.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/style/BasicShapes.cpp:
(WebCore::DeprecatedBasicShapeEllipse::path):
(WebCore::DeprecatedBasicShapeEllipse::blend):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapeEllipse::blend):
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeEllipse::centerX):
(WebCore::BasicShapeEllipse::centerY):
(WebCore::BasicShapeEllipse::radiusX):
(WebCore::BasicShapeEllipse::radiusY):
(WebCore::BasicShapeEllipse::setCenterX):
(WebCore::BasicShapeEllipse::setCenterY):
(WebCore::BasicShapeEllipse::setRadiusX):
(WebCore::BasicShapeEllipse::setRadiusY):
(WebCore::BasicShapeEllipse::BasicShapeEllipse):
(WebCore::DeprecatedBasicShapeEllipse::create):
(WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse):

LayoutTests:

Test that the new ellipse syntax is properly parsed.

* fast/shapes/parsing/parsing-shape-inside-expected.txt:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:</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="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionscpp">trunk/Source/WebCore/css/BasicShapeFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBasicShapescpp">trunk/Source/WebCore/css/CSSBasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBasicShapesh">trunk/Source/WebCore/css/CSSBasicShapes.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapecpp">trunk/Source/WebCore/rendering/shapes/Shape.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 (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/LayoutTests/ChangeLog        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-12-02  Rob Buis  &lt;rob.buis@samsung.com&gt;
+
+        [css shapes] Parse new ellipse shape syntax
+        https://bugs.webkit.org/show_bug.cgi?id=124620
+
+        Reviewed by Dirk Schulze.
+
+        Test that the new ellipse syntax is properly parsed.
+
+        * fast/shapes/parsing/parsing-shape-inside-expected.txt:
+        * fast/shapes/parsing/parsing-shape-outside-expected.txt:
+        * fast/shapes/parsing/parsing-test-utils.js:
+
</ins><span class="cx"> 2013-12-02  Brendan Long  &lt;b.long@cablelabs.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use GenericEventQueue in TrackListBase and reduce code duplication with scheduleTrackEvent()
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapeinsideexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -29,8 +29,6 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at 10px 10px)&quot;) is &quot;circle(10px at 10px 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(at 10px 50%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(closest-side at 10px 50%)&quot;
</span><del>-PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(at 10px 50%)&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(closest-side at 10px 50%)&quot;
</del><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px)&quot;) is &quot;circle(at 10px 10px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px)&quot;) is &quot;circle(closest-side at 10px 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at top left)&quot;) is &quot;circle(at 0% 0%)&quot;
</span><span class="lines">@@ -45,6 +43,38 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px at right 10px bottom 10px)&quot;) is &quot;circle(10px at right 10px bottom 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px, 30px, 40px)&quot;) is &quot;ellipse(10px, 20px, 30px, 40px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px, 30px, 40px)&quot;) is &quot;ellipse(10px, 20px, 30px, 40px)&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse()&quot;) is &quot;ellipse()&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse()&quot;) is &quot;ellipse(closest-side closest-side at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px)&quot;) is &quot;ellipse(10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px)&quot;) is &quot;ellipse(10px closest-side at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px)&quot;) is &quot;ellipse(10px 20px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px)&quot;) is &quot;ellipse(10px 20px at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px)&quot;) is &quot;ellipse(10px at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px)&quot;) is &quot;ellipse(10px closest-side at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at 10px)&quot;) is &quot;ellipse(10px 20px at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at 10px)&quot;) is &quot;ellipse(10px 20px at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px)&quot;) is &quot;ellipse(10px at 10px 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px)&quot;) is &quot;ellipse(10px closest-side at 10px 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px)&quot;) is &quot;ellipse(at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px)&quot;) is &quot;ellipse(closest-side closest-side at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px)&quot;) is &quot;ellipse(at 10px 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px)&quot;) is &quot;ellipse(closest-side closest-side at 10px 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at top left)&quot;) is &quot;ellipse(at 0% 0%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at top left)&quot;) is &quot;ellipse(closest-side closest-side at 0% 0%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at right bottom)&quot;) is &quot;ellipse(at 100% 100%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at right bottom)&quot;) is &quot;ellipse(closest-side closest-side at 100% 100%)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at left top 10px)&quot;) is &quot;ellipse(10px at left 0% top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at left top 10px)&quot;) is &quot;ellipse(10px closest-side at left 0% top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at top 10px left 10px)&quot;) is &quot;ellipse(10px at left 10px top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at top 10px left 10px)&quot;) is &quot;ellipse(10px closest-side at left 10px top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px at right 10px bottom 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px closest-side at right 10px bottom 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at left top 10px)&quot;) is &quot;ellipse(10px 20px at left 0% top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at left top 10px)&quot;) is &quot;ellipse(10px 20px at left 0% top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at top 10px left 10px)&quot;) is &quot;ellipse(10px 20px at left 10px top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at top 10px left 10px)&quot;) is &quot;ellipse(10px 20px at left 10px top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;polygon(10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;polygon(10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="lines">@@ -127,16 +157,28 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(at center center 10px)&quot;) is &quot;auto&quot;
</span><del>-PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse()&quot;) is &quot;&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse()&quot;) is &quot;auto&quot;
-PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px)&quot;) is &quot;&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px)&quot;) is &quot;auto&quot;
</del><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px, 30px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px, 20px, 30px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px 40px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px 40px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px at center)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at 10px 10px at center)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(at center center 10px)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;polygon()&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;polygon()&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;polygon(evenodd 10px 20px, 30px 40px, 40px 50px)&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 (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -29,8 +29,6 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at 10px 10px)&quot;) is &quot;circle(10px at 10px 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(at 10px 50%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(closest-side at 10px 50%)&quot;
</span><del>-PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(at 10px 50%)&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px)&quot;) is &quot;circle(closest-side at 10px 50%)&quot;
</del><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px)&quot;) is &quot;circle(at 10px 10px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px)&quot;) is &quot;circle(closest-side at 10px 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at top left)&quot;) is &quot;circle(at 0% 0%)&quot;
</span><span class="lines">@@ -45,6 +43,38 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px at right 10px bottom 10px)&quot;) is &quot;circle(10px at right 10px bottom 10px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px, 30px, 40px)&quot;) is &quot;ellipse(10px, 20px, 30px, 40px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px, 30px, 40px)&quot;) is &quot;ellipse(10px, 20px, 30px, 40px)&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse()&quot;) is &quot;ellipse()&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse()&quot;) is &quot;ellipse(closest-side closest-side at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px)&quot;) is &quot;ellipse(10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px)&quot;) is &quot;ellipse(10px closest-side at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px)&quot;) is &quot;ellipse(10px 20px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px)&quot;) is &quot;ellipse(10px 20px at 50% 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px)&quot;) is &quot;ellipse(10px at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px)&quot;) is &quot;ellipse(10px closest-side at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at 10px)&quot;) is &quot;ellipse(10px 20px at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at 10px)&quot;) is &quot;ellipse(10px 20px at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px)&quot;) is &quot;ellipse(10px at 10px 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px)&quot;) is &quot;ellipse(10px closest-side at 10px 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px)&quot;) is &quot;ellipse(at 10px 50%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px)&quot;) is &quot;ellipse(closest-side closest-side at 10px 50%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px)&quot;) is &quot;ellipse(at 10px 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px)&quot;) is &quot;ellipse(closest-side closest-side at 10px 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at top left)&quot;) is &quot;ellipse(at 0% 0%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at top left)&quot;) is &quot;ellipse(closest-side closest-side at 0% 0%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at right bottom)&quot;) is &quot;ellipse(at 100% 100%)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at right bottom)&quot;) is &quot;ellipse(closest-side closest-side at 100% 100%)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at left top 10px)&quot;) is &quot;ellipse(10px at left 0% top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at left top 10px)&quot;) is &quot;ellipse(10px closest-side at left 0% top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at top 10px left 10px)&quot;) is &quot;ellipse(10px at left 10px top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at top 10px left 10px)&quot;) is &quot;ellipse(10px closest-side at left 10px top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px at right 10px bottom 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px closest-side at right 10px bottom 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at left top 10px)&quot;) is &quot;ellipse(10px 20px at left 0% top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at left top 10px)&quot;) is &quot;ellipse(10px 20px at left 0% top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at top 10px left 10px)&quot;) is &quot;ellipse(10px 20px at left 10px top 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at top 10px left 10px)&quot;) is &quot;ellipse(10px 20px at left 10px top 10px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;) is &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;polygon(10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;polygon(10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;) is &quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;
</span><span class="lines">@@ -125,16 +155,28 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at 10px 10px at center)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(at center center 10px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(at center center 10px)&quot;) is &quot;auto&quot;
</span><del>-PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse()&quot;) is &quot;&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse()&quot;) is &quot;auto&quot;
-PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px)&quot;) is &quot;&quot;
-PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px)&quot;) is &quot;auto&quot;
</del><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px, 30px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px, 20px, 30px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px 40px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px 40px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at 10px 10px at center)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px at center center 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(10px 20px 30px at center center 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px at center)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at 10px 10px at center)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at center center 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;ellipse(at center center 10px)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;polygon()&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;polygon()&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;polygon(evenodd 10px 20px, 30px 40px, 40px 50px)&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 (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -14,14 +14,13 @@
</span><span class="cx">     [&quot;inset-rectangle(10px, 20px, 30px, 40px, 5px)&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px)&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)&quot;],
</span><span class="cx">     &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;,
</span><span class="cx"> 
</span><del>-    &quot;circle(10px, 20px, 30px)&quot;, // FIXME remove with deprecated circle
</del><ins>+    &quot;circle(10px, 20px, 30px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</ins><span class="cx"> 
</span><span class="cx">     [&quot;circle()&quot;, &quot;circle()&quot;, &quot;circle(closest-side at 50% 50%)&quot;],
</span><span class="cx">     [&quot;circle(10px)&quot;, &quot;circle(10px)&quot;, &quot;circle(10px at 50% 50%)&quot;],
</span><span class="cx">     [&quot;circle(10px at 10px)&quot;, &quot;circle(10px at 10px 50%)&quot;],
</span><span class="cx">     &quot;circle(10px at 10px 10px)&quot;,
</span><span class="cx">     [&quot;circle(at 10px)&quot;, &quot;circle(at 10px 50%)&quot;, &quot;circle(closest-side at 10px 50%)&quot;],
</span><del>-    [&quot;circle(at 10px)&quot;, &quot;circle(at 10px 50%)&quot;, &quot;circle(closest-side at 10px 50%)&quot;],
</del><span class="cx">     [&quot;circle(at 10px 10px)&quot;, &quot;circle(at 10px 10px)&quot;, &quot;circle(closest-side at 10px 10px)&quot;],
</span><span class="cx">     [&quot;circle(at top left)&quot;, &quot;circle(at 0% 0%)&quot;, &quot;circle(closest-side at 0% 0%)&quot;],
</span><span class="cx">     [&quot;circle(at right bottom)&quot;, &quot;circle(at 100% 100%)&quot;, &quot;circle(closest-side at 100% 100%)&quot;],
</span><span class="lines">@@ -29,8 +28,25 @@
</span><span class="cx">     [&quot;circle(10px at top 10px left 10px)&quot;, &quot;circle(10px at left 10px top 10px)&quot;],
</span><span class="cx">     [&quot;circle(10px at right 10px bottom 10px)&quot;, &quot;circle(10px at right 10px bottom 10px)&quot;],
</span><span class="cx"> 
</span><del>-    &quot;ellipse(10px, 20px, 30px, 40px)&quot;,
</del><ins>+    &quot;ellipse(10px, 20px, 30px, 40px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</ins><span class="cx"> 
</span><ins>+    [&quot;ellipse()&quot;, &quot;ellipse()&quot;, &quot;ellipse(closest-side closest-side at 50% 50%)&quot;],
+    [&quot;ellipse(10px)&quot;, &quot;ellipse(10px)&quot;, &quot;ellipse(10px closest-side at 50% 50%)&quot;],
+    [&quot;ellipse(10px 20px)&quot;, &quot;ellipse(10px 20px)&quot;, &quot;ellipse(10px 20px at 50% 50%)&quot;],
+    [&quot;ellipse(10px at 10px)&quot;, &quot;ellipse(10px at 10px 50%)&quot;, &quot;ellipse(10px closest-side at 10px 50%)&quot;],
+    [&quot;ellipse(10px 20px at 10px)&quot;, &quot;ellipse(10px 20px at 10px 50%)&quot;],
+    [&quot;ellipse(10px at 10px 10px)&quot;, &quot;ellipse(10px at 10px 10px)&quot;, &quot;ellipse(10px closest-side at 10px 10px)&quot;],
+    [&quot;ellipse(at 10px)&quot;, &quot;ellipse(at 10px 50%)&quot;, &quot;ellipse(closest-side closest-side at 10px 50%)&quot;],
+    [&quot;ellipse(at 10px 10px)&quot;, &quot;ellipse(at 10px 10px)&quot;, &quot;ellipse(closest-side closest-side at 10px 10px)&quot;],
+    [&quot;ellipse(at top left)&quot;, &quot;ellipse(at 0% 0%)&quot;, &quot;ellipse(closest-side closest-side at 0% 0%)&quot;],
+    [&quot;ellipse(at right bottom)&quot;, &quot;ellipse(at 100% 100%)&quot;, &quot;ellipse(closest-side closest-side at 100% 100%)&quot;],
+    [&quot;ellipse(10px at left top 10px)&quot;, &quot;ellipse(10px at left 0% top 10px)&quot;, &quot;ellipse(10px closest-side at left 0% top 10px)&quot;],
+    [&quot;ellipse(10px at top 10px left 10px)&quot;, &quot;ellipse(10px at left 10px top 10px)&quot;, &quot;ellipse(10px closest-side at left 10px top 10px)&quot;],
+    [&quot;ellipse(10px at right 10px bottom 10px)&quot;, &quot;ellipse(10px at right 10px bottom 10px)&quot;, &quot;ellipse(10px closest-side at right 10px bottom 10px)&quot;],
+    [&quot;ellipse(10px 20px at left top 10px)&quot;, &quot;ellipse(10px 20px at left 0% top 10px)&quot;],
+    [&quot;ellipse(10px 20px at top 10px left 10px)&quot;, &quot;ellipse(10px 20px at left 10px top 10px)&quot;],
+    [&quot;ellipse(10px 20px at right 10px bottom 10px)&quot;, &quot;ellipse(10px 20px at right 10px bottom 10px)&quot;],
+
</ins><span class="cx">     [&quot;polygon(10px 20px, 30px 40px, 40px 50px)&quot;, &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;],
</span><span class="cx">     [&quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;, &quot;polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)&quot;],
</span><span class="cx">     [&quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;, &quot;polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)&quot;],
</span><span class="lines">@@ -71,9 +87,9 @@
</span><span class="cx">     &quot;inset-rectangle(10px 20px 30px 40px)&quot;,
</span><span class="cx">     &quot;inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)&quot;,
</span><span class="cx"> 
</span><del>-    &quot;circle(10px, 20px)&quot;, // FIXME remove with deprecated circle
-    &quot;circle(10px 20px 30px)&quot;, // FIXME remove with deprecated circle
-    &quot;circle(10px, 20px, 30px, 40px)&quot;, // FIXME remove with deprecated circle
</del><ins>+    &quot;circle(10px, 20px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
+    &quot;circle(10px 20px 30px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
+    &quot;circle(10px, 20px, 30px, 40px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</ins><span class="cx"> 
</span><span class="cx">     &quot;circle(10px 20px)&quot;,
</span><span class="cx">     &quot;circle(10px at 10px 10px 10px)&quot;,
</span><span class="lines">@@ -83,12 +99,19 @@
</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="cx"> 
</span><del>-    &quot;ellipse()&quot;,
-    &quot;ellipse(10px)&quot;,
-    &quot;ellipse(10px, 20px)&quot;,
-    &quot;ellipse(10px, 20px, 30px)&quot;,
-    &quot;ellipse(10px 20px 30px 40px)&quot;,
</del><ins>+    &quot;ellipse(10px, 20px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
+    &quot;ellipse(10px, 20px, 30px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
+    &quot;ellipse(10px 20px 30px 40px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</ins><span class="cx"> 
</span><ins>+    &quot;ellipse(10px 20px 30px)&quot;,
+    &quot;ellipse(10px at 10px 10px 10px)&quot;,
+    &quot;ellipse(10px at 10px 10px at center)&quot;,
+    &quot;ellipse(10px at center center 10px)&quot;,
+    &quot;ellipse(10px 20px 30px at center center 10px)&quot;,
+    &quot;ellipse(at 10px 10px 10px)&quot;,
+    &quot;ellipse(at 10px 10px at center)&quot;,
+    &quot;ellipse(at center center 10px)&quot;,
+
</ins><span class="cx">     &quot;polygon()&quot;,
</span><span class="cx">     &quot;polygon(evenodd 10px 20px, 30px 40px, 40px 50px)&quot;,
</span><span class="cx">     &quot;polygon(nonzero 10px 20px, 30px 40px, 40px 50px)&quot;,
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/ChangeLog        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2013-12-02  Rob Buis  &lt;rob.buis@samsung.com&gt;
+
+        [css shapes] Parse new ellipse shape syntax
+        https://bugs.webkit.org/show_bug.cgi?id=124620
+
+        Reviewed by Dirk Schulze.
+
+        Implement parsing of the new ellipse shape syntax. This closely follows the patch
+        for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with
+        some refactoring of functionality shared by both.
+
+        Updated existing parsing tests to cover this.
+
+        * css/BasicShapeFunctions.cpp:
+        (WebCore::BasicShapeRadiusToCSSValue):
+        (WebCore::valueForBasicShape):
+        (WebCore::CSSValueToBasicShapeRadius):
+        (WebCore::basicShapeForValue):
+        * css/CSSBasicShapes.cpp:
+        (WebCore::buildEllipseString):
+        (WebCore::CSSBasicShapeEllipse::cssText):
+        (WebCore::CSSBasicShapeEllipse::equals):
+        (WebCore::buildDeprecatedEllipseString):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::equals):
+        * css/CSSBasicShapes.h:
+        (WebCore::CSSDeprecatedBasicShapeEllipse::create):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::centerX):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::centerY):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::radiusX):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::radiusY):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY):
+        (WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseBasicShapeEllipse):
+        (WebCore::CSSParser::parseDeprecatedBasicShapeEllipse):
+        (WebCore::CSSParser::parseBasicShape):
+        * css/CSSParser.h:
+        * rendering/shapes/Shape.cpp:
+        (WebCore::Shape::createShape):
+        * rendering/style/BasicShapes.cpp:
+        (WebCore::DeprecatedBasicShapeEllipse::path):
+        (WebCore::DeprecatedBasicShapeEllipse::blend):
+        (WebCore::BasicShapeEllipse::path):
+        (WebCore::BasicShapeEllipse::blend):
+        * rendering/style/BasicShapes.h:
+        (WebCore::BasicShapeEllipse::centerX):
+        (WebCore::BasicShapeEllipse::centerY):
+        (WebCore::BasicShapeEllipse::radiusX):
+        (WebCore::BasicShapeEllipse::radiusY):
+        (WebCore::BasicShapeEllipse::setCenterX):
+        (WebCore::BasicShapeEllipse::setCenterY):
+        (WebCore::BasicShapeEllipse::setRadiusX):
+        (WebCore::BasicShapeEllipse::setRadiusY):
+        (WebCore::BasicShapeEllipse::BasicShapeEllipse):
+        (WebCore::DeprecatedBasicShapeEllipse::create):
+        (WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse):
+
</ins><span class="cx"> 2013-12-02  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for WebCrypto RSA-OAEP
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -100,6 +100,21 @@
</span><span class="cx">     return pool.createValue(Pair::create(pool.createIdentifierValue(keyword), pool.createValue(center.length(), style)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static PassRefPtr&lt;CSSPrimitiveValue&gt; basicShapeRadiusToCSSValue(const RenderStyle* style, CSSValuePool&amp; pool, const BasicShapeRadius&amp; radius)
+{
+    switch (radius.type()) {
+    case BasicShapeRadius::Value:
+        return pool.createValue(radius.value(), style);
+    case BasicShapeRadius::ClosestSide:
+        return pool.createIdentifierValue(CSSValueClosestSide);
+    case BasicShapeRadius::FarthestSide:
+        return pool.createIdentifierValue(CSSValueFarthestSide);
+    }
+
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
</ins><span class="cx"> PassRefPtr&lt;CSSValue&gt; valueForBasicShape(const RenderStyle* style, const BasicShape* basicShape)
</span><span class="cx"> {
</span><span class="cx">     CSSValuePool&amp; pool = cssValuePool();
</span><span class="lines">@@ -137,23 +152,13 @@
</span><span class="cx"> 
</span><span class="cx">         circleValue-&gt;setCenterX(valueForCenterCoordinate(pool, style, circle-&gt;centerX()));
</span><span class="cx">         circleValue-&gt;setCenterY(valueForCenterCoordinate(pool, style, circle-&gt;centerY()));
</span><del>-        switch (circle-&gt;radius().type()) {
-        case BasicShapeRadius::Value:
-            circleValue-&gt;setRadius(pool.createValue(circle-&gt;radius().value(), style));
-            break;
-        case BasicShapeRadius::ClosestSide:
-            circleValue-&gt;setRadius(pool.createIdentifierValue(CSSValueClosestSide));
-            break;
-        case BasicShapeRadius::FarthestSide:
-            circleValue-&gt;setRadius(pool.createIdentifierValue(CSSValueFarthestSide));
-            break;
-        }
</del><ins>+        circleValue-&gt;setRadius(basicShapeRadiusToCSSValue(style, pool, circle-&gt;radius()));
</ins><span class="cx">         basicShapeValue = circleValue.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    case BasicShape::BasicShapeEllipseType: {
-        const BasicShapeEllipse* ellipse = static_cast&lt;const BasicShapeEllipse*&gt;(basicShape);
-        RefPtr&lt;CSSBasicShapeEllipse&gt; ellipseValue = CSSBasicShapeEllipse::create();
</del><ins>+    case BasicShape::DeprecatedBasicShapeEllipseType: {
+        const DeprecatedBasicShapeEllipse* ellipse = static_cast&lt;const DeprecatedBasicShapeEllipse*&gt;(basicShape);
+        RefPtr&lt;CSSDeprecatedBasicShapeEllipse&gt; ellipseValue = CSSDeprecatedBasicShapeEllipse::create();
</ins><span class="cx"> 
</span><span class="cx">         ellipseValue-&gt;setCenterX(pool.createValue(ellipse-&gt;centerX(), style));
</span><span class="cx">         ellipseValue-&gt;setCenterY(pool.createValue(ellipse-&gt;centerY(), style));
</span><span class="lines">@@ -163,6 +168,17 @@
</span><span class="cx">         basicShapeValue = ellipseValue.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+    case BasicShape::BasicShapeEllipseType: {
+        const BasicShapeEllipse* ellipse = static_cast&lt;const BasicShapeEllipse*&gt;(basicShape);
+        RefPtr&lt;CSSBasicShapeEllipse&gt; ellipseValue = CSSBasicShapeEllipse::create();
+
+        ellipseValue-&gt;setCenterX(valueForCenterCoordinate(pool, style, ellipse-&gt;centerX()));
+        ellipseValue-&gt;setCenterY(valueForCenterCoordinate(pool, style, ellipse-&gt;centerY()));
+        ellipseValue-&gt;setRadiusX(basicShapeRadiusToCSSValue(style, pool, ellipse-&gt;radiusX()));
+        ellipseValue-&gt;setRadiusY(basicShapeRadiusToCSSValue(style, pool, ellipse-&gt;radiusY()));
+        basicShapeValue = ellipseValue.release();
+        break;
+    }
</ins><span class="cx">     case BasicShape::BasicShapePolygonType: {
</span><span class="cx">         const BasicShapePolygon* polygon = static_cast&lt;const BasicShapePolygon*&gt;(basicShape);
</span><span class="cx">         RefPtr&lt;CSSBasicShapePolygon&gt; polygonValue = CSSBasicShapePolygon::create();
</span><span class="lines">@@ -230,6 +246,26 @@
</span><span class="cx">     return BasicShapeCenterCoordinate(convertToLength(style, rootStyle, value));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static BasicShapeRadius cssValueToBasicShapeRadius(const RenderStyle* style, const RenderStyle* rootStyle, PassRefPtr&lt;CSSPrimitiveValue&gt; radius)
+{
+    if (!radius)
+        return BasicShapeRadius(BasicShapeRadius::ClosestSide);
+
+    if (radius-&gt;isValueID()) {
+        switch (radius-&gt;getValueID()) {
+        case CSSValueClosestSide:
+            return BasicShapeRadius(BasicShapeRadius::ClosestSide);
+        case CSSValueFarthestSide:
+            return BasicShapeRadius(BasicShapeRadius::FarthestSide);
+        default:
+            ASSERT_NOT_REACHED();
+            break;
+        }
+    }
+
+    return BasicShapeRadius(convertToLength(style, rootStyle, radius.get()));
+}
+
</ins><span class="cx"> PassRefPtr&lt;BasicShape&gt; basicShapeForValue(const RenderStyle* style, const RenderStyle* rootStyle, const CSSBasicShape* basicShapeValue)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;BasicShape&gt; basicShape;
</span><span class="lines">@@ -279,30 +315,14 @@
</span><span class="cx">             circle-&gt;setCenterX(BasicShapeCenterCoordinate(Length(50, Percent)));
</span><span class="cx">             circle-&gt;setCenterY(BasicShapeCenterCoordinate(Length(50, Percent)));
</span><span class="cx">         }
</span><del>-        if (RefPtr&lt;CSSPrimitiveValue&gt; radius = circleValue-&gt;radius()) {
-            if (radius-&gt;isValueID()) {
-                switch (radius-&gt;getValueID()) {
-                case CSSValueClosestSide:
-                    circle-&gt;setRadius(BasicShapeRadius(BasicShapeRadius::ClosestSide));
-                    break;
-                case CSSValueFarthestSide:
-                    circle-&gt;setRadius(BasicShapeRadius(BasicShapeRadius::FarthestSide));
-                    break;
-                default:
-                    ASSERT_NOT_REACHED();
-                    break;
-                }
-            } else
-                circle-&gt;setRadius(BasicShapeRadius(convertToLength(style, rootStyle, radius.get())));
-        } else
-            circle-&gt;setRadius(BasicShapeRadius(BasicShapeRadius::ClosestSide));
</del><ins>+        circle-&gt;setRadius(cssValueToBasicShapeRadius(style, rootStyle, circleValue-&gt;radius()));
</ins><span class="cx"> 
</span><span class="cx">         basicShape = circle.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    case CSSBasicShape::CSSBasicShapeEllipseType: {
-        const CSSBasicShapeEllipse* ellipseValue = static_cast&lt;const CSSBasicShapeEllipse *&gt;(basicShapeValue);
-        RefPtr&lt;BasicShapeEllipse&gt; ellipse = BasicShapeEllipse::create();
</del><ins>+    case CSSBasicShape::CSSDeprecatedBasicShapeEllipseType: {
+        const CSSDeprecatedBasicShapeEllipse* ellipseValue = static_cast&lt;const CSSDeprecatedBasicShapeEllipse *&gt;(basicShapeValue);
+        RefPtr&lt;DeprecatedBasicShapeEllipse&gt; ellipse = DeprecatedBasicShapeEllipse::create();
</ins><span class="cx"> 
</span><span class="cx">         ellipse-&gt;setCenterX(convertToLength(style, rootStyle, ellipseValue-&gt;centerX()));
</span><span class="cx">         ellipse-&gt;setCenterY(convertToLength(style, rootStyle, ellipseValue-&gt;centerY()));
</span><span class="lines">@@ -312,6 +332,23 @@
</span><span class="cx">         basicShape = ellipse.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+    case CSSBasicShape::CSSBasicShapeEllipseType: {
+        const CSSBasicShapeEllipse* ellipseValue = static_cast&lt;const CSSBasicShapeEllipse *&gt;(basicShapeValue);
+        RefPtr&lt;BasicShapeEllipse&gt; ellipse = BasicShapeEllipse::create();
+
+        if (ellipseValue-&gt;centerX() &amp;&amp; ellipseValue-&gt;centerY()) {
+            ellipse-&gt;setCenterX(convertToCenterCoordinate(style, rootStyle, ellipseValue-&gt;centerX()));
+            ellipse-&gt;setCenterY(convertToCenterCoordinate(style, rootStyle, ellipseValue-&gt;centerY()));
+        } else {
+            ellipse-&gt;setCenterX(BasicShapeCenterCoordinate(Length(50, Percent)));
+            ellipse-&gt;setCenterY(BasicShapeCenterCoordinate(Length(50, Percent)));
+        }
+        ellipse-&gt;setRadiusX(cssValueToBasicShapeRadius(style, rootStyle, ellipseValue-&gt;radiusX()));
+        ellipse-&gt;setRadiusY(cssValueToBasicShapeRadius(style, rootStyle, ellipseValue-&gt;radiusY()));
+
+        basicShape = ellipse.release();
+        break;
+    }
</ins><span class="cx">     case CSSBasicShape::CSSBasicShapePolygonType: {
</span><span class="cx">         const CSSBasicShapePolygon* polygonValue = static_cast&lt;const CSSBasicShapePolygon *&gt;(basicShapeValue);
</span><span class="cx">         RefPtr&lt;BasicShapePolygon&gt; polygon = BasicShapePolygon::create();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.cpp        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -181,9 +181,67 @@
</span><span class="cx">         &amp;&amp; compareCSSValuePtr(m_box, other.m_box);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static String buildEllipseString(const String&amp; x, const String&amp; y, const String&amp; radiusX, const String&amp; radiusY, const String&amp; box)
</del><ins>+static String buildEllipseString(const String&amp; radiusX, const String&amp; radiusY, const String&amp; centerX, const String&amp; centerY, const String&amp; box)
</ins><span class="cx"> {
</span><ins>+    char opening[] = &quot;ellipse(&quot;;
+    char at[] = &quot;at&quot;;
+    char separator[] = &quot; &quot;;
</ins><span class="cx">     StringBuilder result;
</span><ins>+    result.appendLiteral(opening);
+    bool needsSeparator = false;
+    if (!radiusX.isNull()) {
+        result.append(radiusX);
+        needsSeparator = true;
+    }
+    if (!radiusY.isNull()) {
+        if (needsSeparator)
+            result.appendLiteral(separator);
+        result.append(radiusY);
+        needsSeparator = true;
+    }
+
+    if (!centerX.isNull() || !centerY.isNull()) {
+        if (needsSeparator)
+            result.appendLiteral(separator);
+        result.appendLiteral(at);
+        result.appendLiteral(separator);
+        result.append(centerX);
+        result.appendLiteral(separator);
+        result.append(centerY);
+    }
+    result.appendLiteral(&quot;)&quot;);
+    if (box.length()) {
+        result.appendLiteral(separator);
+        result.append(box);
+    }
+    return result.toString();
+}
+
+String CSSBasicShapeEllipse::cssText() const
+{
+    return buildEllipseString(m_radiusX ? m_radiusX-&gt;cssText() : String(),
+        m_radiusY ? m_radiusY-&gt;cssText() : String(),
+        m_centerX ? m_centerX-&gt;cssText() : String(),
+        m_centerY ? m_centerY-&gt;cssText() : String(),
+        m_box ? m_box-&gt;cssText() : String());
+}
+
+bool CSSBasicShapeEllipse::equals(const CSSBasicShape&amp; shape) const
+{
+    if (shape.type() != CSSBasicShapeEllipseType)
+        return false;
+
+    const CSSBasicShapeEllipse&amp; other = static_cast&lt;const CSSBasicShapeEllipse&amp;&gt;(shape);
+    return compareCSSValuePtr(m_centerX, other.m_centerX)
+        &amp;&amp; compareCSSValuePtr(m_centerY, other.m_centerY)
+        &amp;&amp; compareCSSValuePtr(m_radiusX, other.m_radiusX)
+        &amp;&amp; compareCSSValuePtr(m_radiusY, other.m_radiusY)
+        &amp;&amp; compareCSSValuePtr(m_box, other.m_box);
+}
+
+static String buildDeprecatedEllipseString(const String&amp; x, const String&amp; y, const String&amp; radiusX, const String&amp; radiusY, const String&amp; box)
+{
+    StringBuilder result;
</ins><span class="cx">     char opening[] = &quot;ellipse(&quot;;
</span><span class="cx">     char separator[] = &quot;, &quot;;
</span><span class="cx">     result.appendLiteral(opening);
</span><span class="lines">@@ -202,17 +260,17 @@
</span><span class="cx">     return result.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String CSSBasicShapeEllipse::cssText() const
</del><ins>+String CSSDeprecatedBasicShapeEllipse::cssText() const
</ins><span class="cx"> {
</span><del>-    return buildEllipseString(m_centerX-&gt;cssText(), m_centerY-&gt;cssText(), m_radiusX-&gt;cssText(), m_radiusY-&gt;cssText(), m_box ? m_box-&gt;cssText() : String());
</del><ins>+    return buildDeprecatedEllipseString(m_centerX-&gt;cssText(), m_centerY-&gt;cssText(), m_radiusX-&gt;cssText(), m_radiusY-&gt;cssText(), m_box ? m_box-&gt;cssText() : String());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSBasicShapeEllipse::equals(const CSSBasicShape&amp; shape) const
</del><ins>+bool CSSDeprecatedBasicShapeEllipse::equals(const CSSBasicShape&amp; shape) const
</ins><span class="cx"> {
</span><del>-    if (shape.type() != CSSBasicShapeEllipseType)
</del><ins>+    if (shape.type() != CSSDeprecatedBasicShapeEllipseType)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const CSSBasicShapeEllipse&amp; other = static_cast&lt;const CSSBasicShapeEllipse&amp;&gt;(shape);
</del><ins>+    const CSSDeprecatedBasicShapeEllipse&amp; other = static_cast&lt;const CSSDeprecatedBasicShapeEllipse&amp;&gt;(shape);
</ins><span class="cx">     return compareCSSValuePtr(m_centerX, other.m_centerX)
</span><span class="cx">         &amp;&amp; compareCSSValuePtr(m_centerY, other.m_centerY)
</span><span class="cx">         &amp;&amp; compareCSSValuePtr(m_radiusX, other.m_radiusX)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.h (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.h        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/css/CSSBasicShapes.h        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -43,10 +43,11 @@
</span><span class="cx">     enum Type {
</span><span class="cx">         CSSBasicShapeRectangleType = 1,
</span><span class="cx">         CSSDeprecatedBasicShapeCircleType = 2,
</span><del>-        CSSBasicShapeEllipseType = 3,
</del><ins>+        CSSDeprecatedBasicShapeEllipseType = 3,
</ins><span class="cx">         CSSBasicShapePolygonType = 4,
</span><span class="cx">         CSSBasicShapeInsetRectangleType = 5,
</span><del>-        CSSBasicShapeCircleType = 6
</del><ins>+        CSSBasicShapeCircleType = 6,
+        CSSBasicShapeEllipseType = 7
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     virtual Type type() const = 0;
</span><span class="lines">@@ -178,6 +179,33 @@
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; m_radius;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+class CSSDeprecatedBasicShapeEllipse : public CSSBasicShape {
+public:
+    static PassRefPtr&lt;CSSDeprecatedBasicShapeEllipse&gt; create() { return adoptRef(new CSSDeprecatedBasicShapeEllipse); }
+
+    CSSPrimitiveValue* centerX() const { return m_centerX.get(); }
+    CSSPrimitiveValue* centerY() const { return m_centerY.get(); }
+    CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); }
+    CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); }
+
+    void setCenterX(PassRefPtr&lt;CSSPrimitiveValue&gt; centerX) { m_centerX = centerX; }
+    void setCenterY(PassRefPtr&lt;CSSPrimitiveValue&gt; centerY) { m_centerY = centerY; }
+    void setRadiusX(PassRefPtr&lt;CSSPrimitiveValue&gt; radiusX) { m_radiusX = radiusX; }
+    void setRadiusY(PassRefPtr&lt;CSSPrimitiveValue&gt; radiusY) { m_radiusY = radiusY; }
+
+    virtual Type type() const OVERRIDE { return CSSDeprecatedBasicShapeEllipseType; }
+    virtual String cssText() const OVERRIDE;
+    virtual bool equals(const CSSBasicShape&amp;) const OVERRIDE;
+
+private:
+    CSSDeprecatedBasicShapeEllipse() { }
+
+    RefPtr&lt;CSSPrimitiveValue&gt; m_centerX;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_centerY;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_radiusX;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_radiusY;
+};
+
</ins><span class="cx"> class CSSBasicShapeEllipse : public CSSBasicShape {
</span><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;CSSBasicShapeEllipse&gt; create() { return adoptRef(new CSSBasicShapeEllipse); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -5565,11 +5565,60 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(args);
</span><span class="cx"> 
</span><ins>+    // ellipse(radiusX)
+    // ellipse(radiusX at &lt;position&gt;
+    // ellipse(radiusX radiusY)
+    // ellipse(radiusX radiusY at &lt;position&gt;
+    // ellipse(at &lt;position&gt;)
+    // where position defines centerX and centerY using a CSS &lt;position&gt; data type.
+    RefPtr&lt;CSSBasicShapeEllipse&gt; shape = CSSBasicShapeEllipse::create();
+
+    for (CSSParserValue* argument = args-&gt;current(); argument; argument = args-&gt;next()) {
+        // The call to parseFillPosition below should consume all of the
+        // arguments except the first three. Thus, an index greater than two
+        // indicates an invalid production.
+        if (args-&gt;currentIndex() &gt; 2)
+            return 0;
+
+        if (args-&gt;currentIndex() &lt; 2 &amp;&amp; argument-&gt;id != CSSValueAt) {
+            if (RefPtr&lt;CSSPrimitiveValue&gt; radius = parseShapeRadius(argument)) {
+                if (!shape-&gt;radiusX())
+                    shape-&gt;setRadiusX(radius);
+                else
+                    shape-&gt;setRadiusY(radius);
+                continue;
+            }
+
+            return 0;
+        }
+
+        if (argument-&gt;id != CSSValueAt)
+            return 0;
+        RefPtr&lt;CSSValue&gt; centerX;
+        RefPtr&lt;CSSValue&gt; centerY;
+        args-&gt;next(); // set list to start of position center
+        parseFillPosition(args, centerX, centerY);
+        if (!centerX || !centerY)
+            return 0;
+
+        ASSERT(centerX-&gt;isPrimitiveValue());
+        ASSERT(centerY-&gt;isPrimitiveValue());
+        shape-&gt;setCenterX(toCSSPrimitiveValue(centerX.get()));
+        shape-&gt;setCenterY(toCSSPrimitiveValue(centerY.get()));
+    }
+
+    return shape;
+}
+
+PassRefPtr&lt;CSSBasicShape&gt; CSSParser::parseDeprecatedBasicShapeEllipse(CSSParserValueList* args)
+{
+    ASSERT(args);
+
</ins><span class="cx">     // ellipse(centerX, centerY, radiusX, radiusY)
</span><span class="cx">     if (args-&gt;size() != 7)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSBasicShapeEllipse&gt; shape = CSSBasicShapeEllipse::create();
</del><ins>+    RefPtr&lt;CSSDeprecatedBasicShapeEllipse&gt; shape = CSSDeprecatedBasicShapeEllipse::create();
</ins><span class="cx">     unsigned argumentNumber = 0;
</span><span class="cx">     CSSParserValue* argument = args-&gt;current();
</span><span class="cx">     while (argument) {
</span><span class="lines">@@ -5761,7 +5810,10 @@
</span><span class="cx">         else
</span><span class="cx">             shape = parseBasicShapeCircle(args);
</span><span class="cx">     else if (equalIgnoringCase(value-&gt;function-&gt;name, &quot;ellipse(&quot;))
</span><del>-        shape = parseBasicShapeEllipse(args);
</del><ins>+        if (isDeprecatedBasicShape(args))
+            shape = parseDeprecatedBasicShapeEllipse(args);
+        else
+            shape = parseBasicShapeEllipse(args);
</ins><span class="cx">     else if (equalIgnoringCase(value-&gt;function-&gt;name, &quot;polygon(&quot;))
</span><span class="cx">         shape = parseBasicShapePolygon(args);
</span><span class="cx">     else if (equalIgnoringCase(value-&gt;function-&gt;name, &quot;inset-rectangle(&quot;))
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/css/CSSParser.h        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -184,6 +184,7 @@
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapeCircle(CSSParserValueList*);
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseDeprecatedBasicShapeCircle(CSSParserValueList*);
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapeEllipse(CSSParserValueList*);
</span><ins>+    PassRefPtr&lt;CSSBasicShape&gt; parseDeprecatedBasicShapeEllipse(CSSParserValueList*);
</ins><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapePolygon(CSSParserValueList*);
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapeInsetRectangle(CSSParserValueList*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/Shape.cpp (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/Shape.cpp        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/rendering/shapes/Shape.cpp        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -156,8 +156,8 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    case BasicShape::BasicShapeEllipseType: {
-        const BasicShapeEllipse* ellipse = static_cast&lt;const BasicShapeEllipse*&gt;(basicShape);
</del><ins>+    case BasicShape::DeprecatedBasicShapeEllipseType: {
+        const DeprecatedBasicShapeEllipse* ellipse = static_cast&lt;const DeprecatedBasicShapeEllipse*&gt;(basicShape);
</ins><span class="cx">         float centerX = floatValueForLength(ellipse-&gt;centerX(), boxWidth);
</span><span class="cx">         float centerY = floatValueForLength(ellipse-&gt;centerY(), boxHeight);
</span><span class="cx">         float radiusX = floatValueForLength(ellipse-&gt;radiusX(), boxWidth);
</span><span class="lines">@@ -169,6 +169,12 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    case BasicShape::BasicShapeEllipseType: {
+        // FIXME: Layout implementation needed. See bug https://bugs.webkit.org/show_bug.cgi?id=125079
+        shape = createRectangleShape(FloatRect(0, 0, boxWidth, boxHeight), FloatSize());
+        break;
+    }
+
</ins><span class="cx">     case BasicShape::BasicShapePolygonType: {
</span><span class="cx">         const BasicShapePolygon* polygon = static_cast&lt;const BasicShapePolygon*&gt;(basicShape);
</span><span class="cx">         const Vector&lt;Length&gt;&amp; values = polygon-&gt;values();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BasicShapeEllipse::path(Path&amp; path, const FloatRect&amp; boundingBox)
</del><ins>+void DeprecatedBasicShapeEllipse::path(Path&amp; path, const FloatRect&amp; boundingBox)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="cx">     float centerX = floatValueForLength(m_centerX, boundingBox.width());
</span><span class="lines">@@ -167,12 +167,57 @@
</span><span class="cx">     ));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;BasicShape&gt; DeprecatedBasicShapeEllipse::blend(const BasicShape* other, double progress) const
+{
+    ASSERT(type() == other-&gt;type());
+
+    const DeprecatedBasicShapeEllipse* o = static_cast&lt;const DeprecatedBasicShapeEllipse*&gt;(other);
+    RefPtr&lt;DeprecatedBasicShapeEllipse&gt; result = DeprecatedBasicShapeEllipse::create();
+    result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress));
+    result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress));
+    result-&gt;setRadiusX(m_radiusX.blend(o-&gt;radiusX(), progress));
+    result-&gt;setRadiusY(m_radiusY.blend(o-&gt;radiusY(), progress));
+    return result.release();
+}
+
+void BasicShapeEllipse::path(Path&amp; path, const FloatRect&amp; boundingBox)
+{
+    ASSERT(path.isEmpty());
+    // FIXME: The implementation of path is incomplete. See https://bugs.webkit.org/show_bug.cgi?id=125079 
+    // Compute closest-side and farthest-side from boundingBox.
+    // Compute top, left, bottom, right from boundingBox.
+    if (m_radiusX.type() != BasicShapeRadius::Value || m_radiusY.type() != BasicShapeRadius::Value)
+        return;
+    if (m_centerX.keyword() != BasicShapeCenterCoordinate::None || m_centerY.keyword() != BasicShapeCenterCoordinate::None)
+        return;
+
+    float diagonal = sqrtf((boundingBox.width() * boundingBox.width() + boundingBox.height() * boundingBox.height()) / 2);
+    float centerX = floatValueForLength(m_centerX.length(), boundingBox.width());
+    float centerY = floatValueForLength(m_centerY.length(), boundingBox.height());
+    float radiusX = floatValueForLength(m_radiusX.value(), diagonal);
+    float radiusY = floatValueForLength(m_radiusY.value(), diagonal);
+    path.addEllipse(FloatRect(
+        centerX - radiusX + boundingBox.x(),
+        centerY - radiusY + boundingBox.y(),
+        radiusX * 2,
+        radiusY * 2));
+}
+
</ins><span class="cx"> PassRefPtr&lt;BasicShape&gt; BasicShapeEllipse::blend(const BasicShape* other, double progress) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(type() == other-&gt;type());
</span><ins>+    const BasicShapeEllipse* o = static_cast&lt;const BasicShapeEllipse*&gt;(other);
+    RefPtr&lt;BasicShapeEllipse&gt; result = BasicShapeEllipse::create();
</ins><span class="cx"> 
</span><del>-    const BasicShapeEllipse* o = static_cast&lt;const BasicShapeEllipse*&gt;(other);
-    RefPtr&lt;BasicShapeEllipse&gt; result =  BasicShapeEllipse::create();
</del><ins>+    if (m_radiusX.type() != BasicShapeRadius::Value || o-&gt;radiusX().type() != BasicShapeRadius::Value
+        || m_radiusY.type() != BasicShapeRadius::Value || o-&gt;radiusY().type() != BasicShapeRadius::Value) {
+        result-&gt;setCenterX(o-&gt;centerX());
+        result-&gt;setCenterY(o-&gt;centerY());
+        result-&gt;setRadiusX(o-&gt;radiusX());
+        result-&gt;setRadiusY(o-&gt;radiusY());
+        return result;
+    }
+
</ins><span class="cx">     result-&gt;setCenterX(m_centerX.blend(o-&gt;centerX(), progress));
</span><span class="cx">     result-&gt;setCenterY(m_centerY.blend(o-&gt;centerY(), progress));
</span><span class="cx">     result-&gt;setRadiusX(m_radiusX.blend(o-&gt;radiusX(), progress));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.h (159953 => 159954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-02 20:44:17 UTC (rev 159953)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-02 20:52:11 UTC (rev 159954)
</span><span class="lines">@@ -48,10 +48,11 @@
</span><span class="cx">     enum Type {
</span><span class="cx">         BasicShapeRectangleType = 1,
</span><span class="cx">         DeprecatedBasicShapeCircleType = 2,
</span><del>-        BasicShapeEllipseType = 3,
</del><ins>+        DeprecatedBasicShapeEllipseType = 3,
</ins><span class="cx">         BasicShapePolygonType = 4,
</span><span class="cx">         BasicShapeInsetRectangleType = 5,
</span><del>-        BasicShapeCircleType = 6
</del><ins>+        BasicShapeCircleType = 6,
+        BasicShapeEllipseType = 7
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     enum ReferenceBox {
</span><span class="lines">@@ -235,6 +236,33 @@
</span><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;BasicShapeEllipse&gt; create() { return adoptRef(new BasicShapeEllipse); }
</span><span class="cx"> 
</span><ins>+    const BasicShapeCenterCoordinate&amp; centerX() const { return m_centerX; }
+    const BasicShapeCenterCoordinate&amp; centerY() const { return m_centerY; }
+    const BasicShapeRadius&amp; radiusX() const { return m_radiusX; }
+    const BasicShapeRadius&amp; radiusY() const { return m_radiusY; }
+
+    void setCenterX(BasicShapeCenterCoordinate centerX) { m_centerX = std::move(centerX); }
+    void setCenterY(BasicShapeCenterCoordinate centerY) { m_centerY = std::move(centerY); }
+    void setRadiusX(BasicShapeRadius radiusX) { m_radiusX = std::move(radiusX); }
+    void setRadiusY(BasicShapeRadius radiusY) { m_radiusY = std::move(radiusY); }
+
+    virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
+    virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
+
+    virtual Type type() const OVERRIDE { return BasicShapeEllipseType; }
+private:
+    BasicShapeEllipse() { }
+
+    BasicShapeCenterCoordinate m_centerX;
+    BasicShapeCenterCoordinate m_centerY;
+    BasicShapeRadius m_radiusX;
+    BasicShapeRadius m_radiusY;
+};
+
+class DeprecatedBasicShapeEllipse : public BasicShape {
+public:
+    static PassRefPtr&lt;DeprecatedBasicShapeEllipse&gt; create() { return adoptRef(new DeprecatedBasicShapeEllipse); }
+
</ins><span class="cx">     const Length&amp; centerX() const { return m_centerX; }
</span><span class="cx">     const Length&amp; centerY() const { return m_centerY; }
</span><span class="cx">     const Length&amp; radiusX() const { return m_radiusX; }
</span><span class="lines">@@ -248,9 +276,9 @@
</span><span class="cx">     virtual void path(Path&amp;, const FloatRect&amp;) OVERRIDE;
</span><span class="cx">     virtual PassRefPtr&lt;BasicShape&gt; blend(const BasicShape*, double) const OVERRIDE;
</span><span class="cx"> 
</span><del>-    virtual Type type() const OVERRIDE { return BasicShapeEllipseType; }
</del><ins>+    virtual Type type() const OVERRIDE { return DeprecatedBasicShapeEllipseType; }
</ins><span class="cx"> private:
</span><del>-    BasicShapeEllipse() { }
</del><ins>+    DeprecatedBasicShapeEllipse() { }
</ins><span class="cx"> 
</span><span class="cx">     Length m_centerX;
</span><span class="cx">     Length m_centerY;
</span></span></pre>
</div>
</div>

</body>
</html>