| Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
|
| index bd17074260193efcf274904d86b04874098bd205..9aa9f6b24d6f90f5802fcc6a862bf64be2f0cecf 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
|
| @@ -17,8 +17,8 @@
|
| // - replaced calculations
|
| // - Take scrollbars into account
|
|
|
| -bool NeedMinMaxContentSize(const NGConstraintSpace& constraint_space,
|
| - const ComputedStyle& style) {
|
| +bool NeedMinAndMaxContentSizes(const NGConstraintSpace& constraint_space,
|
| + const ComputedStyle& style) {
|
| // This check is technically too broad (fill-available does not need intrinsic
|
| // size computation) but that's a rare case and only affects performance, not
|
| // correctness.
|
| @@ -28,7 +28,8 @@
|
| style.logicalMaxWidth().isIntrinsic();
|
| }
|
|
|
| -bool NeedMinMaxContentSizeForContentContribution(const ComputedStyle& style) {
|
| +bool NeedMinAndMaxContentSizesForContentContribution(
|
| + const ComputedStyle& style) {
|
| return style.logicalWidth().isIntrinsicOrAuto() ||
|
| style.logicalMinWidth().isIntrinsic() ||
|
| style.logicalMaxWidth().isIntrinsic();
|
| @@ -37,7 +38,7 @@
|
| LayoutUnit ResolveInlineLength(
|
| const NGConstraintSpace& constraint_space,
|
| const ComputedStyle& style,
|
| - const WTF::Optional<MinMaxContentSize>& min_and_max,
|
| + const WTF::Optional<MinAndMaxContentSizes>& min_and_max,
|
| const Length& length,
|
| LengthResolveType type) {
|
| DCHECK(!length.isMaxSizeNone());
|
| @@ -182,9 +183,9 @@
|
| }
|
| }
|
|
|
| -MinMaxContentSize ComputeMinAndMaxContentContribution(
|
| +MinAndMaxContentSizes ComputeMinAndMaxContentContribution(
|
| const ComputedStyle& style,
|
| - const WTF::Optional<MinMaxContentSize>& min_and_max) {
|
| + const WTF::Optional<MinAndMaxContentSizes>& min_and_max) {
|
| // Synthesize a zero-sized constraint space for passing to
|
| // ResolveInlineLength.
|
| NGWritingMode writing_mode = FromPlatformWritingMode(style.getWritingMode());
|
| @@ -193,7 +194,7 @@
|
| NGPhysicalSize{LayoutUnit(), LayoutUnit()});
|
| NGConstraintSpace* space = builder.ToConstraintSpace(writing_mode);
|
|
|
| - MinMaxContentSize computed_sizes;
|
| + MinAndMaxContentSizes computed_sizes;
|
| Length inline_size = style.logicalWidth();
|
| if (inline_size.isAuto()) {
|
| CHECK(min_and_max.has_value());
|
| @@ -233,7 +234,7 @@
|
| LayoutUnit ComputeInlineSizeForFragment(
|
| const NGConstraintSpace& space,
|
| const ComputedStyle& style,
|
| - const WTF::Optional<MinMaxContentSize>& min_and_max) {
|
| + const WTF::Optional<MinAndMaxContentSizes>& min_and_max) {
|
| if (space.IsFixedSizeInline())
|
| return space.AvailableSize().inline_size;
|
|
|
| @@ -334,7 +335,7 @@
|
| const NGWritingMode writing_mode,
|
| const TextDirection direction) {
|
| // We don't need these for margin computations
|
| - MinMaxContentSize empty_sizes;
|
| + MinAndMaxContentSizes empty_sizes;
|
| // Margins always get computed relative to the inline size:
|
| // https://www.w3.org/TR/CSS2/box.html#value-def-margin-width
|
| NGPhysicalBoxStrut physical_dim;
|
| @@ -376,7 +377,7 @@
|
| return NGBoxStrut();
|
|
|
| // We don't need these for padding computations
|
| - MinMaxContentSize empty_sizes;
|
| + MinAndMaxContentSizes empty_sizes;
|
| // Padding always gets computed relative to the inline size:
|
| // https://www.w3.org/TR/CSS2/box.html#value-def-padding-width
|
| NGBoxStrut padding;
|
|
|