Chromium Code Reviews| Index: Source/core/rendering/RenderGrid.cpp |
| diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
| index 68f2e3e6d425ab54323c3128dda9775cc08c2d17..9fe86f921f9566bfb7e9c5cd7b3757c302739b49 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.isSpecified()) { |
|
Julien - ping for review
2013/11/07 18:18:26
This is not totally right but a good beginning.
i
svillar
2013/11/07 18:44:29
I don't really get what you mean with "when indefi
|
| + DEFINE_STATIC_LOCAL(GridTrackSize, autoTrackSize, (Auto)); |
| + return autoTrackSize; |
| + } |
| + } |
| + |
| + return trackSize; |
| } |
| size_t RenderGrid::explicitGridColumnCount() const |