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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc

Issue 2281153002: [layoutng] async layout part 1: Change the API to support async (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_derived_constraint_space.h" 6 #include "core/layout/ng/ng_derived_constraint_space.h"
7 #include "core/layout/ng/ng_block_layout_algorithm.h" 7 #include "core/layout/ng/ng_block_layout_algorithm.h"
8 #include "core/layout/ng/ng_box_iterator.h" 8 #include "core/layout/ng/ng_box_iterator.h"
9 #include "core/layout/ng/ng_fragment.h" 9 #include "core/layout/ng/ng_fragment.h"
10 #include "core/layout/LayoutAnalyzer.h" 10 #include "core/layout/LayoutAnalyzer.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 LayoutNGBlockFlow::LayoutNGBlockFlow(Element* element) 14 LayoutNGBlockFlow::LayoutNGBlockFlow(Element* element)
15 : LayoutBlockFlow(element) {} 15 : LayoutBlockFlow(element) {}
16 16
17 bool LayoutNGBlockFlow::isOfType(LayoutObjectType type) const { 17 bool LayoutNGBlockFlow::isOfType(LayoutObjectType type) const {
18 return type == LayoutObjectNGBlockFlow || LayoutBlockFlow::isOfType(type); 18 return type == LayoutObjectNGBlockFlow || LayoutBlockFlow::isOfType(type);
19 } 19 }
20 20
21 void LayoutNGBlockFlow::layoutBlock(bool relayoutChildren) { 21 void LayoutNGBlockFlow::layoutBlock(bool relayoutChildren) {
22 LayoutAnalyzer::BlockScope analyzer(*this); 22 LayoutAnalyzer::BlockScope analyzer(*this);
23 23
24 const auto* constraintSpace = 24 const auto* constraint_space =
25 NGDerivedConstraintSpace::CreateFromLayoutObject(*this); 25 NGDerivedConstraintSpace::CreateFromLayoutObject(*this);
26 NGBox box(this); 26 NGBox box(this);
27 box.layout(constraintSpace); 27 NGFragment* fragment;
28 while (!box.Layout(constraint_space, &fragment))
29 ;
28 clearNeedsLayout(); 30 clearNeedsLayout();
29 } 31 }
30 32
31 } // namespace blink 33 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698