Closed Bug 1627562 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 22705 - Fix ordering issue within NGBlockLayoutAlgorithm::ComputeMinMaxSizes

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22705 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22705
Details from upstream follow.

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

Fix ordering issue within NGBlockLayoutAlgorithm::ComputeMinMaxSizes

The DCHECK in the bug was caused by an order-of-operations issue.
Within the following calculation:
max_inline_contribution =
child_sizes.max_size + line_left_inset + line_right_inset;

If:
child_sizes.max_size == LayoutUnit::Max()
line_left_inset == LayoutUnit(1)
line_right_inset == LayoutUnit(-1)

max_inline_contribution would be LayoutUnit::Max() - LayoutUnit(1);

This resulted in max_size \< min_size.

Bug: 1004060
Change-Id: I3e439500f07a2cd1cf0cbe5528ece16090c9fa70

Reviewed-on: https://chromium-review.googlesource.com/2136885
WPT-Export-Revision: 7726b85800e436a4db2e5c567c478dba0587482a

Component: web-platform-tests → Layout
Product: Testing → Core
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/27460fa1b217
[wpt PR 22705] - Fix ordering issue within NGBlockLayoutAlgorithm::ComputeMinMaxSizes, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.