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_inline_node.h" | 5 #include "core/layout/ng/ng_inline_node.h" |
6 | 6 |
7 #include "core/layout/LayoutBlockFlow.h" | 7 #include "core/layout/LayoutBlockFlow.h" |
8 #include "core/layout/LayoutObject.h" | 8 #include "core/layout/LayoutObject.h" |
9 #include "core/layout/LayoutText.h" | 9 #include "core/layout/LayoutText.h" |
10 #include "core/layout/ng/ng_bidi_paragraph.h" | 10 #include "core/layout/ng/ng_bidi_paragraph.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 for (auto& item : items_) { | 234 for (auto& item : items_) { |
235 // Skip object replacement characters and bidi control characters. | 235 // Skip object replacement characters and bidi control characters. |
236 if (!item.style_) | 236 if (!item.style_) |
237 continue; | 237 continue; |
238 | 238 |
239 item.shape_result_ = shaper.shape(&item.Style()->font(), item.Direction(), | 239 item.shape_result_ = shaper.shape(&item.Style()->font(), item.Direction(), |
240 item.StartOffset(), item.EndOffset()); | 240 item.StartOffset(), item.EndOffset()); |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 RefPtr<NGLayoutResult> NGInlineNode::Layout(NGConstraintSpace*) { | 244 RefPtr<NGLayoutResult> NGInlineNode::Layout(NGConstraintSpace*, NGBreakToken*) { |
245 ASSERT_NOT_REACHED(); | 245 ASSERT_NOT_REACHED(); |
246 return nullptr; | 246 return nullptr; |
247 } | 247 } |
248 | 248 |
249 void NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, | 249 void NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, |
250 NGLineBuilder* line_builder) { | 250 NGLineBuilder* line_builder) { |
251 PrepareLayout(); | 251 PrepareLayout(); |
252 | 252 |
253 if (text_content_.isEmpty()) | 253 if (text_content_.isEmpty()) |
254 return; | 254 return; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 Vector<NGLayoutInlineItem>* items, | 324 Vector<NGLayoutInlineItem>* items, |
325 unsigned start_index, | 325 unsigned start_index, |
326 unsigned end_index) | 326 unsigned end_index) |
327 : start_item_(&(*items)[start_index]), | 327 : start_item_(&(*items)[start_index]), |
328 size_(end_index - start_index), | 328 size_(end_index - start_index), |
329 start_index_(start_index) { | 329 start_index_(start_index) { |
330 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); | 330 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); |
331 } | 331 } |
332 | 332 |
333 } // namespace blink | 333 } // namespace blink |
OLD | NEW |