Chromium Code Reviews| 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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1783 | 1783 |
| 1784 LayoutUnit availableSize; | 1784 LayoutUnit availableSize; |
| 1785 if (isRowAxis) { | 1785 if (isRowAxis) { |
| 1786 availableSize = sizingOperation == IntrinsicSizeComputation | 1786 availableSize = sizingOperation == IntrinsicSizeComputation |
| 1787 ? LayoutUnit(-1) | 1787 ? LayoutUnit(-1) |
| 1788 : availableLogicalWidth(); | 1788 : availableLogicalWidth(); |
| 1789 } else { | 1789 } else { |
| 1790 availableSize = availableLogicalHeightForPercentageComputation(); | 1790 availableSize = availableLogicalHeightForPercentageComputation(); |
| 1791 if (availableSize == -1) { | 1791 if (availableSize == -1) { |
| 1792 const Length& maxLength = styleRef().logicalMaxHeight(); | 1792 const Length& maxLength = styleRef().logicalMaxHeight(); |
| 1793 if (!maxLength.isMaxSizeNone()) | 1793 if (!maxLength.isMaxSizeNone()) { |
| 1794 availableSize = | 1794 availableSize = constrainContentBoxLogicalHeightByMinMax( |
| 1795 computeContentLogicalHeight(MaxSize, maxLength, LayoutUnit(-1)); | 1795 availableLogicalHeightUsing(maxLength, ExcludeMarginBorderPadding), |
| 1796 } else { | 1796 LayoutUnit(-1)); |
| 1797 availableSize = | 1797 } |
| 1798 constrainLogicalHeightByMinMax(availableSize, LayoutUnit(-1)); | |
| 1799 } | 1798 } |
|
jfernandez
2016/10/13 21:21:08
Why the availableLogicalHeightForPercentageComputa
svillar
2016/10/14 12:46:37
Because that method already does it while availabl
| |
| 1800 } | 1799 } |
| 1801 | 1800 |
| 1802 bool needsToFulfillMinimumSize = false; | 1801 bool needsToFulfillMinimumSize = false; |
| 1803 bool indefiniteMainAndMaxSizes = availableSize == LayoutUnit(-1); | 1802 bool indefiniteMainAndMaxSizes = availableSize == LayoutUnit(-1); |
| 1804 if (indefiniteMainAndMaxSizes) { | 1803 if (indefiniteMainAndMaxSizes) { |
| 1805 const Length& minSize = isRowAxis ? styleRef().logicalMinWidth() | 1804 const Length& minSize = isRowAxis ? styleRef().logicalMinWidth() |
| 1806 : styleRef().logicalMinHeight(); | 1805 : styleRef().logicalMinHeight(); |
| 1807 if (!minSize.isSpecified()) | 1806 if (!minSize.isSpecified()) |
| 1808 return autoRepeatTrackListLength; | 1807 return autoRepeatTrackListLength; |
| 1809 | 1808 |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3327 if (!m_gridItemArea.isEmpty()) | 3326 if (!m_gridItemArea.isEmpty()) |
| 3328 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 3327 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 3329 } | 3328 } |
| 3330 | 3329 |
| 3331 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { | 3330 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { |
| 3332 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); | 3331 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); |
| 3333 return m_hasDefiniteLogicalHeight.value(); | 3332 return m_hasDefiniteLogicalHeight.value(); |
| 3334 } | 3333 } |
| 3335 | 3334 |
| 3336 } // namespace blink | 3335 } // namespace blink |
| OLD | NEW |