Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ng/ng_constraint_space_builder.h" | 5 #include "core/layout/ng/ng_constraint_space_builder.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/ng_length_utils.h" | 7 #include "core/layout/ng/ng_length_utils.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 initial_containing_block_size_.width; | 169 initial_containing_block_size_.width; |
| 170 } else { | 170 } else { |
| 171 percentage_resolution_size.inline_size = | 171 percentage_resolution_size.inline_size = |
| 172 initial_containing_block_size_.height; | 172 initial_containing_block_size_.height; |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 // Reset things that do not pass the Formatting Context boundary. | 176 // Reset things that do not pass the Formatting Context boundary. |
| 177 std::shared_ptr<NGExclusions> exclusions( | 177 std::shared_ptr<NGExclusions> exclusions( |
| 178 is_new_fc_ ? std::make_shared<NGExclusions>() : exclusions_); | 178 is_new_fc_ ? std::make_shared<NGExclusions>() : exclusions_); |
| 179 NGLogicalOffset bfc_offset = is_new_fc_ ? NGLogicalOffset() : bfc_offset_; | |
|
ikilpatrick
2017/03/24 21:17:34
can you add a todo here as well to add this back i
Gleb Lanbin
2017/03/24 21:49:36
Done.
| |
| 180 NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_; | 179 NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_; |
| 181 WTF::Optional<LayoutUnit> clearance_offset = | 180 WTF::Optional<LayoutUnit> clearance_offset = |
| 182 is_new_fc_ ? WTF::nullopt : clearance_offset_; | 181 is_new_fc_ ? WTF::nullopt : clearance_offset_; |
| 183 | 182 |
| 184 if (is_in_parallel_flow) { | 183 if (is_in_parallel_flow) { |
| 185 return adoptRef(new NGConstraintSpace( | 184 return adoptRef(new NGConstraintSpace( |
| 186 static_cast<NGWritingMode>(out_writing_mode), | 185 static_cast<NGWritingMode>(out_writing_mode), |
| 187 static_cast<TextDirection>(text_direction_), available_size, | 186 static_cast<TextDirection>(text_direction_), available_size, |
| 188 percentage_resolution_size, initial_containing_block_size_, | 187 percentage_resolution_size, initial_containing_block_size_, |
| 189 fragmentainer_space_available_, is_fixed_size_inline_, | 188 fragmentainer_space_available_, is_fixed_size_inline_, |
| 190 is_fixed_size_block_, is_shrink_to_fit_, | 189 is_fixed_size_block_, is_shrink_to_fit_, |
| 191 is_inline_direction_triggers_scrollbar_, | 190 is_inline_direction_triggers_scrollbar_, |
| 192 is_block_direction_triggers_scrollbar_, | 191 is_block_direction_triggers_scrollbar_, |
| 193 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, | 192 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, |
| 194 is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset)); | 193 is_anonymous_, margin_strut, bfc_offset_, exclusions, |
| 194 clearance_offset)); | |
| 195 } | 195 } |
| 196 return adoptRef(new NGConstraintSpace( | 196 return adoptRef(new NGConstraintSpace( |
| 197 out_writing_mode, static_cast<TextDirection>(text_direction_), | 197 out_writing_mode, static_cast<TextDirection>(text_direction_), |
| 198 available_size, percentage_resolution_size, | 198 available_size, percentage_resolution_size, |
| 199 initial_containing_block_size_, fragmentainer_space_available_, | 199 initial_containing_block_size_, fragmentainer_space_available_, |
| 200 is_fixed_size_block_, is_fixed_size_inline_, is_shrink_to_fit_, | 200 is_fixed_size_block_, is_fixed_size_inline_, is_shrink_to_fit_, |
| 201 is_block_direction_triggers_scrollbar_, | 201 is_block_direction_triggers_scrollbar_, |
| 202 is_inline_direction_triggers_scrollbar_, | 202 is_inline_direction_triggers_scrollbar_, |
| 203 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, | 203 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, |
| 204 is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset)); | 204 is_anonymous_, margin_strut, bfc_offset_, exclusions, clearance_offset)); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |