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

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

Issue 1461923005: When balancing columns, we must check inner multicols for unbreakable content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 multicolContainer->resetMultiColumnFlowThread(); 255 multicolContainer->resetMultiColumnFlowThread();
256 moveAllChildrenTo(multicolContainer, true); 256 moveAllChildrenTo(multicolContainer, true);
257 257
258 // We used to manually nuke the line box tree here, but that should happen a utomatically when 258 // We used to manually nuke the line box tree here, but that should happen a utomatically when
259 // moving children around (the code above). 259 // moving children around (the code above).
260 ASSERT(!firstLineBox()); 260 ASSERT(!firstLineBox());
261 261
262 destroy(); 262 destroy();
263 } 263 }
264 264
265 LayoutUnit LayoutMultiColumnFlowThread::tallestUnbreakableLogicalHeight(LayoutUn it offsetInFlowThread) const
266 {
267 if (LayoutMultiColumnSet* multicolSet = columnSetAtBlockOffset(offsetInFlowT hread))
268 return multicolSet->tallestUnbreakableLogicalHeight();
269 return LayoutUnit();
270 }
271
265 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst 272 LayoutSize LayoutMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst
266 { 273 {
267 if (!hasValidColumnSetInfo()) 274 if (!hasValidColumnSetInfo())
268 return LayoutSize(0, 0); 275 return LayoutSize(0, 0);
269 276
270 LayoutPoint flowThreadPoint = flipForWritingMode(point); 277 LayoutPoint flowThreadPoint = flipForWritingMode(point);
271 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x(); 278 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x();
272 return flowThreadTranslationAtOffset(blockOffset); 279 return flowThreadTranslationAtOffset(blockOffset);
273 } 280 }
274 281
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 LayoutMultiColumnSet* columnSet = columnSetAtBlockOffset(logicalTopInFlowThr eadAfterPagination); 929 LayoutMultiColumnSet* columnSet = columnSetAtBlockOffset(logicalTopInFlowThr eadAfterPagination);
923 if (!columnSet) 930 if (!columnSet)
924 return; 931 return;
925 MultiColumnFragmentainerGroup& row = columnSet->fragmentainerGroupAtFlowThre adOffset(logicalTopInFlowThreadAfterPagination); 932 MultiColumnFragmentainerGroup& row = columnSet->fragmentainerGroupAtFlowThre adOffset(logicalTopInFlowThreadAfterPagination);
926 if (!row.isLastGroup()) 933 if (!row.isLastGroup())
927 return; 934 return;
928 appendNewFragmentainerGroupIfNeeded(logicalTopInFlowThreadAfterPagination); 935 appendNewFragmentainerGroupIfNeeded(logicalTopInFlowThreadAfterPagination);
929 } 936 }
930 937
931 } 938 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698