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

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

Issue 2238523002: [LayoutNG] Initial version of NGBox wrapper object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/layout/ng/ng_box.h"
8 #include "wtf/RefPtr.h" 9 #include "wtf/RefPtr.h"
Gleb Lanbin 2016/08/10 15:35:32 we don't need it anymore.
ikilpatrick 2016/08/10 16:20:29 Acknowledged.
9 10
10 namespace blink { 11 namespace blink {
11 12
12 class ComputedStyle;
13 class LayoutBox;
14 class NGConstraintSpace; 13 class NGConstraintSpace;
15 class NGFragment; 14 class NGFragment;
16 15
17 // A class for general block layout (e.g. a <div> with no special style). 16 // A class for general block layout (e.g. a <div> with no special style).
18 // Lays out the children in sequence. 17 // Lays out the children in sequence.
19 class NGBlockLayoutAlgorithm { 18 class NGBlockLayoutAlgorithm {
20 public: 19 public:
21 NGBlockLayoutAlgorithm(const ComputedStyle*); 20 NGBlockLayoutAlgorithm(NGBox);
22 21
23 // Actual layout implementation. Lays out the children in sequence within the 22 // Actual layout implementation. Lays out the children in sequence within the
24 // constraints given by the NGConstraintSpace. Returns a fragment with the 23 // constraints given by the NGConstraintSpace. Returns a fragment with the
25 // resulting layout information. 24 // resulting layout information.
26 // This function can not be const because for interruptible layout, we have 25 // This function can not be const because for interruptible layout, we have
27 // to be able to store state information. 26 // to be able to store state information.
28 NGFragment* layout(const NGConstraintSpace&); 27 NGFragment* layout(const NGConstraintSpace&);
29 28
30 private: 29 private:
31 RefPtr<const ComputedStyle> m_style; 30 NGBox m_box;
32 }; 31 };
33 32
34 } // namespace blink 33 } // namespace blink
35 34
36 #endif // NGBlockLayoutAlgorithm_h 35 #endif // NGBlockLayoutAlgorithm_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698