| 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_fragment_builder.h" | 5 #include "core/layout/ng/ng_fragment_builder.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/ng_block_node.h" | 7 #include "core/layout/ng/ng_block_node.h" |
| 8 #include "core/layout/ng/ng_fragment_base.h" | 8 #include "core/layout/ng/ng_fragment_base.h" |
| 9 #include "core/layout/ng/ng_physical_fragment.h" | 9 #include "core/layout/ng/ng_physical_fragment.h" |
| 10 #include "core/layout/ng/ng_physical_text_fragment.h" | 10 #include "core/layout/ng/ng_physical_text_fragment.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 NGFragmentBuilder::NGFragmentBuilder( | 14 NGFragmentBuilder::NGFragmentBuilder( |
| 15 NGPhysicalFragmentBase::NGFragmentType type) | 15 NGPhysicalFragmentBase::NGFragmentType type) |
| 16 : type_(type), writing_mode_(kHorizontalTopBottom), direction_(LTR) {} | 16 : type_(type), |
| 17 writing_mode_(kHorizontalTopBottom), |
| 18 direction_(TextDirection::Ltr) {} |
| 17 | 19 |
| 18 NGFragmentBuilder& NGFragmentBuilder::SetWritingMode( | 20 NGFragmentBuilder& NGFragmentBuilder::SetWritingMode( |
| 19 NGWritingMode writing_mode) { | 21 NGWritingMode writing_mode) { |
| 20 writing_mode_ = writing_mode; | 22 writing_mode_ = writing_mode; |
| 21 return *this; | 23 return *this; |
| 22 } | 24 } |
| 23 | 25 |
| 24 NGFragmentBuilder& NGFragmentBuilder::SetDirection(TextDirection direction) { | 26 NGFragmentBuilder& NGFragmentBuilder::SetDirection(TextDirection direction) { |
| 25 direction_ = direction; | 27 direction_ = direction; |
| 26 return *this; | 28 return *this; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 out_of_flow_positions_); | 163 out_of_flow_positions_); |
| 162 } | 164 } |
| 163 | 165 |
| 164 DEFINE_TRACE(NGFragmentBuilder) { | 166 DEFINE_TRACE(NGFragmentBuilder) { |
| 165 visitor->trace(children_); | 167 visitor->trace(children_); |
| 166 visitor->trace(out_of_flow_descendant_candidates_); | 168 visitor->trace(out_of_flow_descendant_candidates_); |
| 167 visitor->trace(out_of_flow_descendants_); | 169 visitor->trace(out_of_flow_descendants_); |
| 168 } | 170 } |
| 169 | 171 |
| 170 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |