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

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

Issue 1492143002: Add support for printing multicol containers, and enable it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "core/layout/ColumnBalancer.h" 7 #include "core/layout/ColumnBalancer.h"
8 8
9 #include "core/layout/LayoutMultiColumnFlowThread.h" 9 #include "core/layout/LayoutMultiColumnFlowThread.h"
10 #include "core/layout/LayoutMultiColumnSet.h" 10 #include "core/layout/LayoutMultiColumnSet.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (box.hasForcedBreakAfter()) 109 if (box.hasForcedBreakAfter())
110 addContentRun(flowThreadOffset() + box.logicalHeight()); 110 addContentRun(flowThreadOffset() + box.logicalHeight());
111 111
112 if (box.paginationBreakability() != LayoutBox::AllowAnyBreaks) { 112 if (box.paginationBreakability() != LayoutBox::AllowAnyBreaks) {
113 LayoutUnit unsplittableLogicalHeight = box.logicalHeight(); 113 LayoutUnit unsplittableLogicalHeight = box.logicalHeight();
114 if (box.isFloating()) 114 if (box.isFloating())
115 unsplittableLogicalHeight += box.marginBefore() + box.marginAfter(); 115 unsplittableLogicalHeight += box.marginBefore() + box.marginAfter();
116 m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLogical Height, unsplittableLogicalHeight); 116 m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLogical Height, unsplittableLogicalHeight);
117 } else if (box.isLayoutBlockFlow()) { 117 } else if (box.isLayoutBlockFlow()) {
118 if (LayoutMultiColumnFlowThread* innerFlowThread = toLayoutBlockFlow(box ).multiColumnFlowThread()) { 118 if (LayoutMultiColumnFlowThread* innerFlowThread = toLayoutBlockFlow(box ).multiColumnFlowThread()) {
119 LayoutUnit offsetInInnerFlowThread = flowThreadOffset() - innerFlowT hread->blockOffsetInEnclosingFlowThread(); 119 LayoutUnit offsetInInnerFlowThread = flowThreadOffset() - innerFlowT hread->blockOffsetInEnclosingFragmentationContext();
120 LayoutUnit innerUnbreakableHeight = innerFlowThread->tallestUnbreaka bleLogicalHeight(offsetInInnerFlowThread); 120 LayoutUnit innerUnbreakableHeight = innerFlowThread->tallestUnbreaka bleLogicalHeight(offsetInInnerFlowThread);
121 m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLog icalHeight, innerUnbreakableHeight); 121 m_tallestUnbreakableLogicalHeight = std::max(m_tallestUnbreakableLog icalHeight, innerUnbreakableHeight);
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 void InitialColumnHeightFinder::examineBoxBeforeLeaving(const LayoutBox& box) 126 void InitialColumnHeightFinder::examineBoxBeforeLeaving(const LayoutBox& box)
127 { 127 {
128 } 128 }
129 129
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 recordSpaceShortage(logicalOffsetFromCurrentColumn + lineHeight - m_pend ingStrut); 313 recordSpaceShortage(logicalOffsetFromCurrentColumn + lineHeight - m_pend ingStrut);
314 m_pendingStrut = LayoutUnit::min(); 314 m_pendingStrut = LayoutUnit::min();
315 return; 315 return;
316 } 316 }
317 ASSERT(isFirstAfterBreak(lineTopInFlowThread) || !line.paginationStrut()); 317 ASSERT(isFirstAfterBreak(lineTopInFlowThread) || !line.paginationStrut());
318 if (isFirstAfterBreak(lineTopInFlowThread)) 318 if (isFirstAfterBreak(lineTopInFlowThread))
319 recordSpaceShortage(lineHeight - line.paginationStrut()); 319 recordSpaceShortage(lineHeight - line.paginationStrut());
320 } 320 }
321 321
322 } // namespace blink 322 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/html.css ('k') | third_party/WebKit/Source/core/layout/FragmentationContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698