| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/GridTrackSizingAlgorithm.h" | 5 #include "core/layout/GridTrackSizingAlgorithm.h" |
| 6 | 6 |
| 7 #include "core/layout/Grid.h" | 7 #include "core/layout/Grid.h" |
| 8 #include "core/layout/LayoutGrid.h" | 8 #include "core/layout/LayoutGrid.h" |
| 9 #include "platform/LengthFunctions.h" | 9 #include "platform/LengthFunctions.h" |
| 10 | 10 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 LayoutBox& child) const { | 367 LayoutBox& child) const { |
| 368 GridTrackSizingDirection childInlineDirection = | 368 GridTrackSizingDirection childInlineDirection = |
| 369 flowAwareDirectionForChild(layoutGrid(), child, ForColumns); | 369 flowAwareDirectionForChild(layoutGrid(), child, ForColumns); |
| 370 bool isRowAxis = direction() == childInlineDirection; | 370 bool isRowAxis = direction() == childInlineDirection; |
| 371 const Length& childSize = isRowAxis ? child.styleRef().logicalWidth() | 371 const Length& childSize = isRowAxis ? child.styleRef().logicalWidth() |
| 372 : child.styleRef().logicalHeight(); | 372 : child.styleRef().logicalHeight(); |
| 373 const Length& childMinSize = isRowAxis ? child.styleRef().logicalMinWidth() | 373 const Length& childMinSize = isRowAxis ? child.styleRef().logicalMinWidth() |
| 374 : child.styleRef().logicalMinHeight(); | 374 : child.styleRef().logicalMinHeight(); |
| 375 bool overflowIsVisible = | 375 bool overflowIsVisible = |
| 376 isRowAxis | 376 isRowAxis |
| 377 ? child.styleRef().overflowInlineDirection() == EOverflow::Visible | 377 ? child.styleRef().overflowInlineDirection() == EOverflow::kVisible |
| 378 : child.styleRef().overflowBlockDirection() == EOverflow::Visible; | 378 : child.styleRef().overflowBlockDirection() == EOverflow::kVisible; |
| 379 if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) | 379 if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) |
| 380 return minContentForChild(child); | 380 return minContentForChild(child); |
| 381 | 381 |
| 382 bool overrideSizeHasChanged = | 382 bool overrideSizeHasChanged = |
| 383 updateOverrideContainingBlockContentSizeForChild(child, | 383 updateOverrideContainingBlockContentSizeForChild(child, |
| 384 childInlineDirection); | 384 childInlineDirection); |
| 385 if (isRowAxis) | 385 if (isRowAxis) |
| 386 return minLogicalWidthForChild(child, childMinSize, childInlineDirection); | 386 return minLogicalWidthForChild(child, childMinSize, childInlineDirection); |
| 387 | 387 |
| 388 layoutGridItemForMinSizeComputation(child, overrideSizeHasChanged); | 388 layoutGridItemForMinSizeComputation(child, overrideSizeHasChanged); |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1425 DCHECK(m_algorithm.isValidTransition()); | 1425 DCHECK(m_algorithm.isValidTransition()); |
| 1426 DCHECK(!m_algorithm.m_needsSetup); | 1426 DCHECK(!m_algorithm.m_needsSetup); |
| 1427 } | 1427 } |
| 1428 | 1428 |
| 1429 GridTrackSizingAlgorithm::StateMachine::~StateMachine() { | 1429 GridTrackSizingAlgorithm::StateMachine::~StateMachine() { |
| 1430 m_algorithm.advanceNextState(); | 1430 m_algorithm.advanceNextState(); |
| 1431 m_algorithm.m_needsSetup = true; | 1431 m_algorithm.m_needsSetup = true; |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 } // namespace blink | 1434 } // namespace blink |
| OLD | NEW |