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_layout_inline_items_builder.h" | 5 #include "core/layout/ng/ng_layout_inline_items_builder.h" |
6 | 6 |
7 #include "core/layout/LayoutObject.h" | 7 #include "core/layout/LayoutObject.h" |
8 #include "core/layout/ng/ng_inline_node.h" | 8 #include "core/layout/ng/ng_inline_node.h" |
9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
10 | 10 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 is_last_collapsible_space_ = false; | 191 is_last_collapsible_space_ = false; |
192 if (*offset > text_.length()) | 192 if (*offset > text_.length()) |
193 *offset = text_.length(); | 193 *offset = text_.length(); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 void NGLayoutInlineItemsBuilder::AppendBidiControl(const ComputedStyle* style, | 197 void NGLayoutInlineItemsBuilder::AppendBidiControl(const ComputedStyle* style, |
198 UChar ltr, | 198 UChar ltr, |
199 UChar rtl) { | 199 UChar rtl) { |
200 AppendAsOpaqueToSpaceCollapsing( | 200 AppendAsOpaqueToSpaceCollapsing( |
201 style->direction() == TextDirection::Rtl ? rtl : ltr); | 201 style->direction() == TextDirection::kRtl ? rtl : ltr); |
202 } | 202 } |
203 | 203 |
204 void NGLayoutInlineItemsBuilder::EnterBlock(const ComputedStyle* style) { | 204 void NGLayoutInlineItemsBuilder::EnterBlock(const ComputedStyle* style) { |
205 // Handle bidi-override on the block itself. | 205 // Handle bidi-override on the block itself. |
206 // Isolate and embed values are enforced by default and redundant on the block | 206 // Isolate and embed values are enforced by default and redundant on the block |
207 // elements. | 207 // elements. |
208 // Plaintext and direction are handled as the paragraph level by | 208 // Plaintext and direction are handled as the paragraph level by |
209 // NGBidiParagraph::SetParagraph(). | 209 // NGBidiParagraph::SetParagraph(). |
210 if (style->unicodeBidi() == Override || | 210 if (style->unicodeBidi() == Override || |
211 style->unicodeBidi() == IsolateOverride) { | 211 style->unicodeBidi() == IsolateOverride) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 | 267 |
268 void NGLayoutInlineItemsBuilder::Exit(LayoutObject* node) { | 268 void NGLayoutInlineItemsBuilder::Exit(LayoutObject* node) { |
269 while (!exits_.isEmpty() && exits_.back().node == node) { | 269 while (!exits_.isEmpty() && exits_.back().node == node) { |
270 AppendAsOpaqueToSpaceCollapsing(exits_.back().character); | 270 AppendAsOpaqueToSpaceCollapsing(exits_.back().character); |
271 exits_.pop_back(); | 271 exits_.pop_back(); |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 } // namespace blink | 275 } // namespace blink |
OLD | NEW |