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

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

Issue 2628983002: [layoutng] Slightly simplify some code (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
index 56256ff489198c2eea435266aac86240c8a7157a..366a40c6ef3867f5a28eaaf60872e041368fc9ce 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
@@ -54,28 +54,27 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject(
}
NGLogicalSize percentage_size = {available_logical_width,
available_logical_height};
+ NGLogicalSize available_size = percentage_size;
// When we have an override size, the available_logical_{width,height} will be
// used as the final size of the box, so it has to include border and
// padding.
if (box.hasOverrideLogicalContentWidth()) {
- available_logical_width =
+ available_size.inline_size =
box.borderAndPaddingLogicalWidth() + box.overrideLogicalContentWidth();
fixed_inline = true;
}
if (box.hasOverrideLogicalContentHeight()) {
- available_logical_height = box.borderAndPaddingLogicalHeight() +
- box.overrideLogicalContentHeight();
+ available_size.block_size = box.borderAndPaddingLogicalHeight() +
+ box.overrideLogicalContentHeight();
fixed_block = true;
}
bool is_new_fc =
box.isLayoutBlock() && toLayoutBlock(box).createsNewFormattingContext();
- NGLogicalSize logical_size = {available_logical_width,
- available_logical_height};
auto writing_mode = FromPlatformWritingMode(box.styleRef().getWritingMode());
return NGConstraintSpaceBuilder(writing_mode)
- .SetAvailableSize(logical_size)
+ .SetAvailableSize(available_size)
.SetPercentageResolutionSize(percentage_size)
.SetIsInlineDirectionTriggersScrollbar(
box.styleRef().overflowInlineDirection() == EOverflow::Auto)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698