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

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: 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,
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
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 }
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