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

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

Issue 2725773002: Remove NGBlockNode constructor, SetFirstChild, SetNextSibling methods (Closed)
Patch Set: Created 3 years, 9 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 NGBlockNode_h 5 #ifndef NGBlockNode_h
6 #define NGBlockNode_h 6 #define NGBlockNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/LayoutBox.h" 9 #include "core/layout/LayoutBox.h"
10 #include "core/layout/ng/ng_layout_input_node.h" 10 #include "core/layout/ng/ng_layout_input_node.h"
(...skipping 11 matching lines...) Expand all
22 struct NGLogicalOffset; 22 struct NGLogicalOffset;
23 struct MinAndMaxContentSizes; 23 struct MinAndMaxContentSizes;
24 24
25 // Represents a node to be laid out. 25 // Represents a node to be laid out.
26 class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode { 26 class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
27 friend NGLayoutInputNode; 27 friend NGLayoutInputNode;
28 28
29 public: 29 public:
30 explicit NGBlockNode(LayoutObject*); 30 explicit NGBlockNode(LayoutObject*);
31 31
32 // TODO(layout-ng): make it private and declare a friend class to use in tests
33 explicit NGBlockNode(ComputedStyle*);
34
35 ~NGBlockNode() override; 32 ~NGBlockNode() override;
36 33
37 RefPtr<NGLayoutResult> Layout(NGConstraintSpace* constraint_space, 34 RefPtr<NGLayoutResult> Layout(NGConstraintSpace* constraint_space,
38 NGBreakToken* break_token = nullptr) override; 35 NGBreakToken* break_token = nullptr) override;
39 NGLayoutInputNode* NextSibling() override; 36 NGLayoutInputNode* NextSibling() override;
40 LayoutObject* GetLayoutObject() override; 37 LayoutObject* GetLayoutObject() override;
41 38
42 // Computes the value of min-content and max-content for this box. 39 // Computes the value of min-content and max-content for this box.
43 // If the underlying layout algorithm's ComputeMinAndMaxContentSizes returns 40 // If the underlying layout algorithm's ComputeMinAndMaxContentSizes returns
44 // no value, this function will synthesize these sizes using Layout with 41 // no value, this function will synthesize these sizes using Layout with
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 86
90 DEFINE_TYPE_CASTS(NGBlockNode, 87 DEFINE_TYPE_CASTS(NGBlockNode,
91 NGLayoutInputNode, 88 NGLayoutInputNode,
92 node, 89 node,
93 node->Type() == NGLayoutInputNode::kLegacyBlock, 90 node->Type() == NGLayoutInputNode::kLegacyBlock,
94 node.Type() == NGLayoutInputNode::kLegacyBlock); 91 node.Type() == NGLayoutInputNode::kLegacyBlock);
95 92
96 } // namespace blink 93 } // namespace blink
97 94
98 #endif // NGBlockNode 95 #endif // NGBlockNode
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698