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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 ASSERT(!previousSibling()); | 77 ASSERT(!previousSibling()); |
78 ASSERT(!nextSibling()); | 78 ASSERT(!nextSibling()); |
79 | 79 |
80 // Finally we can promote all flow thread's children. Before we move them to
the flow thread's | 80 // Finally we can promote all flow thread's children. Before we move them to
the flow thread's |
81 // container, we need to unregister the flow thread, so that they aren't jus
t re-added again to | 81 // container, we need to unregister the flow thread, so that they aren't jus
t re-added again to |
82 // the flow thread that we're trying to empty. | 82 // the flow thread that we're trying to empty. |
83 multicolContainer->resetMultiColumnFlowThread(); | 83 multicolContainer->resetMultiColumnFlowThread(); |
84 moveAllChildrenTo(multicolContainer, true); | 84 moveAllChildrenTo(multicolContainer, true); |
85 | 85 |
| 86 // FIXME: it's scary that neither destroy() nor the move*Children* methods t
ake care of this, |
| 87 // and instead leave you with dangling root line box pointers. But since thi
s is how it is done |
| 88 // in other parts of the code that deal with reparenting renderers, let's do
the cleanup on our |
| 89 // own here as well. |
| 90 deleteLineBoxTree(); |
| 91 |
86 destroy(); | 92 destroy(); |
87 } | 93 } |
88 | 94 |
89 void RenderMultiColumnFlowThread::layoutColumns(bool relayoutChildren, SubtreeLa
youtScope& layoutScope) | 95 void RenderMultiColumnFlowThread::layoutColumns(bool relayoutChildren, SubtreeLa
youtScope& layoutScope) |
90 { | 96 { |
91 // Update the dimensions of our regions before we lay out the flow thread. | 97 // Update the dimensions of our regions before we lay out the flow thread. |
92 // FIXME: Eventually this is going to get way more complicated, and we will
be destroying regions | 98 // FIXME: Eventually this is going to get way more complicated, and we will
be destroying regions |
93 // instead of trying to keep them around. | 99 // instead of trying to keep them around. |
94 RenderBlockFlow* container = multiColumnBlockFlow(); | 100 RenderBlockFlow* container = multiColumnBlockFlow(); |
95 bool shouldInvalidateRegions = false; | 101 bool shouldInvalidateRegions = false; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 { | 273 { |
268 for (RenderBox* renderer = parentBox()->lastChildBox(); renderer; renderer =
renderer->previousSiblingBox()) { | 274 for (RenderBox* renderer = parentBox()->lastChildBox(); renderer; renderer =
renderer->previousSiblingBox()) { |
269 if (renderer->isRenderMultiColumnSet()) | 275 if (renderer->isRenderMultiColumnSet()) |
270 return toRenderMultiColumnSet(renderer)->computedColumnHeight(); | 276 return toRenderMultiColumnSet(renderer)->computedColumnHeight(); |
271 } | 277 } |
272 // A column set hasn't been created yet. Height may already be known if colu
mn-fill is 'auto', though. | 278 // A column set hasn't been created yet. Height may already be known if colu
mn-fill is 'auto', though. |
273 return !requiresBalancing(); | 279 return !requiresBalancing(); |
274 } | 280 } |
275 | 281 |
276 } | 282 } |
OLD | NEW |