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

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

Issue 2237643003: [layoutng] Add a base class for layout algorithms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fast alloc and noncopyable Created 4 years, 4 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 | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NGLayoutAlgorithm_h
6 #define NGLayoutAlgorithm_h
7
8 #include "core/CoreExport.h"
9 #include "wtf/Allocator.h"
10 #include "wtf/Noncopyable.h"
11
12 namespace blink {
13
14 class NGConstraintSpace;
15 class NGFragment;
16
17 // Base class for all LayoutNG algorithms.
18 class CORE_EXPORT NGLayoutAlgorithm {
19 WTF_MAKE_NONCOPYABLE(NGLayoutAlgorithm);
20 USING_FAST_MALLOC(NGLayoutAlgorithm);
21
22 public:
23 NGLayoutAlgorithm() {}
24
25 // Actual layout function. Lays out the children and descendents within the
26 // constraints given by the NGConstraintSpace. Returns a fragment with the
27 // resulting layout information.
28 // This function can not be const because for interruptible layout, we have
29 // to be able to store state information.
30 virtual NGFragment* layout(const NGConstraintSpace&) = 0;
31 };
32
33 } // namespace blink
34
35 #endif // NGLayoutAlgorithm_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698