<!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>[159968] 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/159968">159968</a></dd>
<dt>Author</dt> <dd>zoltan@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-02 14:48:54 -0800 (Mon, 02 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Shapes] Support inset parsing
https://bugs.webkit.org/show_bug.cgi?id=124903

Reviewed by David Hyatt.

Source/WebCore:

In this patch I added support for inset shape parsing for CSS Shapes. Inset is defined
by CSS Shapes Level 1 (http://dev.w3.org/csswg/css-shapes-1/#supported-basic-shapes).
Inset is going to be used by shape-outside (bug #124905), and eventually by shape-inside.

No new tests, I updated existing tests to cover the changes.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Add support for inset.
(WebCore::basicShapeForValue): Add support for inset.
* css/CSSBasicShapes.cpp:
(WebCore::buildInsetString): Create inset css string.
(WebCore::CSSBasicShapeInset::cssText): Convert inset shape to a CSS string.
(WebCore::CSSBasicShapeInset::equals): Compare two inset rectangles.
(WebCore::CSSBasicShapeInset::serializeResolvingVariables): Create an inset string, with CSS variables resolved.
(WebCore::CSSBasicShapeInset::hasVariableReference): Determine if this inset has any CSS Variable references.
* css/CSSBasicShapes.h: Add inset class.
(WebCore::CSSBasicShapeInset::create):
(WebCore::CSSBasicShapeInset::top):
(WebCore::CSSBasicShapeInset::right):
(WebCore::CSSBasicShapeInset::bottom):
(WebCore::CSSBasicShapeInset::left):
(WebCore::CSSBasicShapeInset::topLeftRadius):
(WebCore::CSSBasicShapeInset::topRightRadius):
(WebCore::CSSBasicShapeInset::bottomRightRadius):
(WebCore::CSSBasicShapeInset::bottomLeftRadius):
(WebCore::CSSBasicShapeInset::setTop):
(WebCore::CSSBasicShapeInset::setRight):
(WebCore::CSSBasicShapeInset::setBottom):
(WebCore::CSSBasicShapeInset::setLeft):
(WebCore::CSSBasicShapeInset::setTopLeftRadius):
(WebCore::CSSBasicShapeInset::setTopRightRadius):
(WebCore::CSSBasicShapeInset::setBottomRightRadius):
(WebCore::CSSBasicShapeInset::setBottomLeftRadius):
(WebCore::CSSBasicShapeInset::CSSBasicShapeInset):
* css/CSSParser.cpp:
(WebCore::completeBorderRadii): Move static function before parseInsetBorderRadius.
(WebCore::CSSParser::parseInsetRoundedCorners): I added this helper function for parsing the rounded corners
(WebCore::CSSParser::parseBasicShapeInset): Parse inset.
(WebCore::CSSParser::parseBasicShape): Add call to parse inset.
* css/CSSParser.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add constructor for LengthSize.
(WebCore::CSSPrimitiveValue::init): Initialize LengthSize.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::create): Add support for creating PrimitiveValue from LengthSize.
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createValue): Add support for LengthSize.
* platform/LengthSize.h:
(WebCore::LengthSize::blend): Add blend for LengthSize.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor): Keep inset disabled for shape-inside now.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path): Calculate path for an inset.
(WebCore::BasicShapeInset::blend): Blend two insets.
* rendering/style/BasicShapes.h: Add higher level inset.
(WebCore::BasicShapeInset::create):
(WebCore::BasicShapeInset::top):
(WebCore::BasicShapeInset::right):
(WebCore::BasicShapeInset::bottom):
(WebCore::BasicShapeInset::left):
(WebCore::BasicShapeInset::topLeftRadius):
(WebCore::BasicShapeInset::topRightRadius):
(WebCore::BasicShapeInset::bottomRightRadius):
(WebCore::BasicShapeInset::bottomLeftRadius):
(WebCore::BasicShapeInset::setTop):
(WebCore::BasicShapeInset::setRight):
(WebCore::BasicShapeInset::setBottom):
(WebCore::BasicShapeInset::setLeft):
(WebCore::BasicShapeInset::setTopLeftRadius):
(WebCore::BasicShapeInset::setTopRightRadius):
(WebCore::BasicShapeInset::setBottomRightRadius):
(WebCore::BasicShapeInset::setBottomLeftRadius):
(WebCore::BasicShapeInset::BasicShapeInset):

LayoutTests:

* fast/shapes/parsing/parsing-shape-inside-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths.html:
* 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="#trunkLayoutTestsfastshapesparsingparsingshapelengthsexpectedtxt">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastshapesparsingparsingshapelengthshtml">trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html</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="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuePoolh">trunk/Source/WebCore/css/CSSValuePool.h</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthSizeh">trunk/Source/WebCore/platform/LengthSize.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInsideInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.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 (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/ChangeLog        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-12-02  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
+
+        [CSS Shapes] Support inset parsing
+        https://bugs.webkit.org/show_bug.cgi?id=124903
+
+        Reviewed by David Hyatt.
+
+        * fast/shapes/parsing/parsing-shape-inside-expected.txt:
+        * fast/shapes/parsing/parsing-shape-lengths-expected.txt:
+        * fast/shapes/parsing/parsing-shape-lengths.html:
+        * fast/shapes/parsing/parsing-shape-outside-expected.txt:
+        * fast/shapes/parsing/parsing-test-utils.js:
+
</ins><span class="cx"> 2013-12-02  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Support WebCrypto AES-KW
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapeinsideexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -17,6 +17,12 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px)&quot;) is &quot;inset(10px 20px 30px 40px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px)&quot;) is &quot;inset(10px 20px 30px 40px round 0px 0px 0px 0px / 0px 0px 0px 0px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(10px, 20px, 30px)&quot;) is &quot;circle(10px, 20px, 30px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px, 20px, 30px)&quot;) is &quot;circle(10px, 20px, 30px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle()&quot;) is &quot;circle()&quot;
</span><span class="lines">@@ -137,6 +143,36 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px 20px 30px 40px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset()&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset()&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px, 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px, 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px, 30px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px, 30px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px, 20px 30px 40px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px, 20px 30px 40px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px 50px 60px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px 20px 30px 40px 50px 60px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(round)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(round)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(round 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(round 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round 10px /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round 10px /)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round 20px 30px 40px 50px 60px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round 20px 30px 40px 50px 60px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round /)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round / 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(10px round / 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(/)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(/)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(/ 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(/ 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;inset(round /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(round /)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(10px, 20px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(10px, 20px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-inside&quot;, &quot;circle(10px 20px 30px)&quot;) is &quot;&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapelengthsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -9,6 +9,7 @@
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(-.5px, +.5px, .5px)&quot;) is &quot;circle(-0.5px, 0.5px, 0.5px)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;) is &quot;rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;) is &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;
</span><ins>+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm 1mm 1in 1px round 1pt 1pc)&quot;) is &quot;inset(1cm 1mm 1in 1px round 1pt 1pc 1pt 1pc / 1pt 1pc 1pt 1pc)&quot;
</ins><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(-1em, +1em, 1em)&quot;) is &quot;circle(-1em, 1em, 1em)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(-1.5em, +1.5em, 1.5em)&quot;) is &quot;circle(-1.5em, 1.5em, 1.5em)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(-.5em, +.5em, .5em)&quot;) is &quot;circle(-0.5em, 0.5em, 0.5em)&quot;
</span><span class="lines">@@ -25,11 +26,13 @@
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(100%, 100%, 100%)&quot;) is &quot;circle(100%, 100%, 100%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;) is &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;) is &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;
</span><ins>+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;) is &quot;inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)&quot;
</ins><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;) is &quot;ellipse(100%, 100%, 100%, 100%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;) is &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(50%, 100%, 150%)&quot;) is &quot;circle(50%, 100%, 150%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;) is &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;) is &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;
</span><ins>+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(45% 45% 90% 60% round 25% 10%)&quot;) is &quot;inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)&quot;
</ins><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;) is &quot;ellipse(100%, 100%, 100%, 100%)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;) is &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;circle(1px, 1px, 1)&quot;) is null
</span><span class="lines">@@ -50,6 +53,8 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)&quot;) is null
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)&quot;) is &quot;auto&quot;
</span><ins>+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm 1mm 1in 1px round 1pt -1pc)&quot;) is null
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm 1mm 1in 1px round 1pt -1pc)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(1em, 1em, -1em, 1em)&quot;) is null
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(1em, 1em, -1em, 1em)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(1em, 1em, 1em, -1em)&quot;) is null
</span><span class="lines">@@ -66,6 +71,14 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is null
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
</span><ins>+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(-1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;) is null
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(-1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, -1mm, 1in, 1px, 1pt, 1pc)&quot;) is null
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, -1mm, 1in, 1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;) is null
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
+PASS getStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is null
+PASS getComputedStyleValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapelengthshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> 
</span><span class="cx"> testStyleValue(&quot;rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;, &quot;rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;);
</span><span class="cx"> testStyleValue(&quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;);
</span><ins>+testStyleValue(&quot;inset(1cm 1mm 1in 1px round 1pt 1pc)&quot;, &quot;inset(1cm 1mm 1in 1px round 1pt 1pc 1pt 1pc / 1pt 1pc 1pt 1pc)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // font-relative lengths - number serialization, units, resolution
</span><span class="cx"> testStyleValue(&quot;circle(-1em, +1em, 1em)&quot;, &quot;circle(-1em, 1em, 1em)&quot;);
</span><span class="lines">@@ -69,12 +70,14 @@
</span><span class="cx"> testStyleValue(&quot;circle(100%, 100%, 100%)&quot;, &quot;circle(100%, 100%, 100%)&quot;);
</span><span class="cx"> testStyleValue(&quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;, &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;);
</span><span class="cx"> testStyleValue(&quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;, &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;);
</span><ins>+testStyleValue(&quot;inset(45% 45% 90% 60% round 25% 10%)&quot;, &quot;inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)&quot;);
</ins><span class="cx"> testStyleValue(&quot;ellipse(100%, 100%, 100%, 100%)&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;);
</span><span class="cx"> testStyleValue(&quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;, &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;);
</span><span class="cx"> 
</span><span class="cx"> testComputedStyleValue(&quot;circle(50%, 100%, 150%)&quot;, &quot;circle(50%, 100%, 150%)&quot;);
</span><span class="cx"> testComputedStyleValue(&quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;, &quot;rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;);
</span><span class="cx"> testComputedStyleValue(&quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;, &quot;inset-rectangle(45%, 45%, 90%, 60%, 25%, 10%)&quot;);
</span><ins>+testComputedStyleValue(&quot;inset(45% 45% 90% 60% round 25% 10%)&quot;, &quot;inset(45% 45% 90% 60% round 25% 10% 25% 10% / 25% 10% 25% 10%)&quot;);
</ins><span class="cx"> testComputedStyleValue(&quot;ellipse(100%, 100%, 100%, 100%)&quot;, &quot;ellipse(100%, 100%, 100%, 100%)&quot;);
</span><span class="cx"> testComputedStyleValue(&quot;polygon(10% 20%, 30% 40%, 40% 50%)&quot;, &quot;polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -90,6 +93,7 @@
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)&quot;);
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)&quot;);
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)&quot;);
</span><ins>+testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm 1mm 1in 1px round 1pt -1pc)&quot;);
</ins><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(1em, 1em, -1em, 1em)&quot;);
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;ellipse(1em, 1em, 1em, -1em)&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -102,6 +106,13 @@
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, -1mm, 1in, 1px, 1pt, 1pc)&quot;);
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;);
</span><span class="cx"> testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset-rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;);
</span><ins>+
+// reject negative top, right, bottom, and left
+testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset(-1cm, 1mm, 1in, 1px, 1pt, 1pc)&quot;);
+testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, -1mm, 1in, 1px, 1pt, 1pc)&quot;);
+testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, -1in, 1px, 1pt, 1pc)&quot;);
+testInvalidValue(&quot;-webkit-shape-inside&quot;, &quot;inset(1cm, 1mm, 1in, -1px, 1pt, 1pc)&quot;);
+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastshapesparsingparsingshapeoutsideexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -17,6 +17,12 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;) is &quot;inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px)&quot;) is &quot;inset(10px 20px 30px 40px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px)&quot;) is &quot;inset(10px 20px 30px 40px round 0px 0px 0px 0px / 0px 0px 0px 0px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;) is &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(10px, 20px, 30px)&quot;) is &quot;circle(10px, 20px, 30px)&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px, 20px, 30px)&quot;) is &quot;circle(10px, 20px, 30px)&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle()&quot;) is &quot;circle()&quot;
</span><span class="lines">@@ -135,6 +141,36 @@
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px 20px 30px 40px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)&quot;) is &quot;auto&quot;
</span><ins>+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset()&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset()&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px, 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px, 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px, 30px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px, 30px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px, 20px 30px 40px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px, 20px 30px 40px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px 50px 60px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px 20px 30px 40px 50px 60px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(round)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(round)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(round 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(round 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round 10px /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round 10px /)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round 20px 30px 40px 50px 60px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round 20px 30px 40px 50px 60px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round /)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round / 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(10px round / 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(/)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(/)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(/ 10px)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(/ 10px)&quot;) is &quot;auto&quot;
+PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;inset(round /)&quot;) is &quot;&quot;
+PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;inset(round /)&quot;) is &quot;auto&quot;
</ins><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(10px, 20px)&quot;) is &quot;&quot;
</span><span class="cx"> PASS getComputedStyleValue(&quot;-webkit-shape-outside&quot;, &quot;circle(10px, 20px)&quot;) is &quot;auto&quot;
</span><span class="cx"> PASS getCSSText(&quot;-webkit-shape-outside&quot;, &quot;circle(10px 20px 30px)&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 (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-test-utils.js        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -14,6 +14,10 @@
</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><ins>+    [&quot;inset(10px 20px 30px 40px)&quot;, &quot;inset(10px 20px 30px 40px)&quot;, &quot;inset(10px 20px 30px 40px round 0px 0px 0px 0px / 0px 0px 0px 0px)&quot;],
+    [&quot;inset(10px 20px 30px 40px round 5px 6px)&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;, &quot;inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)&quot;],
+    &quot;inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)&quot;,
+
</ins><span class="cx">     &quot;circle(10px, 20px, 30px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</span><span class="cx"> 
</span><span class="cx">     [&quot;circle()&quot;, &quot;circle()&quot;, &quot;circle(closest-side at 50% 50%)&quot;],
</span><span class="lines">@@ -87,6 +91,22 @@
</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><ins>+    &quot;inset()&quot;,
+    &quot;inset(10px, 10px)&quot;,
+    &quot;inset(10px 20px, 30px)&quot;,
+    &quot;inset(10px, 20px 30px 40px)&quot;,
+    &quot;inset(10px 20px 30px 40px 50px 60px)&quot;,
+    &quot;inset(round)&quot;,
+    &quot;inset(round 10px)&quot;,
+    &quot;inset(10px round)&quot;,
+    &quot;inset(10px round 10px /)&quot;,
+    &quot;inset(10px round 20px 30px 40px 50px 60px)&quot;,
+    &quot;inset(10px round /)&quot;,
+    &quot;inset(10px round / 10px)&quot;,
+    &quot;inset(/)&quot;,
+    &quot;inset(/ 10px)&quot;,
+    &quot;inset(round /)&quot;,
+
</ins><span class="cx">     &quot;circle(10px, 20px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</span><span class="cx">     &quot;circle(10px 20px 30px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</span><span class="cx">     &quot;circle(10px, 20px, 30px, 40px)&quot;, // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/ChangeLog        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -1,3 +1,84 @@
</span><ins>+2013-12-02  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
+
+        [CSS Shapes] Support inset parsing
+        https://bugs.webkit.org/show_bug.cgi?id=124903
+
+        Reviewed by David Hyatt.
+
+        In this patch I added support for inset shape parsing for CSS Shapes. Inset is defined
+        by CSS Shapes Level 1 (http://dev.w3.org/csswg/css-shapes-1/#supported-basic-shapes).
+        Inset is going to be used by shape-outside (bug #124905), and eventually by shape-inside.
+
+        No new tests, I updated existing tests to cover the changes.
+
+        * css/BasicShapeFunctions.cpp:
+        (WebCore::valueForBasicShape): Add support for inset.
+        (WebCore::basicShapeForValue): Add support for inset.
+        * css/CSSBasicShapes.cpp:
+        (WebCore::buildInsetString): Create inset css string.
+        (WebCore::CSSBasicShapeInset::cssText): Convert inset shape to a CSS string.
+        (WebCore::CSSBasicShapeInset::equals): Compare two inset rectangles.
+        (WebCore::CSSBasicShapeInset::serializeResolvingVariables): Create an inset string, with CSS variables resolved.
+        (WebCore::CSSBasicShapeInset::hasVariableReference): Determine if this inset has any CSS Variable references.
+        * css/CSSBasicShapes.h: Add inset class.
+        (WebCore::CSSBasicShapeInset::create):
+        (WebCore::CSSBasicShapeInset::top):
+        (WebCore::CSSBasicShapeInset::right):
+        (WebCore::CSSBasicShapeInset::bottom):
+        (WebCore::CSSBasicShapeInset::left):
+        (WebCore::CSSBasicShapeInset::topLeftRadius):
+        (WebCore::CSSBasicShapeInset::topRightRadius):
+        (WebCore::CSSBasicShapeInset::bottomRightRadius):
+        (WebCore::CSSBasicShapeInset::bottomLeftRadius):
+        (WebCore::CSSBasicShapeInset::setTop):
+        (WebCore::CSSBasicShapeInset::setRight):
+        (WebCore::CSSBasicShapeInset::setBottom):
+        (WebCore::CSSBasicShapeInset::setLeft):
+        (WebCore::CSSBasicShapeInset::setTopLeftRadius):
+        (WebCore::CSSBasicShapeInset::setTopRightRadius):
+        (WebCore::CSSBasicShapeInset::setBottomRightRadius):
+        (WebCore::CSSBasicShapeInset::setBottomLeftRadius):
+        (WebCore::CSSBasicShapeInset::CSSBasicShapeInset):
+        * css/CSSParser.cpp:
+        (WebCore::completeBorderRadii): Move static function before parseInsetBorderRadius.
+        (WebCore::CSSParser::parseInsetRoundedCorners): I added this helper function for parsing the rounded corners
+        (WebCore::CSSParser::parseBasicShapeInset): Parse inset.
+        (WebCore::CSSParser::parseBasicShape): Add call to parse inset.
+        * css/CSSParser.h:
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add constructor for LengthSize.
+        (WebCore::CSSPrimitiveValue::init): Initialize LengthSize.
+        * css/CSSPrimitiveValue.h:
+        (WebCore::CSSPrimitiveValue::create): Add support for creating PrimitiveValue from LengthSize.
+        * css/CSSValuePool.h:
+        (WebCore::CSSValuePool::createValue): Add support for LengthSize.
+        * platform/LengthSize.h:
+        (WebCore::LengthSize::blend): Add blend for LengthSize.
+        * rendering/shapes/ShapeInsideInfo.cpp:
+        (WebCore::ShapeInsideInfo::isEnabledFor): Keep inset disabled for shape-inside now.
+        * rendering/style/BasicShapes.cpp:
+        (WebCore::BasicShapeInset::path): Calculate path for an inset.
+        (WebCore::BasicShapeInset::blend): Blend two insets.
+        * rendering/style/BasicShapes.h: Add higher level inset.
+        (WebCore::BasicShapeInset::create):
+        (WebCore::BasicShapeInset::top):
+        (WebCore::BasicShapeInset::right):
+        (WebCore::BasicShapeInset::bottom):
+        (WebCore::BasicShapeInset::left):
+        (WebCore::BasicShapeInset::topLeftRadius):
+        (WebCore::BasicShapeInset::topRightRadius):
+        (WebCore::BasicShapeInset::bottomRightRadius):
+        (WebCore::BasicShapeInset::bottomLeftRadius):
+        (WebCore::BasicShapeInset::setTop):
+        (WebCore::BasicShapeInset::setRight):
+        (WebCore::BasicShapeInset::setBottom):
+        (WebCore::BasicShapeInset::setLeft):
+        (WebCore::BasicShapeInset::setTopLeftRadius):
+        (WebCore::BasicShapeInset::setTopRightRadius):
+        (WebCore::BasicShapeInset::setBottomRightRadius):
+        (WebCore::BasicShapeInset::setBottomLeftRadius):
+        (WebCore::BasicShapeInset::BasicShapeInset):
+
</ins><span class="cx"> 2013-12-02  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Support WebCrypto AES-KW
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -205,6 +205,23 @@
</span><span class="cx">         basicShapeValue = rectangleValue.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+    case BasicShape::BasicShapeInsetType: {
+        const BasicShapeInset* inset = static_cast&lt;const BasicShapeInset*&gt;(basicShape);
+        RefPtr&lt;CSSBasicShapeInset&gt; insetValue = CSSBasicShapeInset::create();
+
+        insetValue-&gt;setTop(pool.createValue(inset-&gt;top()));
+        insetValue-&gt;setRight(pool.createValue(inset-&gt;right()));
+        insetValue-&gt;setBottom(pool.createValue(inset-&gt;bottom()));
+        insetValue-&gt;setLeft(pool.createValue(inset-&gt;left()));
+
+        insetValue-&gt;setTopLeftRadius(pool.createValue(inset-&gt;topLeftRadius()));
+        insetValue-&gt;setTopRightRadius(pool.createValue(inset-&gt;topRightRadius()));
+        insetValue-&gt;setBottomRightRadius(pool.createValue(inset-&gt;bottomRightRadius()));
+        insetValue-&gt;setBottomLeftRadius(pool.createValue(inset-&gt;bottomLeftRadius()));
+
+        basicShapeValue = insetValue.release();
+        break;
+    }
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -383,6 +400,48 @@
</span><span class="cx">         basicShape = rect.release();
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+    case CSSBasicShape::CSSBasicShapeInsetType: {
+        const CSSBasicShapeInset* rectValue = static_cast&lt;const CSSBasicShapeInset* &gt;(basicShapeValue);
+        RefPtr&lt;BasicShapeInset&gt; rect = BasicShapeInset::create();
+
+        if (rectValue-&gt;left())
+            rect-&gt;setTop(convertToLength(style, rootStyle, rectValue-&gt;top()));
+        else
+            return rect;
+        if (rectValue-&gt;right())
+            rect-&gt;setRight(convertToLength(style, rootStyle, rectValue-&gt;right()));
+        if (rectValue-&gt;bottom())
+            rect-&gt;setBottom(convertToLength(style, rootStyle, rectValue-&gt;bottom()));
+        if (rectValue-&gt;left())
+            rect-&gt;setLeft(convertToLength(style, rootStyle, rectValue-&gt;left()));
+
+        if (rectValue-&gt;topLeftRadius()) {
+            Pair* topLeftRadius = rectValue-&gt;topLeftRadius()-&gt;getPairValue();
+            rect-&gt;setTopLeftRadius(LengthSize(convertToLength(style, rootStyle, topLeftRadius-&gt;first()), convertToLength(style, rootStyle, topLeftRadius-&gt;second())));
+        } else
+            rect-&gt;setTopLeftRadius(LengthSize(Length(0, Fixed), Length(0, Fixed)));
+
+        if (rectValue-&gt;topRightRadius()) {
+            Pair* topRightRadius = rectValue-&gt;topRightRadius()-&gt;getPairValue();
+            rect-&gt;setTopRightRadius(LengthSize(convertToLength(style, rootStyle, topRightRadius-&gt;first()), convertToLength(style, rootStyle, topRightRadius-&gt;second())));
+        } else
+            rect-&gt;setTopRightRadius(LengthSize(Length(0, Fixed), Length(0, Fixed)));
+
+        if (rectValue-&gt;bottomRightRadius()) {
+            Pair* bottomRightRadius = rectValue-&gt;bottomRightRadius()-&gt;getPairValue();
+            rect-&gt;setBottomRightRadius(LengthSize(convertToLength(style, rootStyle, bottomRightRadius-&gt;first()), convertToLength(style, rootStyle, bottomRightRadius-&gt;second())));
+        } else
+            rect-&gt;setBottomRightRadius(LengthSize(Length(0, Fixed), Length(0, Fixed)));
+
+        if (rectValue-&gt;topLeftRadius()) {
+            Pair* bottomLeftRadius = rectValue-&gt;bottomLeftRadius()-&gt;getPairValue();
+            rect-&gt;setBottomLeftRadius(LengthSize(convertToLength(style, rootStyle, bottomLeftRadius-&gt;first()), convertToLength(style, rootStyle, bottomLeftRadius-&gt;second())));
+        } else
+            rect-&gt;setBottomLeftRadius(LengthSize(Length(0, Fixed), Length(0, Fixed)));
+
+        basicShape = rect.release();
+        break;
+    }
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include &quot;CSSBasicShapes.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><del>-
</del><ins>+#include &quot;Pair.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WTF;
</span><span class="lines">@@ -403,5 +403,205 @@
</span><span class="cx">         &amp;&amp; compareCSSValuePtr(m_box, other.m_box);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static String buildInsetString(const String&amp; top, const String&amp; right, const String&amp; bottom, const String&amp; left,
+    const String&amp; topLeftRadiusWidth, const String&amp; topLeftRadiusHeight,
+    const String&amp; topRightRadiusWidth, const String&amp; topRightRadiusHeight,
+    const String&amp; bottomRightRadiusWidth, const String&amp; bottomRightRadiusHeight,
+    const String&amp; bottomLeftRadiusWidth, const String&amp; bottomLeftRadiusHeight,
+    const String&amp; box)
+{
+    char opening[] = &quot;inset(&quot;;
+    char separator[] = &quot; &quot;;
+    char cornersSeparator[] = &quot;round&quot;;
+    char radiusSeparator[] = &quot;/&quot;;
+    StringBuilder result;
+    // Compute the required capacity in advance to reduce allocations.
+    result.reserveCapacity((sizeof(opening) - 1) + (13 * (sizeof(separator) - 1)) + (sizeof(cornersSeparator) - 1) + (sizeof(radiusSeparator) - 1) + 1
+        + top.length() + right.length() + bottom.length() + left.length()
+        + topLeftRadiusWidth.length() + topRightRadiusWidth.length() + bottomRightRadiusWidth.length() + bottomLeftRadiusWidth.length() +
+        + topLeftRadiusHeight.length() + topRightRadiusHeight.length() + bottomRightRadiusHeight.length() + bottomLeftRadiusHeight.length() +
+        + (box.length() ? box.length() + 1 : 0));
+    result.appendLiteral(opening);
+    result.append(top);
+    result.appendLiteral(separator);
+    result.append(right);
+    result.appendLiteral(separator);
+    result.append(bottom);
+    result.appendLiteral(separator);
+    result.append(left);
+
+    if (!topLeftRadiusWidth.isNull() &amp;&amp; !topLeftRadiusHeight.isNull()) {
+        result.appendLiteral(separator);
+        result.appendLiteral(cornersSeparator);
+        result.appendLiteral(separator);
+
+        result.append(topLeftRadiusWidth);
+        result.appendLiteral(separator);
+        result.append(topRightRadiusWidth);
+        result.appendLiteral(separator);
+        result.append(bottomRightRadiusWidth);
+        result.appendLiteral(separator);
+        result.append(bottomLeftRadiusWidth);
+
+        result.appendLiteral(separator);
+        result.append(radiusSeparator);
+        result.appendLiteral(separator);
+
+        result.append(topLeftRadiusHeight);
+        result.appendLiteral(separator);
+        result.append(topRightRadiusHeight);
+        result.appendLiteral(separator);
+        result.append(bottomRightRadiusHeight);
+        result.appendLiteral(separator);
+        result.append(bottomLeftRadiusHeight);
+    }
+    result.append(')');
+    if (box.length()) {
+        result.append(' ');
+        result.append(box);
+    }
+    return result.toString();
+}
+
+String CSSBasicShapeInset::cssText() const
+{
+    String topLeftRadiusWidth;
+    String topLeftRadiusHeight;
+    if (topLeftRadius()) {
+        Pair* topLeftRadius = m_topLeftRadius-&gt;getPairValue();
+        topLeftRadiusWidth = topLeftRadius-&gt;first() ? topLeftRadius-&gt;first()-&gt;cssText() : String(&quot;0&quot;);
+        if (topLeftRadius-&gt;second())
+            topLeftRadiusHeight = topLeftRadius-&gt;second()-&gt;cssText();
+    }
+
+    String topRightRadiusWidth;
+    String topRightRadiusHeight;
+    if (topRightRadius()) {
+        Pair* topRightRadius = m_topRightRadius-&gt;getPairValue();
+        if (topRightRadius-&gt;first())
+            topRightRadiusWidth = topRightRadius-&gt;first()-&gt;cssText();
+        if (topRightRadius-&gt;second())
+            topRightRadiusHeight = topRightRadius-&gt;second()-&gt;cssText();
+    }
+
+    String bottomRightRadiusWidth;
+    String bottomRightRadiusHeight;
+    if (bottomRightRadius()) {
+        Pair* bottomRightRadius = m_bottomRightRadius-&gt;getPairValue();
+        if (bottomRightRadius-&gt;first())
+            bottomRightRadiusWidth = bottomRightRadius-&gt;first()-&gt;cssText();
+        if (bottomRightRadius-&gt;second())
+            bottomRightRadiusHeight = bottomRightRadius-&gt;second()-&gt;cssText();
+    }
+
+    String bottomLeftRadiusWidth;
+    String bottomLeftRadiusHeight;
+    if (bottomLeftRadius()) {
+        Pair* bottomLeftRadius = m_bottomLeftRadius-&gt;getPairValue();
+        if (bottomLeftRadius-&gt;first())
+            bottomLeftRadiusWidth = bottomLeftRadius-&gt;first()-&gt;cssText();
+        if (bottomLeftRadius-&gt;second())
+            bottomLeftRadiusHeight = bottomLeftRadius-&gt;second()-&gt;cssText();
+    }
+
+    return buildInsetString(m_top ? m_top-&gt;cssText() : String(),
+        m_right ? m_right-&gt;cssText() : String(),
+        m_bottom ? m_bottom-&gt;cssText() : String(),
+        m_left ? m_left-&gt;cssText() : String(),
+        topLeftRadiusWidth,
+        topLeftRadiusHeight,
+        topRightRadiusWidth,
+        topRightRadiusHeight,
+        bottomRightRadiusWidth,
+        bottomRightRadiusHeight,
+        bottomLeftRadiusWidth,
+        bottomLeftRadiusHeight,
+        m_box ? m_box-&gt;cssText() : String());
+}
+
+bool CSSBasicShapeInset::equals(const CSSBasicShape&amp; shape) const
+{
+    if (shape.type() != CSSBasicShapeInsetType)
+        return false;
+
+    const CSSBasicShapeInset&amp; other = static_cast&lt;const CSSBasicShapeInset&amp;&gt;(shape);
+    return compareCSSValuePtr(m_top, other.m_top)
+        &amp;&amp; compareCSSValuePtr(m_right, other.m_right)
+        &amp;&amp; compareCSSValuePtr(m_bottom, other.m_bottom)
+        &amp;&amp; compareCSSValuePtr(m_left, other.m_left)
+        &amp;&amp; compareCSSValuePtr(m_topLeftRadius, other.m_topLeftRadius)
+        &amp;&amp; compareCSSValuePtr(m_topRightRadius, other.m_topRightRadius)
+        &amp;&amp; compareCSSValuePtr(m_bottomRightRadius, other.m_bottomRightRadius)
+        &amp;&amp; compareCSSValuePtr(m_bottomLeftRadius, other.m_bottomLeftRadius);
+}
+
+#if ENABLE(CSS_VARIABLES)
+String CSSBasicShapeInset::serializeResolvingVariables(const HashMap&lt;AtomicString, String&gt;&amp; variables) const
+{
+    String topLeftRadiusWidth;
+    String topLeftRadiusHeight;
+    if (topLeftRadius()) {
+        if (m_topLeftRadius-&gt;getPairValue()-&gt;first())
+            topLeftRadiusWidth = m_topLeftRadius-&gt;getPairValue()-&gt;first()-&gt;serializeResolvingVariables(variables);
+        if (m_topLeftRadius-&gt;getPairValue()-&gt;second())
+            topLeftRadiusHeight = m_topLeftRadius-&gt;getPairValue()-&gt;second()-&gt;serializeResolvingVariables(variables);
+    }
+
+    String topRightRadiusWidth;
+    String topRightRadiusHeight;
+    if (topRightRadius()) {
+        if (m_topRightRadius-&gt;getPairValue()-&gt;first())
+            topRightRadiusWidth = m_topRightRadius-&gt;getPairValue()-&gt;first()-&gt;serializeResolvingVariables(variables);
+        if (m_topRightRadius-&gt;getPairValue()-&gt;second())
+            topRightRadiusHeight = m_topRightRadius-&gt;getPairValue()-&gt;second()-&gt;serializeResolvingVariables(variables);
+    }
+
+    String bottomRightRadiusWidth;
+    String bottomRightRadiusHeight;
+    if (bottomRightRadius()) {
+        if (m_bottomRightRadius-&gt;getPairValue()-&gt;first())
+            bottomRightRadiusWidth = m_bottomRightRadius-&gt;getPairValue()-&gt;first()-&gt;serializeResolvingVariables(variables);
+        if (m_bottomRightRadius-&gt;getPairValue()-&gt;second())
+            bottomRightRadiusHeight = m_bottomRightRadius-&gt;getPairValue()-&gt;second()-&gt;serializeResolvingVariables(variables);
+    }
+
+    String bottomLeftRadiusWidth;
+    String bottomLeftRadiusHeight;
+    if (bottomLeftRadius()) {
+        if (m_bottomLeftRadius-&gt;getPairValue()-&gt;first())
+            bottomLeftRadiusWidth = m_bottomLeftRadius-&gt;getPairValue()-&gt;first()-&gt;serializeResolvingVariables(variables);
+        if (m_bottomLeftRadius-&gt;getPairValue()-&gt;second())
+            bottomLeftRadiusHeight = m_bottomLeftRadius-&gt;getPairValue()-&gt;second()-&gt;serializeResolvingVariables(variables);
+    }
+
+    return buildInsetString(m_top-&gt;serializeResolvingVariables(variables),
+        m_right-&gt;serializeResolvingVariables(variables),
+        m_bottom-&gt;serializeResolvingVariables(variables),
+        m_left-&gt;serializeResolvingVariables(variables),
+        topLeftRadiusWidth,
+        topLeftRadiusHeight,
+        topRightRadiusWidth,
+        topRightRadiusHeight,
+        bottomRightRadiusWidth,
+        bottomRightRadiusHeight,
+        bottomLeftRadiusWidth,
+        bottomLeftRadiusHeight,
+        m_box ? m_box-&gt;serializeResolvingVariables(variables) : String());
+}
+
+bool CSSBasicShapeInset::hasVariableReference() const
+{
+    return m_top-&gt;hasVariableReference()
+        || m_right-&gt;hasVariableReference()
+        || m_bottom-&gt;hasVariableReference()
+        || m_left-&gt;hasVariableReference()
+        || (topLeftRadius() &amp;&amp; m_topLeftRadius-&gt;hasVariableReference())
+        || (topRightRadius() &amp;&amp; m_topRightRadius-&gt;hasVariableReference())
+        || (bottomRightRadius() &amp;&amp; m_bottomRightRadius-&gt;hasVariableReference())
+        || (bottomLeftRadius() &amp;&amp; m_bottomLeftRadius-&gt;hasVariableReference())
+        || (m_box &amp;&amp; m_box-&gt;hasVariableReference());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSBasicShapes.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -47,7 +47,8 @@
</span><span class="cx">         CSSBasicShapePolygonType = 4,
</span><span class="cx">         CSSBasicShapeInsetRectangleType = 5,
</span><span class="cx">         CSSBasicShapeCircleType = 6,
</span><del>-        CSSBasicShapeEllipseType = 7
</del><ins>+        CSSBasicShapeEllipseType = 7,
+        CSSBasicShapeInsetType = 8
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     virtual Type type() const = 0;
</span><span class="lines">@@ -131,6 +132,54 @@
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; m_radiusY;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+
+class CSSBasicShapeInset : public CSSBasicShape {
+public:
+    static PassRefPtr&lt;CSSBasicShapeInset&gt; create() { return adoptRef(new CSSBasicShapeInset); }
+
+    CSSPrimitiveValue* top() const { return m_top.get(); }
+    CSSPrimitiveValue* right() const { return m_right.get(); }
+    CSSPrimitiveValue* bottom() const { return m_bottom.get(); }
+    CSSPrimitiveValue* left() const { return m_left.get(); }
+
+    CSSPrimitiveValue* topLeftRadius() const { return m_topLeftRadius.get(); }
+    CSSPrimitiveValue* topRightRadius() const { return m_topRightRadius.get(); }
+    CSSPrimitiveValue* bottomRightRadius() const { return m_bottomRightRadius.get(); }
+    CSSPrimitiveValue* bottomLeftRadius() const { return m_bottomLeftRadius.get(); }
+
+    void setTop(PassRefPtr&lt;CSSPrimitiveValue&gt; top) { m_top = top; }
+    void setRight(PassRefPtr&lt;CSSPrimitiveValue&gt; right) { m_right = right; }
+    void setBottom(PassRefPtr&lt;CSSPrimitiveValue&gt; bottom) { m_bottom = bottom; }
+    void setLeft(PassRefPtr&lt;CSSPrimitiveValue&gt; left) { m_left = left; }
+
+    void setTopLeftRadius(PassRefPtr&lt;CSSPrimitiveValue&gt; radius) { m_topLeftRadius = radius; }
+    void setTopRightRadius(PassRefPtr&lt;CSSPrimitiveValue&gt; radius) { m_topRightRadius = radius; }
+    void setBottomRightRadius(PassRefPtr&lt;CSSPrimitiveValue&gt; radius) { m_bottomRightRadius = radius; }
+    void setBottomLeftRadius(PassRefPtr&lt;CSSPrimitiveValue&gt; radius) { m_bottomLeftRadius = radius; }
+
+    virtual Type type() const OVERRIDE { return CSSBasicShapeInsetType; }
+    virtual String cssText() const OVERRIDE;
+    virtual bool equals(const CSSBasicShape&amp;) const OVERRIDE;
+
+#if ENABLE(CSS_VARIABLES)
+    virtual String serializeResolvingVariables(const HashMap&lt;AtomicString, String&gt;&amp;) const;
+    virtual bool hasVariableReference() const;
+#endif
+
+private:
+    CSSBasicShapeInset() { }
+
+    RefPtr&lt;CSSPrimitiveValue&gt; m_top;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_right;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_bottom;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_left;
+
+    RefPtr&lt;CSSPrimitiveValue&gt; m_topLeftRadius;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_topRightRadius;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_bottomRightRadius;
+    RefPtr&lt;CSSPrimitiveValue&gt; m_bottomLeftRadius;
+};
+
</ins><span class="cx"> class CSSBasicShapeCircle : public CSSBasicShape {
</span><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;CSSBasicShapeCircle&gt; create() { return adoptRef(new CSSBasicShapeCircle); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -5343,6 +5343,124 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void completeBorderRadii(RefPtr&lt;CSSPrimitiveValue&gt; radii[4])
+{
+    if (radii[3])
+        return;
+    if (!radii[2]) {
+        if (!radii[1])
+            radii[1] = radii[0];
+        radii[2] = radii[0];
+    }
+    radii[3] = radii[1];
+}
+
+// FIXME: This should be refactored with CSSParser::parseBorderRadius.
+// CSSParser::parseBorderRadius contains support for some legacy radius construction.
+PassRefPtr&lt;CSSBasicShape&gt; CSSParser::parseInsetRoundedCorners(PassRefPtr&lt;CSSBasicShapeInset&gt; shape, CSSParserValueList* args)
+{
+    CSSParserValue* argument = args-&gt;next();
+
+    std::unique_ptr&lt;CSSParserValueList&gt; radiusArguments(new CSSParserValueList);
+    while (argument) {
+        radiusArguments-&gt;addValue(*argument);
+        argument = args-&gt;next();
+    }
+
+    unsigned num = radiusArguments-&gt;size();
+    if (!num || num &gt; 9)
+        return nullptr;
+
+    RefPtr&lt;CSSPrimitiveValue&gt; radii[2][4];
+
+    unsigned indexAfterSlash = 0;
+    for (unsigned i = 0; i &lt; num; ++i) {
+        CSSParserValue* value = radiusArguments-&gt;valueAt(i);
+        if (value-&gt;unit == CSSParserValue::Operator) {
+            if (value-&gt;iValue != '/')
+                return nullptr;
+
+            if (!i || indexAfterSlash || i + 1 == num || num &gt; i + 5)
+                return nullptr;
+
+            indexAfterSlash = i + 1;
+            completeBorderRadii(radii[0]);
+            continue;
+        }
+
+        if (i - indexAfterSlash &gt;= 4)
+            return nullptr;
+
+        if (!validUnit(value, FLength | FPercent | FNonNeg))
+            return nullptr;
+
+        RefPtr&lt;CSSPrimitiveValue&gt; radius = createPrimitiveNumericValue(value);
+
+        if (!indexAfterSlash)
+            radii[0][i] = radius;
+        else
+            radii[1][i - indexAfterSlash] = radius.release();
+    }
+
+    if (!indexAfterSlash) {
+        completeBorderRadii(radii[0]);
+        for (unsigned i = 0; i &lt; 4; ++i)
+            radii[1][i] = radii[0][i];
+    } else
+        completeBorderRadii(radii[1]);
+
+    shape-&gt;setTopLeftRadius(createPrimitiveValuePair(radii[0][0].release(), radii[1][0].release()));
+    shape-&gt;setTopRightRadius(createPrimitiveValuePair(radii[0][1].release(), radii[1][1].release()));
+    shape-&gt;setBottomRightRadius(createPrimitiveValuePair(radii[0][2].release(), radii[1][2].release()));
+    shape-&gt;setBottomLeftRadius(createPrimitiveValuePair(radii[0][3].release(), radii[1][3].release()));
+
+    return shape;
+}
+
+PassRefPtr&lt;CSSBasicShape&gt; CSSParser::parseBasicShapeInset(CSSParserValueList* args)
+{
+    ASSERT(args);
+
+    RefPtr&lt;CSSBasicShapeInset&gt; shape = CSSBasicShapeInset::create();
+
+    unsigned argumentNumber = 0;
+    CSSParserValue* argument = args-&gt;current();
+    while (argument) {
+        if (argument-&gt;unit == CSSPrimitiveValue::CSS_IDENT) {
+            if (argumentNumber &gt; 0 &amp;&amp; equalIgnoringCase(argument-&gt;string, &quot;round&quot;))
+                return parseInsetRoundedCorners(shape.release(), args);
+            return nullptr;
+        }
+
+        Units unitFlags = FLength | FPercent| FNonNeg;
+        if (!validUnit(argument, unitFlags) || argumentNumber &gt; 3)
+            return nullptr;
+
+        RefPtr&lt;CSSPrimitiveValue&gt; length = createPrimitiveNumericValue(argument);
+        switch (argumentNumber) {
+        case 0:
+            shape-&gt;setTop(length);
+            break;
+        case 1:
+            shape-&gt;setRight(length);
+            break;
+        case 2:
+            shape-&gt;setBottom(length);
+            break;
+        case 3:
+            shape-&gt;setLeft(length);
+            break;
+        }
+        argument = args-&gt;next();
+        argumentNumber++;
+    }
+
+    if (!argumentNumber)
+        return nullptr;
+
+    return shape;
+}
+
</ins><span class="cx"> PassRefPtr&lt;CSSBasicShape&gt; CSSParser::parseBasicShapeRectangle(CSSParserValueList* args)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(args);
</span><span class="lines">@@ -5818,6 +5936,8 @@
</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 class="cx">         shape = parseBasicShapeInsetRectangle(args);
</span><ins>+    else if (equalIgnoringCase(value-&gt;function-&gt;name, &quot;inset(&quot;))
+        shape = parseBasicShapeInset(args);
</ins><span class="cx"> 
</span><span class="cx">     if (!shape)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -7509,18 +7629,6 @@
</span><span class="cx">     return parseBorderImageQuad(FLength | FInteger | FNonNeg, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void completeBorderRadii(RefPtr&lt;CSSPrimitiveValue&gt; radii[4])
-{
-    if (radii[3])
-        return;
-    if (!radii[2]) {
-        if (!radii[1])
-            radii[1] = radii[0];
-        radii[2] = radii[0];
-    }
-    radii[3] = radii[1];
-}
-
</del><span class="cx"> bool CSSParser::parseBorderRadius(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><span class="cx">     unsigned num = m_valueList-&gt;size();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSParser.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> class CSSValue;
</span><span class="cx"> class CSSValueList;
</span><span class="cx"> class CSSBasicShape;
</span><ins>+class CSSBasicShapeInset;
</ins><span class="cx"> class Document;
</span><span class="cx"> class Element;
</span><span class="cx"> class ImmutableStyleProperties;
</span><span class="lines">@@ -187,6 +188,7 @@
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseDeprecatedBasicShapeEllipse(CSSParserValueList*);
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapePolygon(CSSParserValueList*);
</span><span class="cx">     PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapeInsetRectangle(CSSParserValueList*);
</span><ins>+    PassRefPtr&lt;CSSBasicShape&gt; parseBasicShapeInset(CSSParserValueList*);
</ins><span class="cx"> 
</span><span class="cx">     bool parseFont(bool important);
</span><span class="cx">     PassRefPtr&lt;CSSValueList&gt; parseFontFamily();
</span><span class="lines">@@ -530,6 +532,8 @@
</span><span class="cx">     bool parseValue(MutableStyleProperties*, CSSPropertyID, const String&amp;, bool important, StyleSheetContents* contextStyleSheet);
</span><span class="cx">     PassRef&lt;ImmutableStyleProperties&gt; parseDeclaration(const String&amp;, StyleSheetContents* contextStyleSheet);
</span><span class="cx"> 
</span><ins>+    PassRefPtr&lt;CSSBasicShape&gt; parseInsetRoundedCorners(PassRefPtr&lt;CSSBasicShapeInset&gt;, CSSParserValueList*);
+
</ins><span class="cx">     enum SizeParameterType {
</span><span class="cx">         None,
</span><span class="cx">         Auto,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -268,7 +268,6 @@
</span><span class="cx">         m_value.string-&gt;ref();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color)
</span><span class="cx">     : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="lines">@@ -314,6 +313,12 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize&amp; lengthSize)
+    : CSSValue(PrimitiveClass)
+{
+    init(lengthSize);
+}
+
</ins><span class="cx"> void CSSPrimitiveValue::init(const Length&amp; length)
</span><span class="cx"> {
</span><span class="cx">     switch (length.type()) {
</span><span class="lines">@@ -378,6 +383,13 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CSSPrimitiveValue::init(const LengthSize&amp; lengthSize)
+{
+    m_primitiveUnitType = CSS_PAIR;
+    m_hasCachedCSSText = false;
+    m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.height())).leakRef();
+}
+
</ins><span class="cx"> void CSSPrimitiveValue::init(PassRefPtr&lt;Counter&gt; c)
</span><span class="cx"> {
</span><span class="cx">     m_primitiveUnitType = CSS_COUNTER;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> class CSSBasicShape;
</span><span class="cx"> 
</span><span class="cx"> struct Length;
</span><ins>+struct LengthSize;
</ins><span class="cx"> 
</span><span class="cx"> // Dimension calculations are imprecise, often resulting in values of e.g.
</span><span class="cx"> // 44.99998. We need to go ahead and round if we're really close to the next
</span><span class="lines">@@ -213,6 +214,7 @@
</span><span class="cx">     static PassRef&lt;CSSPrimitiveValue&gt; create(double value, UnitTypes type) { return adoptRef(*new CSSPrimitiveValue(value, type)); }
</span><span class="cx">     static PassRef&lt;CSSPrimitiveValue&gt; create(const String&amp; value, UnitTypes type) { return adoptRef(*new CSSPrimitiveValue(value, type)); }
</span><span class="cx">     static PassRef&lt;CSSPrimitiveValue&gt; create(const Length&amp; value, const RenderStyle* style) { return adoptRef(*new CSSPrimitiveValue(value, style)); }
</span><ins>+    static PassRef&lt;CSSPrimitiveValue&gt; create(const LengthSize&amp; value) { return adoptRef(*new CSSPrimitiveValue(value)); }
</ins><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt; static PassRef&lt;CSSPrimitiveValue&gt; create(T value)
</span><span class="cx">     {
</span><span class="lines">@@ -344,6 +346,7 @@
</span><span class="cx">     CSSPrimitiveValue(unsigned color); // RGB value
</span><span class="cx">     CSSPrimitiveValue(const Length&amp;);
</span><span class="cx">     CSSPrimitiveValue(const Length&amp;, const RenderStyle*);
</span><ins>+    CSSPrimitiveValue(const LengthSize&amp;);
</ins><span class="cx">     CSSPrimitiveValue(const String&amp;, UnitTypes);
</span><span class="cx">     CSSPrimitiveValue(double, UnitTypes);
</span><span class="cx"> 
</span><span class="lines">@@ -365,6 +368,7 @@
</span><span class="cx">     template&lt;typename T&gt; operator T*(); // compile-time guard
</span><span class="cx"> 
</span><span class="cx">     void init(const Length&amp;);
</span><ins>+    void init(const LengthSize&amp;);
</ins><span class="cx">     void init(PassRefPtr&lt;Counter&gt;);
</span><span class="cx">     void init(PassRefPtr&lt;Rect&gt;);
</span><span class="cx">     void init(PassRefPtr&lt;Pair&gt;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuePoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValuePool.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValuePool.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/css/CSSValuePool.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">     PassRef&lt;CSSPrimitiveValue&gt; createValue(double value, CSSPrimitiveValue::UnitTypes);
</span><span class="cx">     PassRef&lt;CSSPrimitiveValue&gt; createValue(const String&amp; value, CSSPrimitiveValue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); }
</span><span class="cx">     PassRef&lt;CSSPrimitiveValue&gt; createValue(const Length&amp; value, const RenderStyle* style) { return CSSPrimitiveValue::create(value, style); }
</span><ins>+    PassRef&lt;CSSPrimitiveValue&gt; createValue(const LengthSize&amp; value) { return CSSPrimitiveValue::create(value); }
</ins><span class="cx">     template&lt;typename T&gt; static PassRef&lt;CSSPrimitiveValue&gt; createValue(T value) { return CSSPrimitiveValue::create(value); }
</span><span class="cx"> 
</span><span class="cx">     void drain();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthSizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LengthSize.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LengthSize.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/platform/LengthSize.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -48,6 +48,11 @@
</span><span class="cx">     void setHeight(Length height) { m_height = std::move(height); }
</span><span class="cx">     const Length&amp; height() const { return m_height; }
</span><span class="cx"> 
</span><ins>+    LengthSize blend(const LengthSize&amp; from, double progress) const
+    {
+        return LengthSize(m_width.blend(from.width(), progress), m_height.blend(from.height(), progress));
+    }
+
</ins><span class="cx"> private:
</span><span class="cx">     Length m_width;
</span><span class="cx">     Length m_height;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInsideInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx">     switch (shapeValue-&gt;type()) {
</span><span class="cx">     case ShapeValue::Shape:
</span><del>-        return shapeValue-&gt;shape() &amp;&amp; shapeValue-&gt;shape()-&gt;type() != BasicShape::BasicShapeInsetRectangleType;
</del><ins>+        return shapeValue-&gt;shape() &amp;&amp; shapeValue-&gt;shape()-&gt;type() != BasicShape::BasicShapeInsetRectangleType &amp;&amp; shapeValue-&gt;shape()-&gt;type() != BasicShape::BasicShapeInsetType;
</ins><span class="cx">     case ShapeValue::Image:
</span><span class="cx">         return shapeValue-&gt;isImageValid() &amp;&amp; checkShapeImageOrigin(renderer.document(), *(shapeValue-&gt;image()-&gt;cachedImage()));
</span><span class="cx">     case ShapeValue::Box:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -299,4 +299,54 @@
</span><span class="cx">     result-&gt;setCornerRadiusY(m_cornerRadiusY.blend(o-&gt;cornerRadiusY(), progress));
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><ins>+
+void BasicShapeInset::path(Path&amp; path, const FloatRect&amp; boundingBox)
+{
+    ASSERT(path.isEmpty());
+    float left = floatValueForLength(m_left, boundingBox.width());
+    float top = floatValueForLength(m_top, boundingBox.height());
+    path.addRoundedRect(
+        FloatRect(
+            left + boundingBox.x(),
+            top + boundingBox.y(),
+            std::max&lt;float&gt;(boundingBox.width() - left - floatValueForLength(m_right, boundingBox.width()), 0),
+            std::max&lt;float&gt;(boundingBox.height() - top - floatValueForLength(m_bottom, boundingBox.height()), 0)
+        ),
+        FloatSize(
+            floatValueForLength(m_topLeftRadius.width(), boundingBox.width()),
+            floatValueForLength(m_topLeftRadius.height(), boundingBox.height())
+        ),
+        FloatSize(
+            floatValueForLength(m_topRightRadius.width(), boundingBox.width()),
+            floatValueForLength(m_topRightRadius.height(), boundingBox.height())
+        ),
+        FloatSize(
+            floatValueForLength(m_bottomRightRadius.width(), boundingBox.width()),
+            floatValueForLength(m_bottomRightRadius.height(), boundingBox.height())
+        ),
+        FloatSize(
+            floatValueForLength(m_bottomLeftRadius.width(), boundingBox.width()),
+            floatValueForLength(m_bottomLeftRadius.height(), boundingBox.height())
+        )
+    );
</ins><span class="cx"> }
</span><ins>+
+PassRefPtr&lt;BasicShape&gt; BasicShapeInset::blend(const BasicShape* other, double progress) const
+{
+    ASSERT(type() == other-&gt;type());
+
+    const BasicShapeInset* o = static_cast&lt;const BasicShapeInset*&gt;(other);
+    RefPtr&lt;BasicShapeInset&gt; result =  BasicShapeInset::create();
+    result-&gt;setTop(m_top.blend(o-&gt;top(), progress));
+    result-&gt;setRight(m_right.blend(o-&gt;right(), progress));
+    result-&gt;setBottom(m_bottom.blend(o-&gt;bottom(), progress));
+    result-&gt;setLeft(m_left.blend(o-&gt;left(), progress));
+
+    result-&gt;setTopLeftRadius(m_topLeftRadius.blend(o-&gt;topLeftRadius(), progress));
+    result-&gt;setTopRightRadius(m_topRightRadius.blend(o-&gt;topRightRadius(), progress));
+    result-&gt;setBottomRightRadius(m_bottomRightRadius.blend(o-&gt;bottomRightRadius(), progress));
+    result-&gt;setBottomLeftRadius(m_bottomLeftRadius.blend(o-&gt;bottomLeftRadius(), progress));
+
+    return result.release();
+}
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.h (159967 => 159968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-02 22:42:34 UTC (rev 159967)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.h        2013-12-02 22:48:54 UTC (rev 159968)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #define BasicShapes_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Length.h&quot;
</span><ins>+#include &quot;LengthSize.h&quot;
</ins><span class="cx"> #include &quot;WindRule.h&quot;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="lines">@@ -52,7 +53,8 @@
</span><span class="cx">         BasicShapePolygonType = 4,
</span><span class="cx">         BasicShapeInsetRectangleType = 5,
</span><span class="cx">         BasicShapeCircleType = 6,
</span><del>-        BasicShapeEllipseType = 7
</del><ins>+        BasicShapeEllipseType = 7,
+        BasicShapeInsetType = 8
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     enum ReferenceBox {
</span><span class="lines">@@ -352,5 +354,48 @@
</span><span class="cx">     Length m_cornerRadiusX;
</span><span class="cx">     Length m_cornerRadiusY;
</span><span class="cx"> };
</span><ins>+
+class BasicShapeInset : public BasicShape {
+public:
+    static PassRefPtr&lt;BasicShapeInset&gt; create() { return adoptRef(new BasicShapeInset); }
+
+    const Length&amp; top() const { return m_top; }
+    const Length&amp; right() const { return m_right; }
+    const Length&amp; bottom() const { return m_bottom; }
+    const Length&amp; left() const { return m_left; }
+
+    const LengthSize&amp; topLeftRadius() const { return m_topLeftRadius; }
+    const LengthSize&amp; topRightRadius() const { return m_topRightRadius; }
+    const LengthSize&amp; bottomRightRadius() const { return m_bottomRightRadius; }
+    const LengthSize&amp; bottomLeftRadius() const { return m_bottomLeftRadius; }
+
+    void setTop(Length top) { m_top = std::move(top); }
+    void setRight(Length right) { m_right = std::move(right); }
+    void setBottom(Length bottom) { m_bottom = std::move(bottom); }
+    void setLeft(Length left) { m_left = std::move(left); }
+
+    void setTopLeftRadius(LengthSize radius) { m_topLeftRadius = std::move(radius); }
+    void setTopRightRadius(LengthSize radius) { m_topRightRadius = std::move(radius); }
+    void setBottomRightRadius(LengthSize radius) { m_bottomRightRadius = std::move(radius); }
+    void setBottomLeftRadius(LengthSize radius) { m_bottomLeftRadius = std::move(radius); }
+
+    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 BasicShapeInsetType; }
+private:
+    BasicShapeInset() { }
+
+    Length m_right;
+    Length m_top;
+    Length m_bottom;
+    Length m_left;
+
+    LengthSize m_topLeftRadius;
+    LengthSize m_topRightRadius;
+    LengthSize m_bottomRightRadius;
+    LengthSize m_bottomLeftRadius;
+};
+
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>