| 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 LayoutUnit LayoutGrid::minSizeForChild(LayoutBox& child, | 1235 LayoutUnit LayoutGrid::minSizeForChild(LayoutBox& child, |
| 1236 GridTrackSizingDirection direction, | 1236 GridTrackSizingDirection direction, |
| 1237 GridSizingData& sizingData) const { | 1237 GridSizingData& sizingData) const { |
| 1238 GridTrackSizingDirection childInlineDirection = | 1238 GridTrackSizingDirection childInlineDirection = |
| 1239 flowAwareDirectionForChild(child, ForColumns); | 1239 flowAwareDirectionForChild(child, ForColumns); |
| 1240 bool isRowAxis = direction == childInlineDirection; | 1240 bool isRowAxis = direction == childInlineDirection; |
| 1241 const Length& childSize = isRowAxis ? child.styleRef().logicalWidth() | 1241 const Length& childSize = isRowAxis ? child.styleRef().logicalWidth() |
| 1242 : child.styleRef().logicalHeight(); | 1242 : child.styleRef().logicalHeight(); |
| 1243 const Length& childMinSize = isRowAxis ? child.styleRef().logicalMinWidth() | 1243 const Length& childMinSize = isRowAxis ? child.styleRef().logicalMinWidth() |
| 1244 : child.styleRef().logicalMinHeight(); | 1244 : child.styleRef().logicalMinHeight(); |
| 1245 if (!childSize.isAuto() || childMinSize.isAuto()) | 1245 bool overflowIsVisible = |
| 1246 isRowAxis ? child.styleRef().overflowInlineDirection() == OverflowVisible |
| 1247 : child.styleRef().overflowBlockDirection() == OverflowVisible; |
| 1248 if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) |
| 1246 return minContentForChild(child, direction, sizingData); | 1249 return minContentForChild(child, direction, sizingData); |
| 1247 | 1250 |
| 1248 bool overrideSizeHasChanged = | 1251 bool overrideSizeHasChanged = |
| 1249 updateOverrideContainingBlockContentSizeForChild( | 1252 updateOverrideContainingBlockContentSizeForChild( |
| 1250 child, childInlineDirection, sizingData); | 1253 child, childInlineDirection, sizingData); |
| 1251 if (isRowAxis) { | 1254 if (isRowAxis) { |
| 1252 LayoutUnit marginLogicalWidth = | 1255 LayoutUnit marginLogicalWidth = |
| 1253 sizingData.sizingOperation == TrackSizing | 1256 sizingData.sizingOperation == TrackSizing |
| 1254 ? computeMarginLogicalSizeForChild(InlineDirection, child) | 1257 ? computeMarginLogicalSizeForChild(InlineDirection, child) |
| 1255 : marginIntrinsicLogicalWidthForChild(child); | 1258 : marginIntrinsicLogicalWidthForChild(child); |
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3506 // not stored in m_grid). | 3509 // not stored in m_grid). |
| 3507 if (direction == ForRows) | 3510 if (direction == ForRows) |
| 3508 return m_grid.numRows(); | 3511 return m_grid.numRows(); |
| 3509 | 3512 |
| 3510 return m_grid.numRows() ? m_grid.numColumns() | 3513 return m_grid.numRows() ? m_grid.numColumns() |
| 3511 : GridPositionsResolver::explicitGridColumnCount( | 3514 : GridPositionsResolver::explicitGridColumnCount( |
| 3512 styleRef(), m_autoRepeatColumns); | 3515 styleRef(), m_autoRepeatColumns); |
| 3513 } | 3516 } |
| 3514 | 3517 |
| 3515 } // namespace blink | 3518 } // namespace blink |
| OLD | NEW |