Commit bcef67c0 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[layoutng] Use ShouldForceLayoutForNGChild instead of HasPercentHeightDescendants

I already changed the other use of that function in this file, but I
missed this spot in 2093cb98

R=eae@chromium.org,mstensho@chromium.org

Bug: 839661

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I6bc69933e12ad9d4fdfe9813337ec54f552dcf98
Reviewed-on: https://chromium-review.googlesource.com/1072322
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561797}
parent 962dce8d
......@@ -259,7 +259,6 @@ crbug.com/591099 external/wpt/css/css-display/display-contents-dynamic-list-001-
crbug.com/591099 external/wpt/css/css-display/display-contents-dynamic-table-001-inline.html [ Failure ]
crbug.com/591099 external/wpt/css/css-display/display-contents-list-001.html [ Failure ]
crbug.com/591099 external/wpt/css/css-filter/filtered-inline-is-container.html [ Crash ]
crbug.com/591099 external/wpt/css/css-flexbox/percentage-heights-001.html [ Failure ]
crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-1.html [ Pass ]
crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-3.html [ Pass ]
crbug.com/591099 external/wpt/css/css-fonts/font-variant-ligatures-11.html [ Pass ]
......
......@@ -1730,14 +1730,15 @@ void LayoutFlexibleBox::ApplyStretchAlignmentToChild(
// FIXME: Can avoid laying out here in some cases. See
// https://webkit.org/b/87905.
bool child_needs_relayout = desired_logical_height != child.LogicalHeight();
if (child.IsLayoutBlock() &&
ToLayoutBlock(child).HasPercentHeightDescendants() &&
relaid_out_children_.Contains(&child)) {
if ((child.IsLayoutNGMixin() &&
ShouldForceLayoutForNGChild(ToLayoutBlockFlow(child))) ||
(child.IsLayoutBlock() &&
ToLayoutBlock(child).HasPercentHeightDescendants())) {
// Have to force another relayout even though the child is sized
// correctly, because its descendants are not sized correctly yet. Our
// previous layout of the child was done without an override height set.
// So, redo it here.
child_needs_relayout = true;
child_needs_relayout = relaid_out_children_.Contains(&child);
}
if (child_needs_relayout || !child.HasOverrideLogicalHeight())
child.SetOverrideLogicalHeight(desired_logical_height);
......
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