Index: Source/core/layout/LayoutGrid.cpp |
diff --git a/Source/core/layout/LayoutGrid.cpp b/Source/core/layout/LayoutGrid.cpp |
index add685ab608673b919360b1109411e75028b78bd..133368064420ad67b5d8e71e05704321da5cc8b5 100644 |
--- a/Source/core/layout/LayoutGrid.cpp |
+++ b/Source/core/layout/LayoutGrid.cpp |
@@ -617,15 +617,16 @@ LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, Vector<GridTrack> |
SubtreeLayoutScope layoutScope(child); |
LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child.hasOverrideContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth() : LayoutUnit(); |
LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, columnTracks); |
- if (child.style()->logicalHeight().isPercent() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth) |
+ if (child.hasRelativeLogicalHeight() || oldOverrideContainingBlockContentLogicalWidth != overrideContainingBlockContentLogicalWidth) |
layoutScope.setNeedsLayout(&child); |
child.clearOverrideLogicalContentHeight(); |
child.setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth); |
- // If |child| has a percentage logical height, we shouldn't let it override its intrinsic height, which is |
+ // If |child| has a relative 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); |
+ if (child.hasRelativeLogicalHeight()) |
+ child.setOverrideContainingBlockContentLogicalHeight(-1); |
Manuel Rego
2015/03/05 06:31:07
Applied the same change to the new lines doing:
|
child.layoutIfNeeded(); |
return child.logicalHeight() + child.marginLogicalHeight(); |
} |