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

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

Issue 2632523002: [LayoutNG] Initial support for multicol, introducing NGBlockBreakToken. (Closed)
Patch Set: Add TODO. 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 #ifndef NGFragmentBuilder_h 5 #ifndef NGFragmentBuilder_h
6 #define NGFragmentBuilder_h 6 #define NGFragmentBuilder_h
7 7
8 #include "core/layout/ng/ng_physical_fragment.h" 8 #include "core/layout/ng/ng_physical_fragment.h"
9 #include "core/layout/ng/ng_units.h" 9 #include "core/layout/ng/ng_units.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // builder->AddOutOfFlowDescendant(); 74 // builder->AddOutOfFlowDescendant();
75 // } 75 // }
76 NGFragmentBuilder& AddOutOfFlowChildCandidate(NGBlockNode*, NGLogicalOffset); 76 NGFragmentBuilder& AddOutOfFlowChildCandidate(NGBlockNode*, NGLogicalOffset);
77 77
78 void GetAndClearOutOfFlowDescendantCandidates(WeakBoxList*, 78 void GetAndClearOutOfFlowDescendantCandidates(WeakBoxList*,
79 Vector<NGStaticPosition>*); 79 Vector<NGStaticPosition>*);
80 80
81 NGFragmentBuilder& AddOutOfFlowDescendant(NGBlockNode*, 81 NGFragmentBuilder& AddOutOfFlowDescendant(NGBlockNode*,
82 const NGStaticPosition&); 82 const NGStaticPosition&);
83 83
84 void SetBreakToken(NGBreakToken* token) {
85 DCHECK(!break_token_);
86 break_token_ = token;
87 }
88 bool HasBreakToken() const { return break_token_; }
89
84 // Sets MarginStrut for the resultant fragment. 90 // Sets MarginStrut for the resultant fragment.
85 NGFragmentBuilder& SetMarginStrutBlockStart(const NGMarginStrut& from); 91 NGFragmentBuilder& SetMarginStrutBlockStart(const NGMarginStrut& from);
86 NGFragmentBuilder& SetMarginStrutBlockEnd(const NGMarginStrut& from); 92 NGFragmentBuilder& SetMarginStrutBlockEnd(const NGMarginStrut& from);
87 93
88 // Offsets are not supposed to be set during fragment construction, so we 94 // Offsets are not supposed to be set during fragment construction, so we
89 // do not provide a setter here. 95 // do not provide a setter here.
90 96
91 // Creates the fragment. Can only be called once. 97 // Creates the fragment. Can only be called once.
92 NGPhysicalBoxFragment* ToBoxFragment(); 98 NGPhysicalBoxFragment* ToBoxFragment();
93 NGPhysicalTextFragment* ToTextFragment(NGInlineNode*, 99 NGPhysicalTextFragment* ToTextFragment(NGInlineNode*,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 NGMarginStrut margin_strut_; 131 NGMarginStrut margin_strut_;
126 132
127 HeapVector<Member<NGPhysicalFragment>> children_; 133 HeapVector<Member<NGPhysicalFragment>> children_;
128 Vector<NGLogicalOffset> offsets_; 134 Vector<NGLogicalOffset> offsets_;
129 135
130 WeakBoxList out_of_flow_descendant_candidates_; 136 WeakBoxList out_of_flow_descendant_candidates_;
131 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_; 137 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_;
132 138
133 WeakBoxList out_of_flow_descendants_; 139 WeakBoxList out_of_flow_descendants_;
134 Vector<NGStaticPosition> out_of_flow_positions_; 140 Vector<NGStaticPosition> out_of_flow_positions_;
141
142 Member<NGBreakToken> break_token_;
135 }; 143 };
136 144
137 } // namespace blink 145 } // namespace blink
138 146
139 #endif // NGFragmentBuilder 147 #endif // NGFragmentBuilder
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698