Commit 42ecb854 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[layoutng] Correctly compute min/max content for orthogonal flows

When we are a legacy node and computing our min/max content, we need
to check if we are an orthogonal writing mode before just returning
legacy min/max, so that we return the right dimension (matching
container_writing_mode).

Bug: 635619
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I9663bf8a384fe3bfddd457371d6ecf879fcbf03b
Reviewed-on: https://chromium-review.googlesource.com/1182142Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584757}
parent 59d4ab82
...@@ -193,7 +193,6 @@ crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure ...@@ -193,7 +193,6 @@ crbug.com/591099 compositing/iframes/floating-self-painting-frame.html [ Failure
crbug.com/591099 compositing/layer-creation/overlap-animation.html [ Crash ] crbug.com/591099 compositing/layer-creation/overlap-animation.html [ Crash ]
crbug.com/869265 compositing/layer-creation/stacking-context-overlap-nested.html [ Failure ] crbug.com/869265 compositing/layer-creation/stacking-context-overlap-nested.html [ Failure ]
crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ] crbug.com/591099 css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html [ Failure ]
crbug.com/591099 css3/flexbox/flex-flow-margins-auto-size.html [ Failure ]
crbug.com/591099 css3/flexbox/line-wrapping.html [ Failure ] crbug.com/591099 css3/flexbox/line-wrapping.html [ Failure ]
crbug.com/714962 css3/masking/clip-path-reference-box-inline.html [ Failure ] crbug.com/714962 css3/masking/clip-path-reference-box-inline.html [ Failure ]
crbug.com/591099 editing/selection/paint-hyphen.html [ Pass ] crbug.com/591099 editing/selection/paint-hyphen.html [ Pass ]
...@@ -518,7 +517,6 @@ crbug.com/835484 fast/inline/outline-offset.html [ Failure ] ...@@ -518,7 +517,6 @@ crbug.com/835484 fast/inline/outline-offset.html [ Failure ]
crbug.com/591099 fast/overflow/overflow-update-transform.html [ Failure ] crbug.com/591099 fast/overflow/overflow-update-transform.html [ Failure ]
crbug.com/591099 fast/overflow/recompute-overflow-of-layout-root-container.html [ Failure ] crbug.com/591099 fast/overflow/recompute-overflow-of-layout-root-container.html [ Failure ]
crbug.com/591099 fast/replaced/table-replaced-element.html [ Failure ] crbug.com/591099 fast/replaced/table-replaced-element.html [ Failure ]
crbug.com/591099 fast/ruby/position-after.html [ Failure ]
crbug.com/591099 fast/scrolling/content-box-smaller-than-scrollbar.html [ Failure ] crbug.com/591099 fast/scrolling/content-box-smaller-than-scrollbar.html [ Failure ]
crbug.com/591099 fast/scrolling/jquery-rtl-scroll-type.html [ Failure ] crbug.com/591099 fast/scrolling/jquery-rtl-scroll-type.html [ Failure ]
crbug.com/591099 fast/scrolling/scrollbar-tickmarks-hittest.html [ Failure Pass ] crbug.com/591099 fast/scrolling/scrollbar-tickmarks-hittest.html [ Failure Pass ]
......
...@@ -275,7 +275,7 @@ MinMaxSize NGBlockNode::ComputeMinMaxSize( ...@@ -275,7 +275,7 @@ MinMaxSize NGBlockNode::ComputeMinMaxSize(
MinMaxSize sizes; MinMaxSize sizes;
// If we're orthogonal, we have to run layout to compute the sizes. However, // If we're orthogonal, we have to run layout to compute the sizes. However,
// if we're outside of layout, we can't do that. This can happen on Mac. // if we're outside of layout, we can't do that. This can happen on Mac.
if (!CanUseNewLayout() || if ((!CanUseNewLayout() && !is_orthogonal_flow_root) ||
(is_orthogonal_flow_root && !box_->GetFrameView()->IsInPerformLayout())) { (is_orthogonal_flow_root && !box_->GetFrameView()->IsInPerformLayout())) {
return ComputeMinMaxSizeFromLegacy(); return ComputeMinMaxSizeFromLegacy();
} }
...@@ -292,7 +292,7 @@ MinMaxSize NGBlockNode::ComputeMinMaxSize( ...@@ -292,7 +292,7 @@ MinMaxSize NGBlockNode::ComputeMinMaxSize(
constraint_space = zero_constraint_space.get(); constraint_space = zero_constraint_space.get();
} }
if (is_orthogonal_flow_root) { if (is_orthogonal_flow_root || !CanUseNewLayout()) {
scoped_refptr<NGLayoutResult> layout_result = Layout(*constraint_space); scoped_refptr<NGLayoutResult> layout_result = Layout(*constraint_space);
DCHECK_EQ(layout_result->Status(), NGLayoutResult::kSuccess); DCHECK_EQ(layout_result->Status(), NGLayoutResult::kSuccess);
NGBoxFragment fragment( NGBoxFragment fragment(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment