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, | |
259 // and instead leave you with dangling root line box pointers. But since thi s is how it is done | |
260 // in other parts of the code that deal with reparenting layoutObjects, let' s do the cleanup on our | |
261 // own here as well. | |
262 deleteLineBoxTree(); | |
leviw_travelin_and_unemployed
2015/09/11 15:38:39
Perhaps assert !firstLineBox?
mstensho (USE GERRIT)
2015/09/11 18:03:49
And readers of the code will go "huh?", but I can
| |
263 | |
264 destroy(); | 258 destroy(); |
265 } | 259 } |
266 | 260 |
267 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst | 261 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst |
268 { | 262 { |
269 if (!hasValidColumnSetInfo()) | 263 if (!hasValidColumnSetInfo()) |
270 return LayoutSize(0, 0); | 264 return LayoutSize(0, 0); |
271 | 265 |
272 LayoutPoint flowThreadPoint = flipForWritingMode(point); | 266 LayoutPoint flowThreadPoint = flipForWritingMode(point); |
273 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x(); | 267 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x(); |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
965 if (LayoutMultiColumnSet* multicolSet = columnSetAtBlockOffset(offset)) { | 959 if (LayoutMultiColumnSet* multicolSet = columnSetAtBlockOffset(offset)) { |
966 multicolSet->addContentRun(offset); | 960 multicolSet->addContentRun(offset); |
967 if (offsetBreakAdjustment) | 961 if (offsetBreakAdjustment) |
968 *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRe mainingLogicalHeightForOffset(offset, AssociateWithFormerPage) : LayoutUnit(); | 962 *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRe mainingLogicalHeightForOffset(offset, AssociateWithFormerPage) : LayoutUnit(); |
969 return true; | 963 return true; |
970 } | 964 } |
971 return false; | 965 return false; |
972 } | 966 } |
973 | 967 |
974 } | 968 } |
OLD | NEW |