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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_block_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 | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_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 #ifndef NGBlockLayoutAlgorithm_h 5 #ifndef NGBlockLayoutAlgorithm_h
6 #define NGBlockLayoutAlgorithm_h 6 #define NGBlockLayoutAlgorithm_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_box.h" 9 #include "core/layout/ng/ng_box.h"
10 #include "core/layout/ng/ng_layout_algorithm.h"
10 #include "wtf/RefPtr.h" 11 #include "wtf/RefPtr.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class ComputedStyle; 15 class ComputedStyle;
15 class NGConstraintSpace; 16 class NGConstraintSpace;
16 class NGFragment; 17 class NGFragment;
17 18
18 // A class for general block layout (e.g. a <div> with no special style). 19 // A class for general block layout (e.g. a <div> with no special style).
19 // Lays out the children in sequence. 20 // Lays out the children in sequence.
20 class CORE_EXPORT NGBlockLayoutAlgorithm { 21 class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
21 public: 22 public:
22 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBox); 23 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBox);
23 24
24 // Actual layout implementation. Lays out the children in sequence within the 25 // Actual layout implementation. Lays out the children in sequence within the
25 // constraints given by the NGConstraintSpace. Returns a fragment with the 26 // constraints given by the NGConstraintSpace. Returns a fragment with the
26 // resulting layout information. 27 // resulting layout information.
27 // This function can not be const because for interruptible layout, we have 28 // This function can not be const because for interruptible layout, we have
28 // to be able to store state information. 29 // to be able to store state information.
29 NGFragment* layout(const NGConstraintSpace&); 30 NGFragment* layout(const NGConstraintSpace&) override;
30 31
31 private: 32 private:
32 RefPtr<const ComputedStyle> m_style; 33 RefPtr<const ComputedStyle> m_style;
33 NGBox m_firstChild; 34 NGBox m_firstChild;
34 }; 35 };
35 36
36 } // namespace blink 37 } // namespace blink
37 38
38 #endif // NGBlockLayoutAlgorithm_h 39 #endif // NGBlockLayoutAlgorithm_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698