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/ng_units.h" | 9 #include "core/layout/ng/ng_units.h" |
10 #include "core/layout/ng/ng_writing_mode.h" | 10 #include "core/layout/ng/ng_writing_mode.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 CORE_EXPORT LayoutUnit ResolveUsedColumnInlineSize(LayoutUnit available_size, | 97 CORE_EXPORT LayoutUnit ResolveUsedColumnInlineSize(LayoutUnit available_size, |
98 const ComputedStyle&); | 98 const ComputedStyle&); |
99 | 99 |
100 CORE_EXPORT LayoutUnit ResolveUsedColumnGap(const ComputedStyle&); | 100 CORE_EXPORT LayoutUnit ResolveUsedColumnGap(const ComputedStyle&); |
101 | 101 |
102 CORE_EXPORT NGBoxStrut ComputeMargins(const NGConstraintSpace&, | 102 CORE_EXPORT NGBoxStrut ComputeMargins(const NGConstraintSpace&, |
103 const ComputedStyle&, | 103 const ComputedStyle&, |
104 const NGWritingMode writing_mode, | 104 const NGWritingMode writing_mode, |
105 const TextDirection direction); | 105 const TextDirection direction); |
106 | 106 |
107 CORE_EXPORT NGBoxStrut ComputeBorders(const ComputedStyle&); | 107 CORE_EXPORT NGBoxStrut ComputeBorders(const NGConstraintSpace& constraint_space, |
| 108 const ComputedStyle&); |
108 | 109 |
109 CORE_EXPORT NGBoxStrut ComputePadding(const NGConstraintSpace&, | 110 CORE_EXPORT NGBoxStrut ComputePadding(const NGConstraintSpace&, |
110 const ComputedStyle&); | 111 const ComputedStyle&); |
111 | 112 |
112 // Resolves margin: auto in the inline direction. | 113 // Resolves margin: auto in the inline direction. |
113 // This uses the available size from the constraint space and inline size to | 114 // This uses the available size from the constraint space and inline size to |
114 // compute the margins that are auto, if any, and adjusts | 115 // compute the margins that are auto, if any, and adjusts |
115 // the given NGBoxStrut accordingly. | 116 // the given NGBoxStrut accordingly. |
116 CORE_EXPORT void ApplyAutoMargins(const NGConstraintSpace&, | 117 CORE_EXPORT void ApplyAutoMargins(const NGConstraintSpace&, |
117 const ComputedStyle&, | 118 const ComputedStyle&, |
118 const LayoutUnit& inline_size, | 119 const LayoutUnit& inline_size, |
119 NGBoxStrut* margins); | 120 NGBoxStrut* margins); |
120 | 121 |
121 CORE_EXPORT LayoutUnit ConstrainByMinMax(LayoutUnit length, | 122 CORE_EXPORT LayoutUnit ConstrainByMinMax(LayoutUnit length, |
122 Optional<LayoutUnit> min, | 123 Optional<LayoutUnit> min, |
123 Optional<LayoutUnit> max); | 124 Optional<LayoutUnit> max); |
124 | 125 |
125 } // namespace blink | 126 } // namespace blink |
126 | 127 |
127 #endif // NGLengthUtils_h | 128 #endif // NGLengthUtils_h |
OLD | NEW |