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 NGLayoutInputNode_h | 5 #ifndef NGLayoutInputNode_h |
6 #define NGLayoutInputNode_h | 6 #define NGLayoutInputNode_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 : public GarbageCollectedFinalized<NGLayoutInputNode> { | 24 : public GarbageCollectedFinalized<NGLayoutInputNode> { |
25 public: | 25 public: |
26 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 }; | 26 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 }; |
27 | 27 |
28 bool IsInline() const { return type_ == kLegacyInline; } | 28 bool IsInline() const { return type_ == kLegacyInline; } |
29 | 29 |
30 bool IsBlock() const { return type_ == kLegacyBlock; } | 30 bool IsBlock() const { return type_ == kLegacyBlock; } |
31 | 31 |
32 bool IsFloating() const { return IsBlock() && Style().IsFloating(); } | 32 bool IsFloating() const { return IsBlock() && Style().IsFloating(); } |
33 | 33 |
| 34 bool IsOutOfFlowPositioned() const { |
| 35 return IsBlock() && Style().HasOutOfFlowPosition(); |
| 36 } |
| 37 |
34 virtual ~NGLayoutInputNode(){}; | 38 virtual ~NGLayoutInputNode(){}; |
35 | 39 |
36 // Performs layout on this input node, will return the layout result. | 40 // Performs layout on this input node, will return the layout result. |
37 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*, NGBreakToken*) = 0; | 41 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*, NGBreakToken*) = 0; |
38 | 42 |
39 // Returns the next sibling. | 43 // Returns the next sibling. |
40 virtual NGLayoutInputNode* NextSibling() = 0; | 44 virtual NGLayoutInputNode* NextSibling() = 0; |
41 | 45 |
42 // Returns the LayoutObject which is associated with this node. | 46 // Returns the LayoutObject which is associated with this node. |
43 virtual LayoutObject* GetLayoutObject() const = 0; | 47 virtual LayoutObject* GetLayoutObject() const = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
61 protected: | 65 protected: |
62 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {} | 66 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {} |
63 | 67 |
64 private: | 68 private: |
65 unsigned type_ : 1; | 69 unsigned type_ : 1; |
66 }; | 70 }; |
67 | 71 |
68 } // namespace blink | 72 } // namespace blink |
69 | 73 |
70 #endif // NGLayoutInputNode_h | 74 #endif // NGLayoutInputNode_h |
OLD | NEW |