| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 if (!m_contentRuns.isEmpty() && endOffsetFromFirstPage <= m_contentRuns.last
().breakOffset()) | 199 if (!m_contentRuns.isEmpty() && endOffsetFromFirstPage <= m_contentRuns.last
().breakOffset()) |
| 200 return; | 200 return; |
| 201 // Append another item as long as we haven't exceeded used column count. Wha
t ends up in the | 201 // Append another item as long as we haven't exceeded used column count. Wha
t ends up in the |
| 202 // overflow area shouldn't affect column balancing. | 202 // overflow area shouldn't affect column balancing. |
| 203 if (m_contentRuns.size() < usedColumnCount()) | 203 if (m_contentRuns.size() < usedColumnCount()) |
| 204 m_contentRuns.append(ContentRun(endOffsetFromFirstPage)); | 204 m_contentRuns.append(ContentRun(endOffsetFromFirstPage)); |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool RenderMultiColumnSet::recalculateColumnHeight(BalancedHeightCalculation cal
culationMode) | 207 bool RenderMultiColumnSet::recalculateColumnHeight(BalancedHeightCalculation cal
culationMode) |
| 208 { | 208 { |
| 209 if (previousSiblingMultiColumnSet()) { |
| 210 // FIXME: column spanner layout is not yet implemented. Until it's in pl
ace, we only operate |
| 211 // on the first set during layout. We need to ignore the others here, or
assertions will |
| 212 // fail. |
| 213 return false; |
| 214 } |
| 209 ASSERT(multiColumnFlowThread()->heightIsAuto()); | 215 ASSERT(multiColumnFlowThread()->heightIsAuto()); |
| 210 | 216 |
| 211 LayoutUnit oldColumnHeight = m_columnHeight; | 217 LayoutUnit oldColumnHeight = m_columnHeight; |
| 212 if (calculationMode == GuessFromFlowThreadPortion) { | 218 if (calculationMode == GuessFromFlowThreadPortion) { |
| 213 // Post-process the content runs and find out where the implicit breaks
will occur. | 219 // Post-process the content runs and find out where the implicit breaks
will occur. |
| 214 distributeImplicitBreaks(); | 220 distributeImplicitBreaks(); |
| 215 } | 221 } |
| 216 LayoutUnit newColumnHeight = calculateColumnHeight(calculationMode); | 222 LayoutUnit newColumnHeight = calculateColumnHeight(calculationMode); |
| 217 setAndConstrainColumnHeight(newColumnHeight); | 223 setAndConstrainColumnHeight(newColumnHeight); |
| 218 | 224 |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 628 |
| 623 void RenderMultiColumnSet::detachRegion() | 629 void RenderMultiColumnSet::detachRegion() |
| 624 { | 630 { |
| 625 if (m_flowThread) { | 631 if (m_flowThread) { |
| 626 m_flowThread->removeRegionFromThread(this); | 632 m_flowThread->removeRegionFromThread(this); |
| 627 m_flowThread = 0; | 633 m_flowThread = 0; |
| 628 } | 634 } |
| 629 } | 635 } |
| 630 | 636 |
| 631 } | 637 } |
| OLD | NEW |