| 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 17 matching lines...) Expand all Loading... |
| 28 LayoutSize MultiColumnFragmentainerGroup::offsetFromColumnSet() const | 28 LayoutSize MultiColumnFragmentainerGroup::offsetFromColumnSet() const |
| 29 { | 29 { |
| 30 LayoutSize offset(LayoutUnit(), logicalTop()); | 30 LayoutSize offset(LayoutUnit(), logicalTop()); |
| 31 if (!m_columnSet.flowThread()->isHorizontalWritingMode()) | 31 if (!m_columnSet.flowThread()->isHorizontalWritingMode()) |
| 32 return offset.transposedSize(); | 32 return offset.transposedSize(); |
| 33 return offset; | 33 return offset; |
| 34 } | 34 } |
| 35 | 35 |
| 36 LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFragmentationCon
text() const | 36 LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFragmentationCon
text() const |
| 37 { | 37 { |
| 38 return logicalTop() + m_columnSet.logicalTop() + m_columnSet.multiColumnFlow
Thread()->blockOffsetInEnclosingFragmentationContext(); | 38 return logicalTop() + m_columnSet.logicalTopFromMulticolContentEdge() + m_co
lumnSet.multiColumnFlowThread()->blockOffsetInEnclosingFragmentationContext(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void MultiColumnFragmentainerGroup::resetColumnHeight() | 41 void MultiColumnFragmentainerGroup::resetColumnHeight() |
| 42 { | 42 { |
| 43 m_maxColumnHeight = calculateMaxColumnHeight(); | 43 m_maxColumnHeight = calculateMaxColumnHeight(); |
| 44 | 44 |
| 45 LayoutMultiColumnFlowThread* flowThread = m_columnSet.multiColumnFlowThread(
); | 45 LayoutMultiColumnFlowThread* flowThread = m_columnSet.multiColumnFlowThread(
); |
| 46 if (m_columnSet.heightIsAuto()) { | 46 if (m_columnSet.heightIsAuto()) { |
| 47 FragmentationContext* enclosingFragmentationContext = flowThread->enclos
ingFragmentationContext(); | 47 FragmentationContext* enclosingFragmentationContext = flowThread->enclos
ingFragmentationContext(); |
| 48 if (enclosingFragmentationContext && enclosingFragmentationContext->isFr
agmentainerLogicalHeightKnown()) { | 48 if (enclosingFragmentationContext && enclosingFragmentationContext->isFr
agmentainerLogicalHeightKnown()) { |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 append(MultiColumnFragmentainerGroup(m_columnSet)); | 532 append(MultiColumnFragmentainerGroup(m_columnSet)); |
| 533 return last(); | 533 return last(); |
| 534 } | 534 } |
| 535 | 535 |
| 536 void MultiColumnFragmentainerGroupList::deleteExtraGroups() | 536 void MultiColumnFragmentainerGroupList::deleteExtraGroups() |
| 537 { | 537 { |
| 538 shrink(1); | 538 shrink(1); |
| 539 } | 539 } |
| 540 | 540 |
| 541 } // namespace blink | 541 } // namespace blink |
| OLD | NEW |