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_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_box_fragment.h" | 9 #include "core/layout/ng/ng_box_fragment.h" |
10 #include "core/layout/ng/ng_column_mapper.h" | 10 #include "core/layout/ng/ng_column_mapper.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const NGExclusion* left_exclusion = space.Exclusions()->last_left_float; | 36 const NGExclusion* left_exclusion = space.Exclusions()->last_left_float; |
37 | 37 |
38 // Calculates Left/Right block end offset from left/right float exclusions or | 38 // Calculates Left/Right block end offset from left/right float exclusions or |
39 // use the default content offset position. | 39 // use the default content offset position. |
40 LayoutUnit left_block_end_offset = | 40 LayoutUnit left_block_end_offset = |
41 left_exclusion ? left_exclusion->rect.BlockEndOffset() : *content_size; | 41 left_exclusion ? left_exclusion->rect.BlockEndOffset() : *content_size; |
42 LayoutUnit right_block_end_offset = | 42 LayoutUnit right_block_end_offset = |
43 right_exclusion ? right_exclusion->rect.BlockEndOffset() : *content_size; | 43 right_exclusion ? right_exclusion->rect.BlockEndOffset() : *content_size; |
44 | 44 |
45 switch (style.clear()) { | 45 switch (style.clear()) { |
46 case EClear::ClearNone: | 46 case EClear::kNone: |
47 return; // nothing to do here. | 47 return; // nothing to do here. |
48 case EClear::ClearLeft: | 48 case EClear::kLeft: |
49 *content_size = left_block_end_offset; | 49 *content_size = left_block_end_offset; |
50 break; | 50 break; |
51 case EClear::ClearRight: | 51 case EClear::kRight: |
52 *content_size = right_block_end_offset; | 52 *content_size = right_block_end_offset; |
53 break; | 53 break; |
54 case EClear::ClearBoth: | 54 case EClear::kBoth: |
55 *content_size = std::max(left_block_end_offset, right_block_end_offset); | 55 *content_size = std::max(left_block_end_offset, right_block_end_offset); |
56 break; | 56 break; |
57 default: | 57 default: |
58 ASSERT_NOT_REACHED(); | 58 ASSERT_NOT_REACHED(); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 LayoutUnit ComputeCollapsedMarginBlockStart( | 62 LayoutUnit ComputeCollapsedMarginBlockStart( |
63 const NGDeprecatedMarginStrut& prev_margin_strut, | 63 const NGDeprecatedMarginStrut& prev_margin_strut, |
64 const NGDeprecatedMarginStrut& curr_margin_strut) { | 64 const NGDeprecatedMarginStrut& curr_margin_strut) { |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 visitor->trace(constraint_space_); | 662 visitor->trace(constraint_space_); |
663 visitor->trace(break_token_); | 663 visitor->trace(break_token_); |
664 visitor->trace(builder_); | 664 visitor->trace(builder_); |
665 visitor->trace(space_builder_); | 665 visitor->trace(space_builder_); |
666 visitor->trace(space_for_current_child_); | 666 visitor->trace(space_for_current_child_); |
667 visitor->trace(current_child_); | 667 visitor->trace(current_child_); |
668 visitor->trace(fragmentainer_mapper_); | 668 visitor->trace(fragmentainer_mapper_); |
669 } | 669 } |
670 | 670 |
671 } // namespace blink | 671 } // namespace blink |
OLD | NEW |