| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 TextRun item_run(item_text); | 209 TextRun item_run(item_text); |
| 210 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font); | 210 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font); |
| 211 RefPtr<const ShapeResult> word_result; | 211 RefPtr<const ShapeResult> word_result; |
| 212 while (iterator.next(&word_result)) { | 212 while (iterator.next(&word_result)) { |
| 213 item.shape_results_.push_back(word_result.get()); | 213 item.shape_results_.push_back(word_result.get()); |
| 214 }; | 214 }; |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool NGInlineNode::Layout(NGConstraintSpace* constraint_space, | 218 NGPhysicalFragment* NGInlineNode::Layout(NGConstraintSpace*) { |
| 219 NGFragment** out) { | |
| 220 ASSERT_NOT_REACHED(); | 219 ASSERT_NOT_REACHED(); |
| 221 *out = nullptr; | 220 return nullptr; |
| 222 return true; | |
| 223 } | 221 } |
| 224 | 222 |
| 225 bool NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, | 223 bool NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, |
| 226 NGLineBuilder* line_builder) { | 224 NGLineBuilder* line_builder) { |
| 227 PrepareLayout(); | 225 PrepareLayout(); |
| 228 | 226 |
| 229 // NOTE: We don't need to change the coordinate system here as we are an | 227 // NOTE: We don't need to change the coordinate system here as we are an |
| 230 // inline. | 228 // inline. |
| 231 NGConstraintSpace* child_constraint_space = | 229 NGConstraintSpace* child_constraint_space = |
| 232 NGConstraintSpaceBuilder(constraint_space->WritingMode()) | 230 NGConstraintSpaceBuilder(constraint_space->WritingMode()) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 Vector<NGLayoutInlineItem>* items, | 309 Vector<NGLayoutInlineItem>* items, |
| 312 unsigned start_index, | 310 unsigned start_index, |
| 313 unsigned end_index) | 311 unsigned end_index) |
| 314 : start_item_(&(*items)[start_index]), | 312 : start_item_(&(*items)[start_index]), |
| 315 size_(end_index - start_index), | 313 size_(end_index - start_index), |
| 316 start_index_(start_index) { | 314 start_index_(start_index) { |
| 317 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); | 315 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); |
| 318 } | 316 } |
| 319 | 317 |
| 320 } // namespace blink | 318 } // namespace blink |
| OLD | NEW |