Index: Source/core/rendering/RenderGrid.cpp |
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
index 68f2e3e6d425ab54323c3128dda9775cc08c2d17..f2116da8df59f9aeb9ef6c5847e2e4a869127ea2 100644 |
--- a/Source/core/rendering/RenderGrid.cpp |
+++ b/Source/core/rendering/RenderGrid.cpp |
@@ -488,7 +488,17 @@ const GridTrackSize& RenderGrid::gridTrackSize(GridTrackSizingDirection directio |
if (i >= trackStyles.size()) |
return (direction == ForColumns) ? style()->gridAutoColumns() : style()->gridAutoRows(); |
- return trackStyles[i]; |
+ const GridTrackSize& trackSize = trackStyles[i]; |
+ // If the logical width/height of the grid container is indefinite, percentage values are treated as <auto>. |
+ if (trackSize.isPercentage()) { |
+ Length logicalSize = direction == ForColumns ? style()->logicalWidth() : style()->logicalHeight(); |
+ if (logicalSize.isIntrinsic()) { |
ojan
2013/12/10 22:53:26
Should this be isInstrinsicOrAuto? Also, what if i
svillar
2013/12/16 17:46:51
Yeah I guess auto should be considered here as ind
|
+ DEFINE_STATIC_LOCAL(GridTrackSize, autoTrackSize, (Auto)); |
ojan
2013/12/10 22:53:26
I don't expect you gain anything here by making th
svillar
2013/12/16 17:46:51
Well, we need to return a reference to a GridTrack
|
+ return autoTrackSize; |
+ } |
+ } |
+ |
+ return trackSize; |
} |
size_t RenderGrid::explicitGridColumnCount() const |