| Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
|
| index 6d5eb70227e7762e0341bf10659fbe31b3faae52..9e67b620f09f9607457d2873379ce274d4a1daee 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
|
| @@ -35,6 +35,11 @@ enum class LengthResolveType {
|
| // MinAndMaxContentSizes struct to those functions.
|
| CORE_EXPORT bool NeedMinAndMaxContentSizes(const ComputedStyle&);
|
|
|
| +// Like NeedMinAndMaxContentSizes, but for use when calling
|
| +// ComputeMinAndMaxContentContribution.
|
| +CORE_EXPORT bool NeedMinAndMaxContentSizesForContentContribution(
|
| + const ComputedStyle&);
|
| +
|
| // Convert an inline-axis length to a layout unit using the given constraint
|
| // space.
|
| CORE_EXPORT LayoutUnit
|
| @@ -52,6 +57,17 @@ CORE_EXPORT LayoutUnit ResolveBlockLength(const NGConstraintSpace&,
|
| LayoutUnit content_size,
|
| LengthResolveType);
|
|
|
| +// For the given style and min/max content sizes, computes the min and max
|
| +// content contribution (https://drafts.csswg.org/css-sizing/#contributions).
|
| +// This is similar to ComputeInlineSizeForFragment except that it does not
|
| +// require a constraint space (percentage sizes as well as auto margins compute
|
| +// to zero) and that an auto inline size resolves to the respective min/max
|
| +// content size.
|
| +// Also, the min/max contribution does include the inline margins as well.
|
| +CORE_EXPORT MinAndMaxContentSizes ComputeMinAndMaxContentContribution(
|
| + const ComputedStyle&,
|
| + const WTF::Optional<MinAndMaxContentSizes>&);
|
| +
|
| // Resolves the given length to a layout unit, constraining it by the min
|
| // logical width and max logical width properties from the ComputedStyle
|
| // object.
|
|
|