Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 27 | 27 |
| 28 public: | 28 public: |
| 29 explicit NGBlockNode(LayoutObject*); | 29 explicit NGBlockNode(LayoutObject*); |
| 30 | 30 |
| 31 // TODO(layout-ng): make it private and declare a friend class to use in tests | 31 // TODO(layout-ng): make it private and declare a friend class to use in tests |
| 32 explicit NGBlockNode(ComputedStyle*); | 32 explicit NGBlockNode(ComputedStyle*); |
| 33 | 33 |
| 34 ~NGBlockNode() override; | 34 ~NGBlockNode() override; |
| 35 | 35 |
| 36 bool Layout(NGConstraintSpace*, NGFragment**) override; | 36 bool Layout(NGConstraintSpace*, NGFragment**) override; |
| 37 void LayoutSync(NGConstraintSpace*, NGFragment**); | |
| 38 | |
|
atotic
2017/01/18 18:48:49
Are Sync methods temporary?
What are our plans fo
ikilpatrick
2017/01/18 19:32:13
Yup the sync methods are temporary, the eventual L
| |
| 37 NGBlockNode* NextSibling() override; | 39 NGBlockNode* NextSibling() override; |
| 38 | 40 |
| 39 // Computes the value of min-content and max-content for this box. | 41 // Computes the value of min-content and max-content for this box. |
| 40 // The return value has the same meaning as for Layout. | 42 // The return value has the same meaning as for Layout. |
| 41 // If the underlying layout algorithm returns NotImplemented from | 43 // If the underlying layout algorithm returns NotImplemented from |
| 42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes | 44 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes |
| 43 // using Layout with special constraint spaces. | 45 // using Layout with special constraint spaces. |
| 44 // It is not legal to interleave a pending Layout() with a pending | 46 // It is not legal to interleave a pending Layout() with a pending |
| 45 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout | 47 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout |
| 46 // often enough that it returns true before calling | 48 // often enough that it returns true before calling |
| 47 // ComputeOrSynthesizeMinAndMaxContentSizes) | 49 // ComputeOrSynthesizeMinAndMaxContentSizes) |
| 48 bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*); | 50 bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*); |
| 51 MinAndMaxContentSizes ComputeMinAndMaxContentSizesSync(); | |
| 49 | 52 |
| 50 const ComputedStyle* Style() const; | 53 const ComputedStyle* Style() const; |
| 51 ComputedStyle* MutableStyle(); | 54 ComputedStyle* MutableStyle(); |
| 52 | 55 |
| 53 NGLayoutInputNode* FirstChild(); | 56 NGLayoutInputNode* FirstChild(); |
| 54 | 57 |
| 55 void SetNextSibling(NGBlockNode*); | 58 void SetNextSibling(NGBlockNode*); |
| 56 void SetFirstChild(NGLayoutInputNode*); | 59 void SetFirstChild(NGLayoutInputNode*); |
| 57 | 60 |
| 58 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 | 97 |
| 95 DEFINE_TYPE_CASTS(NGBlockNode, | 98 DEFINE_TYPE_CASTS(NGBlockNode, |
| 96 NGLayoutInputNode, | 99 NGLayoutInputNode, |
| 97 node, | 100 node, |
| 98 node->Type() == NGLayoutInputNode::kLegacyBlock, | 101 node->Type() == NGLayoutInputNode::kLegacyBlock, |
| 99 node.Type() == NGLayoutInputNode::kLegacyBlock); | 102 node.Type() == NGLayoutInputNode::kLegacyBlock); |
| 100 | 103 |
| 101 } // namespace blink | 104 } // namespace blink |
| 102 | 105 |
| 103 #endif // NGBlockNode | 106 #endif // NGBlockNode |
| OLD | NEW |