Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 86e5fd7aa84d50ea9963c7ad820533e0d239dfdc..036a5bbdd295fdd6b531ea8d888d62f1718aad75 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
@@ -175,26 +175,26 @@ LayoutUnit ResolveBlockLength(const NGConstraintSpace& constraintSpace,
}
LayoutUnit ComputeInlineSizeForFragment(
- const NGConstraintSpace& constraintSpace,
+ const NGConstraintSpace& space,
const ComputedStyle& style,
const WTF::Optional<MinAndMaxContentSizes>& min_and_max) {
- if (constraintSpace.FixedInlineSize())
- return constraintSpace.AvailableSize().inline_size;
+ if (space.IsFixedSizeInline())
+ return space.AvailableSize().inline_size;
LayoutUnit extent =
- ResolveInlineLength(constraintSpace, style, min_and_max,
- style.logicalWidth(), LengthResolveType::ContentSize);
+ ResolveInlineLength(space, style, min_and_max, style.logicalWidth(),
+ LengthResolveType::ContentSize);
Length maxLength = style.logicalMaxWidth();
if (!maxLength.isMaxSizeNone()) {
- LayoutUnit max = ResolveInlineLength(constraintSpace, style, min_and_max,
- maxLength, LengthResolveType::MaxSize);
+ LayoutUnit max = ResolveInlineLength(space, style, min_and_max, maxLength,
+ LengthResolveType::MaxSize);
extent = std::min(extent, max);
}
LayoutUnit min =
- ResolveInlineLength(constraintSpace, style, min_and_max,
- style.logicalMinWidth(), LengthResolveType::MinSize);
+ ResolveInlineLength(space, style, min_and_max, style.logicalMinWidth(),
+ LengthResolveType::MinSize);
extent = std::max(extent, min);
return extent;
}
@@ -202,7 +202,7 @@ LayoutUnit ComputeInlineSizeForFragment(
LayoutUnit ComputeBlockSizeForFragment(const NGConstraintSpace& constraintSpace,
const ComputedStyle& style,
LayoutUnit contentSize) {
- if (constraintSpace.FixedBlockSize())
+ if (constraintSpace.IsFixedSizeBlock())
return constraintSpace.AvailableSize().block_size;
LayoutUnit extent =

Powered by Google App Engine
This is Rietveld 408576698