| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 unsigned index = findRunWithTallestColumns(); | 130 unsigned index = findRunWithTallestColumns(); |
| 131 LayoutUnit startOffset = index > 0 ? m_contentRuns[index - 1].breakOffse
t() : LayoutUnit(); | 131 LayoutUnit startOffset = index > 0 ? m_contentRuns[index - 1].breakOffse
t() : LayoutUnit(); |
| 132 return std::max<LayoutUnit>(m_contentRuns[index].columnLogicalHeight(sta
rtOffset), m_minimumColumnHeight); | 132 return std::max<LayoutUnit>(m_contentRuns[index].columnLogicalHeight(sta
rtOffset), m_minimumColumnHeight); |
| 133 } | 133 } |
| 134 | 134 |
| 135 if (columnCount() <= computedColumnCount()) { | 135 if (columnCount() <= computedColumnCount()) { |
| 136 // With the current column height, the content fits without creating ove
rflowing columns. We're done. | 136 // With the current column height, the content fits without creating ove
rflowing columns. We're done. |
| 137 return m_computedColumnHeight; | 137 return m_computedColumnHeight; |
| 138 } | 138 } |
| 139 | 139 |
| 140 if (forcedBreaksCount() > 1 && forcedBreaksCount() >= computedColumnCount())
{ | 140 if (forcedBreaksCount() >= computedColumnCount()) { |
| 141 // Too many forced breaks to allow any implicit breaks. Initial balancin
g should already | 141 // Too many forced breaks to allow any implicit breaks. Initial balancin
g should already |
| 142 // have set a good height. There's nothing more we should do. | 142 // have set a good height. There's nothing more we should do. |
| 143 return m_computedColumnHeight; | 143 return m_computedColumnHeight; |
| 144 } | 144 } |
| 145 | 145 |
| 146 // If the initial guessed column height wasn't enough, stretch it now. Stret
ch by the lowest | 146 // If the initial guessed column height wasn't enough, stretch it now. Stret
ch by the lowest |
| 147 // amount of space shortage found during layout. | 147 // amount of space shortage found during layout. |
| 148 | 148 |
| 149 ASSERT(m_minSpaceShortage > 0); // We should never _shrink_ the height! | 149 ASSERT(m_minSpaceShortage > 0); // We should never _shrink_ the height! |
| 150 ASSERT(m_minSpaceShortage != RenderFlowThread::maxLogicalHeight()); // If th
is happens, we probably have a bug. | 150 ASSERT(m_minSpaceShortage != RenderFlowThread::maxLogicalHeight()); // If th
is happens, we probably have a bug. |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 fragments.append(fragment); | 584 fragments.append(fragment); |
| 585 } | 585 } |
| 586 } | 586 } |
| 587 | 587 |
| 588 const char* RenderMultiColumnSet::renderName() const | 588 const char* RenderMultiColumnSet::renderName() const |
| 589 { | 589 { |
| 590 return "RenderMultiColumnSet"; | 590 return "RenderMultiColumnSet"; |
| 591 } | 591 } |
| 592 | 592 |
| 593 } | 593 } |
| OLD | NEW |