OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ng/layout_ng_block_flow.h" | 5 #include "core/layout/ng/layout_ng_block_flow.h" |
| 6 #include "core/layout/ng/ng_constraint_space.h" |
| 7 #include "core/layout/ng/ng_block_layout_algorithm.h" |
| 8 #include "core/layout/ng/ng_box_iterator.h" |
| 9 #include "core/layout/ng/ng_fragment.h" |
| 10 #include "core/layout/LayoutAnalyzer.h" |
6 | 11 |
7 namespace blink { | 12 namespace blink { |
8 | 13 |
9 LayoutNGBlockFlow::LayoutNGBlockFlow(Element* element) | 14 LayoutNGBlockFlow::LayoutNGBlockFlow(Element* element) |
10 : LayoutBlockFlow(element) {} | 15 : LayoutBlockFlow(element) {} |
11 | 16 |
12 bool LayoutNGBlockFlow::isOfType(LayoutObjectType type) const { | 17 bool LayoutNGBlockFlow::isOfType(LayoutObjectType type) const { |
13 return type == LayoutObjectNGBlockFlow || LayoutBlockFlow::isOfType(type); | 18 return type == LayoutObjectNGBlockFlow || LayoutBlockFlow::isOfType(type); |
14 } | 19 } |
15 | 20 |
| 21 void LayoutNGBlockFlow::layoutBlock(bool relayoutChildren) { |
| 22 LayoutAnalyzer::BlockScope analyzer(*this); |
| 23 |
| 24 const auto& constraintSpace = NGConstraintSpace::fromLayoutObject(*this); |
| 25 NGBox box(this); |
| 26 box.layout(constraintSpace); |
| 27 clearNeedsLayout(); |
| 28 } |
| 29 |
16 } // namespace blink | 30 } // namespace blink |
OLD | NEW |