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

Side by Side Diff: Source/core/layout/LayoutPagedFlowThread.cpp

Issue 1282353002: Prepare height calculation methods in LayoutFlowThread for nested multicol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "core/layout/LayoutPagedFlowThread.h" 6 #include "core/layout/LayoutPagedFlowThread.h"
7 7
8 #include "core/layout/LayoutMultiColumnSet.h" 8 #include "core/layout/LayoutMultiColumnSet.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 28 matching lines...) Expand all
39 39
40 void LayoutPagedFlowThread::layout() 40 void LayoutPagedFlowThread::layout()
41 { 41 {
42 ASSERT(firstMultiColumnBox() == lastMultiColumnBox()); // There should eithe r be zero or one of those for paged layout. 42 ASSERT(firstMultiColumnBox() == lastMultiColumnBox()); // There should eithe r be zero or one of those for paged layout.
43 setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis()) ; 43 setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis()) ;
44 LayoutMultiColumnFlowThread::layout(); 44 LayoutMultiColumnFlowThread::layout();
45 45
46 LayoutMultiColumnSet* columnSet = firstMultiColumnSet(); 46 LayoutMultiColumnSet* columnSet = firstMultiColumnSet();
47 if (!columnSet) 47 if (!columnSet)
48 return; 48 return;
49 LayoutUnit pageLogicalHeight = columnSet->pageLogicalHeight(); 49 LayoutUnit pageLogicalHeight = columnSet->pageLogicalHeightForOffset(LayoutU nit());
50 if (!pageLogicalHeight) 50 if (!pageLogicalHeight)
51 return; // Page height not calculated yet. Happens in the first layout p ass when height is auto. 51 return; // Page height not calculated yet. Happens in the first layout p ass when height is auto.
52 // Ensure uniform page height. We don't want the last page to be shorter tha n the others, 52 // Ensure uniform page height. We don't want the last page to be shorter tha n the others,
53 // or it'll be impossible to scroll that whole page into view. 53 // or it'll be impossible to scroll that whole page into view.
54 LayoutUnit paddedLogicalBottomInFlowThread = pageLogicalHeight * pageCount() ; 54 LayoutUnit paddedLogicalBottomInFlowThread = pageLogicalHeight * pageCount() ;
55 ASSERT(paddedLogicalBottomInFlowThread >= columnSet->logicalBottomInFlowThre ad()); 55 ASSERT(paddedLogicalBottomInFlowThread >= columnSet->logicalBottomInFlowThre ad());
56 columnSet->endFlow(paddedLogicalBottomInFlowThread); 56 columnSet->endFlow(paddedLogicalBottomInFlowThread);
57 } 57 }
58 58
59 } // namespace blink 59 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnSet.cpp ('k') | Source/core/layout/MultiColumnFragmentainerGroup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698