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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h

Issue 2456973002: [LayoutNG] Move ng_block_layout_algorithm to use constraint space builder. (Closed)
Patch Set: rebase. Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc ('k') | no next file » | 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 #ifndef NGLayoutAlgorithm_h 5 #ifndef NGLayoutAlgorithm_h
6 #define NGLayoutAlgorithm_h 6 #define NGLayoutAlgorithm_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
(...skipping 12 matching lines...) Expand all
23 NGLayoutAlgorithm() {} 23 NGLayoutAlgorithm() {}
24 virtual ~NGLayoutAlgorithm() {} 24 virtual ~NGLayoutAlgorithm() {}
25 25
26 // Actual layout function. Lays out the children and descendents within the 26 // Actual layout function. Lays out the children and descendents within the
27 // constraints given by the NGConstraintSpace. Returns a fragment with the 27 // constraints given by the NGConstraintSpace. Returns a fragment with the
28 // resulting layout information. 28 // resulting layout information.
29 // This function can not be const because for interruptible layout, we have 29 // This function can not be const because for interruptible layout, we have
30 // to be able to store state information. 30 // to be able to store state information.
31 // Returns true when done; when this function returns false, it has to be 31 // Returns true when done; when this function returns false, it has to be
32 // called again. The out parameter will only be set when this function 32 // called again. The out parameter will only be set when this function
33 // returns true. The same constraint space has to be passed each time. 33 // returns true.
34 // TODO(layout-ng): Should we have a StartLayout function to avoid passing 34 virtual bool Layout(NGPhysicalFragment**) = 0;
35 // the same space for each Layout iteration?
36 virtual bool Layout(const NGConstraintSpace*, NGPhysicalFragment**) = 0;
37 35
38 DEFINE_INLINE_VIRTUAL_TRACE() {} 36 DEFINE_INLINE_VIRTUAL_TRACE() {}
39 }; 37 };
40 38
41 } // namespace blink 39 } // namespace blink
42 40
43 #endif // NGLayoutAlgorithm_h 41 #endif // NGLayoutAlgorithm_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698