Index: third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc |
index 8f46932ec4e067b19f44c1f0577fd40278d402e0..e3f0f37b7e5266688df3a38823c006c19f4e1bb7 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc |
@@ -15,9 +15,15 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(NGWritingMode writing_mode) |
fragmentation_type_(NGFragmentationType::FragmentNone), |
is_new_fc_(false) {} |
-NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetContainerSize( |
- NGLogicalSize container_size) { |
- container_size_ = container_size; |
+NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetAvailableSize( |
+ NGLogicalSize available_size) { |
+ available_size_ = available_size; |
+ return *this; |
+} |
+ |
+NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetPercentageResolutionSize( |
+ NGLogicalSize percentage_resolution_size) { |
+ percentage_resolution_size_ = percentage_resolution_size; |
return *this; |
} |
@@ -62,18 +68,22 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsNewFormattingContext( |
} |
NGPhysicalConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace() { |
- NGPhysicalSize container_size = container_size_.ConvertToPhysical( |
+ NGPhysicalSize available_size = available_size_.ConvertToPhysical( |
static_cast<NGWritingMode>(writing_mode_)); |
+ NGPhysicalSize percentage_resolution_size = |
+ percentage_resolution_size_.ConvertToPhysical( |
+ static_cast<NGWritingMode>(writing_mode_)); |
+ |
if (writing_mode_ == HorizontalTopBottom) { |
return new NGPhysicalConstraintSpace( |
- container_size, is_fixed_size_inline_, is_fixed_size_block_, |
- is_inline_direction_triggers_scrollbar_, |
+ available_size, percentage_resolution_size, is_fixed_size_inline_, |
+ is_fixed_size_block_, is_inline_direction_triggers_scrollbar_, |
is_block_direction_triggers_scrollbar_, FragmentNone, |
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_); |
} else { |
return new NGPhysicalConstraintSpace( |
- container_size, is_fixed_size_block_, is_fixed_size_inline_, |
- is_block_direction_triggers_scrollbar_, |
+ available_size, percentage_resolution_size, is_fixed_size_block_, |
+ is_fixed_size_inline_, is_block_direction_triggers_scrollbar_, |
is_inline_direction_triggers_scrollbar_, |
static_cast<NGFragmentationType>(fragmentation_type_), FragmentNone, |
is_new_fc_); |