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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_line_builder.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_line_builder.h" 5 #include "core/layout/ng/ng_line_builder.h"
6 6
7 #include "core/layout/ng/ng_bidi_paragraph.h" 7 #include "core/layout/ng/ng_bidi_paragraph.h"
8 #include "core/layout/ng/ng_constraint_space.h" 8 #include "core/layout/ng/ng_constraint_space.h"
9 #include "core/layout/ng/ng_fragment_builder.h" 9 #include "core/layout/ng/ng_fragment_builder.h"
10 #include "core/layout/ng/ng_inline_node.h" 10 #include "core/layout/ng/ng_inline_node.h"
(...skipping 18 matching lines...) Expand all
29 unsigned end_index, 29 unsigned end_index,
30 LayoutUnit inline_size) { 30 LayoutUnit inline_size) {
31 DCHECK_LT(start_index, end_index); 31 DCHECK_LT(start_index, end_index);
32 line_item_chunks_.append(LineItemChunk{start_index, end_index, inline_size}); 32 line_item_chunks_.append(LineItemChunk{start_index, end_index, inline_size});
33 } 33 }
34 34
35 void NGLineBuilder::CreateLine() { 35 void NGLineBuilder::CreateLine() {
36 if (inline_box_->IsBidiEnabled()) 36 if (inline_box_->IsBidiEnabled())
37 BidiReorder(); 37 BidiReorder();
38 38
39 NGFragmentBuilder text_builder(NGPhysicalFragmentBase::kFragmentText); 39 NGFragmentBuilder text_builder(NGPhysicalFragment::kFragmentText);
40 text_builder.SetWritingMode(constraint_space_->WritingMode()); 40 text_builder.SetWritingMode(constraint_space_->WritingMode());
41 LayoutUnit inline_offset; 41 LayoutUnit inline_offset;
42 const Vector<NGLayoutInlineItem>& items = inline_box_->Items(); 42 const Vector<NGLayoutInlineItem>& items = inline_box_->Items();
43 for (const auto& line_item_chunk : line_item_chunks_) { 43 for (const auto& line_item_chunk : line_item_chunks_) {
44 const NGLayoutInlineItem& start_item = items[line_item_chunk.start_index]; 44 const NGLayoutInlineItem& start_item = items[line_item_chunk.start_index];
45 const ComputedStyle* style = start_item.Style(); 45 const ComputedStyle* style = start_item.Style();
46 // Skip bidi controls. 46 // Skip bidi controls.
47 if (!style) 47 if (!style)
48 continue; 48 continue;
49 49
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 .SetBlockOverflow(content_size_); 126 .SetBlockOverflow(content_size_);
127 } 127 }
128 128
129 DEFINE_TRACE(NGLineBuilder) { 129 DEFINE_TRACE(NGLineBuilder) {
130 visitor->trace(inline_box_); 130 visitor->trace(inline_box_);
131 visitor->trace(constraint_space_); 131 visitor->trace(constraint_space_);
132 visitor->trace(fragments_); 132 visitor->trace(fragments_);
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698