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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc

Issue 2664383003: [LayoutNG] Make NGBlockNode return a const style reference. (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index 0c9669cc0fa0e984615e341101f937fa209fc3d2..f7e50974feb37ecd66b448e51343c3a889923e57 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -282,12 +282,12 @@ bool NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes(
// TODO: handle floats & orthogonal children.
for (NGBlockNode* node = first_child_; node; node = node->NextSibling()) {
Optional<MinAndMaxContentSizes> child_minmax;
- if (NeedMinAndMaxContentSizesForContentContribution(*node->Style())) {
+ if (NeedMinAndMaxContentSizesForContentContribution(node->Style())) {
child_minmax = node->ComputeMinAndMaxContentSizes();
}
MinAndMaxContentSizes child_sizes =
- ComputeMinAndMaxContentContribution(*node->Style(), child_minmax);
+ ComputeMinAndMaxContentContribution(node->Style(), child_minmax);
sizes->min_content = std::max(sizes->min_content, child_sizes.min_content);
sizes->max_content = std::max(sizes->max_content, child_sizes.max_content);
@@ -380,7 +380,7 @@ NGPhysicalFragment* NGBlockLayoutAlgorithm::Layout() {
curr_bfc_offset_.block_offset += content_size_;
while (current_child_) {
- EPosition position = current_child_->Style()->position();
+ EPosition position = current_child_->Style().position();
if (position == AbsolutePosition || position == FixedPosition) {
builder_->AddOutOfFlowChildCandidate(current_child_,
GetChildSpaceOffset());

Powered by Google App Engine
This is Rietveld 408576698