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

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

Issue 2612103004: [ng_layout] Rename NGFragmentBase,NGFragment,NGPhysicalFragment (Closed)
Patch Set: CR: rename ifdef guards Created 3 years, 11 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/LayoutObject.h" 7 #include "core/layout/LayoutObject.h"
8 #include "core/layout/LayoutText.h" 8 #include "core/layout/LayoutText.h"
9 #include "core/layout/ng/ng_bidi_paragraph.h" 9 #include "core/layout/ng/ng_bidi_paragraph.h"
10 #include "core/layout/ng/ng_fragment.h"
11 #include "core/layout/ng/ng_fragment_builder.h" 10 #include "core/layout/ng/ng_fragment_builder.h"
12 #include "core/layout/ng/ng_layout_inline_items_builder.h" 11 #include "core/layout/ng/ng_layout_inline_items_builder.h"
13 #include "core/layout/ng/ng_text_layout_algorithm.h" 12 #include "core/layout/ng/ng_text_layout_algorithm.h"
14 #include "core/layout/ng/ng_constraint_space_builder.h" 13 #include "core/layout/ng/ng_constraint_space_builder.h"
15 #include "core/layout/ng/ng_physical_fragment.h"
16 #include "core/layout/ng/ng_physical_text_fragment.h" 14 #include "core/layout/ng/ng_physical_text_fragment.h"
17 #include "core/layout/ng/ng_text_fragment.h" 15 #include "core/layout/ng/ng_text_fragment.h"
18 #include "core/style/ComputedStyle.h" 16 #include "core/style/ComputedStyle.h"
17 #include "core/layout/ng/ng_box_fragment.h"
18 #include "core/layout/ng/ng_physical_box_fragment.h"
19 #include "platform/fonts/shaping/CachingWordShaper.h" 19 #include "platform/fonts/shaping/CachingWordShaper.h"
20 #include "platform/fonts/shaping/CachingWordShapeIterator.h" 20 #include "platform/fonts/shaping/CachingWordShapeIterator.h"
21 #include "wtf/text/CharacterNames.h" 21 #include "wtf/text/CharacterNames.h"
22 22
23 namespace blink { 23 namespace blink {
24 24
25 NGInlineNode::NGInlineNode(LayoutObject* start_inline, 25 NGInlineNode::NGInlineNode(LayoutObject* start_inline,
26 ComputedStyle* block_style) 26 ComputedStyle* block_style)
27 : NGLayoutInputNode(NGLayoutInputNodeType::kLegacyInline), 27 : NGLayoutInputNode(NGLayoutInputNodeType::kLegacyInline),
28 start_inline_(start_inline), 28 start_inline_(start_inline),
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 TextRun item_run(item_text); 207 TextRun item_run(item_text);
208 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font); 208 CachingWordShapeIterator iterator(shape_cache, item_run, &item_font);
209 RefPtr<const ShapeResult> word_result; 209 RefPtr<const ShapeResult> word_result;
210 while (iterator.next(&word_result)) { 210 while (iterator.next(&word_result)) {
211 item.shape_results_.append(word_result.get()); 211 item.shape_results_.append(word_result.get());
212 }; 212 };
213 } 213 }
214 } 214 }
215 215
216 bool NGInlineNode::Layout(NGConstraintSpace* constraint_space, 216 bool NGInlineNode::Layout(NGConstraintSpace* constraint_space,
217 NGFragmentBase** out) { 217 NGFragment** out) {
218 ASSERT_NOT_REACHED(); 218 ASSERT_NOT_REACHED();
219 *out = nullptr; 219 *out = nullptr;
220 return true; 220 return true;
221 } 221 }
222 222
223 bool NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space, 223 bool NGInlineNode::LayoutInline(NGConstraintSpace* constraint_space,
224 NGLineBuilder* line_builder) { 224 NGLineBuilder* line_builder) {
225 PrepareLayout(); 225 PrepareLayout();
226 226
227 // 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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 Vector<NGLayoutInlineItem>* items, 267 Vector<NGLayoutInlineItem>* items,
268 unsigned start_index, 268 unsigned start_index,
269 unsigned end_index) 269 unsigned end_index)
270 : start_item_(&(*items)[start_index]), 270 : start_item_(&(*items)[start_index]),
271 size_(end_index - start_index), 271 size_(end_index - start_index),
272 start_index_(start_index) { 272 start_index_(start_index) {
273 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size()); 273 RELEASE_ASSERT(start_index <= end_index && end_index <= items->size());
274 } 274 }
275 275
276 } // namespace blink 276 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698