Chromium Code Reviews| 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 1da0c530ef4f5112401a89a38d93b2fedd1c54b9..8b03c1f7307841c84d3130d178ef800dbdf7b004 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 |
| @@ -112,7 +112,13 @@ LayoutUnit NGBlockLayoutAlgorithm::CollapseMargins( |
| // Calculate margin strut for the current child. |
| NGMarginStrut curr_margin_strut = children_margin_strut; |
| curr_margin_strut.AppendMarginBlockStart(margins.block_start); |
| - curr_margin_strut.AppendMarginBlockEnd(margins.block_end); |
| + if (current_child_->Style()->height().isAuto()) { |
|
ikilpatrick
2016/09/13 19:08:39
not logicalHeight here?
Gleb Lanbin
2016/09/13 19:33:44
Done.
|
| + // bottom margin of a last in-flow child is only collapsed if |
| + // the parent has 'auto' computed height |
| + curr_margin_strut.AppendMarginBlockEnd(margins.block_end); |
| + } else { |
| + curr_margin_strut.SetMarginBlockEnd(margins.block_end); |
| + } |
| // Set the margin strut for the resultant fragment if this is the first or |
| // last child fragment. |