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 NGBlockLayoutAlgorithm_h | 5 #ifndef NGBlockLayoutAlgorithm_h |
6 #define NGBlockLayoutAlgorithm_h | 6 #define NGBlockLayoutAlgorithm_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_block_node.h" | 9 #include "core/layout/ng/ng_block_node.h" |
10 #include "core/layout/ng/ng_layout_algorithm.h" | 10 #include "core/layout/ng/ng_layout_algorithm.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 DCHECK(current_child_); | 139 DCHECK(current_child_); |
140 return *current_child_->Style(); | 140 return *current_child_->Style(); |
141 } | 141 } |
142 | 142 |
143 const NGConstraintSpace& ConstraintSpace() const { | 143 const NGConstraintSpace& ConstraintSpace() const { |
144 return *constraint_space_; | 144 return *constraint_space_; |
145 } | 145 } |
146 | 146 |
147 const ComputedStyle& Style() const { return *style_; } | 147 const ComputedStyle& Style() const { return *style_; } |
148 | 148 |
149 enum LayoutState { | |
150 kStateInit, | |
151 kStatePrepareForChildLayout, | |
152 kStateChildLayout, | |
153 kStateOutOfFlowLayout, | |
154 kStateFinalize | |
155 }; | |
156 LayoutState layout_state_; | |
157 | |
158 RefPtr<const ComputedStyle> style_; | 149 RefPtr<const ComputedStyle> style_; |
159 | 150 |
160 Member<NGBlockNode> first_child_; | 151 Member<NGBlockNode> first_child_; |
161 Member<NGConstraintSpace> constraint_space_; | 152 Member<NGConstraintSpace> constraint_space_; |
162 | 153 |
163 // The break token from which we are currently resuming layout. | 154 // The break token from which we are currently resuming layout. |
164 Member<NGBreakToken> break_token_; | 155 Member<NGBreakToken> break_token_; |
165 | 156 |
166 Member<NGFragmentBuilder> builder_; | 157 Member<NGFragmentBuilder> builder_; |
167 Member<NGConstraintSpaceBuilder> space_builder_; | 158 Member<NGConstraintSpaceBuilder> space_builder_; |
(...skipping 16 matching lines...) Expand all Loading... |
184 // MarginStrut for the previous child. | 175 // MarginStrut for the previous child. |
185 NGMarginStrut prev_child_margin_strut_; | 176 NGMarginStrut prev_child_margin_strut_; |
186 // Whether the block-start was set for the currently built | 177 // Whether the block-start was set for the currently built |
187 // fragment's margin strut. | 178 // fragment's margin strut. |
188 bool is_fragment_margin_strut_block_start_updated_ : 1; | 179 bool is_fragment_margin_strut_block_start_updated_ : 1; |
189 }; | 180 }; |
190 | 181 |
191 } // namespace blink | 182 } // namespace blink |
192 | 183 |
193 #endif // NGBlockLayoutAlgorithm_h | 184 #endif // NGBlockLayoutAlgorithm_h |
OLD | NEW |