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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // @param child_margins Margins information for the current child fragment. | 122 // @param child_margins Margins information for the current child fragment. |
123 // @return Position of the fragment in the parent's constraint space. | 123 // @return Position of the fragment in the parent's constraint space. |
124 NGLogicalOffset PositionFloatFragment(const NGFragment& fragment, | 124 NGLogicalOffset PositionFloatFragment(const NGFragment& fragment, |
125 const NGBoxStrut& child_margins); | 125 const NGBoxStrut& child_margins); |
126 | 126 |
127 // Updates block-{start|end} of the currently constructed fragment. | 127 // Updates block-{start|end} of the currently constructed fragment. |
128 // | 128 // |
129 // This method is supposed to be called on every child but it only updates | 129 // This method is supposed to be called on every child but it only updates |
130 // the block-start once (on the first non-zero height child fragment) and | 130 // the block-start once (on the first non-zero height child fragment) and |
131 // keeps updating block-end (on every non-zero height child). | 131 // keeps updating block-end (on every non-zero height child). |
132 void UpdateMarginStrut(const NGMarginStrut& from); | 132 void UpdateMarginStrut(const NGDeprecatedMarginStrut& from); |
133 | 133 |
134 NGLogicalOffset GetChildSpaceOffset() const { | 134 NGLogicalOffset GetChildSpaceOffset() const { |
135 return NGLogicalOffset(border_and_padding_.inline_start, content_size_); | 135 return NGLogicalOffset(border_and_padding_.inline_start, content_size_); |
136 } | 136 } |
137 | 137 |
138 // Read-only Getters. | 138 // Read-only Getters. |
139 const ComputedStyle& CurrentChildStyle() const { | 139 const ComputedStyle& CurrentChildStyle() const { |
140 DCHECK(current_child_); | 140 DCHECK(current_child_); |
141 return *current_child_->Style(); | 141 return *current_child_->Style(); |
142 } | 142 } |
(...skipping 23 matching lines...) Expand all Loading... |
166 | 166 |
167 // Mapper from the fragmented flow coordinate space coordinates to visual | 167 // Mapper from the fragmented flow coordinate space coordinates to visual |
168 // coordinates. Only set on fragmentation context roots, such as multicol | 168 // coordinates. Only set on fragmentation context roots, such as multicol |
169 // containers. Keeps track of the current fragmentainer. | 169 // containers. Keeps track of the current fragmentainer. |
170 Member<NGColumnMapper> fragmentainer_mapper_; | 170 Member<NGColumnMapper> fragmentainer_mapper_; |
171 | 171 |
172 NGBoxStrut border_and_padding_; | 172 NGBoxStrut border_and_padding_; |
173 LayoutUnit content_size_; | 173 LayoutUnit content_size_; |
174 LayoutUnit max_inline_size_; | 174 LayoutUnit max_inline_size_; |
175 // MarginStrut for the previous child. | 175 // MarginStrut for the previous child. |
176 NGMarginStrut prev_child_margin_strut_; | 176 NGDeprecatedMarginStrut prev_child_margin_strut_; |
177 // Whether the block-start was set for the currently built | 177 // Whether the block-start was set for the currently built |
178 // fragment's margin strut. | 178 // fragment's margin strut. |
179 bool is_fragment_margin_strut_block_start_updated_ : 1; | 179 bool is_fragment_margin_strut_block_start_updated_ : 1; |
180 NGBoxStrut curr_child_margins_; | 180 NGBoxStrut curr_child_margins_; |
181 }; | 181 }; |
182 | 182 |
183 } // namespace blink | 183 } // namespace blink |
184 | 184 |
185 #endif // NGBlockLayoutAlgorithm_h | 185 #endif // NGBlockLayoutAlgorithm_h |
OLD | NEW |