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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.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_layout_input_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc
index 89996dbfa935441d65bb475f582b3c1a8789315c..dcb0e2745553bfae22872565886033c594fd9f74 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc
@@ -25,18 +25,18 @@ NGLayoutAlgorithm* NGLayoutInputNode::AlgorithmForInputNode(
NGBlockNode* block = toNGBlockNode(input_node);
if (!block->CanUseNewLayout())
return new NGLegacyBlockLayoutAlgorithm(block, constraint_space);
- const ComputedStyle* style = block->Style();
+ const ComputedStyle& style = block->Style();
LayoutObject* layout_object = input_node->GetLayoutObject();
if (block->HasInlineChildren()) {
NGInlineNode* child = toNGInlineNode(block->FirstChild());
- return new NGInlineLayoutAlgorithm(layout_object, style, child,
+ return new NGInlineLayoutAlgorithm(layout_object, &style, child,
constraint_space);
}
NGBlockNode* child = toNGBlockNode(block->FirstChild());
// TODO(layout-ng): The break token should be passed as an argument to this
// method instead of getting it from the NGBlockNode
NGBreakToken* token = block->CurrentBreakToken();
- return new NGBlockLayoutAlgorithm(layout_object, style, child,
+ return new NGBlockLayoutAlgorithm(layout_object, &style, child,
constraint_space, token);
}
}

Powered by Google App Engine
This is Rietveld 408576698