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_box_fragment.h" | 10 #include "core/layout/ng/ng_box_fragment.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // fragment's parent. | 101 // fragment's parent. |
102 NGLogicalOffset CalculateRelativeOffset(const NGBoxFragment& fragment); | 102 NGLogicalOffset CalculateRelativeOffset(const NGBoxFragment& fragment); |
103 | 103 |
104 NGLogicalOffset GetChildSpaceOffset() const { | 104 NGLogicalOffset GetChildSpaceOffset() const { |
105 return NGLogicalOffset(border_and_padding_.inline_start, content_size_); | 105 return NGLogicalOffset(border_and_padding_.inline_start, content_size_); |
106 } | 106 } |
107 | 107 |
108 // Read-only Getters. | 108 // Read-only Getters. |
109 const ComputedStyle& CurrentChildStyle() const { | 109 const ComputedStyle& CurrentChildStyle() const { |
110 DCHECK(current_child_); | 110 DCHECK(current_child_); |
111 return *current_child_->Style(); | 111 return current_child_->Style(); |
112 } | 112 } |
113 | 113 |
114 const NGConstraintSpace& ConstraintSpace() const { | 114 const NGConstraintSpace& ConstraintSpace() const { |
115 return *constraint_space_; | 115 return *constraint_space_; |
116 } | 116 } |
117 | 117 |
118 const NGConstraintSpace& CurrentChildConstraintSpace() const { | 118 const NGConstraintSpace& CurrentChildConstraintSpace() const { |
119 return *space_for_current_child_.get(); | 119 return *space_for_current_child_.get(); |
120 } | 120 } |
121 | 121 |
(...skipping 23 matching lines...) Expand all Loading... |
145 // MarginStrut for the previous child. | 145 // MarginStrut for the previous child. |
146 NGMarginStrut curr_margin_strut_; | 146 NGMarginStrut curr_margin_strut_; |
147 NGLogicalOffset bfc_offset_; | 147 NGLogicalOffset bfc_offset_; |
148 NGLogicalOffset curr_bfc_offset_; | 148 NGLogicalOffset curr_bfc_offset_; |
149 NGBoxStrut curr_child_margins_; | 149 NGBoxStrut curr_child_margins_; |
150 }; | 150 }; |
151 | 151 |
152 } // namespace blink | 152 } // namespace blink |
153 | 153 |
154 #endif // NGBlockLayoutAlgorithm_h | 154 #endif // NGBlockLayoutAlgorithm_h |
OLD | NEW |