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 NGLayoutAlgorithm_h | 5 #ifndef NGLayoutAlgorithm_h |
6 #define NGLayoutAlgorithm_h | 6 #define NGLayoutAlgorithm_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // If it returns NewFragment, the NGPhysicalFragmentBase out parameter | 41 // If it returns NewFragment, the NGPhysicalFragmentBase out parameter |
42 // will contain the new fragment. | 42 // will contain the new fragment. |
43 virtual NGLayoutStatus Layout(NGFragmentBase*, | 43 virtual NGLayoutStatus Layout(NGFragmentBase*, |
44 NGPhysicalFragmentBase**, | 44 NGPhysicalFragmentBase**, |
45 NGLayoutAlgorithm**) = 0; | 45 NGLayoutAlgorithm**) = 0; |
46 | 46 |
47 enum MinAndMaxState { Success, Pending, NotImplemented }; | 47 enum MinAndMaxState { Success, Pending, NotImplemented }; |
48 | 48 |
49 // Computes the min-content and max-content intrinsic sizes for the given box. | 49 // Computes the min-content and max-content intrinsic sizes for the given box. |
50 // The result will not take any min-width. max-width or width properties into | 50 // The result will not take any min-width. max-width or width properties into |
51 // account. Implementations can return NotImpplemented in which case the | 51 // account. Implementations can return NotImplemented, in which case the |
52 // caller is expected ot synthesize this value from the overflow rect returned | 52 // caller is expected to synthesize this value from the overflow rect returned |
53 // from Layout called with a available width of 0 and LayoutUnit::max(), | 53 // from Layout called with a available width of 0 and LayoutUnit::max(), |
54 // respectively. | 54 // respectively. |
55 // A Pending return value has the same meaning as a false return from layout, | 55 // A Pending return value has the same meaning as a false return from layout, |
56 // i.e. it is a request to call this function again. | 56 // i.e. it is a request to call this function again. |
57 virtual MinAndMaxState ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) { | 57 virtual MinAndMaxState ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) { |
58 return NotImplemented; | 58 return NotImplemented; |
59 } | 59 } |
60 | 60 |
61 DEFINE_INLINE_VIRTUAL_TRACE() {} | 61 DEFINE_INLINE_VIRTUAL_TRACE() {} |
62 }; | 62 }; |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
65 | 65 |
66 #endif // NGLayoutAlgorithm_h | 66 #endif // NGLayoutAlgorithm_h |
OLD | NEW |