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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc

Issue 2770483002: CS of out-of-flow positioned objects should have is_new_fc == true (Closed)
Patch Set: update TestExpectations Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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
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_; 179 // TODO(glebl): Uncomment the line below once we add the fragmentation
180 // support for floats.
181 // NGLogicalOffset bfc_offset = is_new_fc_ ? NGLogicalOffset() : bfc_offset_;
180 NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_; 182 NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_;
181 WTF::Optional<LayoutUnit> clearance_offset = 183 WTF::Optional<LayoutUnit> clearance_offset =
182 is_new_fc_ ? WTF::nullopt : clearance_offset_; 184 is_new_fc_ ? WTF::nullopt : clearance_offset_;
183 185
184 if (is_in_parallel_flow) { 186 if (is_in_parallel_flow) {
185 return adoptRef(new NGConstraintSpace( 187 return adoptRef(new NGConstraintSpace(
186 static_cast<NGWritingMode>(out_writing_mode), 188 static_cast<NGWritingMode>(out_writing_mode),
187 static_cast<TextDirection>(text_direction_), available_size, 189 static_cast<TextDirection>(text_direction_), available_size,
188 percentage_resolution_size, initial_containing_block_size_, 190 percentage_resolution_size, initial_containing_block_size_,
189 fragmentainer_space_available_, is_fixed_size_inline_, 191 fragmentainer_space_available_, is_fixed_size_inline_,
190 is_fixed_size_block_, is_shrink_to_fit_, 192 is_fixed_size_block_, is_shrink_to_fit_,
191 is_inline_direction_triggers_scrollbar_, 193 is_inline_direction_triggers_scrollbar_,
192 is_block_direction_triggers_scrollbar_, 194 is_block_direction_triggers_scrollbar_,
193 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, 195 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
194 is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset)); 196 is_anonymous_, margin_strut, bfc_offset_, exclusions,
197 clearance_offset));
195 } 198 }
196 return adoptRef(new NGConstraintSpace( 199 return adoptRef(new NGConstraintSpace(
197 out_writing_mode, static_cast<TextDirection>(text_direction_), 200 out_writing_mode, static_cast<TextDirection>(text_direction_),
198 available_size, percentage_resolution_size, 201 available_size, percentage_resolution_size,
199 initial_containing_block_size_, fragmentainer_space_available_, 202 initial_containing_block_size_, fragmentainer_space_available_,
200 is_fixed_size_block_, is_fixed_size_inline_, is_shrink_to_fit_, 203 is_fixed_size_block_, is_fixed_size_inline_, is_shrink_to_fit_,
201 is_block_direction_triggers_scrollbar_, 204 is_block_direction_triggers_scrollbar_,
202 is_inline_direction_triggers_scrollbar_, 205 is_inline_direction_triggers_scrollbar_,
203 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_, 206 static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
204 is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset)); 207 is_anonymous_, margin_strut, bfc_offset_, exclusions, clearance_offset));
205 } 208 }
206 209
207 } // namespace blink 210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698