No subject


Mon Jan 28 08:41:14 PST 2013


8766">r148766</a> by &lt;jchaffraix at chromium.org&gt;

Source/WebCore:

This adds the parsing, style resolution and getComputedStyle bits
to our code. The rendering code was not made aware of the new type
of GridPosition yet.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
* css/CSSParser.h:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isInteger):
(WebCore::GridPosition::isSpan):
(WebCore::GridPosition::setSpanPosition):
(WebCore::GridPosition::spanPosition):

LayoutTests:

Added several test cases to check that we properly parse the
keyword 'span' in &lt;grid-line&gt;.

* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a=
></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemcolumnrowgetsete=
xpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-g=
et-set-expected.txt</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemcolumnrowgetseth=
tml">trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.=
html</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemendaftergetsetex=
pectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get=
-set-expected.txt</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemendaftergetsetht=
ml">trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.ht=
ml</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemstartbeforegetse=
texpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-item-start-befo=
re-get-set-expected.txt</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemstartbeforegetse=
thtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-=
set.html</a></li>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trun=
k/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href=3D"#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/c=
ss/CSSParser.cpp</a></li>
<li><a href=3D"#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css=
/CSSParser.h</a></li>
<li><a href=3D"#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/Web=
Core/css/CSSValueKeywords.in</a></li>
<li><a href=3D"#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCo=
re/css/StyleResolver.cpp</a></li>
<li><a href=3D"#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore=
/css/StyleResolver.h</a></li>
<li><a href=3D"#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/We=
bCore/rendering/RenderGrid.cpp</a></li>
<li><a href=3D"#trunkSourceWebCorerenderingstyleGridPositionh">trunk/Sour=
ce/WebCore/rendering/style/GridPosition.h</a></li>
</ul>

</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkLayoutTestsChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (153747 =
=3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/ChangeLog	2013-08-06 11:08:03 =
UTC (rev 153747)
+++ trunk/LayoutTests/ChangeLog	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -1,3 +1,22 @@
</span><ins>+2013-06-26  Sergio Villar Senin  &lt;svillar at igalia.com&gt;
+
+        [CSS Grid Layout] Add support for parsing &lt;grid-line&gt; that=
 includes a 'span'
+        https://bugs.webkit.org/show_bug.cgi?id=3D118051
+
+        Reviewed by Andreas Kling.
+
+        From Blink r148766 by &lt;jchaffraix at chromium.org&gt;
+
+        Added several test cases to check that we properly parse the
+        keyword 'span' in &lt;grid-line&gt;.
+
+        * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt=
:
+        * fast/css-grid-layout/grid-item-column-row-get-set.html:
+        * fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
+        * fast/css-grid-layout/grid-item-end-after-get-set.html:
+        * fast/css-grid-layout/grid-item-start-before-get-set-expected.t=
xt:
+        * fast/css-grid-layout/grid-item-start-before-get-set.html:
+
</ins><span class=3D"cx"> 2013-06-25  Sergio Villar Senin  &lt;svillar at ig=
alia.com&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         [CSS Grid Layout] Rename grid placemen=
t properties
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemcolumnrowgetsetexpected=
txt"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-column-row-get-set-expected.txt (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-column-row-get-set-expected.txt	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-e=
xpected.txt	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -40,6 +40,24 @@
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativePosi=
tiveIntegerElement, '').getPropertyValue('-webkit-grid-row') is '-8 / 5'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativePosi=
tiveIntegerElement, '').getPropertyValue('-webkit-grid-row-start') is '-8=
'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativePosi=
tiveIntegerElement, '').getPropertyValue('-webkit-grid-row-end') is '5'
</span><ins>+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').get=
PropertyValue('-webkit-grid-column') is 'span 2 / 4'
+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').getPropertyValu=
e('-webkit-grid-column-start') is 'span 2'
+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').getPropertyValu=
e('-webkit-grid-column-end') is '4'
+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').getPropertyValu=
e('-webkit-grid-row') is '3 / span 5'
+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').getPropertyValu=
e('-webkit-grid-row-start') is '3'
+PASS getComputedStyle(gridItemWithBeforeSpanElement, '').getPropertyValu=
e('-webkit-grid-row-end') is 'span 5'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-column') is 'span 2 / 4'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-column-start') is 'span 2'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-column-end') is '4'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-row') is '3 / span 5'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-row-start') is '3'
+PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue=
('-webkit-grid-row-end') is 'span 5'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-column') is 'auto / auto'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-column-start') is 'auto'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-column-end') is 'auto'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-row') is 'auto / auto'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-row-start') is 'auto'
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue=
('-webkit-grid-row-end') is 'auto'
</ins><span class=3D"cx"> PASS getComputedStyle(gridItemWith2AutoElement,=
 '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWith2AutoElement=
, '').getPropertyValue('-webkit-grid-column-start') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWith2AutoElement=
, '').getPropertyValue('-webkit-grid-column-end') is 'auto'
</span><span class=3D"lines">@@ -92,6 +110,12 @@
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row') is '1 / 10'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-start') is '1'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-end') is '10'
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit=
-grid-column') is 'span 5 / 5'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'span 5'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is '5'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is '4 / span 4'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is '4'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'span 4'
</ins><span class=3D"cx"> PASS getComputedStyle(element, '').getPropertyV=
alue('-webkit-grid-column') is '-5 / 5'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column-start') is '-5'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column-end') is '5'
</span><span class=3D"lines">@@ -110,6 +134,12 @@
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row') is 'auto / 8'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-start') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-end') is '8'
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit=
-grid-column') is 'span 1 / 3'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'span 1'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is '3'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is '5 / span 1'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is '5'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'span 1'
</ins><span class=3D"cx">=20
</span><span class=3D"cx"> Test setting grid-column and grid-row back to =
'auto' through JS
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column') is '18 / 19'
</span><span class=3D"lines">@@ -174,6 +204,30 @@
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-start') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-end') is 'auto'
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit=
-grid-column') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'auto'
</ins><span class=3D"cx"> PASS successfullyParsed is true
</span><span class=3D"cx">=20
</span><span class=3D"cx"> TEST COMPLETE
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemcolumnrowgetsethtml"></=
a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-column-row-get-set.html (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-column-row-get-set.html	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.h=
tml	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -26,6 +26,18 @@
</span><span class=3D"cx">     -webkit-grid-column: 10 / -10;
</span><span class=3D"cx">     -webkit-grid-row: -8 / 5;
</span><span class=3D"cx"> }
</span><ins>+.gridItemWithBeforeSpan {
+    -webkit-grid-column: span 2 / 4;
+    -webkit-grid-row: 3 / span 5;
+}
+.gridItemWithAfterSpan {
+    -webkit-grid-column: 2 span / 4;
+    -webkit-grid-row: 3 / 5 span;
+}
+.gridItemWith2OnlySpan {
+    -webkit-grid-column: span / span;
+    -webkit-grid-row: span / span;
+}
</ins><span class=3D"cx"> .gridItemWith2Auto {
</span><span class=3D"cx">     -webkit-grid-column: auto / auto;
</span><span class=3D"cx">     -webkit-grid-row: auto / auto;
</span><span class=3D"lines">@@ -50,6 +62,9 @@
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWith2Integer&quo=
t; id=3D&quot;gridItemWith2IntegerElement&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithNegativePosi=
tiveInteger&quot; id=3D&quot;gridItemWithNegativePositiveIntegerElement&q=
uot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWith2Auto&quot; =
id=3D&quot;gridItemWith2AutoElement&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div class=3D&quot;gridItemWithBeforeSpan&quot; id=3D&quo=
t;gridItemWithBeforeSpanElement&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWithAfterSpan&quot; id=3D&quot;gridItemWit=
hAfterSpanElement&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWith2OnlySpan&quot; id=3D&quot;gridItemWit=
h2OnlySpanElement&quot;&gt;&lt;/div&gt;
</ins><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithNegativePosit=
iveInteger gridItemWithBothLongHand&quot; id=3D&quot;gridItemWithBothShor=
tLongHandElement&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithNoSpace&quot=
; id=3D&quot;gridItemWithNoSpaceElement&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;script&gt;
</span><span class=3D"lines">@@ -104,6 +119,30 @@
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativePositiveIntegerElement, '').getPropertyValue('-webkit-grid-row-=
start')&quot;, &quot;'-8'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativePositiveIntegerElement, '').getPropertyValue('-webkit-grid-row-=
end')&quot;, &quot;'5'&quot;);
</span><span class=3D"cx">=20
</span><ins>+    var gridItemWithBeforeSpanElement =3D document.getElemen=
tById(&quot;gridItemWithBeforeSpanElement&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-column')&quot;, &quot;'span 2 / 4'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-column-start')&quot;, &quot;'span 2'&quot;)=
;
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-column-end')&quot;, &quot;'4'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-row')&quot;, &quot;'3 / span 5'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-row-start')&quot;, &quot;'3'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpanElement, '').g=
etPropertyValue('-webkit-grid-row-end')&quot;, &quot;'span 5'&quot;);
+
+    var gridItemWithAfterSpanElement =3D document.getElementById(&quot;g=
ridItemWithAfterSpanElement&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-column')&quot;, &quot;'span 2 / 4'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-column-start')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-column-end')&quot;, &quot;'4'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-row')&quot;, &quot;'3 / span 5'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-row-start')&quot;, &quot;'3'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpanElement, '').ge=
tPropertyValue('-webkit-grid-row-end')&quot;, &quot;'span 5'&quot;);
+
+    var gridItemWith2OnlySpanElement =3D document.getElementById(&quot;g=
ridItemWith2OnlySpanElement&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-column')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-column-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-column-end')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-row')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-row-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWith2OnlySpanElement, '').ge=
tPropertyValue('-webkit-grid-row-end')&quot;, &quot;'auto'&quot;);
+
</ins><span class=3D"cx">     var gridItemWith2AutoElement =3D document.g=
etElementById(&quot;gridItemWith2AutoElement&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
th2AutoElement, '').getPropertyValue('-webkit-grid-column')&quot;, &quot;=
'auto / auto'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
th2AutoElement, '').getPropertyValue('-webkit-grid-column-start')&quot;, =
&quot;'auto'&quot;);
</span><span class=3D"lines">@@ -185,6 +224,17 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     element =3D document.createElement(&quot;d=
iv&quot;);
</span><span class=3D"cx">     document.body.appendChild(element);
</span><ins>+    element.style.webkitGridColumn =3D &quot;span 5 / 5&quot=
;;
+    element.style.webkitGridRow =3D &quot;4 / span 4&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'span 5 / 5'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'span 5'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'5'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'4 / span 4'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'4'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'span 4'&quot;);
+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
</ins><span class=3D"cx">     element.style.webkitGridColumn =3D &quot;-5=
 / 5&quot;;
</span><span class=3D"cx">     element.style.webkitGridRow =3D &quot;4 / =
-4&quot;;
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-column')&quot;, &quot;'-5 / 5'&quot;);
</span><span class=3D"lines">@@ -216,6 +266,17 @@
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-row-start')&quot;, &quot;'auto'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-row-end')&quot;, &quot;'8'&quot;);
</span><span class=3D"cx">=20
</span><ins>+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.webkitGridColumn =3D &quot;span / 3&quot;;
+    element.style.webkitGridRow =3D &quot;5 / span&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'span 1 / 3'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'3'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'5 / span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'5'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'span 1'&quot;);
+
</ins><span class=3D"cx">     debug(&quot;&quot;);
</span><span class=3D"cx">     debug(&quot;Test setting grid-column and g=
rid-row back to 'auto' through JS&quot;);
</span><span class=3D"cx">     element.style.webkitGridColumn =3D &quot;1=
8 / 19&quot;;
</span><span class=3D"lines">@@ -326,6 +387,51 @@
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-row')&quot;, &quot;'auto / auto'&quot;)=
;
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-row-start')&quot;, &quot;'auto'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-row-end')&quot;, &quot;'auto'&quot;);
</span><ins>+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.webkitGridColumn =3D &quot;span span / span span&quot;=
;
+    element.style.webkitGridRow =3D &quot;span span / span span&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'auto'&quot;);
+
+    // Negative integer or 0 are invalid.
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.webkitGridColumn =3D &quot;span -1 / -2 span&quot;;
+    element.style.webkitGridRow =3D &quot;-3 span / span -4&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'auto'&quot;);
+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.webkitGridColumn =3D &quot;0 span / span 0&quot;;
+    element.style.webkitGridRow =3D &quot;span 0 / 0 span&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'auto'&quot;);
+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.webkitGridColumn =3D &quot;5 span / span 2&quot;;
+    element.style.webkitGridRow =3D &quot;span 4 / 3 span&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'auto / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'auto'&quot;);
</ins><span class=3D"cx"> &lt;/script&gt;
</span><span class=3D"cx"> &lt;script src=3D&quot;../js/resources/js-test=
-post.js&quot;&gt;&lt;/script&gt;
</span><span class=3D"cx"> &lt;/body&gt;
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemendaftergetsetexpectedt=
xt"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-end-after-get-set-expected.txt (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-end-after-get-set-expected.txt	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-ex=
pected.txt	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -16,6 +16,18 @@
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-column') is 'auto / -10'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-row-end') is '-15'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-row') is 'auto / -15'
</span><ins>+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropert=
yValue('-webkit-grid-column-end') is 'span 2'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-column') is 'auto / span 2'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-row-end') is 'span 9'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-row') is 'auto / span 9'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-column-end') is 'span 2'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-column') is 'auto / span 2'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-row-end') is 'span 9'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-row') is 'auto / span 9'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-column-end') is 'span 1'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-column') is 'auto / span 1'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-row-end') is 'span 1'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-row') is 'auto / span 1'
</ins><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement, =
'').getPropertyValue('-webkit-grid-column-end') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement,=
 '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement,=
 '').getPropertyValue('-webkit-grid-row-end') is 'auto'
</span><span class=3D"lines">@@ -36,6 +48,10 @@
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column') is 'auto / -55'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-end') is '-40'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row') is 'auto / -40'
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit=
-grid-column-end') is 'span 7'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
') is 'auto / span 7'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-en=
d') is 'span 2'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'auto / span 2'
</ins><span class=3D"cx"> PASS getComputedStyle(element, '').getPropertyV=
alue('-webkit-grid-column-end') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-end') is 'auto'
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemendaftergetsethtml"></a=
>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-end-after-get-set.html (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-end-after-get-set.html	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.ht=
ml	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -14,6 +14,18 @@
</span><span class=3D"cx">     -webkit-grid-column-end: -10;
</span><span class=3D"cx">     -webkit-grid-row-end: -15;
</span><span class=3D"cx"> }
</span><ins>+.gridItemWithBeforeSpan {
+    -webkit-grid-column-end: span 2;
+    -webkit-grid-row-end: span 9;
+}
+.gridItemWithAfterSpan {
+    -webkit-grid-column-end: 2 span;
+    -webkit-grid-row-end: 9 span;
+}
+.gridItemWithOnlySpan {
+    -webkit-grid-column-end: span;
+    -webkit-grid-row-end: span;
+}
</ins><span class=3D"cx"> .gridItemWithAuto {
</span><span class=3D"cx">     -webkit-grid-column-end: auto;
</span><span class=3D"cx">     -webkit-grid-row-end: auto;
</span><span class=3D"lines">@@ -26,6 +38,9 @@
</span><span class=3D"cx"> &lt;div id=3D&quot;gridElement&quot;&gt;&lt;/d=
iv&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithPositiveInte=
ger&quot; id=3D&quot;gridItemWithPositiveInteger&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithNegativeInte=
ger&quot; id=3D&quot;gridItemWithNegativeInteger&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div class=3D&quot;gridItemWithBeforeSpan&quot; id=3D&quo=
t;gridItemWithBeforeSpan&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWithAfterSpan&quot; id=3D&quot;gridItemWit=
hAfterSpan&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWithOnlySpan&quot; id=3D&quot;gridItemWith=
OnlySpan&quot;&gt;&lt;/div&gt;
</ins><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithAuto&quot; id=
=3D&quot;gridItemWithAutoElement&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;script&gt;
</span><span class=3D"cx">     description('Test that setting and getting=
 grid-column-end and grid-row-end works as expected');
</span><span class=3D"lines">@@ -49,6 +64,24 @@
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativeInteger, '').getPropertyValue('-webkit-grid-row-end')&quot;, &q=
uot;'-15'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativeInteger, '').getPropertyValue('-webkit-grid-row')&quot;, &quot;=
'auto / -15'&quot;);
</span><span class=3D"cx">=20
</span><ins>+    var gridItemWithBeforeSpan =3D document.getElementById(&=
quot;gridItemWithBeforeSpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-column-end')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-column')&quot;, &quot;'auto / span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-row-end')&quot;, &quot;'span 9'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-row')&quot;, &quot;'auto / span 9'&quot;);
+
+    var gridItemWithAfterSpan =3D document.getElementById(&quot;gridItem=
WithAfterSpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-column-end')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-column')&quot;, &quot;'auto / span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-row-end')&quot;, &quot;'span 9'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-row')&quot;, &quot;'auto / span 9'&quot;);
+
+    var gridItemWithOnlySpan =3D document.getElementById(&quot;gridItemW=
ithOnlySpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-column-end')&quot;, &quot;'span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-column')&quot;, &quot;'auto / span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-row-end')&quot;, &quot;'span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-row')&quot;, &quot;'auto / span 1'&quot;);
+
</ins><span class=3D"cx">     var gridItemWithAutoElement =3D document.ge=
tElementById(&quot;gridItemWithAutoElement&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thAutoElement, '').getPropertyValue('-webkit-grid-column-end')&quot;, &qu=
ot;'auto'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thAutoElement, '').getPropertyValue('-webkit-grid-column')&quot;, &quot;'=
auto / auto'&quot;);
</span><span class=3D"lines">@@ -84,6 +117,15 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     element =3D document.createElement(&quot;d=
iv&quot;);
</span><span class=3D"cx">     document.body.appendChild(element);
</span><ins>+    element.style.webkitGridColumnEnd =3D &quot;span 7&quot;=
;
+    element.style.webkitGridRowEnd =3D &quot;span 2&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-end')&quot;, &quot;'span 7'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'auto / span 7'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-end')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'auto / span 2'&quot;);
+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
</ins><span class=3D"cx">     element.style.webkitGridColumnEnd =3D &quot=
;auto&quot;;
</span><span class=3D"cx">     element.style.webkitGridRowEnd =3D &quot;a=
uto&quot;;
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-column-end')&quot;, &quot;'auto'&quot;)=
;
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemstartbeforegetsetexpect=
edtxt"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-start-before-get-set-expected.txt (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-start-before-get-set-expected.txt	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set=
-expected.txt	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -16,6 +16,18 @@
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-column') is '-10 / auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-row-start') is '-15'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithNegativeInte=
ger, '').getPropertyValue('-webkit-grid-row') is '-15 / auto'
</span><ins>+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropert=
yValue('-webkit-grid-column-start') is 'span 2'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-column') is 'span 2 / auto'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-row-start') is 'span 8'
+PASS getComputedStyle(gridItemWithBeforeSpan, '').getPropertyValue('-web=
kit-grid-row') is 'span 8 / auto'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-column-start') is 'span 2'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-column') is 'span 2 / auto'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-row-start') is 'span 8'
+PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('-webk=
it-grid-row') is 'span 8 / auto'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-column-start') is 'span 1'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-column') is 'span 1 / auto'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-row-start') is 'span 1'
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('-webki=
t-grid-row') is 'span 1 / auto'
</ins><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement, =
'').getPropertyValue('-webkit-grid-column-start') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement,=
 '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(gridItemWithAutoElement,=
 '').getPropertyValue('-webkit-grid-row-start') is 'auto'
</span><span class=3D"lines">@@ -36,6 +48,10 @@
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column') is '-55 / auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-start') is '-40'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row') is '-40 / auto'
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit=
-grid-column-start') is 'span 3'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column=
') is 'span 3 / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row-st=
art') is 'span 20'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') =
is 'span 20 / auto'
</ins><span class=3D"cx"> PASS getComputedStyle(element, '').getPropertyV=
alue('-webkit-grid-column-start') is 'auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-column') is 'auto / auto'
</span><span class=3D"cx"> PASS getComputedStyle(element, '').getProperty=
Value('-webkit-grid-row-start') is 'auto'
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemstartbeforegetsethtml">=
</a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layo=
ut/grid-item-start-before-get-set.html (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-start-before-get-set.html	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set=
.html	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -14,6 +14,18 @@
</span><span class=3D"cx">     -webkit-grid-column-start: -10;
</span><span class=3D"cx">     -webkit-grid-row-start: -15;
</span><span class=3D"cx"> }
</span><ins>+.gridItemWithBeforeSpan {
+    -webkit-grid-column-start: span 2;
+    -webkit-grid-row-start: span 8;
+}
+.gridItemWithAfterSpan {
+    -webkit-grid-column-start: 2 span;
+    -webkit-grid-row-start: 8 span;
+}
+.gridItemWithOnlySpan {
+    -webkit-grid-column-start: span;
+    -webkit-grid-row-start: span;
+}
</ins><span class=3D"cx"> .gridItemWithAuto {
</span><span class=3D"cx">     -webkit-grid-column-start: auto;
</span><span class=3D"cx">     -webkit-grid-row-start: auto;
</span><span class=3D"lines">@@ -26,6 +38,9 @@
</span><span class=3D"cx"> &lt;div id=3D&quot;gridElement&quot;&gt;&lt;/d=
iv&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithPositiveInte=
ger&quot; id=3D&quot;gridItemWithPositiveInteger&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithNegativeInte=
ger&quot; id=3D&quot;gridItemWithNegativeInteger&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div class=3D&quot;gridItemWithBeforeSpan&quot; id=3D&quo=
t;gridItemWithBeforeSpan&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWithAfterSpan&quot; id=3D&quot;gridItemWit=
hAfterSpan&quot;&gt;&lt;/div&gt;
+&lt;div class=3D&quot;gridItemWithOnlySpan&quot; id=3D&quot;gridItemWith=
OnlySpan&quot;&gt;&lt;/div&gt;
</ins><span class=3D"cx"> &lt;div class=3D&quot;gridItemWithAuto&quot; id=
=3D&quot;gridItemWithAutoElement&quot;&gt;&lt;/div&gt;
</span><span class=3D"cx"> &lt;script&gt;
</span><span class=3D"cx">     description('Test that setting and getting=
 grid-column-start and grid-row-start works as expected');
</span><span class=3D"lines">@@ -49,6 +64,24 @@
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativeInteger, '').getPropertyValue('-webkit-grid-row-start')&quot;, =
&quot;'-15'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thNegativeInteger, '').getPropertyValue('-webkit-grid-row')&quot;, &quot;=
'-15 / auto'&quot;);
</span><span class=3D"cx">=20
</span><ins>+    var gridItemWithBeforeSpan =3D document.getElementById(&=
quot;gridItemWithBeforeSpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-column-start')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-column')&quot;, &quot;'span 2 / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-row-start')&quot;, &quot;'span 8'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithBeforeSpan, '').getPrope=
rtyValue('-webkit-grid-row')&quot;, &quot;'span 8 / auto'&quot;);
+
+    var gridItemWithAfterSpan =3D document.getElementById(&quot;gridItem=
WithAfterSpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-column-start')&quot;, &quot;'span 2'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-column')&quot;, &quot;'span 2 / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-row-start')&quot;, &quot;'span 8'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithAfterSpan, '').getProper=
tyValue('-webkit-grid-row')&quot;, &quot;'span 8 / auto'&quot;);
+
+    var gridItemWithOnlySpan =3D document.getElementById(&quot;gridItemW=
ithOnlySpan&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-column-start')&quot;, &quot;'span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-column')&quot;, &quot;'span 1 / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-row-start')&quot;, &quot;'span 1'&quot;);
+    shouldBe(&quot;getComputedStyle(gridItemWithOnlySpan, '').getPropert=
yValue('-webkit-grid-row')&quot;, &quot;'span 1 / auto'&quot;);
+
</ins><span class=3D"cx">     var gridItemWithAutoElement =3D document.ge=
tElementById(&quot;gridItemWithAutoElement&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thAutoElement, '').getPropertyValue('-webkit-grid-column-start')&quot;, &=
quot;'auto'&quot;);
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(gridItemWi=
thAutoElement, '').getPropertyValue('-webkit-grid-column')&quot;, &quot;'=
auto / auto'&quot;);
</span><span class=3D"lines">@@ -84,6 +117,15 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     element =3D document.createElement(&quot;d=
iv&quot;);
</span><span class=3D"cx">     document.body.appendChild(element);
</span><ins>+    element.style.webkitGridColumnStart =3D &quot;span 3&quo=
t;;
+    element.style.webkitGridRowStart =3D &quot;span 20&quot;;
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column-start')&quot;, &quot;'span 3'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-column')&quot;, &quot;'span 3 / auto'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row-start')&quot;, &quot;'span 20'&quot;);
+    shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webk=
it-grid-row')&quot;, &quot;'span 20 / auto'&quot;);
+
+    element =3D document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
</ins><span class=3D"cx">     element.style.webkitGridColumnStart =3D &qu=
ot;auto&quot;;
</span><span class=3D"cx">     element.style.webkitGridRowStart =3D &quot=
;auto&quot;;
</span><span class=3D"cx">     shouldBe(&quot;getComputedStyle(element, '=
').getPropertyValue('-webkit-grid-column-start')&quot;, &quot;'auto'&quot=
;);
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1537=
47 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog	2013-08-06 11:08:=
03 UTC (rev 153747)
+++ trunk/Source/WebCore/ChangeLog	2013-08-06 11:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -1,3 +1,36 @@
</span><ins>+2013-06-26  Sergio Villar Senin  &lt;svillar at igalia.com&gt;
+
+        [CSS Grid Layout] Add support for parsing &lt;grid-line&gt; that=
 includes a 'span'
+        https://bugs.webkit.org/show_bug.cgi?id=3D118051
+
+        Reviewed by Andreas Kling.
+
+        From Blink r148766 by &lt;jchaffraix at chromium.org&gt;
+
+        This adds the parsing, style resolution and getComputedStyle bit=
s
+        to our code. The rendering code was not made aware of the new ty=
pe
+        of GridPosition yet.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForGridPosition):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseGridPosition):
+        * css/CSSParser.h:
+        * css/CSSValueKeywords.in:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::adjustRenderStyle):
+        (WebCore::StyleResolver::adjustGridItemPosition):
+        (WebCore::createGridPosition):
+        * css/StyleResolver.h:
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::resolveGridPositionFromStyle):
+        * rendering/style/GridPosition.h:
+        (WebCore::GridPosition::isInteger):
+        (WebCore::GridPosition::isSpan):
+        (WebCore::GridPosition::setSpanPosition):
+        (WebCore::GridPosition::spanPosition):
+
</ins><span class=3D"cx"> 2013-06-25  Sergio Villar Senin  &lt;svillar at ig=
alia.com&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         [CSS Grid Layout] Rename grid placemen=
t properties
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputed=
StyleDeclaration.cpp (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclara=
tion.cpp	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2013-08-06 1=
1:45:58 UTC (rev 153748)
</span><span class=3D"lines">@@ -1100,8 +1100,15 @@
</span><span class=3D"cx">     if (position.isAuto())
</span><span class=3D"cx">         return cssValuePool().createIdentifier=
Value(CSSValueAuto);
</span><span class=3D"cx">=20
</span><del>-    return cssValuePool().createValue(position.integerPositi=
on(), CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+    if (position.isInteger())
+        return cssValuePool().createValue(position.integerPosition(), CS=
SPrimitiveValue::CSS_NUMBER);
+
+    RefPtr&lt;CSSValueList&gt; list =3D CSSValueList::createSpaceSeparat=
ed();
+    list-&gt;append(cssValuePool().createIdentifierValue(CSSValueSpan));
+    list-&gt;append(cssValuePool().createValue(position.spanPosition(), =
CSSPrimitiveValue::CSS_NUMBER));
+    return list.release();
</ins><span class=3D"cx"> }
</span><ins>+
</ins><span class=3D"cx"> static PassRefPtr&lt;CSSValue&gt; createTransit=
ionPropertyValue(const Animation* animation)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     RefPtr&lt;CSSValue&gt; propertyValue;
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSParsercpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.c=
pp (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSParser.cpp	2013-08-0=
6 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2013-08-06 11:45:58 UTC (rev 1=
53748)
</span><span class=3D"lines">@@ -2684,7 +2684,7 @@
</span><span class=3D"cx">         if (!cssGridLayoutEnabled())
</span><span class=3D"cx">             return false;
</span><span class=3D"cx">=20
</span><del>-        validPrimitive =3D id =3D=3D CSSValueAuto || (validU=
nit(value, FInteger) &amp;&amp; value-&gt;fValue);
</del><ins>+        parsedValue =3D parseGridPosition();
</ins><span class=3D"cx">         break;
</span><span class=3D"cx">=20
</span><span class=3D"cx">     case CSSPropertyWebkitGridColumn:
</span><span class=3D"lines">@@ -4772,6 +4772,50 @@
</span><span class=3D"cx">     return false;
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+PassRefPtr&lt;CSSValue&gt; CSSParser::parseGridPosition()
+{
+    CSSParserValue* value =3D m_valueList-&gt;current();
+    if (value-&gt;id =3D=3D CSSValueAuto) {
+        m_valueList-&gt;next();
+        return cssValuePool().createIdentifierValue(CSSValueAuto);
+    }
+
+    RefPtr&lt;CSSPrimitiveValue&gt; numericValue;
+    bool hasSeenSpanKeyword =3D false;
+
+    if (validUnit(value, FInteger) &amp;&amp; value-&gt;fValue) {
+        numericValue =3D createPrimitiveNumericValue(value);
+        value =3D m_valueList-&gt;next();
+        if (value &amp;&amp; value-&gt;id =3D=3D CSSValueSpan) {
+            hasSeenSpanKeyword =3D true;
+            m_valueList-&gt;next();
+        }
+    } else if (value-&gt;id =3D=3D CSSValueSpan) {
+        hasSeenSpanKeyword =3D true;
+        value =3D m_valueList-&gt;next();
+        if (value &amp;&amp; (validUnit(value, FInteger) &amp;&amp; valu=
e-&gt;fValue)) {
+            numericValue =3D createPrimitiveNumericValue(value);
+            m_valueList-&gt;next();
+        }
+    }
+
+    if (!hasSeenSpanKeyword)
+        return numericValue.release();
+
+    if (!numericValue &amp;&amp; hasSeenSpanKeyword)
+        return cssValuePool().createIdentifierValue(CSSValueSpan);
+
+    // Negative numbers are not allowed for span (but are for &lt;intege=
r&gt;).
+    if (numericValue &amp;&amp; numericValue-&gt;getIntValue() &lt; 0)
+        return 0;
+
+    RefPtr&lt;CSSValueList&gt; values =3D CSSValueList::createSpaceSepar=
ated();
+    values-&gt;append(cssValuePool().createIdentifierValue(CSSValueSpan)=
);
+    if (numericValue)
+        values-&gt;append(numericValue.release());
+    return values.release();
+}
+
</ins><span class=3D"cx"> bool CSSParser::parseGridItemPositionShorthand(=
CSSPropertyID shorthandId, bool important)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     ShorthandScope scope(this, shorthandId);
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSParserh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h=
 (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSParser.h	2013-08-06 =
11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/CSSParser.h	2013-08-06 11:45:58 UTC (rev 153=
748)
</span><span class=3D"lines">@@ -164,6 +164,7 @@
</span><span class=3D"cx">     bool parseAnimationShorthand(bool importan=
t);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     bool cssGridLayoutEnabled() const;
</span><ins>+    PassRefPtr&lt;CSSValue&gt; parseGridPosition();
</ins><span class=3D"cx">     bool parseGridItemPositionShorthand(CSSProp=
ertyID, bool important);
</span><span class=3D"cx">     bool parseGridTrackList(CSSPropertyID, boo=
l important);
</span><span class=3D"cx">     PassRefPtr&lt;CSSPrimitiveValue&gt; parseG=
ridTrackSize();
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKey=
words.in (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSValueKeywords.in	201=
3-08-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2013-08-06 11:45:58 UTC =
(rev 153748)
</span><span class=3D"lines">@@ -1022,6 +1022,9 @@
</span><span class=3D"cx"> no-drag
</span><span class=3D"cx"> #endif
</span><span class=3D"cx">=20
</span><ins>+// -webkit-grid-{column-start|column-end|row-start|row-end}
+span
+
</ins><span class=3D"cx"> #if defined(ENABLE_CSS3_TEXT) &amp;&amp; ENABLE=
_CSS3_TEXT
</span><span class=3D"cx"> // text-indent
</span><span class=3D"cx"> -webkit-each-line
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssStyleResolvercpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolv=
er.cpp (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/StyleResolver.cpp	2013-=
08-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2013-08-06 11:45:58 UTC (r=
ev 153748)
</span><span class=3D"lines">@@ -1531,6 +1531,8 @@
</span><span class=3D"cx">     if (e &amp;&amp; e-&gt;hasTagName(iframeTa=
g) &amp;&amp; style-&gt;display() =3D=3D INLINE &amp;&amp; toHTMLIFrameEl=
ement(e)-&gt;shouldDisplaySeamlessly())
</span><span class=3D"cx">         style-&gt;setDisplay(INLINE_BLOCK);
</span><span class=3D"cx">=20
</span><ins>+    adjustGridItemPosition(style);
+
</ins><span class=3D"cx"> #if ENABLE(SVG)
</span><span class=3D"cx">     if (e &amp;&amp; e-&gt;isSVGElement()) {
</span><span class=3D"cx">         // Spec: http://www.w3.org/TR/SVG/mask=
ing.html#OverflowProperty
</span><span class=3D"lines">@@ -1556,6 +1558,20 @@
</span><span class=3D"cx"> #endif
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+void StyleResolver::adjustGridItemPosition(RenderStyle* styl=
e) const
+{
+    // If opposing grid-placement properties both specify a grid span, t=
hey both compute to =E2=80=98auto=E2=80=99.
+    if (style-&gt;gridItemColumnStart().isSpan() &amp;&amp; style-&gt;gr=
idItemColumnEnd().isSpan()) {
+        style-&gt;setGridItemColumnStart(GridPosition());
+        style-&gt;setGridItemColumnEnd(GridPosition());
+    }
+
+    if (style-&gt;gridItemRowStart().isSpan() &amp;&amp; style-&gt;gridI=
temRowEnd().isSpan()) {
+        style-&gt;setGridItemRowStart(GridPosition());
+        style-&gt;setGridItemRowEnd(GridPosition());
+    }
+}
+
</ins><span class=3D"cx"> bool StyleResolver::checkRegionStyle(Element* r=
egionElement)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     // FIXME (BUG 72472): We don't add @-webki=
t-region rules of scoped style sheets for the moment,
</span><span class=3D"lines">@@ -2108,16 +2124,30 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> static bool createGridPosition(CSSValue* value=
, GridPosition&amp; position)
</span><span class=3D"cx"> {
</span><del>-    // For now, we only accept: &lt;integer&gt; | 'auto'
-    if (!value-&gt;isPrimitiveValue())
-        return false;
</del><ins>+    // For now, we only accept: 'auto' | &lt;integer&gt; | sp=
an &amp;&amp; &lt;integer&gt;?
+    if (value-&gt;isPrimitiveValue()) {
+        CSSPrimitiveValue* primitiveValue =3D static_cast&lt;CSSPrimitiv=
eValue*&gt;(value);
+        if (primitiveValue-&gt;getValueID() =3D=3D CSSValueAuto)
+            return true;
</ins><span class=3D"cx">=20
</span><del>-    CSSPrimitiveValue* primitiveValue =3D static_cast&lt;CSS=
PrimitiveValue*&gt;(value);
-    if (primitiveValue-&gt;getValueID() =3D=3D CSSValueAuto)
</del><ins>+        if (primitiveValue-&gt;getValueID() =3D=3D CSSValueSp=
an) {
+            // If the &lt;integer&gt; is omitted, it defaults to '1'.
+            position.setSpanPosition(1);
+            return true;
+        }
+
+        ASSERT(primitiveValue-&gt;isNumber());
+        position.setIntegerPosition(primitiveValue-&gt;getIntValue());
</ins><span class=3D"cx">         return true;
</span><ins>+    }
</ins><span class=3D"cx">=20
</span><del>-    ASSERT_WITH_SECURITY_IMPLICATION(primitiveValue-&gt;isNu=
mber());
-    position.setIntegerPosition(primitiveValue-&gt;getIntValue());
</del><ins>+    ASSERT_WITH_SECURITY_IMPLICATION(value-&gt;isValueList())=
;
+    CSSValueList* values =3D static_cast&lt;CSSValueList*&gt;(value);
+    ASSERT(values-&gt;length() =3D=3D 2);
+    ASSERT_WITH_SECURITY_IMPLICATION(values-&gt;itemWithoutBoundsCheck(1=
)-&gt;isPrimitiveValue());
+    CSSPrimitiveValue* numericValue =3D static_cast&lt;CSSPrimitiveValue=
*&gt;(values-&gt;itemWithoutBoundsCheck(1));
+    ASSERT(numericValue-&gt;isNumber());
+    position.setSpanPosition(numericValue-&gt;getIntValue());
</ins><span class=3D"cx">     return true;
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssStyleResolverh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolv=
er.h (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/StyleResolver.h	2013-08=
-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/css/StyleResolver.h	2013-08-06 11:45:58 UTC (rev=
 153748)
</span><span class=3D"lines">@@ -377,6 +377,7 @@
</span><span class=3D"cx">     void checkForZoomChange(RenderStyle*, Rend=
erStyle* parentStyle);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     void adjustRenderStyle(RenderStyle* styleT=
oAdjust, RenderStyle* parentStyle, Element*);
</span><ins>+    void adjustGridItemPosition(RenderStyle* styleToAdjust) =
const;
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     bool fastRejectSelector(const RuleData&amp=
;) const;
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/rendering/Rende=
rGrid.cpp (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp	20=
13-08-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp	2013-08-06 11:45:58 UTC=
 (rev 153748)
</span><span class=3D"lines">@@ -772,6 +772,10 @@
</span><span class=3D"cx">         // 'auto' depends on the opposite posi=
tion for resolution (e.g. grid-row: auto / 1).
</span><span class=3D"cx">         ASSERT_NOT_REACHED();
</span><span class=3D"cx">         return 0;
</span><ins>+    case SpanPosition:
+        // FIXME: Handle span positions.
+        ASSERT_NOT_REACHED();
+        return 0;
</ins><span class=3D"cx">     }
</span><span class=3D"cx">     ASSERT_NOT_REACHED();
</span><span class=3D"cx">     return 0;
</span></span></pre></div>
<a id=3D"trunkSourceWebCorerenderingstyleGridPositionh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/rendering/style=
/GridPosition.h (153747 =3D> 153748)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/rendering/style/GridPositio=
n.h	2013-08-06 11:08:03 UTC (rev 153747)
+++ trunk/Source/WebCore/rendering/style/GridPosition.h	2013-08-06 11:45:=
58 UTC (rev 153748)
</span><span class=3D"lines">@@ -35,7 +35,8 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> enum GridPositionType {
</span><span class=3D"cx">     AutoPosition,
</span><del>-    IntegerPosition
</del><ins>+    IntegerPosition,
+    SpanPosition
</ins><span class=3D"cx"> };
</span><span class=3D"cx">=20
</span><span class=3D"cx"> class GridPosition {
</span><span class=3D"lines">@@ -50,6 +51,8 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     GridPositionType type() const { return m_t=
ype; }
</span><span class=3D"cx">     bool isAuto() const { return m_type =3D=3D=
 AutoPosition; }
</span><ins>+    bool isInteger() const { return m_type =3D=3D IntegerPos=
ition; }
+    bool isSpan() const { return m_type =3D=3D SpanPosition; }
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     void setIntegerPosition(int position)
</span><span class=3D"cx">     {
</span><span class=3D"lines">@@ -57,12 +60,27 @@
</span><span class=3D"cx">         m_integerPosition =3D position;
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><ins>+    // 'span' values cannot be negative, yet we reuse the &l=
t;integer&gt; position which can
+    // be. This means that we have to convert the span position to an in=
teger, losing
+    // some precision here. It shouldn't be an issue in practice though.
+    void setSpanPosition(int position)
+    {
+        m_type =3D SpanPosition;
+        m_integerPosition =3D position;
+    }
+
</ins><span class=3D"cx">     int integerPosition() const
</span><span class=3D"cx">     {
</span><span class=3D"cx">         ASSERT(type() =3D=3D IntegerPosition);
</span><span class=3D"cx">         return m_integerPosition;
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><ins>+    int spanPosition() const
+    {
+        ASSERT(type() =3D=3D SpanPosition);
+        return m_integerPosition;
+    }
+
</ins><span class=3D"cx">     bool operator=3D=3D(const GridPosition&amp;=
 other) const
</span><span class=3D"cx">     {
</span><span class=3D"cx">         return m_type =3D=3D other.m_type &amp=
;&amp; m_integerPosition =3D=3D other.m_integerPosition;
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list