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

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

Issue 688703003: [New Multicolumn] Add RenderMultiColumnSpannerSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: There won't ever be any intervening non-multicol fragmentation contexts. Created 6 years, 1 month 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
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (!m_contentRuns.isEmpty() && endOffsetFromFirstPage <= m_contentRuns.last ().breakOffset()) 199 if (!m_contentRuns.isEmpty() && endOffsetFromFirstPage <= m_contentRuns.last ().breakOffset())
200 return; 200 return;
201 // Append another item as long as we haven't exceeded used column count. Wha t ends up in the 201 // Append another item as long as we haven't exceeded used column count. Wha t ends up in the
202 // overflow area shouldn't affect column balancing. 202 // overflow area shouldn't affect column balancing.
203 if (m_contentRuns.size() < usedColumnCount()) 203 if (m_contentRuns.size() < usedColumnCount())
204 m_contentRuns.append(ContentRun(endOffsetFromFirstPage)); 204 m_contentRuns.append(ContentRun(endOffsetFromFirstPage));
205 } 205 }
206 206
207 bool RenderMultiColumnSet::recalculateColumnHeight(BalancedHeightCalculation cal culationMode) 207 bool RenderMultiColumnSet::recalculateColumnHeight(BalancedHeightCalculation cal culationMode)
208 { 208 {
209 if (previousSiblingMultiColumnSet()) {
210 // FIXME: column spanner layout is not yet implemented. Until it's in pl ace, we only operate
211 // on the first set during layout. We need to ignore the others here, or assertions will
212 // fail.
213 return false;
214 }
209 ASSERT(multiColumnFlowThread()->heightIsAuto()); 215 ASSERT(multiColumnFlowThread()->heightIsAuto());
210 216
211 LayoutUnit oldColumnHeight = m_columnHeight; 217 LayoutUnit oldColumnHeight = m_columnHeight;
212 if (calculationMode == GuessFromFlowThreadPortion) { 218 if (calculationMode == GuessFromFlowThreadPortion) {
213 // Post-process the content runs and find out where the implicit breaks will occur. 219 // Post-process the content runs and find out where the implicit breaks will occur.
214 distributeImplicitBreaks(); 220 distributeImplicitBreaks();
215 } 221 }
216 LayoutUnit newColumnHeight = calculateColumnHeight(calculationMode); 222 LayoutUnit newColumnHeight = calculateColumnHeight(calculationMode);
217 setAndConstrainColumnHeight(newColumnHeight); 223 setAndConstrainColumnHeight(newColumnHeight);
218 224
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 628
623 void RenderMultiColumnSet::detachRegion() 629 void RenderMultiColumnSet::detachRegion()
624 { 630 {
625 if (m_flowThread) { 631 if (m_flowThread) {
626 m_flowThread->removeRegionFromThread(this); 632 m_flowThread->removeRegionFromThread(this);
627 m_flowThread = 0; 633 m_flowThread = 0;
628 } 634 }
629 } 635 }
630 636
631 } 637 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/RenderMultiColumnSpannerSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698