Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc

Issue 2702403003: [layoutng] Split NGLayoutResult out of NGPhysicalFragment (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 TextRun item_run(item_text); 233 TextRun item_run(item_text);
234 item_run.setDirection(item.Direction()); 234 item_run.setDirection(item.Direction());
235 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font); 235 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font);
236 RefPtr<const ShapeResult> word_result; 236 RefPtr<const ShapeResult> word_result;
237 while (iterator.next(&word_result)) { 237 while (iterator.next(&word_result)) {
238 item.shape_results_.push_back(std::move(word_result)); 238 item.shape_results_.push_back(std::move(word_result));
239 } 239 }
240 } 240 }
241 } 241 }
242 242
243 RefPtr<NGPhysicalFragment> NGInlineNode::Layout(NGConstraintSpace*) { 243 RefPtr<NGLayoutResult> NGInlineNode::Layout(NGConstraintSpace*) {
244 ASSERT_NOT_REACHED(); 244 ASSERT_NOT_REACHED();
245 return nullptr; 245 return nullptr;
246 } 246 }
247 247
248 void NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, 248 void NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space,
249 NGLineBuilder* line_builder) { 249 NGLineBuilder* line_builder) {
250 PrepareLayout(); 250 PrepareLayout();
251 251
252 if (text_content_.isEmpty()) 252 if (text_content_.isEmpty())
253 return; 253 return;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 Vector<NGLayoutInlineItem>* items, 323 Vector<NGLayoutInlineItem>* items,
324 unsigned start_index, 324 unsigned start_index,
325 unsigned end_index) 325 unsigned end_index)
326 : start_item_(&(*items)[start_index]), 326 : start_item_(&(*items)[start_index]),
327 size_(end_index - start_index), 327 size_(end_index - start_index),
328 start_index_(start_index) { 328 start_index_(start_index) {
329 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); 329 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size());
330 } 330 }
331 331
332 } // namespace blink 332 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698