Commit 5b1b0e09 authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Remove available_size DCHECK in absolute_utils

Remove a DCHECK in ng_absolute_utils liable to trigger incorrectly when
any combination of the component values are near the saturation limits.

Bug: 1002317
Change-Id: I1bc22823dd72a23c162eecb2f3c676e059617817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1804937
Commit-Queue: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696704}
parent 744ae4e8
...@@ -234,18 +234,6 @@ void ComputeAbsoluteSize(const LayoutUnit border_padding_size, ...@@ -234,18 +234,6 @@ void ComputeAbsoluteSize(const LayoutUnit border_padding_size,
*margin_end; *margin_end;
} }
#if DCHECK_IS_ON()
values_might_be_saturated |=
inset_start->MightBeSaturated() || inset_end->MightBeSaturated() ||
size->MightBeSaturated() || margin_start->MightBeSaturated() ||
margin_end->MightBeSaturated() || available_size.MightBeSaturated();
// The DCHECK is useful, but only holds true if the values aren't saturated.
if (!values_might_be_saturated) {
DCHECK_EQ(available_size,
*inset_start + *inset_end + *margin_start + *margin_end + *size);
}
#endif // #if DCHECK_IS_ON()
// If calculated |size| is outside of min/max constraints, rerun the // If calculated |size| is outside of min/max constraints, rerun the
// algorithm with the constrained |size|. // algorithm with the constrained |size|.
LayoutUnit constrained_size = ConstrainByMinMax(*size, min_size, max_size); LayoutUnit constrained_size = ConstrainByMinMax(*size, min_size, max_size);
......
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