OLD | NEW |
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/ng/ng_layout_input_node.h" | 9 #include "core/layout/ng/ng_layout_input_node.h" |
10 #include "core/layout/ng/ng_physical_box_fragment.h" | 10 #include "core/layout/ng/ng_physical_box_fragment.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 NGPhysicalFragment* Layout(NGConstraintSpace* constraint_space) override; | 36 NGPhysicalFragment* Layout(NGConstraintSpace* constraint_space) override; |
37 NGBlockNode* NextSibling() override; | 37 NGBlockNode* NextSibling() override; |
38 LayoutObject* GetLayoutObject() override; | 38 LayoutObject* GetLayoutObject() override; |
39 | 39 |
40 // Computes the value of min-content and max-content for this box. | 40 // Computes the value of min-content and max-content for this box. |
41 // If the underlying layout algorithm returns NotImplemented from | 41 // If the underlying layout algorithm returns NotImplemented from |
42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes | 42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes |
43 // using Layout with special constraint spaces. | 43 // using Layout with special constraint spaces. |
44 MinAndMaxContentSizes ComputeMinAndMaxContentSizes(); | 44 MinAndMaxContentSizes ComputeMinAndMaxContentSizes(); |
45 | 45 |
46 const ComputedStyle* Style() const; | 46 const ComputedStyle& Style() const; |
47 ComputedStyle* MutableStyle(); | |
48 | 47 |
49 NGLayoutInputNode* FirstChild(); | 48 NGLayoutInputNode* FirstChild(); |
50 | 49 |
51 void SetNextSibling(NGBlockNode*); | 50 void SetNextSibling(NGBlockNode*); |
52 void SetFirstChild(NGLayoutInputNode*); | 51 void SetFirstChild(NGLayoutInputNode*); |
53 | 52 |
54 void SetFragment(NGPhysicalBoxFragment* fragment) { fragment_ = fragment; } | 53 void SetFragment(NGPhysicalBoxFragment* fragment) { fragment_ = fragment; } |
55 NGBreakToken* CurrentBreakToken() const; | 54 NGBreakToken* CurrentBreakToken() const; |
56 bool IsLayoutFinished() const { | 55 bool IsLayoutFinished() const { |
57 return fragment_ && !fragment_->BreakToken(); | 56 return fragment_ && !fragment_->BreakToken(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 91 |
93 DEFINE_TYPE_CASTS(NGBlockNode, | 92 DEFINE_TYPE_CASTS(NGBlockNode, |
94 NGLayoutInputNode, | 93 NGLayoutInputNode, |
95 node, | 94 node, |
96 node->Type() == NGLayoutInputNode::kLegacyBlock, | 95 node->Type() == NGLayoutInputNode::kLegacyBlock, |
97 node.Type() == NGLayoutInputNode::kLegacyBlock); | 96 node.Type() == NGLayoutInputNode::kLegacyBlock); |
98 | 97 |
99 } // namespace blink | 98 } // namespace blink |
100 | 99 |
101 #endif // NGBlockNode | 100 #endif // NGBlockNode |
OLD | NEW |