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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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_break_token.h" 7 #include "core/layout/ng/ng_break_token.h"
8 #include "core/layout/ng/ng_constraint_space.h" 8 #include "core/layout/ng/ng_constraint_space.h"
9 #include "core/layout/ng/ng_constraint_space_builder.h" 9 #include "core/layout/ng/ng_constraint_space_builder.h"
10 #include "core/layout/ng/ng_fragment_builder.h" 10 #include "core/layout/ng/ng_fragment_builder.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 &offset.block_offset); 498 &offset.block_offset);
499 space_for_current_child_->SetOffset(offset); 499 space_for_current_child_->SetOffset(offset);
500 500
501 const NGLayoutOpportunity opportunity = FindLayoutOpportunityForFragment( 501 const NGLayoutOpportunity opportunity = FindLayoutOpportunityForFragment(
502 space_for_current_child_, fragment, margins); 502 space_for_current_child_, fragment, margins);
503 DCHECK(!opportunity.IsEmpty()) << "Opportunity is empty but it shouldn't be"; 503 DCHECK(!opportunity.IsEmpty()) << "Opportunity is empty but it shouldn't be";
504 504
505 NGExclusion::Type exclusion_type = NGExclusion::kFloatLeft; 505 NGExclusion::Type exclusion_type = NGExclusion::kFloatLeft;
506 // Calculate the float offset if needed. 506 // Calculate the float offset if needed.
507 LayoutUnit float_offset; 507 LayoutUnit float_offset;
508 if (CurrentChildStyle().floating() == EFloat::Right) { 508 if (CurrentChildStyle().floating() == EFloat::kRight) {
509 float_offset = opportunity.size.inline_size - fragment.InlineSize(); 509 float_offset = opportunity.size.inline_size - fragment.InlineSize();
510 exclusion_type = NGExclusion::kFloatRight; 510 exclusion_type = NGExclusion::kFloatRight;
511 } 511 }
512 512
513 // Add the float as an exclusion. 513 // Add the float as an exclusion.
514 const NGExclusion exclusion = CreateExclusion( 514 const NGExclusion exclusion = CreateExclusion(
515 fragment, opportunity, float_offset, margins, exclusion_type); 515 fragment, opportunity, float_offset, margins, exclusion_type);
516 constraint_space_->AddExclusion(exclusion); 516 constraint_space_->AddExclusion(exclusion);
517 517
518 return CalculateLogicalOffsetForOpportunity(opportunity, float_offset, 518 return CalculateLogicalOffsetForOpportunity(opportunity, float_offset,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 visitor->trace(builder_); 559 visitor->trace(builder_);
560 visitor->trace(space_builder_); 560 visitor->trace(space_builder_);
561 visitor->trace(space_for_current_child_); 561 visitor->trace(space_for_current_child_);
562 visitor->trace(current_child_); 562 visitor->trace(current_child_);
563 visitor->trace(current_minmax_child_); 563 visitor->trace(current_minmax_child_);
564 visitor->trace(out_of_flow_layout_); 564 visitor->trace(out_of_flow_layout_);
565 visitor->trace(out_of_flow_candidates_); 565 visitor->trace(out_of_flow_candidates_);
566 } 566 }
567 567
568 } // namespace blink 568 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698