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 NGLengthUtils_h | 5 #ifndef NGLengthUtils_h |
6 #define NGLengthUtils_h | 6 #define NGLengthUtils_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/geometry/ng_box_strut.h" | 9 #include "core/layout/ng/geometry/ng_box_strut.h" |
10 #include "core/layout/ng/ng_min_max_content_size.h" | 10 #include "core/layout/ng/ng_min_max_content_size.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 kMarginBorderPaddingSize | 28 kMarginBorderPaddingSize |
29 }; | 29 }; |
30 | 30 |
31 // Whether the caller needs to compute min-content and max-content sizes to | 31 // Whether the caller needs to compute min-content and max-content sizes to |
32 // pass them to ResolveInlineLength / ComputeInlineSizeForFragment. | 32 // pass them to ResolveInlineLength / ComputeInlineSizeForFragment. |
33 // If this function returns false, it is safe to pass an empty | 33 // If this function returns false, it is safe to pass an empty |
34 // MinMaxContentSize struct to those functions. | 34 // MinMaxContentSize struct to those functions. |
35 CORE_EXPORT bool NeedMinMaxContentSize(const NGConstraintSpace&, | 35 CORE_EXPORT bool NeedMinMaxContentSize(const NGConstraintSpace&, |
36 const ComputedStyle&); | 36 const ComputedStyle&); |
37 | 37 |
| 38 CORE_EXPORT bool NeedMinMaxContentSize(const ComputedStyle&); |
| 39 |
38 // Like NeedMinMaxContentSize, but for use when calling | 40 // Like NeedMinMaxContentSize, but for use when calling |
39 // ComputeMinAndMaxContentContribution. | 41 // ComputeMinAndMaxContentContribution. |
40 CORE_EXPORT bool NeedMinMaxContentSizeForContentContribution( | 42 CORE_EXPORT bool NeedMinMaxContentSizeForContentContribution( |
41 const ComputedStyle&); | 43 const ComputedStyle&); |
42 | 44 |
43 // Convert an inline-axis length to a layout unit using the given constraint | 45 // Convert an inline-axis length to a layout unit using the given constraint |
44 // space. | 46 // space. |
45 CORE_EXPORT LayoutUnit | 47 CORE_EXPORT LayoutUnit |
46 ResolveInlineLength(const NGConstraintSpace&, | 48 ResolveInlineLength(const NGConstraintSpace&, |
47 const ComputedStyle&, | 49 const ComputedStyle&, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 CORE_EXPORT LayoutUnit ConstrainByMinMax(LayoutUnit length, | 126 CORE_EXPORT LayoutUnit ConstrainByMinMax(LayoutUnit length, |
125 Optional<LayoutUnit> min, | 127 Optional<LayoutUnit> min, |
126 Optional<LayoutUnit> max); | 128 Optional<LayoutUnit> max); |
127 | 129 |
128 // Returns scrollbar sizes or this layout object. | 130 // Returns scrollbar sizes or this layout object. |
129 NGBoxStrut GetScrollbarSizes(const LayoutObject*); | 131 NGBoxStrut GetScrollbarSizes(const LayoutObject*); |
130 | 132 |
131 } // namespace blink | 133 } // namespace blink |
132 | 134 |
133 #endif // NGLengthUtils_h | 135 #endif // NGLengthUtils_h |
OLD | NEW |