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/inline/ng_inline_node.h" | 5 #include "core/layout/ng/inline/ng_inline_node.h" |
6 | 6 |
7 #include "core/layout/BidiRun.h" | 7 #include "core/layout/BidiRun.h" |
8 #include "core/layout/LayoutBlockFlow.h" | 8 #include "core/layout/LayoutBlockFlow.h" |
9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
10 #include "core/layout/LayoutText.h" | 10 #include "core/layout/LayoutText.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 while (node) { | 223 while (node) { |
224 if (node->IsText()) { | 224 if (node->IsText()) { |
225 builder->SetIsSVGText(node->IsSVGInlineText()); | 225 builder->SetIsSVGText(node->IsSVGInlineText()); |
226 builder->Append(ToLayoutText(node)->GetText(), node->Style(), node); | 226 builder->Append(ToLayoutText(node)->GetText(), node->Style(), node); |
227 node->ClearNeedsLayout(); | 227 node->ClearNeedsLayout(); |
228 | 228 |
229 } else if (node->IsFloating()) { | 229 } else if (node->IsFloating()) { |
230 // Add floats and positioned objects in the same way as atomic inlines. | 230 // Add floats and positioned objects in the same way as atomic inlines. |
231 // Because these objects need positions, they will be handled in | 231 // Because these objects need positions, they will be handled in |
232 // NGInlineLayoutAlgorithm. | 232 // NGInlineLayoutAlgorithm. |
233 builder->Append(NGInlineItem::kFloating, kObjectReplacementCharacter, | 233 builder->AppendOpaque(NGInlineItem::kFloating, nullptr, node); |
234 nullptr, node); | |
235 | 234 |
236 } else if (node->IsOutOfFlowPositioned()) { | 235 } else if (node->IsOutOfFlowPositioned()) { |
237 builder->Append(NGInlineItem::kOutOfFlowPositioned, | 236 builder->AppendOpaque(NGInlineItem::kOutOfFlowPositioned, nullptr, node); |
238 kObjectReplacementCharacter, nullptr, node); | |
239 | 237 |
240 } else if (node->IsAtomicInlineLevel()) { | 238 } else if (node->IsAtomicInlineLevel()) { |
241 // For atomic inlines add a unicode "object replacement character" to | 239 // For atomic inlines add a unicode "object replacement character" to |
242 // signal the presence of a non-text object to the unicode bidi algorithm. | 240 // signal the presence of a non-text object to the unicode bidi algorithm. |
243 builder->Append(NGInlineItem::kAtomicInline, kObjectReplacementCharacter, | 241 builder->Append(NGInlineItem::kAtomicInline, kObjectReplacementCharacter, |
244 node->Style(), node); | 242 node->Style(), node); |
245 | 243 |
246 } else if (!node->IsInline()) { | 244 } else if (!node->IsInline()) { |
247 // A block box found. End inline and transit to block layout. | 245 // A block box found. End inline and transit to block layout. |
248 return node; | 246 return node; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 item.Style() == item.GetLayoutObject()->Style()); | 524 item.Style() == item.GetLayoutObject()->Style()); |
527 } | 525 } |
528 #endif | 526 #endif |
529 } | 527 } |
530 | 528 |
531 String NGInlineNode::ToString() const { | 529 String NGInlineNode::ToString() const { |
532 return String::Format("NGInlineNode"); | 530 return String::Format("NGInlineNode"); |
533 } | 531 } |
534 | 532 |
535 } // namespace blink | 533 } // namespace blink |
OLD | NEW |