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 "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 void SetNextSibling(NGBlockNode*); | 55 void SetNextSibling(NGBlockNode*); |
56 void SetFirstChild(NGLayoutInputNode*); | 56 void SetFirstChild(NGLayoutInputNode*); |
57 | 57 |
58 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
59 | 59 |
60 // Runs layout on layout_box_ and creates a fragment for the resulting | 60 // Runs layout on layout_box_ and creates a fragment for the resulting |
61 // geometry. | 61 // geometry. |
62 NGPhysicalFragment* RunOldLayout(const NGConstraintSpace&); | 62 NGPhysicalFragment* RunOldLayout(const NGConstraintSpace&); |
63 | 63 |
| 64 // Called if this is an out-of-flow block which needs to be |
| 65 // positioned with legacy layout. |
| 66 void UseOldOutOfFlowPositioning(); |
| 67 |
64 void UpdateLayoutBox(NGPhysicalFragment* fragment, | 68 void UpdateLayoutBox(NGPhysicalFragment* fragment, |
65 const NGConstraintSpace* constraint_space); | 69 const NGConstraintSpace* constraint_space); |
66 | 70 |
67 private: | 71 private: |
68 // This is necessary for interop between old and new trees -- after our parent | 72 // This is necessary for interop between old and new trees -- after our parent |
69 // positions us, it calls this function so we can store the position on the | 73 // positions us, it calls this function so we can store the position on the |
70 // underlying LayoutBox. | 74 // underlying LayoutBox. |
71 void PositionUpdated(); | 75 void PositionUpdated(); |
72 | 76 |
73 bool CanUseNewLayout(); | 77 bool CanUseNewLayout(); |
(...skipping 16 matching lines...) Expand all Loading... |
90 | 94 |
91 DEFINE_TYPE_CASTS(NGBlockNode, | 95 DEFINE_TYPE_CASTS(NGBlockNode, |
92 NGLayoutInputNode, | 96 NGLayoutInputNode, |
93 node, | 97 node, |
94 node->Type() == NGLayoutInputNode::kLegacyBlock, | 98 node->Type() == NGLayoutInputNode::kLegacyBlock, |
95 node.Type() == NGLayoutInputNode::kLegacyBlock); | 99 node.Type() == NGLayoutInputNode::kLegacyBlock); |
96 | 100 |
97 } // namespace blink | 101 } // namespace blink |
98 | 102 |
99 #endif // NGBlockNode | 103 #endif // NGBlockNode |
OLD | NEW |