Index: Source/core/rendering/RenderGrid.cpp |
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
index 9d0d58990de04c5fe7aeb8b1dee48edbb24739b6..36530fb98d2bdc580428766e73168c2e9758cb69 100644 |
--- a/Source/core/rendering/RenderGrid.cpp |
+++ b/Source/core/rendering/RenderGrid.cpp |
@@ -509,18 +509,14 @@ size_t RenderGrid::explicitGridSizeForSide(GridPositionSide side) const |
LayoutUnit RenderGrid::logicalContentHeightForChild(RenderBox* child, Vector<GridTrack>& columnTracks) |
{ |
- // FIXME: We shouldn't force a layout every time this function is called but |
- // 1) Return computeLogicalHeight's value if it's available. Unfortunately computeLogicalHeight |
- // doesn't return if the logical height is available so would need to be changed. |
- // 2) Relayout if the column track's used breadth changed OR the logical height is unavailable. |
- if (!child->needsLayout()) |
+ if (child->style()->logicalHeight().isPercent()) |
ojan
2013/08/13 17:22:21
What if it's position:absolute; top:0; bottom: 0?
Julien - ping for review
2013/08/13 18:45:43
Absolutely positioned grid items don't participate
|
child->setNeedsLayout(MarkOnlyThis); |
child->setOverrideContainingBlockContentLogicalWidth(gridAreaBreadthForChild(child, ForColumns, columnTracks)); |
// If |child| has a percentage logical height, we shouldn't let it override its intrinsic height, which is |
// what we are interested in here. Thus we need to set the override logical height to -1 (no possible resolution). |
child->setOverrideContainingBlockContentLogicalHeight(-1); |
- child->layout(); |
+ child->layoutIfNeeded(); |
return child->logicalHeight(); |
} |