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

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

Issue 2562703003: Make AlgorithmForInputNode use original constraint space (Closed)
Patch Set: Make AlgorithmForInputNode use container constraint space Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6a0798da84b98e9f86163489d85895d2a2fc2576..daa83de168526255a5fdbffc61fd3199c6a5d647 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
@@ -17,7 +17,7 @@ namespace blink {
NGLayoutAlgorithm* NGLayoutInputNode::AlgorithmForInputNode(
NGLayoutInputNode* input_node,
- const NGConstraintSpace* constraint_space) {
+ NGConstraintSpace* constraint_space) {
// At least for now, this should never be called on LegacyInline
// children. However, there will be other kinds of input_node so
// it makes sense to do this here.
@@ -26,12 +26,11 @@ NGLayoutAlgorithm* NGLayoutInputNode::AlgorithmForInputNode(
if (block->CanUseNewLayout()) {
if (block->HasInlineChildren())
- return new NGInlineLayoutAlgorithm(
- block->Style(), toNGInlineNode(block->FirstChild()),
- constraint_space->ChildSpace(block->Style()));
+ return new NGInlineLayoutAlgorithm(block->Style(),
+ toNGInlineNode(block->FirstChild()),
+ constraint_space);
return new NGBlockLayoutAlgorithm(
- block->Style(), toNGBlockNode(block->FirstChild()),
- constraint_space->ChildSpace(block->Style()));
+ block->Style(), toNGBlockNode(block->FirstChild()), constraint_space);
}
return new NGLegacyBlockLayoutAlgorithm(block, constraint_space);
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698