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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "core/rendering/RenderMultiColumnSet.h" | 29 #include "core/rendering/RenderMultiColumnSet.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 RenderMultiColumnFlowThread::RenderMultiColumnFlowThread() | 33 RenderMultiColumnFlowThread::RenderMultiColumnFlowThread() |
34 : m_columnCount(1) | 34 : m_columnCount(1) |
35 , m_columnHeightAvailable(0) | 35 , m_columnHeightAvailable(0) |
36 , m_inBalancingPass(false) | 36 , m_inBalancingPass(false) |
37 , m_needsColumnHeightsRecalculation(false) | 37 , m_needsColumnHeightsRecalculation(false) |
| 38 , m_progressionIsInline(true) |
38 { | 39 { |
39 setFlowThreadState(InsideInFlowThread); | 40 setFlowThreadState(InsideInFlowThread); |
40 } | 41 } |
41 | 42 |
42 RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread() | 43 RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread() |
43 { | 44 { |
44 } | 45 } |
45 | 46 |
46 RenderMultiColumnFlowThread* RenderMultiColumnFlowThread::createAnonymous(Docume
nt& document, RenderStyle* parentStyle) | 47 RenderMultiColumnFlowThread* RenderMultiColumnFlowThread::createAnonymous(Docume
nt& document, RenderStyle* parentStyle) |
47 { | 48 { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 163 |
163 for (RenderMultiColumnSet* columnSet = firstMultiColumnSet(); columnSet; col
umnSet = columnSet->nextSiblingMultiColumnSet()) { | 164 for (RenderMultiColumnSet* columnSet = firstMultiColumnSet(); columnSet; col
umnSet = columnSet->nextSiblingMultiColumnSet()) { |
164 if (!m_inBalancingPass) { | 165 if (!m_inBalancingPass) { |
165 // This is the initial layout pass. We need to reset the column heig
ht, because contents | 166 // This is the initial layout pass. We need to reset the column heig
ht, because contents |
166 // typically have changed. | 167 // typically have changed. |
167 columnSet->resetColumnHeight(); | 168 columnSet->resetColumnHeight(); |
168 } | 169 } |
169 } | 170 } |
170 | 171 |
171 invalidateRegions(); | 172 invalidateRegions(); |
172 m_needsColumnHeightsRecalculation = requiresBalancing(); | 173 m_needsColumnHeightsRecalculation = heightIsAuto(); |
173 layout(); | 174 layout(); |
174 } | 175 } |
175 | 176 |
176 bool RenderMultiColumnFlowThread::recalculateColumnHeights() | 177 bool RenderMultiColumnFlowThread::recalculateColumnHeights() |
177 { | 178 { |
178 // All column sets that needed layout have now been laid out, so we can fina
lly validate them. | 179 // All column sets that needed layout have now been laid out, so we can fina
lly validate them. |
179 validateRegions(); | 180 validateRegions(); |
180 | 181 |
181 if (!m_needsColumnHeightsRecalculation) | 182 if (!m_needsColumnHeightsRecalculation) |
182 return false; | 183 return false; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 315 } |
315 | 316 |
316 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const | 317 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const |
317 { | 318 { |
318 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet()) | 319 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet()) |
319 return columnSet->pageLogicalHeight(); | 320 return columnSet->pageLogicalHeight(); |
320 return false; | 321 return false; |
321 } | 322 } |
322 | 323 |
323 } | 324 } |
OLD | NEW |