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

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

Issue 2242893003: [LayoutNG] Switch NGConstraintSpace to NGLogicalSize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 4 months 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 ee0480fb987e66698f9b58249dfc39e75127f81b..30fb60ad79621718f22be82b5eaa164432c10414 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
@@ -24,7 +24,7 @@ LayoutUnit resolveInlineLength(const NGConstraintSpace& constraintSpace,
if (type == LengthResolveType::MinSize && length.isAuto())
return LayoutUnit();
- return valueForLength(length, constraintSpace.inlineContainerSize());
+ return valueForLength(length, constraintSpace.ContainerSize().inlineSize);
}
LayoutUnit resolveBlockLength(const NGConstraintSpace& constraintSpace,
@@ -42,14 +42,14 @@ LayoutUnit resolveBlockLength(const NGConstraintSpace& constraintSpace,
if (length.isMinContent() || length.isMaxContent() || length.isFitContent())
return contentSize;
- return valueForLength(length, constraintSpace.blockContainerSize());
+ return valueForLength(length, constraintSpace.ContainerSize().blockSize);
}
LayoutUnit computeInlineSizeForFragment(
const NGConstraintSpace& constraintSpace,
const ComputedStyle& style) {
if (constraintSpace.fixedInlineSize())
- return constraintSpace.inlineContainerSize();
+ return constraintSpace.ContainerSize().inlineSize;
LayoutUnit extent = resolveInlineLength(constraintSpace, style.logicalWidth(),
LengthResolveType::ContentSize);
@@ -76,7 +76,7 @@ LayoutUnit computeBlockSizeForFragment(const NGConstraintSpace& constraintSpace,
const ComputedStyle& style,
LayoutUnit contentSize) {
if (constraintSpace.fixedBlockSize())
- return constraintSpace.blockContainerSize();
+ return constraintSpace.ContainerSize().blockSize;
LayoutUnit extent =
resolveBlockLength(constraintSpace, style.logicalHeight(), contentSize,

Powered by Google App Engine
This is Rietveld 408576698