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

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

Issue 2714803002: [LayoutNG] Allow block-flow layout to be fragmented using new approach. (Closed)
Patch Set: rebase. Created 3 years, 9 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698