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

Side by Side Diff: Source/core/rendering/RenderMultiColumnFlowThread.cpp

Issue 236913002: [New Multicolumn] Destroy line box tree when evacuating the flowthread for multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review Created 6 years, 8 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
« no previous file with comments | « LayoutTests/fast/multicol/inline-children-crash-expected.txt ('k') | 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/inline-children-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698