Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.cc b/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| index ee77cc83013c08673dc57995d007c2a07ef09643..f7123cfae5c053110ddd030629c3949c5a031bc2 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| @@ -10,6 +10,7 @@ |
| #include "core/layout/ng/ng_direction.h" |
| #include "core/layout/ng/ng_fragment.h" |
| #include "core/layout/ng/ng_fragment_builder.h" |
| +#include "core/layout/ng/ng_length_utils.h" |
| #include "core/layout/ng/ng_writing_mode.h" |
| namespace blink { |
| @@ -42,6 +43,14 @@ bool NGBox::Layout(const NGConstraintSpace* constraint_space, |
| if (layout_box_) { |
| layout_box_->setWidth(fragment_->Width()); |
| layout_box_->setHeight(fragment_->Height()); |
| + NGBoxStrut border_and_padding = |
|
Gleb Lanbin
2016/09/14 20:54:17
.nit should we use plural nouns here?
const auto b
|
| + computeBorders(*style_) + computePadding(*constraint_space, *style_); |
| + LayoutUnit intrinsic_logical_height = |
| + layout_box_->style()->isHorizontalWritingMode() |
| + ? fragment_->HeightOverflow() |
| + : fragment_->WidthOverflow(); |
| + intrinsic_logical_height -= border_and_padding.BlockSum(); |
| + layout_box_->setIntrinsicContentLogicalHeight(intrinsic_logical_height); |
| // Ensure the position of the children are copied across to the |
| // LayoutObject tree. |