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

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

Issue 2772503004: [LayoutNG] Add NGInlineBreakToken and back of NGInlineLayoutAlgorithm (Closed)
Patch Set: Rename Created 3 years, 8 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 #ifndef NGInlineNode_h 5 #ifndef NGInlineNode_h
6 #define NGInlineNode_h 6 #define NGInlineNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/LayoutBlockFlow.h" 9 #include "core/layout/LayoutBlockFlow.h"
10 #include "core/layout/ng/ng_layout_input_node.h" 10 #include "core/layout/ng/ng_layout_input_node.h"
(...skipping 11 matching lines...) Expand all
22 class ComputedStyle; 22 class ComputedStyle;
23 class LayoutBlockFlow; 23 class LayoutBlockFlow;
24 class LayoutObject; 24 class LayoutObject;
25 class LayoutUnit; 25 class LayoutUnit;
26 struct MinMaxContentSize; 26 struct MinMaxContentSize;
27 class NGConstraintSpace; 27 class NGConstraintSpace;
28 class NGLayoutInlineItem; 28 class NGLayoutInlineItem;
29 class NGLayoutInlineItemRange; 29 class NGLayoutInlineItemRange;
30 class NGLayoutInlineItemsBuilder; 30 class NGLayoutInlineItemsBuilder;
31 class NGLayoutResult; 31 class NGLayoutResult;
32 class NGLineBuilder;
33 32
34 // Represents an anonymous block box to be laid out, that contains consecutive 33 // Represents an anonymous block box to be laid out, that contains consecutive
35 // inline nodes and their descendants. 34 // inline nodes and their descendants.
36 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { 35 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode {
37 public: 36 public:
38 NGInlineNode(LayoutObject* start_inline, LayoutBlockFlow*); 37 NGInlineNode(LayoutObject* start_inline, LayoutBlockFlow*);
39 ~NGInlineNode() override; 38 ~NGInlineNode() override;
40 39
41 LayoutBlockFlow* GetLayoutBlockFlow() const { return block_; } 40 LayoutBlockFlow* GetLayoutBlockFlow() const { return block_; }
42 const ComputedStyle* BlockStyle() const { return block_->style(); } 41 const ComputedStyle* BlockStyle() const { return block_->style(); }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void PrepareLayout(); 77 void PrepareLayout();
79 bool IsPrepareLayoutFinished() const { return !text_content_.isNull(); } 78 bool IsPrepareLayoutFinished() const { return !text_content_.isNull(); }
80 79
81 void CollectInlines(LayoutObject* start, LayoutBlockFlow*); 80 void CollectInlines(LayoutObject* start, LayoutBlockFlow*);
82 LayoutObject* CollectInlines(LayoutObject* start, 81 LayoutObject* CollectInlines(LayoutObject* start,
83 LayoutBlockFlow*, 82 LayoutBlockFlow*,
84 NGLayoutInlineItemsBuilder*); 83 NGLayoutInlineItemsBuilder*);
85 void SegmentText(); 84 void SegmentText();
86 void ShapeText(); 85 void ShapeText();
87 86
88 void Layout(NGLineBuilder*);
89
90 LayoutObject* start_inline_; 87 LayoutObject* start_inline_;
91 LayoutBlockFlow* block_; 88 LayoutBlockFlow* block_;
92 Member<NGLayoutInputNode> next_sibling_; 89 Member<NGLayoutInputNode> next_sibling_;
93 90
94 // Text content for all inline items represented by a single NGInlineNode 91 // Text content for all inline items represented by a single NGInlineNode
95 // instance. Encoded either as UTF-16 or latin-1 depending on content. 92 // instance. Encoded either as UTF-16 or latin-1 depending on content.
96 String text_content_; 93 String text_content_;
97 Vector<NGLayoutInlineItem> items_; 94 Vector<NGLayoutInlineItem> items_;
98 95
99 // TODO(kojii): This should move to somewhere else when we move PrepareLayout 96 // TODO(kojii): This should move to somewhere else when we move PrepareLayout
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 244
248 private: 245 private:
249 NGLayoutInlineItem* start_item_; 246 NGLayoutInlineItem* start_item_;
250 unsigned size_; 247 unsigned size_;
251 unsigned start_index_; 248 unsigned start_index_;
252 }; 249 };
253 250
254 } // namespace blink 251 } // namespace blink
255 252
256 #endif // NGInlineNode_h 253 #endif // NGInlineNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698