| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/MultiColumnFragmentainerGroup.h" | 5 #include "core/layout/MultiColumnFragmentainerGroup.h" |
| 6 | 6 |
| 7 #include "core/layout/ColumnBalancer.h" | 7 #include "core/layout/ColumnBalancer.h" |
| 8 #include "core/layout/FragmentationContext.h" | 8 #include "core/layout/FragmentationContext.h" |
| 9 #include "core/layout/LayoutMultiColumnSet.h" | 9 #include "core/layout/LayoutMultiColumnSet.h" |
| 10 | 10 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 LayoutUnit maxColumnHeight = flowThread->maxColumnLogicalHeight(); | 319 LayoutUnit maxColumnHeight = flowThread->maxColumnLogicalHeight(); |
| 320 LayoutUnit maxHeight = heightAdjustedForRowOffset(maxColumnHeight); | 320 LayoutUnit maxHeight = heightAdjustedForRowOffset(maxColumnHeight); |
| 321 if (FragmentationContext* enclosingFragmentationContext = | 321 if (FragmentationContext* enclosingFragmentationContext = |
| 322 flowThread->enclosingFragmentationContext()) { | 322 flowThread->enclosingFragmentationContext()) { |
| 323 if (enclosingFragmentationContext->isFragmentainerLogicalHeightKnown()) { | 323 if (enclosingFragmentationContext->isFragmentainerLogicalHeightKnown()) { |
| 324 // We're nested inside another fragmentation context whose fragmentainer | 324 // We're nested inside another fragmentation context whose fragmentainer |
| 325 // heights are known. This constrains the max height. | 325 // heights are known. This constrains the max height. |
| 326 LayoutUnit remainingOuterLogicalHeight = | 326 LayoutUnit remainingOuterLogicalHeight = |
| 327 enclosingFragmentationContext->remainingLogicalHeightAt( | 327 enclosingFragmentationContext->remainingLogicalHeightAt( |
| 328 blockOffsetInEnclosingFragmentationContext()); | 328 blockOffsetInEnclosingFragmentationContext()); |
| 329 ASSERT(remainingOuterLogicalHeight > 0); | |
| 330 if (maxHeight > remainingOuterLogicalHeight) | 329 if (maxHeight > remainingOuterLogicalHeight) |
| 331 maxHeight = remainingOuterLogicalHeight; | 330 maxHeight = remainingOuterLogicalHeight; |
| 332 } | 331 } |
| 333 } | 332 } |
| 334 return maxHeight; | 333 return maxHeight; |
| 335 } | 334 } |
| 336 | 335 |
| 337 void MultiColumnFragmentainerGroup::setAndConstrainColumnHeight( | 336 void MultiColumnFragmentainerGroup::setAndConstrainColumnHeight( |
| 338 LayoutUnit newHeight) { | 337 LayoutUnit newHeight) { |
| 339 m_columnHeight = newHeight; | 338 m_columnHeight = newHeight; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 MultiColumnFragmentainerGroupList::addExtraGroup() { | 593 MultiColumnFragmentainerGroupList::addExtraGroup() { |
| 595 append(MultiColumnFragmentainerGroup(m_columnSet)); | 594 append(MultiColumnFragmentainerGroup(m_columnSet)); |
| 596 return last(); | 595 return last(); |
| 597 } | 596 } |
| 598 | 597 |
| 599 void MultiColumnFragmentainerGroupList::deleteExtraGroups() { | 598 void MultiColumnFragmentainerGroupList::deleteExtraGroups() { |
| 600 shrink(1); | 599 shrink(1); |
| 601 } | 600 } |
| 602 | 601 |
| 603 } // namespace blink | 602 } // namespace blink |
| OLD | NEW |