OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
738 // If the logical width/height of the grid container is indefinite, percenta ge values are treated as <auto> | 738 // If the logical width/height of the grid container is indefinite, percenta ge values are treated as <auto> |
739 if (minTrackBreadth.hasPercentage() || maxTrackBreadth.hasPercentage()) { | 739 if (minTrackBreadth.hasPercentage() || maxTrackBreadth.hasPercentage()) { |
740 if (!hasDefiniteLogicalSize(direction)) { | 740 if (!hasDefiniteLogicalSize(direction)) { |
741 if (minTrackBreadth.hasPercentage()) | 741 if (minTrackBreadth.hasPercentage()) |
742 minTrackBreadth = Length(Auto); | 742 minTrackBreadth = Length(Auto); |
743 if (maxTrackBreadth.hasPercentage()) | 743 if (maxTrackBreadth.hasPercentage()) |
744 maxTrackBreadth = Length(Auto); | 744 maxTrackBreadth = Length(Auto); |
745 } | 745 } |
746 } | 746 } |
747 | 747 |
748 // Flex sizes are invalid on the min slot of minmax() content. | |
svillar
2016/05/16 14:27:43
This is nitpicking but I prefer to talk about min
Manuel Rego
2016/05/16 15:01:49
Done.
| |
749 // However we still can have a flexible |minTrackBreadth| if the track had a flex size directly (e.g. "1fr"), | |
750 // the spec says that in this case it implies an automatic minimum. | |
751 if (minTrackBreadth.isFlex()) | |
752 minTrackBreadth = Length(Auto); | |
svillar
2016/05/16 14:27:43
Why not generating a minmax(auto,fr) in the parser
Manuel Rego
2016/05/16 15:01:49
First the computed style returns the size of the t
| |
753 | |
748 return GridTrackSize(minTrackBreadth, maxTrackBreadth); | 754 return GridTrackSize(minTrackBreadth, maxTrackBreadth); |
749 } | 755 } |
750 | 756 |
751 bool LayoutGrid::isOrthogonalChild(const LayoutBox& child) const | 757 bool LayoutGrid::isOrthogonalChild(const LayoutBox& child) const |
752 { | 758 { |
753 return child.isHorizontalWritingMode() != isHorizontalWritingMode(); | 759 return child.isHorizontalWritingMode() != isHorizontalWritingMode(); |
754 } | 760 } |
755 | 761 |
756 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& s izingData) | 762 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& s izingData) |
757 { | 763 { |
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2235 | 2241 |
2236 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData )); | 2242 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData )); |
2237 } | 2243 } |
2238 | 2244 |
2239 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const | 2245 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const |
2240 { | 2246 { |
2241 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2247 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2242 } | 2248 } |
2243 | 2249 |
2244 } // namespace blink | 2250 } // namespace blink |
OLD | NEW |