Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 905 childSize = maxExtent; | 905 childSize = maxExtent; |
| 906 } | 906 } |
| 907 | 907 |
| 908 Length min = isHorizontalFlow() ? child.style()->minWidth() : child.style()- >minHeight(); | 908 Length min = isHorizontalFlow() ? child.style()->minWidth() : child.style()- >minHeight(); |
| 909 LayoutUnit minExtent = 0; | 909 LayoutUnit minExtent = 0; |
| 910 if (min.isSpecifiedOrIntrinsic()) { | 910 if (min.isSpecifiedOrIntrinsic()) { |
| 911 minExtent = computeMainAxisExtentForChild(child, MinSize, min); | 911 minExtent = computeMainAxisExtentForChild(child, MinSize, min); |
| 912 // computeMainAxisExtentForChild can return -1 when the child has a perc entage | 912 // computeMainAxisExtentForChild can return -1 when the child has a perc entage |
| 913 // min size, but we have an indefinite size in that axis. | 913 // min size, but we have an indefinite size in that axis. |
| 914 minExtent = std::max(LayoutUnit(), minExtent); | 914 minExtent = std::max(LayoutUnit(), minExtent); |
| 915 } else if (min.isAuto() && mainAxisOverflowForChild(child) == OVISIBLE) { | 915 } else if (min.isAuto() && mainAxisOverflowForChild(child) == OVISIBLE && !( isColumnFlow() && child.isFlexibleBox())) { |
|
leviw_travelin_and_unemployed
2016/01/27 00:18:30
*Sigh*
This sucks, but I agree with it as a banda
| |
| 916 // TODO(cbiesinger): For now, we do not handle min-height: auto for nest ed column flexboxes. We need | |
| 917 // to implement https://drafts.csswg.org/css-flexbox/#intrinsic-sizes be fore that produces | |
| 918 // reasonable results. | |
|
leviw_travelin_and_unemployed
2016/01/27 00:18:30
Tracking bug?
cbiesinger
2016/01/27 00:25:08
Done.
| |
| 916 // css-flexbox section 4.5 | 919 // css-flexbox section 4.5 |
| 917 LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, L ength(MinContent)); | 920 LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, L ength(MinContent)); |
| 918 ASSERT(contentSize >= 0); | 921 ASSERT(contentSize >= 0); |
| 919 if (maxExtent != -1 && contentSize > maxExtent) | 922 if (maxExtent != -1 && contentSize > maxExtent) |
| 920 contentSize = maxExtent; | 923 contentSize = maxExtent; |
| 921 | 924 |
| 922 Length mainSize = isHorizontalFlow() ? child.styleRef().width() : child. styleRef().height(); | 925 Length mainSize = isHorizontalFlow() ? child.styleRef().width() : child. styleRef().height(); |
| 923 if (mainAxisLengthIsDefinite(child, mainSize)) { | 926 if (mainAxisLengthIsDefinite(child, mainSize)) { |
| 924 LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, M ainOrPreferredSize, mainSize); | 927 LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, M ainOrPreferredSize, mainSize); |
| 925 ASSERT(resolvedMainSize >= 0); | 928 ASSERT(resolvedMainSize >= 0); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1542 ASSERT(child); | 1545 ASSERT(child); |
| 1543 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; | 1546 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; |
| 1544 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 1547 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
| 1545 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; | 1548 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; |
| 1546 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1549 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1547 } | 1550 } |
| 1548 } | 1551 } |
| 1549 } | 1552 } |
| 1550 | 1553 |
| 1551 } // namespace blink | 1554 } // namespace blink |
| OLD | NEW |