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_text_layout_algorithm.h" | 5 #include "core/layout/ng/ng_text_layout_algorithm.h" |
6 | 6 |
7 #include "core/layout/ng/ng_bidi_paragraph.h" | 7 #include "core/layout/ng/ng_bidi_paragraph.h" |
8 #include "core/layout/ng/ng_break_token.h" | 8 #include "core/layout/ng/ng_break_token.h" |
9 #include "core/layout/ng/ng_constraint_space.h" | 9 #include "core/layout/ng/ng_constraint_space.h" |
10 #include "core/layout/ng/ng_fragment.h" | 10 #include "core/layout/ng/ng_fragment.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // TODO(kojii): atomic inline is not well-thought yet. | 80 // TODO(kojii): atomic inline is not well-thought yet. |
81 // TODO(kojii): oof is not well-thought yet. The bottom static position may be | 81 // TODO(kojii): oof is not well-thought yet. The bottom static position may be |
82 // in the next line, https://github.com/w3c/csswg-drafts/issues/609 | 82 // in the next line, https://github.com/w3c/csswg-drafts/issues/609 |
83 // TODO(kojii): need to split TextFragment if: | 83 // TODO(kojii): need to split TextFragment if: |
84 // * oof static position is needed. | 84 // * oof static position is needed. |
85 // * nested borders? | 85 // * nested borders? |
86 | 86 |
87 if (!inline_box_->IsBidiEnabled()) { | 87 if (!inline_box_->IsBidiEnabled()) { |
88 // If no bidi reordering, the logical order is the visual order. | 88 // If no bidi reordering, the logical order is the visual order. |
89 DCHECK_EQ(constraint_space.Direction(), LTR); | 89 DCHECK_EQ(constraint_space.Direction(), TextDirection::Ltr); |
90 DCHECK_EQ(items[0].Style()->direction(), LTR); | 90 DCHECK_EQ(items[0].Style()->direction(), TextDirection::Ltr); |
91 fragments_out->append(new NGTextFragment( | 91 fragments_out->append(new NGTextFragment( |
92 constraint_space.WritingMode(), constraint_space.Direction(), | 92 constraint_space.WritingMode(), constraint_space.Direction(), |
93 text_builder.ToTextFragment(inline_box_, items.StartIndex(), | 93 text_builder.ToTextFragment(inline_box_, items.StartIndex(), |
94 items.EndIndex()))); | 94 items.EndIndex()))); |
95 logical_offsets_out->append(NGLogicalOffset()); | 95 logical_offsets_out->append(NGLogicalOffset()); |
96 return; | 96 return; |
97 } | 97 } |
98 | 98 |
99 // TODO(kojii): UAX#9 L1 is not supported yet. Supporting L1 may change | 99 // TODO(kojii): UAX#9 L1 is not supported yet. Supporting L1 may change |
100 // embedding levels of parts of runs, which requires to split items. | 100 // embedding levels of parts of runs, which requires to split items. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 DEFINE_TRACE(NGTextLayoutAlgorithm) { | 151 DEFINE_TRACE(NGTextLayoutAlgorithm) { |
152 NGLayoutAlgorithm::trace(visitor); | 152 NGLayoutAlgorithm::trace(visitor); |
153 visitor->trace(inline_box_); | 153 visitor->trace(inline_box_); |
154 visitor->trace(constraint_space_); | 154 visitor->trace(constraint_space_); |
155 visitor->trace(break_token_); | 155 visitor->trace(break_token_); |
156 } | 156 } |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
OLD | NEW |