Index: Source/core/rendering/RenderGrid.cpp |
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
index 83a03053fe72eed39985a0851379f13d93b2fbdc..f990486018db2e7b906b2a76c2c6848f7ed5a487 100644 |
--- a/Source/core/rendering/RenderGrid.cpp |
+++ b/Source/core/rendering/RenderGrid.cpp |
@@ -563,10 +563,12 @@ size_t RenderGrid::explicitGridSizeForSide(GridPositionSide side) const |
LayoutUnit RenderGrid::logicalContentHeightForChild(RenderBox* child, Vector<GridTrack>& columnTracks) |
{ |
SubtreeLayoutScope layoutScope(child); |
- if (child->style()->logicalHeight().isPercent()) |
+ LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); |
+ LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, columnTracks); |
+ if (child->style()->logicalHeight().isPercent() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth) |
Julien - ping for review
2014/01/29 02:14:08
Quick question: why is this check in logicalConten
|
layoutScope.setNeedsLayout(child); |
- child->setOverrideContainingBlockContentLogicalWidth(gridAreaBreadthForChild(child, ForColumns, columnTracks)); |
+ child->setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth); |
// 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); |