OLD | NEW |
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 namespace blink { | 8 namespace blink { |
9 | 9 |
10 LayoutPagedFlowThread* LayoutPagedFlowThread::createAnonymous(Document& document
, const LayoutStyle& parentStyle) | 10 LayoutPagedFlowThread* LayoutPagedFlowThread::createAnonymous(Document& document
, const ComputedStyle& parentStyle) |
11 { | 11 { |
12 LayoutPagedFlowThread* renderer = new LayoutPagedFlowThread(); | 12 LayoutPagedFlowThread* renderer = new LayoutPagedFlowThread(); |
13 renderer->setDocumentForAnonymous(&document); | 13 renderer->setDocumentForAnonymous(&document); |
14 renderer->setStyle(LayoutStyle::createAnonymousStyleWithDisplay(parentStyle,
BLOCK)); | 14 renderer->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parentStyl
e, BLOCK)); |
15 return renderer; | 15 return renderer; |
16 } | 16 } |
17 | 17 |
18 bool LayoutPagedFlowThread::needsNewWidth() const | 18 bool LayoutPagedFlowThread::needsNewWidth() const |
19 { | 19 { |
20 return progressionIsInline() != pagedBlockFlow()->style()->hasInlinePaginati
onAxis(); | 20 return progressionIsInline() != pagedBlockFlow()->style()->hasInlinePaginati
onAxis(); |
21 } | 21 } |
22 | 22 |
23 void LayoutPagedFlowThread::updateLogicalWidth() | 23 void LayoutPagedFlowThread::updateLogicalWidth() |
24 { | 24 { |
25 // As long as we inherit from LayoutMultiColumnFlowThread, we need to bypass
its implementation | 25 // As long as we inherit from LayoutMultiColumnFlowThread, we need to bypass
its implementation |
26 // here. We're not split into columns, so the flow thread width will just be
whatever is | 26 // here. We're not split into columns, so the flow thread width will just be
whatever is |
27 // available in the containing block. | 27 // available in the containing block. |
28 LayoutFlowThread::updateLogicalWidth(); | 28 LayoutFlowThread::updateLogicalWidth(); |
29 } | 29 } |
30 | 30 |
31 void LayoutPagedFlowThread::layout() | 31 void LayoutPagedFlowThread::layout() |
32 { | 32 { |
33 setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis())
; | 33 setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis())
; |
34 LayoutMultiColumnFlowThread::layout(); | 34 LayoutMultiColumnFlowThread::layout(); |
35 } | 35 } |
36 | 36 |
37 } // namespace blink | 37 } // namespace blink |
OLD | NEW |