Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 bool hasFragmentainerGroupForColumnAt(LayoutUnit bottomOffsetInFlowThread, | 141 bool hasFragmentainerGroupForColumnAt(LayoutUnit bottomOffsetInFlowThread, |
| 142 PageBoundaryRule) const; | 142 PageBoundaryRule) const; |
| 143 | 143 |
| 144 MultiColumnFragmentainerGroup& appendNewFragmentainerGroup(); | 144 MultiColumnFragmentainerGroup& appendNewFragmentainerGroup(); |
| 145 | 145 |
| 146 // Logical top relative to the content edge of the multicol container. | 146 // Logical top relative to the content edge of the multicol container. |
| 147 LayoutUnit logicalTopFromMulticolContentEdge() const; | 147 LayoutUnit logicalTopFromMulticolContentEdge() const; |
| 148 | 148 |
| 149 LayoutUnit logicalTopInFlowThread() const; | 149 LayoutUnit logicalTopInFlowThread() const; |
| 150 LayoutUnit logicalBottomInFlowThread() const; | 150 LayoutUnit logicalBottomInFlowThread() const; |
| 151 LayoutUnit logicalHeightInFlowThread() const { | 151 LayoutUnit logicalHeightInFlowThread() const { |
|
eae
2017/02/23 22:20:20
Would you mind adding a comment here explaining ho
mstensho (USE GERRIT)
2017/02/27 11:57:05
Good idea. Done.
| |
| 152 return logicalBottomInFlowThread() - logicalTopInFlowThread(); | 152 return (logicalBottomInFlowThread() - logicalTopInFlowThread()) |
| 153 .clampNegativeToZero(); | |
| 153 } | 154 } |
| 154 | 155 |
| 155 // Return the amount of flow thread contents that the specified fragmentainer | 156 // Return the amount of flow thread contents that the specified fragmentainer |
| 156 // group can hold without overflowing. | 157 // group can hold without overflowing. |
| 157 LayoutUnit fragmentainerGroupCapacity( | 158 LayoutUnit fragmentainerGroupCapacity( |
| 158 const MultiColumnFragmentainerGroup& group) const { | 159 const MultiColumnFragmentainerGroup& group) const { |
| 159 return group.logicalHeight() * usedColumnCount(); | 160 return group.logicalHeight() * usedColumnCount(); |
| 160 } | 161 } |
| 161 | 162 |
| 162 LayoutRect flowThreadPortionRect() const; | 163 LayoutRect flowThreadPortionRect() const; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 LayoutUnit m_oldLogicalTop; | 274 LayoutUnit m_oldLogicalTop; |
| 274 | 275 |
| 275 bool m_initialHeightCalculated; | 276 bool m_initialHeightCalculated; |
| 276 }; | 277 }; |
| 277 | 278 |
| 278 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); | 279 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); |
| 279 | 280 |
| 280 } // namespace blink | 281 } // namespace blink |
| 281 | 282 |
| 282 #endif // LayoutMultiColumnSet_h | 283 #endif // LayoutMultiColumnSet_h |
| OLD | NEW |