Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1280)

Side by Side Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1311023003: No longer any need to delete the line box tree on our own. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698