Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h

Issue 2664383003: [LayoutNG] Make NGBlockNode return a const style reference. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698