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

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

Issue 2668183003: [LayoutNG] Make NG algorithms non-oilpan. (Closed)
Patch Set: fix win compile 2? Created 3 years, 10 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_block_layout_algorithm.h" 5 #include "core/layout/ng/ng_block_layout_algorithm.h"
6 6
7 #include "core/layout/ng/ng_absolute_utils.h" 7 #include "core/layout/ng/ng_absolute_utils.h"
8 #include "core/layout/ng/ng_block_break_token.h" 8 #include "core/layout/ng/ng_block_break_token.h"
9 #include "core/layout/ng/ng_column_mapper.h" 9 #include "core/layout/ng/ng_column_mapper.h"
10 #include "core/layout/ng/ng_constraint_space.h" 10 #include "core/layout/ng/ng_constraint_space.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 } // namespace 255 } // namespace
256 256
257 NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm( 257 NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
258 LayoutObject* layout_object, 258 LayoutObject* layout_object,
259 PassRefPtr<const ComputedStyle> style, 259 PassRefPtr<const ComputedStyle> style,
260 NGBlockNode* first_child, 260 NGBlockNode* first_child,
261 NGConstraintSpace* constraint_space, 261 NGConstraintSpace* constraint_space,
262 NGBreakToken* break_token) 262 NGBreakToken* break_token)
263 : NGLayoutAlgorithm(kBlockLayoutAlgorithm), 263 : style_(style),
264 style_(style),
265 first_child_(first_child), 264 first_child_(first_child),
266 constraint_space_(constraint_space), 265 constraint_space_(constraint_space),
267 break_token_(break_token), 266 break_token_(break_token),
268 builder_(new NGFragmentBuilder(NGPhysicalFragment::kFragmentBox, 267 builder_(new NGFragmentBuilder(NGPhysicalFragment::kFragmentBox,
269 layout_object)) { 268 layout_object)) {
270 DCHECK(style_); 269 DCHECK(style_);
271 } 270 }
272 271
273 bool NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes( 272 bool NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes(
274 MinAndMaxContentSizes* sizes) const { 273 MinAndMaxContentSizes* sizes) const {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 curr_bfc_offset_.block_offset += content_size_; 711 curr_bfc_offset_.block_offset += content_size_;
713 curr_bfc_offset_.inline_offset += border_and_padding_.inline_start; 712 curr_bfc_offset_.inline_offset += border_and_padding_.inline_start;
714 if (ConstraintSpace().IsNewFormattingContext()) { 713 if (ConstraintSpace().IsNewFormattingContext()) {
715 curr_bfc_offset_.inline_offset += curr_child_margins_.inline_start; 714 curr_bfc_offset_.inline_offset += curr_child_margins_.inline_start;
716 } 715 }
717 space_builder_->SetBfcOffset(curr_bfc_offset_); 716 space_builder_->SetBfcOffset(curr_bfc_offset_);
718 717
719 return space_builder_->ToConstraintSpace(); 718 return space_builder_->ToConstraintSpace();
720 } 719 }
721 720
722 DEFINE_TRACE(NGBlockLayoutAlgorithm) {
723 NGLayoutAlgorithm::trace(visitor);
724 visitor->trace(first_child_);
725 visitor->trace(constraint_space_);
726 visitor->trace(break_token_);
727 visitor->trace(builder_);
728 visitor->trace(space_builder_);
729 visitor->trace(space_for_current_child_);
730 visitor->trace(current_child_);
731 visitor->trace(fragmentainer_mapper_);
732 }
733
734 } // namespace blink 721 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698