<!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>[183370] 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/183370">183370</a></dd>
<dt>Author</dt> <dd>jfernandez@igalia.com</dd>
<dt>Date</dt> <dd>2015-04-26 15:44:11 -0700 (Sun, 26 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[CSS Grid Layout] Support for align-self and align-items in grid layout
https://bugs.webkit.org/show_bug.cgi?id=133225
Reviewed by Darin Adler.
Source/WebCore:
Implementation of align-self and align-items properties for grid. It supports
different writing-modes and direction. Margins, borders and paddings are also
considered when computing the final position and stretched size.
Overflow handling is still missing and will be added when implemented row-axis
alignment support.
Test: fast/css-grid-layout/grid-align.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::computeOverflowAlignmentOffset):
(WebCore::RenderGrid::endOfRowForChild):
(WebCore::RenderGrid::startOfRowForChild):
(WebCore::RenderGrid::centeredRowPositionForChild):
(WebCore::marginWidthForChild):
(WebCore::marginHeightForChild):
(WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
(WebCore::RenderGrid::needToStretchChildLogicalHeight):
(WebCore::RenderGrid::marginLogicalHeightForChild):
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::rowPositionForChild):
(WebCore::RenderGrid::findChildLogicalPosition):
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/RenderGrid.h:
LayoutTests:
Implementation of align-self and align-items properties ifor grid.
Several layout tests were touched for adapting them to the new grid item's
column-axis position when using RTL direction.
* fast/css-grid-layout/grid-align-expected.txt: Added.
* fast/css-grid-layout/grid-align.html: Added.
* fast/css-grid-layout/grid-element-border-grid-item.html:
* fast/css-grid-layout/grid-element-border-padding-grid-item.html:
* fast/css-grid-layout/grid-element-padding-grid-item.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html:
* fast/css-grid-layout/grid-item-margin-resolution.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridelementbordergriditemhtml">trunk/LayoutTests/fast/css-grid-layout/grid-element-border-grid-item.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridelementborderpaddinggriditemhtml">trunk/LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridelementpaddinggriditemhtml">trunk/LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgriditemmarginautocolumnsrowshorizontalrtlexpectedhtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgriditemmarginautocolumnsrowsverticalrtlexpectedhtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgriditemmarginresolutionhtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridh">trunk/Source/WebCore/rendering/RenderGrid.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridalignexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-align-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridalignhtml">trunk/LayoutTests/fast/css-grid-layout/grid-align.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/ChangeLog        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-04-26 Javier Fernandez <jfernandez@igalia.com>
+
+ [CSS Grid Layout] Support for align-self and align-items in grid layout
+ https://bugs.webkit.org/show_bug.cgi?id=133225
+
+ Reviewed by Darin Adler.
+
+ Implementation of align-self and align-items properties ifor grid.
+
+ Several layout tests were touched for adapting them to the new grid item's
+ column-axis position when using RTL direction.
+
+ * fast/css-grid-layout/grid-align-expected.txt: Added.
+ * fast/css-grid-layout/grid-align.html: Added.
+ * fast/css-grid-layout/grid-element-border-grid-item.html:
+ * fast/css-grid-layout/grid-element-border-padding-grid-item.html:
+ * fast/css-grid-layout/grid-element-padding-grid-item.html:
+ * fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html:
+ * fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html:
+ * fast/css-grid-layout/grid-item-margin-resolution.html:
+
</ins><span class="cx"> 2015-04-26 Doug Russell <d_russell@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: richer text change notifications (142719)
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridalignexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-align-expected.txt (0 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-align-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-align-expected.txt        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+This test checks that the align-self property is applied correctly.
+
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridalignhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-align.html (0 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-align.html         (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-align.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -0,0 +1,287 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<link href="resources/grid.css" rel="stylesheet">
+<script src="../../resources/check-layout.js"></script>
+<style>
+body {
+ margin: 0;
+}
+
+.grid {
+ -webkit-grid-template-columns: 100px 100px;
+ -webkit-grid-template-rows: 200px 200px;
+ width: -webkit-fit-content;
+ margin-bottom: 20px;
+}
+
+.cell {
+ width: 20px;
+ height: 40px;
+}
+
+.item {
+ width: 8px;
+ height: 16px;
+ background: black;
+}
+
+.alignSelfAuto {
+ align-self: auto;
+}
+
+.alignSelfStretch {
+ align-self: stretch;
+}
+
+.alignSelfStart {
+ align-self: start;
+}
+
+.alignSelfEnd {
+ align-self: end;
+}
+
+.alignSelfCenter {
+ align-self: center;
+}
+
+.alignSelfRight {
+ align-self: right;
+}
+
+.alignSelfLeft {
+ align-self: left;
+}
+
+.alignSelfFlexStart {
+ align-self: flex-start;
+}
+
+.alignSelfFlexEnd {
+ align-self: flex-end;
+}
+
+.alignSelfSelfStart {
+ align-self: self-start;
+}
+
+.alignSelfSelfEnd {
+ align-self: self-end;
+}
+
+.alignItemsCenter {
+ align-items: center;
+}
+
+</style>
+</head>
+<body onload="checkLayout('.grid')">
+
+<p>This test checks that the align-self property is applied correctly.</p>
+
+<div style="position: relative">
+ <div class="grid" data-expected-width="200" data-expected-height="400">
+ <div class="alignSelfStretch firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
+ <div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="100" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="0" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfRight secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfLeft secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid" data-expected-width="200" data-expected-height="400">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- Default alignment and initial values. -->
+<div style="position: relative">
+ <div class="grid alignItemsCenter" data-expected-width="200" data-expected-height="400">
+ <div class="cell alignSelfAuto firstRowFirstColumn" data-offset-x="0" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y="80" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid" data-expected-width="200" data-expected-height="400">
+ <div class="alignSelfAuto firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
+ <div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfStart secondRowFirstColumn" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd secondRowSecondColumn" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- RTL direction (it should not affect the block-flow direction). -->
+<div style="position: relative">
+ <div class="grid directionRTL" data-expected-width="200" data-expected-height="400">
+ <div class="alignSelfStretch firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
+ <div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="80" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="180" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfRight secondRowSecondColumn" data-offset-x="80" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfLeft secondRowSecondColumn" data-offset-x="80" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid directionRTL" data-expected-width="200" data-expected-height="400">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="180" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="80" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="180" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="80" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- RTL direction (it should not affect the block-flow) with opposite directions grid container vs grid item. -->
+<div style="position: relative">
+ <div class="grid" data-expected-width="200" data-expected-height="400">
+ <div class="alignSelfStretch firstRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div>
+ <div class="cell alignSelfStart firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfCenter secondRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="280" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfRight secondRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfLeft secondRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid" data-expected-width="200" data-expected-height="400">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn directionRTL" data-offset-x="0" data-offset-y="200" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn directionRTL" data-offset-x="100" data-offset-y="360" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- Vertical RL writing mode. -->
+<div style="position: relative">
+ <div class="grid verticalRL" data-expected-width="400" data-expected-height="200">
+ <div class="alignSelfStretch firstRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="200" data-expected-height="100"></div>
+ <div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="90" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfRight secondRowSecondColumn" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfLeft secondRowSecondColumn" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid verticalRL" data-expected-width="400" data-expected-height="200">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- Vertical LR writing mode. -->
+<div style="position: relative">
+ <div class="grid verticalLR" data-expected-width="400" data-expected-height="200">
+ <div class="alignSelfStretch firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="100"></div>
+ <div class="cell alignSelfStart firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfEnd firstRowSecondColumn" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfCenter secondRowFirstColumn" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfRight secondRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfLeft secondRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid verticalLR" data-expected-width="400" data-expected-height="200">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40"></div>
+ </div>
+</div>
+
+<!-- Vertical RL writing mode with opposite block-flow directions grid container vs grid item. -->
+<div style="position: relative">
+ <div class="grid verticalRL" data-expected-width="400" data-expected-height="200">
+ <div class="alignSelfStretch firstRowFirstColumn verticalLR" data-offset-x="200" data-offset-y="0" data-expected-width="200" data-expected-height="100">
+ </div>
+ <div class="cell alignSelfStart firstRowSecondColumn verticalLR" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfEnd firstRowSecondColumn verticalLR" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfCenter secondRowFirstColumn verticalLR" data-offset-x="90" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfRight secondRowSecondColumn verticalLR" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfLeft secondRowSecondColumn verticalLR" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid verticalRL" data-expected-width="400" data-expected-height="200">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn verticalLR" data-offset-x="200" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn verticalLR" data-offset-x="380" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn verticalLR" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+<!-- Vertical LR writing mode with opposite block-flow directions grid container vs grid item. -->
+<div style="position: relative">
+ <div class="grid verticalLR" data-expected-width="400" data-expected-height="200">
+ <div class="alignSelfStretch firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="100">
+ </div>
+ <div class="cell alignSelfStart firstRowSecondColumn verticalRL" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfEnd firstRowSecondColumn verticalRL" data-offset-x="180" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfCenter secondRowFirstColumn verticalRL" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfRight secondRowSecondColumn verticalRL" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfLeft secondRowSecondColumn verticalRL" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+<div style="position: relative">
+ <div class="grid verticalLR" data-expected-width="400" data-expected-height="200">
+ <div class="cell alignSelfFlexEnd firstRowFirstColumn verticalRL" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfFlexStart firstRowSecondColumn verticalRL" data-offset-x="0" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfSelfStart secondRowFirstColumn verticalRL" data-offset-x="380" data-offset-y="0" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ <div class="cell alignSelfSelfEnd secondRowSecondColumn verticalRL" data-offset-x="200" data-offset-y="100" data-expected-width="20" data-expected-height="40">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementbordergriditemhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-border-grid-item.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-border-grid-item.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-border-grid-item.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -20,74 +20,74 @@
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<!-- rtl direciton -->
</del><ins>+<!-- rtl direction -->
</ins><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementborderpaddinggriditemhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -21,74 +21,74 @@
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <!-- rtl direciton -->
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementpaddinggriditemhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -17,74 +17,74 @@
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <!-- rtl direciton -->
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT directionRTL" data-expected-width="280" data-expected-height="260">
</span><del>- <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
- <div class="sizedToGridArea secondRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</del><ins>+ <div class="firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
+ <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="100" data-expected-height="100"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgriditemmarginautocolumnsrowshorizontalrtlexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -53,37 +53,37 @@
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridLong">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 20px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 20px;"></div>
- <div class="gridItem secondRowFirstColumn" style="top: 60px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 60px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 20px; top: 20px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 0px"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px; top: 60px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 0px; top: 60px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridShort">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 20px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 20px;"></div>
- <div class="gridItem secondRowFirstColumn" style="top: 60px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 60px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 20px; top: 20px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 0px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px; top: 60px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 0px; top: 60px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridLong">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 80px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 20px; top: 80px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 0px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 20px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 20px; top: 80px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 0px; top: 80px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 0px; top: 20px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridShort">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 60px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 20px; top: 40px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 0px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 20px; top: 60px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 0px; top: 40px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 0px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgriditemmarginautocolumnsrowsverticalrtlexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -53,36 +53,36 @@
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridLong">
</span><del>- <div class="gridItem firstRowFirstColumn" style="left: 180px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 180px; top: 60px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 160px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 160px; top: 80px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 180px; top: 80px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 180px; top: 20px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 160px; top: 80px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 160px; top: 0px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridShort">
</span><del>- <div class="gridItem firstRowFirstColumn" style="left: 180px;"></div>
- <div class="gridItem firstRowSecondColumn" style="left: 180px; top: 60px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 160px; top: 20px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 160px; top: 60px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="left: 180px; top: 60px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="left: 180px; top: 0px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 160px; top: 40px;"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 160px; top: 0px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridLong">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 0px;"></div>
- <div class="gridItem firstRowSecondColumn" style="top: 60px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 20px;"></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 80px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="top: 80px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="top: 20px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px; top: 80px"></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 0px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="testContainer">
</span><span class="cx"> <div class="grid gridShort">
</span><del>- <div class="gridItem firstRowFirstColumn" style="top: 0px;"></div>
- <div class="gridItem firstRowSecondColumn" style="top: 60px;"></div>
- <div class="gridItem secondRowFirstColumn" style="left: 20px; top: 20px;" ></div>
- <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 60px;"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" style="top: 60px;"></div>
+ <div class="gridItem firstRowSecondColumn" style="top: 0px;"></div>
+ <div class="gridItem secondRowFirstColumn" style="left: 20px; top: 40px;" ></div>
+ <div class="gridItem secondRowSecondColumn" style="left: 20px; top: 0px;"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgriditemmarginresolutionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -60,37 +60,37 @@
</span><span class="cx"> <!-- rtl direction -->
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid directionRTL" data-expected-width="200" data-expected-height="200">
</span><del>- <div class="gridItem firstRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalRL directionRTL" data-expected-width="200" data-expected-height="200">
</span><del>- <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid verticalLR directionRTL" data-expected-width="200" data-expected-height="200">
</span><del>- <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative">
</span><span class="cx"> <div class="grid horizontalBT directionRTL" data-expected-width="200" data-expected-height="200">
</span><del>- <div class="gridItem firstRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem firstRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
- <div class="gridItem secondRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
</del><ins>+ <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
+ <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/Source/WebCore/ChangeLog        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2015-04-26 Javier Fernandez <jfernandez@igalia.com>
+
+ [CSS Grid Layout] Support for align-self and align-items in grid layout
+ https://bugs.webkit.org/show_bug.cgi?id=133225
+
+ Reviewed by Darin Adler.
+
+ Implementation of align-self and align-items properties for grid. It supports
+ different writing-modes and direction. Margins, borders and paddings are also
+ considered when computing the final position and stretched size.
+
+ Overflow handling is still missing and will be added when implemented row-axis
+ alignment support.
+
+ Test: fast/css-grid-layout/grid-align.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeLogicalHeight):
+ * rendering/RenderGrid.cpp:
+ (WebCore::RenderGrid::logicalContentHeightForChild):
+ (WebCore::RenderGrid::layoutGridItems):
+ (WebCore::computeOverflowAlignmentOffset):
+ (WebCore::RenderGrid::endOfRowForChild):
+ (WebCore::RenderGrid::startOfRowForChild):
+ (WebCore::RenderGrid::centeredRowPositionForChild):
+ (WebCore::marginWidthForChild):
+ (WebCore::marginHeightForChild):
+ (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
+ (WebCore::RenderGrid::needToStretchChildLogicalHeight):
+ (WebCore::RenderGrid::marginLogicalHeightForChild):
+ (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
+ (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
+ (WebCore::RenderGrid::rowPositionForChild):
+ (WebCore::RenderGrid::findChildLogicalPosition):
+ (WebCore::RenderGrid::populateGridPositions): Deleted.
+ * rendering/RenderGrid.h:
+
</ins><span class="cx"> 2015-04-26 Doug Russell <d_russell@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: richer text change notifications (142719)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -2712,7 +2712,7 @@
</span><span class="cx"> // grab our cached flexible height.
</span><span class="cx"> // FIXME: Account for block-flow in flexible boxes.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=46418
</span><del>- if (hasOverrideLogicalContentHeight() && parent()->isFlexibleBoxIncludingDeprecated())
</del><ins>+ if (hasOverrideLogicalContentHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid()))
</ins><span class="cx"> h = Length(overrideLogicalContentHeight(), Fixed);
</span><span class="cx"> else if (treatAsReplaced)
</span><span class="cx"> h = Length(computeReplacedLogicalHeight(), Fixed);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -40,6 +40,8 @@
</span><span class="cx">
</span><span class="cx"> static const int infinity = -1;
</span><span class="cx">
</span><ins>+enum GridAxisPosition {GridAxisStart, GridAxisEnd, GridAxisCenter};
+
</ins><span class="cx"> class GridTrack {
</span><span class="cx"> public:
</span><span class="cx"> GridTrack() {}
</span><span class="lines">@@ -548,8 +550,11 @@
</span><span class="cx"> {
</span><span class="cx"> LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child.hasOverrideContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth() : LayoutUnit();
</span><span class="cx"> LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, columnTracks);
</span><del>- if (child.hasRelativeLogicalHeight() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth)
</del><ins>+ if (child.hasRelativeLogicalHeight() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth) {
</ins><span class="cx"> child.setNeedsLayout(MarkOnlyThis);
</span><ins>+ // We need to clear the stretched height to properly compute logical height during layout.
+ child.clearOverrideLogicalContentHeight();
+ }
</ins><span class="cx">
</span><span class="cx"> child.setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth);
</span><span class="cx"> // If |child| has a relative logical height, we shouldn't let it override its intrinsic height, which is
</span><span class="lines">@@ -1174,9 +1179,11 @@
</span><span class="cx">
</span><span class="cx"> LayoutRect oldChildRect = child->frameRect();
</span><span class="cx">
</span><del>- // FIXME: Grid items should stretch to fill their cells. Once we
- // implement grid-{column,row}-align, we can also shrink to fit. For
- // now, just size as if we were a regular child.
</del><ins>+ // Stretching logic might force a child layout, so we need to run it before the layoutIfNeeded
+ // call to avoid unnecessary relayouts. This might imply that child margins, needed to correctly
+ // determine the available space before stretching, are not set yet.
+ applyStretchAlignmentToChildIfNeeded(*child, overrideContainingBlockContentLogicalHeight);
+
</ins><span class="cx"> child->layoutIfNeeded();
</span><span class="cx">
</span><span class="cx"> child->setLogicalLocation(findChildLogicalPosition(*child, sizingData));
</span><span class="lines">@@ -1233,14 +1240,171 @@
</span><span class="cx"> m_rowPositions[i + 1] = m_rowPositions[i] + sizingData.rowTracks[i].baseSize();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LayoutPoint RenderGrid::findChildLogicalPosition(RenderBox& child, const GridSizingData& sizingData)
</del><ins>+LayoutUnit RenderGrid::endOfRowForChild(const RenderBox& child) const
</ins><span class="cx"> {
</span><span class="cx"> const GridCoordinate& coordinate = cachedGridCoordinate(child);
</span><ins>+
+ LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()];
+ // The grid items should be inside the grid container's border box, that's why they need to be shifted.
+ LayoutUnit rowPosition = startOfRow + marginBeforeForChild(child);
+
+ LayoutUnit endOfRow = m_rowPositions[coordinate.rows.resolvedFinalPosition.next().toInt()];
+ // FIXME: This should account for the grid item's <overflow-position>.
+ return rowPosition + std::max<LayoutUnit>(0, endOfRow - startOfRow - child.logicalHeight());
+}
+
+LayoutUnit RenderGrid::startOfRowForChild(const RenderBox& child) const
+{
+ const GridCoordinate& coordinate = cachedGridCoordinate(child);
+
+ LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()];
+ // The grid items should be inside the grid container's border box, that's why they need to be shifted.
+ // FIXME: This should account for the grid item's <overflow-position>.
+ LayoutUnit rowPosition = startOfRow + marginBeforeForChild(child);
+
+ return rowPosition;
+}
+
+LayoutUnit RenderGrid::centeredRowPositionForChild(const RenderBox& child) const
+{
+ const GridCoordinate& coordinate = cachedGridCoordinate(child);
+
+ // The grid items should be inside the grid container's border box, that's why they need to be shifted.
+ LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()];
+ LayoutUnit endOfRow = m_rowPositions[coordinate.rows.resolvedFinalPosition.next().toInt()];
+ // FIXME: This should account for the grid item's <overflow-position>.
+ return startOfRow + std::max<LayoutUnit>(0, endOfRow - startOfRow - child.logicalHeight()) / 2;
+}
+
+bool RenderGrid::allowedToStretchLogicalHeightForChild(const RenderBox& child) const
+{
+ return child.style().logicalHeight().isAuto() && !child.style().marginBeforeUsing(&style()).isAuto() && !child.style().marginAfterUsing(&style()).isAuto();
+}
+
+// FIXME: This logic is shared by RenderFlexibleBox, so it should be moved to RenderBox.
+bool RenderGrid::needToStretchChildLogicalHeight(const RenderBox& child) const
+{
+ if (RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch) != ItemPositionStretch)
+ return false;
+
+ return isHorizontalWritingMode() && child.style().height().isAuto();
+}
+
+// FIXME: This logic is shared by RenderFlexibleBox, so it should be moved to RenderBox.
+LayoutUnit RenderGrid::marginLogicalHeightForChild(const RenderBox& child) const
+{
+ return isHorizontalWritingMode() ? child.verticalMarginExtent() : child.horizontalMarginExtent();
+}
+
+LayoutUnit RenderGrid::availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAreaBreadthForChild, const RenderBox& child) const
+{
+ return gridAreaBreadthForChild - marginLogicalHeightForChild(child);
+}
+
+// FIXME: This logic is shared by RenderFlexibleBox, so it should be moved to RenderBox.
+void RenderGrid::applyStretchAlignmentToChildIfNeeded(RenderBox& child, LayoutUnit gridAreaBreadthForChild)
+{
+ if (RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch) != ItemPositionStretch)
+ return;
+
+ bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
+ if (allowedToStretchLogicalHeightForChild(child)) {
+ // FIXME: If the child has orthogonal flow, then it already has an override height set, so use it.
+ // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
+ if (!hasOrthogonalWritingMode) {
+ LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(gridAreaBreadthForChild, child);
+ LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight);
+
+ // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905.
+ bool childNeedsRelayout = desiredLogicalHeight != child.logicalHeight();
+ if (childNeedsRelayout || !child.hasOverrideLogicalContentHeight())
+ child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight());
+ if (childNeedsRelayout) {
+ child.setLogicalHeight(0);
+ child.setNeedsLayout();
+ }
+ }
+ }
+}
+
+static GridAxisPosition columnAxisPosition(ItemPosition position, bool hasOrthogonalWritingMode, bool hasSameWritingMode)
+{
+ switch (position) {
+ case ItemPositionSelfStart:
+ // If orthogonal writing-modes, this computes to 'start'.
+ // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
+ // self-start is based on the child's block axis direction. That's why we need to check against the grid container's block flow.
+ return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisStart : GridAxisEnd;
+ case ItemPositionSelfEnd:
+ // If orthogonal writing-modes, this computes to 'end'.
+ // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
+ // self-end is based on the child's block axis direction. That's why we need to check against the grid container's block flow.
+ return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisEnd : GridAxisStart;
+ case ItemPositionLeft:
+ // The alignment axis (column axis) and the inline axis are parallell in
+ // orthogonal writing mode. Otherwise this this is equivalent to 'start'.
+ // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
+ return GridAxisStart;
+ case ItemPositionRight:
+ // The alignment axis (column axis) and the inline axis are parallell in
+ // orthogonal writing mode. Otherwise this this is equivalent to 'start'.
+ // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
+ return hasOrthogonalWritingMode ? GridAxisEnd : GridAxisStart;
+ case ItemPositionCenter:
+ return GridAxisCenter;
+ case ItemPositionFlexStart: // Only used in flex layout, otherwise equivalent to 'start'.
+ case ItemPositionStart:
+ return GridAxisStart;
+ case ItemPositionFlexEnd: // Only used in flex layout, otherwise equivalent to 'end'.
+ case ItemPositionEnd:
+ return GridAxisEnd;
+ case ItemPositionStretch:
+ return GridAxisStart;
+ case ItemPositionBaseline:
+ case ItemPositionLastBaseline:
+ // FIXME: Implement the ItemPositionBaseline value. For now, we always 'start' align the child.
+ return GridAxisStart;
+ case ItemPositionAuto:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return GridAxisStart;
+}
+
+LayoutUnit RenderGrid::rowPositionForChild(const RenderBox& child) const
+{
+ bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
+ bool hasSameWritingMode = child.style().writingMode() == style().writingMode();
+ ItemPosition position = RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch);
+
+ switch (columnAxisPosition(position, hasOrthogonalWritingMode, hasSameWritingMode)) {
+ case GridAxisStart:
+ return startOfRowForChild(child);
+ case GridAxisEnd:
+ return endOfRowForChild(child);
+ case GridAxisCenter:
+ return centeredRowPositionForChild(child);
+ }
+
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+LayoutPoint RenderGrid::findChildLogicalPosition(const RenderBox& child, const GridSizingData& sizingData) const
+{
+ const GridCoordinate& coordinate = cachedGridCoordinate(child);
</ins><span class="cx"> ASSERT_UNUSED(sizingData, coordinate.columns.resolvedInitialPosition.toInt() < sizingData.columnTracks.size());
</span><span class="cx"> ASSERT_UNUSED(sizingData, coordinate.rows.resolvedInitialPosition.toInt() < sizingData.rowTracks.size());
</span><span class="cx">
</span><ins>+ LayoutUnit columnPosition = m_columnPositions[coordinate.columns.resolvedInitialPosition.toInt()] + marginStartForChild(child);
+ // We stored m_columnPositions's data ignoring the direction, hence we might need now
+ // to translate positions from RTL to LTR, as it's more convenient for painting.
+ if (!style().isLeftToRightDirection())
+ columnPosition = (m_columnPositions[m_columnPositions.size() - 1] + borderAndPaddingLogicalLeft()) - columnPosition - child.logicalWidth();
+
</ins><span class="cx"> // The grid items should be inside the grid container's border box, that's why they need to be shifted.
</span><del>- return LayoutPoint(m_columnPositions[coordinate.columns.resolvedInitialPosition.toInt()] + marginStartForChild(child), m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()] + marginBeforeForChild(child));
</del><ins>+ return LayoutPoint(columnPosition, rowPositionForChild(child));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderGrid::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& forChild, bool usePrintRect)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.h (183369 => 183370)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.h        2015-04-26 22:31:12 UTC (rev 183369)
+++ trunk/Source/WebCore/rendering/RenderGrid.h        2015-04-26 22:44:11 UTC (rev 183370)
</span><span class="lines">@@ -117,12 +117,22 @@
</span><span class="cx"> LayoutUnit logicalContentHeightForChild(RenderBox&, Vector<GridTrack>&);
</span><span class="cx"> LayoutUnit minContentForChild(RenderBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
</span><span class="cx"> LayoutUnit maxContentForChild(RenderBox&, GridTrackSizingDirection, Vector<GridTrack>& columnTracks);
</span><del>- LayoutPoint findChildLogicalPosition(RenderBox&, const GridSizingData&);
</del><ins>+ LayoutUnit startOfRowForChild(const RenderBox&) const;
+ LayoutUnit endOfRowForChild(const RenderBox&) const;
+ LayoutUnit centeredRowPositionForChild(const RenderBox&) const;
+ LayoutUnit rowPositionForChild(const RenderBox&) const;
+ LayoutPoint findChildLogicalPosition(const RenderBox&, const GridSizingData&) const;
</ins><span class="cx"> GridCoordinate cachedGridCoordinate(const RenderBox&) const;
</span><span class="cx">
</span><span class="cx"> LayoutUnit gridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDirection, const Vector<GridTrack>&) const;
</span><span class="cx">
</span><span class="cx"> virtual void paintChildren(PaintInfo& forSelf, const LayoutPoint& paintOffset, PaintInfo& forChild, bool usePrintRect) override;
</span><ins>+ bool allowedToStretchLogicalHeightForChild(const RenderBox&) const;
+ bool needToStretchChildLogicalHeight(const RenderBox&) const;
+ LayoutUnit marginLogicalHeightForChild(const RenderBox&) const;
+ LayoutUnit computeMarginLogicalHeightForChild(const RenderBox&) const;
+ LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAreaBreadthForChild, const RenderBox&) const;
+ void applyStretchAlignmentToChildIfNeeded(RenderBox&, LayoutUnit gridAreaBreadthForChild);
</ins><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vector<GridTrack>&);
</span></span></pre>
</div>
</div>
</body>
</html>