| 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 039ca524b65373f21255750a959c87ea33b288f2..a25d8a9121335103326de849bf77dd980c11d596 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
|
| @@ -200,7 +200,7 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
|
| ComputeBorders(Style()) + ComputePadding(ConstraintSpace(), Style());
|
|
|
| WTF::Optional<MinAndMaxContentSizes> sizes;
|
| - if (NeedMinAndMaxContentSizes(Style())) {
|
| + if (NeedMinAndMaxContentSizes(ConstraintSpace(), Style())) {
|
| // TODOO(layout-ng): Implement
|
| sizes = MinAndMaxContentSizes();
|
| }
|
| @@ -442,11 +442,19 @@ void NGBlockLayoutAlgorithm::UpdateMarginStrut(const NGMarginStrut& from) {
|
|
|
| NGConstraintSpace*
|
| NGBlockLayoutAlgorithm::CreateConstraintSpaceForCurrentChild() const {
|
| + // TODO(layout-ng): Orthogonal children should also shrink to fit (in *their*
|
| + // inline axis)
|
| + // We have to keep this commented out for now until we correctly compute
|
| + // min/max content sizes in Layout().
|
| + // bool shrink_to_fit = CurrentChildStyle().display() == EDisplay::InlineBlock
|
| + // || CurrentChildStyle().isFloating();
|
| + bool shrink_to_fit = false;
|
| DCHECK(current_child_);
|
| space_builder_
|
| ->SetIsNewFormattingContext(
|
| IsNewFormattingContextForInFlowBlockLevelChild(ConstraintSpace(),
|
| CurrentChildStyle()))
|
| + .SetForceShrinkToFit(shrink_to_fit)
|
| .SetWritingMode(
|
| FromPlatformWritingMode(CurrentChildStyle().getWritingMode()))
|
| .SetTextDirection(CurrentChildStyle().direction());
|
|
|