| 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_box.h" | 9 #include "core/layout/ng/ng_box.h" |
| 10 #include "core/layout/ng/ng_fragment_builder.h" | 10 #include "core/layout/ng/ng_fragment_builder.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBox* first_child); | 28 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBox* first_child); |
| 29 | 29 |
| 30 // Actual layout implementation. Lays out the children in sequence within the | 30 // Actual layout implementation. Lays out the children in sequence within the |
| 31 // constraints given by the NGConstraintSpace. Returns a fragment with the | 31 // constraints given by the NGConstraintSpace. Returns a fragment with the |
| 32 // resulting layout information. | 32 // resulting layout information. |
| 33 // This function can not be const because for interruptible layout, we have | 33 // This function can not be const because for interruptible layout, we have |
| 34 // to be able to store state information. | 34 // to be able to store state information. |
| 35 // Returns true when done; when this function returns false, it has to be | 35 // Returns true when done; when this function returns false, it has to be |
| 36 // called again. The out parameter will only be set when this function | 36 // called again. The out parameter will only be set when this function |
| 37 // returns true. The same constraint space has to be passed each time. | 37 // returns true. The same constraint space has to be passed each time. |
| 38 bool Layout(const NGConstraintSpace*, NGPhysicalFragment**) override; | 38 bool Layout(const NGConstraintSpace&, NGPhysicalFragment**) override; |
| 39 | 39 |
| 40 DEFINE_INLINE_VIRTUAL_TRACE() { | 40 DEFINE_INLINE_VIRTUAL_TRACE() { |
| 41 NGLayoutAlgorithm::trace(visitor); | 41 NGLayoutAlgorithm::trace(visitor); |
| 42 visitor->trace(first_child_); | 42 visitor->trace(first_child_); |
| 43 visitor->trace(builder_); | 43 visitor->trace(builder_); |
| 44 visitor->trace(constraint_space_for_children_); | 44 visitor->trace(constraint_space_for_children_); |
| 45 visitor->trace(current_child_); | 45 visitor->trace(current_child_); |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 // MarginStrut for the previous child. | 79 // MarginStrut for the previous child. |
| 80 NGMarginStrut prev_child_margin_strut_; | 80 NGMarginStrut prev_child_margin_strut_; |
| 81 // Whether the block-start was set for the currently built | 81 // Whether the block-start was set for the currently built |
| 82 // fragment's margin strut. | 82 // fragment's margin strut. |
| 83 bool is_fragment_margin_strut_block_start_updated_ : 1; | 83 bool is_fragment_margin_strut_block_start_updated_ : 1; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 #endif // NGBlockLayoutAlgorithm_h | 88 #endif // NGBlockLayoutAlgorithm_h |
| OLD | NEW |