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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Renamed members Created 4 years, 2 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
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 "core/layout/LayoutPagedFlowThread.h" 5 #include "core/layout/LayoutPagedFlowThread.h"
6 6
7 #include "core/layout/LayoutMultiColumnSet.h" 7 #include "core/layout/LayoutMultiColumnSet.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 LayoutPagedFlowThread* LayoutPagedFlowThread::createAnonymous(Document& document , const ComputedStyle& parentStyle) 11 LayoutPagedFlowThread* LayoutPagedFlowThread::createAnonymous(Document& document , const ComputedStyle& parentStyle)
12 { 12 {
13 LayoutPagedFlowThread* pagedFlowThread = new LayoutPagedFlowThread(); 13 LayoutPagedFlowThread* pagedFlowThread = new LayoutPagedFlowThread();
14 pagedFlowThread->setDocumentForAnonymous(&document); 14 pagedFlowThread->setDocumentForAnonymous(&document);
15 pagedFlowThread->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(par entStyle, BLOCK)); 15 pagedFlowThread->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(par entStyle, EDisplay::Block));
16 return pagedFlowThread; 16 return pagedFlowThread;
17 } 17 }
18 18
19 int LayoutPagedFlowThread::pageCount() 19 int LayoutPagedFlowThread::pageCount()
20 { 20 {
21 if (LayoutMultiColumnSet* columnSet = firstMultiColumnSet()) 21 if (LayoutMultiColumnSet* columnSet = firstMultiColumnSet())
22 return columnSet->actualColumnCount(); 22 return columnSet->actualColumnCount();
23 return 1; 23 return 1;
24 } 24 }
25 25
(...skipping 23 matching lines...) Expand all
49 if (!pageLogicalHeight) 49 if (!pageLogicalHeight)
50 return; // Page height not calculated yet. Happens in the first layout p ass when height is auto. 50 return; // Page height not calculated yet. Happens in the first layout p ass when height is auto.
51 // Ensure uniform page height. We don't want the last page to be shorter tha n the others, 51 // Ensure uniform page height. We don't want the last page to be shorter tha n the others,
52 // or it'll be impossible to scroll that whole page into view. 52 // or it'll be impossible to scroll that whole page into view.
53 LayoutUnit paddedLogicalBottomInFlowThread = pageLogicalHeight * pageCount() ; 53 LayoutUnit paddedLogicalBottomInFlowThread = pageLogicalHeight * pageCount() ;
54 ASSERT(paddedLogicalBottomInFlowThread >= columnSet->logicalBottomInFlowThre ad()); 54 ASSERT(paddedLogicalBottomInFlowThread >= columnSet->logicalBottomInFlowThre ad());
55 columnSet->endFlow(paddedLogicalBottomInFlowThread); 55 columnSet->endFlow(paddedLogicalBottomInFlowThread);
56 } 56 }
57 57
58 } // namespace blink 58 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698