Chromium Code Reviews| 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 6b04a0c72673dcb6c919a28893a7bbb6483cf434..89880d1b61e48c78c4cfa3ce729b72c148561fc0 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 |
| @@ -149,6 +149,19 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetUnpositionedFloats( |
| return *this; |
| } |
| +void NGConstraintSpaceBuilder::AddBaselineRequests( |
| + const Vector<NGBaselineRequest>& requests) { |
| + baseline_requests_.AppendVector(requests); |
| +} |
| + |
| +NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::AddBaselineRequest( |
| + NGBaselineAlgorithmType algorithm_type, |
| + FontBaseline baseline_type) { |
| + baseline_requests_.push_back( |
| + NGBaselineRequest{algorithm_type, baseline_type}); |
|
cbiesinger
2017/07/12 15:48:44
I wonder if we should make an effort to deduplicat
kojii
2017/07/12 18:21:52
Good point.
The question is whether computing sam
cbiesinger
2017/07/12 20:23:09
Yeah, hm, it's a bit hard to tell. But I think it'
|
| + return *this; |
| +} |
| + |
| RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace( |
| NGWritingMode out_writing_mode) { |
| // Whether the child and the containing block are parallel to each other. |
| @@ -213,7 +226,7 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace( |
| is_block_direction_triggers_scrollbar_, |
| static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, |
| is_anonymous_, margin_strut, bfc_offset, floats_bfc_offset, exclusions, |
| - unpositioned_floats_, clearance_offset)); |
| + unpositioned_floats_, clearance_offset, baseline_requests_)); |
| } |
| return AdoptRef(new NGConstraintSpace( |
| out_writing_mode, static_cast<TextDirection>(text_direction_), |
| @@ -224,7 +237,7 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace( |
| is_inline_direction_triggers_scrollbar_, |
| static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, |
| is_anonymous_, margin_strut, bfc_offset, floats_bfc_offset, exclusions, |
| - unpositioned_floats_, clearance_offset)); |
| + unpositioned_floats_, clearance_offset, baseline_requests_)); |
| } |
| } // namespace blink |