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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 ASSERT(!previousSibling()); | 249 ASSERT(!previousSibling()); |
250 ASSERT(!nextSibling()); | 250 ASSERT(!nextSibling()); |
251 | 251 |
252 // Finally we can promote all flow thread's children. Before we move them to
the flow thread's | 252 // Finally we can promote all flow thread's children. Before we move them to
the flow thread's |
253 // container, we need to unregister the flow thread, so that they aren't jus
t re-added again to | 253 // container, we need to unregister the flow thread, so that they aren't jus
t re-added again to |
254 // the flow thread that we're trying to empty. | 254 // the flow thread that we're trying to empty. |
255 multicolContainer->resetMultiColumnFlowThread(); | 255 multicolContainer->resetMultiColumnFlowThread(); |
256 moveAllChildrenTo(multicolContainer, true); | 256 moveAllChildrenTo(multicolContainer, true); |
257 | 257 |
258 // FIXME: it's scary that neither destroy() nor the move*Children* methods t
ake care of this, | 258 // We used to manually nuke the line box tree here, but that should happen a
utomatically when |
259 // and instead leave you with dangling root line box pointers. But since thi
s is how it is done | 259 // moving children around (the code above). |
260 // in other parts of the code that deal with reparenting layoutObjects, let'
s do the cleanup on our | 260 ASSERT(!firstLineBox()); |
261 // own here as well. | |
262 deleteLineBoxTree(); | |
263 | 261 |
264 destroy(); | 262 destroy(); |
265 } | 263 } |
266 | 264 |
267 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c
onst | 265 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c
onst |
268 { | 266 { |
269 if (!hasValidColumnSetInfo()) | 267 if (!hasValidColumnSetInfo()) |
270 return LayoutSize(0, 0); | 268 return LayoutSize(0, 0); |
271 | 269 |
272 LayoutPoint flowThreadPoint = flipForWritingMode(point); | 270 LayoutPoint flowThreadPoint = flipForWritingMode(point); |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 if (LayoutMultiColumnSet* multicolSet = columnSetAtBlockOffset(offset)) { | 963 if (LayoutMultiColumnSet* multicolSet = columnSetAtBlockOffset(offset)) { |
966 multicolSet->addContentRun(offset); | 964 multicolSet->addContentRun(offset); |
967 if (offsetBreakAdjustment) | 965 if (offsetBreakAdjustment) |
968 *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRe
mainingLogicalHeightForOffset(offset, AssociateWithFormerPage) : LayoutUnit(); | 966 *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRe
mainingLogicalHeightForOffset(offset, AssociateWithFormerPage) : LayoutUnit(); |
969 return true; | 967 return true; |
970 } | 968 } |
971 return false; | 969 return false; |
972 } | 970 } |
973 | 971 |
974 } | 972 } |
OLD | NEW |