Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Issue 1979603002: [css-grid] Fix behavior of flexible track breadths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New version fixing comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 as a min sizing function. However we still can hav e a flexible |minTrackBreadth|
749 // if the track had a flex size directly (e.g. "1fr"), the spec says that in this case it implies an automatic minimum.
750 if (minTrackBreadth.isFlex())
751 minTrackBreadth = Length(Auto);
752
748 return GridTrackSize(minTrackBreadth, maxTrackBreadth); 753 return GridTrackSize(minTrackBreadth, maxTrackBreadth);
749 } 754 }
750 755
751 bool LayoutGrid::isOrthogonalChild(const LayoutBox& child) const 756 bool LayoutGrid::isOrthogonalChild(const LayoutBox& child) const
752 { 757 {
753 return child.isHorizontalWritingMode() != isHorizontalWritingMode(); 758 return child.isHorizontalWritingMode() != isHorizontalWritingMode();
754 } 759 }
755 760
756 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& s izingData) 761 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& s izingData)
757 { 762 {
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 2240
2236 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData )); 2241 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData ));
2237 } 2242 }
2238 2243
2239 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 2244 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
2240 { 2245 {
2241 GridPainter(*this).paintChildren(paintInfo, paintOffset); 2246 GridPainter(*this).paintChildren(paintInfo, paintOffset);
2242 } 2247 }
2243 2248
2244 } // namespace blink 2249 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698