Index: third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
index b39ecf3700257db6e92fed0aa79b7cf172ef929c..be4d0d51d2ca0a7a2d356e7cc93885bc41b7b5dc 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
@@ -18,6 +18,7 @@ |
#include "core/layout/ng/ng_layout_result.h" |
#include "core/layout/ng/ng_length_utils.h" |
#include "core/layout/ng/ng_min_max_content_size.h" |
+#include "core/layout/ng/ng_multi_column_layout_algorithm.h" |
#include "core/layout/ng/ng_writing_mode.h" |
#include "core/paint/PaintLayer.h" |
#include "platform/RuntimeEnabledFeatures.h" |
@@ -89,10 +90,17 @@ RefPtr<NGLayoutResult> NGBlockNode::Layout(NGConstraintSpace* constraint_space, |
return RunOldLayout(*constraint_space); |
} |
- RefPtr<NGLayoutResult> layout_result = |
- NGBlockLayoutAlgorithm(this, constraint_space, |
- toNGBlockBreakToken(break_token)) |
- .Layout(); |
+ RefPtr<NGLayoutResult> layout_result; |
+ if (Style().specifiesColumns()) { |
+ layout_result = |
+ NGMultiColumnLayoutAlgorithm(this, constraint_space, |
+ toNGBlockBreakToken(break_token)) |
+ .Layout(); |
+ } else { |
+ layout_result = NGBlockLayoutAlgorithm(this, constraint_space, |
+ toNGBlockBreakToken(break_token)) |
+ .Layout(); |
+ } |
CopyFragmentDataToLayoutBox(*constraint_space, layout_result.get()); |
return layout_result; |