<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - RenderBox::hasDefiniteLogicalHeight() shouldn't consider all abspos elements as definite"
href="https://bugs.webkit.org/show_bug.cgi?id=159251">159251</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>RenderBox::hasDefiniteLogicalHeight() shouldn't consider all abspos elements as definite
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Layout and Rendering
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rego@igalia.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jfernandez@igalia.com, rego@igalia.com, simon.fraser@apple.com, svillar@igalia.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=282326" name="attach_282326" title="Test case to reproduce the issue">attachment 282326</a> <a href="attachment.cgi?id=282326&action=edit" title="Test case to reproduce the issue">[details]</a></span>
Test case to reproduce the issue
An abspos element doesn't have a definite height unless it has a specified height or the top and bottom properties are not auto.
For example, the following div doesn't have a definite height:
<div style="position: absolute;"></div>
However, this one will have a definite height:
<div style="position: absolute; top: 0; bottom: 0;"></div>
RenderBox::hasDefiniteLogicalHeight() is considering that both have a definite height which is wrong:
<a href="http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L4760">http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L4760</a>
This leads to wrong results in CSS Grid Layout check the attached example, the 50% in the 2nd row is resolved against the 100px of the first row when it should be considered "auto".
You can check it live at: <a href="http://jsbin.com/xuyane/1/edit?html,css,output">http://jsbin.com/xuyane/1/edit?html,css,output</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>