| OLD | NEW |
| 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_constraint_space.h" | 8 #include "core/layout/ng/ng_constraint_space.h" |
| 9 #include "core/layout/ng/ng_floating_object.h" | 9 #include "core/layout/ng/ng_floating_object.h" |
| 10 #include "core/layout/ng/ng_physical_fragment.h" | 10 #include "core/layout/ng/ng_physical_fragment.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 NGFragmentBuilder& AddUnpositionedFloat(NGFloatingObject* floating_object); | 87 NGFragmentBuilder& AddUnpositionedFloat(NGFloatingObject* floating_object); |
| 88 | 88 |
| 89 void SetBreakToken(NGBreakToken* token) { | 89 void SetBreakToken(NGBreakToken* token) { |
| 90 DCHECK(!break_token_); | 90 DCHECK(!break_token_); |
| 91 break_token_ = token; | 91 break_token_ = token; |
| 92 } | 92 } |
| 93 bool HasBreakToken() const { return break_token_; } | 93 bool HasBreakToken() const { return break_token_; } |
| 94 | 94 |
| 95 // Sets MarginStrut for the resultant fragment. | 95 // Sets MarginStrut for the resultant fragment. |
| 96 NGFragmentBuilder& SetMarginStrutBlockStart(const NGMarginStrut& from); | 96 NGFragmentBuilder& SetMarginStrutBlockStart( |
| 97 NGFragmentBuilder& SetMarginStrutBlockEnd(const NGMarginStrut& from); | 97 const NGDeprecatedMarginStrut& from); |
| 98 NGFragmentBuilder& SetMarginStrutBlockEnd( |
| 99 const NGDeprecatedMarginStrut& from); |
| 98 | 100 |
| 99 // Offsets are not supposed to be set during fragment construction, so we | 101 // Offsets are not supposed to be set during fragment construction, so we |
| 100 // do not provide a setter here. | 102 // do not provide a setter here. |
| 101 | 103 |
| 102 // Creates the fragment. Can only be called once. | 104 // Creates the fragment. Can only be called once. |
| 103 NGPhysicalBoxFragment* ToBoxFragment(); | 105 NGPhysicalBoxFragment* ToBoxFragment(); |
| 104 NGPhysicalTextFragment* ToTextFragment(NGInlineNode*, | 106 NGPhysicalTextFragment* ToTextFragment(NGInlineNode*, |
| 105 unsigned start_index, | 107 unsigned start_index, |
| 106 unsigned end_index); | 108 unsigned end_index); |
| 107 | 109 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 131 NGStaticPosition descendant_position; | 133 NGStaticPosition descendant_position; |
| 132 }; | 134 }; |
| 133 | 135 |
| 134 NGPhysicalFragment::NGFragmentType type_; | 136 NGPhysicalFragment::NGFragmentType type_; |
| 135 NGWritingMode writing_mode_; | 137 NGWritingMode writing_mode_; |
| 136 TextDirection direction_; | 138 TextDirection direction_; |
| 137 | 139 |
| 138 NGLogicalSize size_; | 140 NGLogicalSize size_; |
| 139 NGLogicalSize overflow_; | 141 NGLogicalSize overflow_; |
| 140 | 142 |
| 141 NGMarginStrut margin_strut_; | 143 NGDeprecatedMarginStrut margin_strut_; |
| 142 | 144 |
| 143 HeapVector<Member<NGPhysicalFragment>> children_; | 145 HeapVector<Member<NGPhysicalFragment>> children_; |
| 144 Vector<NGLogicalOffset> offsets_; | 146 Vector<NGLogicalOffset> offsets_; |
| 145 | 147 |
| 146 WeakBoxList out_of_flow_descendant_candidates_; | 148 WeakBoxList out_of_flow_descendant_candidates_; |
| 147 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_; | 149 Vector<OutOfFlowPlacement> out_of_flow_candidate_placements_; |
| 148 | 150 |
| 149 WeakBoxList out_of_flow_descendants_; | 151 WeakBoxList out_of_flow_descendants_; |
| 150 Vector<NGStaticPosition> out_of_flow_positions_; | 152 Vector<NGStaticPosition> out_of_flow_positions_; |
| 151 | 153 |
| 152 // Floats that need to be positioned by the next in-flow fragment that can | 154 // Floats that need to be positioned by the next in-flow fragment that can |
| 153 // determine its block position in space. | 155 // determine its block position in space. |
| 154 HeapVector<Member<NGFloatingObject>> unpositioned_floats_; | 156 HeapVector<Member<NGFloatingObject>> unpositioned_floats_; |
| 155 | 157 |
| 156 Vector<NGLogicalOffset> floating_object_offsets_; | 158 Vector<NGLogicalOffset> floating_object_offsets_; |
| 157 HeapVector<Member<NGFloatingObject>> positioned_floats_; | 159 HeapVector<Member<NGFloatingObject>> positioned_floats_; |
| 158 | 160 |
| 159 Member<NGBreakToken> break_token_; | 161 Member<NGBreakToken> break_token_; |
| 160 }; | 162 }; |
| 161 | 163 |
| 162 } // namespace blink | 164 } // namespace blink |
| 163 | 165 |
| 164 #endif // NGFragmentBuilder | 166 #endif // NGFragmentBuilder |
| OLD | NEW |