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/LayoutText.h" | |
9 #include "core/layout/ng/ng_inline_node.h" | 8 #include "core/layout/ng/ng_inline_node.h" |
10 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
11 | 10 |
12 namespace blink { | 11 namespace blink { |
13 | 12 |
14 NGLayoutInlineItemsBuilder::~NGLayoutInlineItemsBuilder() { | 13 NGLayoutInlineItemsBuilder::~NGLayoutInlineItemsBuilder() { |
15 DCHECK_EQ(0u, exits_.size()); | 14 DCHECK_EQ(0u, exits_.size()); |
16 DCHECK_EQ(text_.length(), items_->isEmpty() ? 0 : items_->back().EndOffset()); | 15 DCHECK_EQ(text_.length(), items_->isEmpty() ? 0 : items_->back().EndOffset()); |
17 } | 16 } |
18 | 17 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 265 } |
267 | 266 |
268 void NGLayoutInlineItemsBuilder::Exit(LayoutObject* node) { | 267 void NGLayoutInlineItemsBuilder::Exit(LayoutObject* node) { |
269 while (!exits_.isEmpty() && exits_.back().node == node) { | 268 while (!exits_.isEmpty() && exits_.back().node == node) { |
270 AppendAsOpaqueToSpaceCollapsing(exits_.back().character); | 269 AppendAsOpaqueToSpaceCollapsing(exits_.back().character); |
271 exits_.pop_back(); | 270 exits_.pop_back(); |
272 } | 271 } |
273 } | 272 } |
274 | 273 |
275 } // namespace blink | 274 } // namespace blink |
OLD | NEW |