Closed Bug 1756966 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 32964 - Intrinsic block-size should be >= border+scrollbar+padding.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Intrinsic block-size should be >= border+scrollbar+padding.

In some special-code for text areas, subtract before adding, to avoid
issues with saturated arithmetic in LayoutUnit. If
current_intrinsic_block_size is LayoutUnit::Max(), and
default_intrinsic_size + border_scrollbar_padding.BlockSum() is
LayoutUnit::Max(), and ComputeScrollbars(space, node).BlockSum() is
greater than zero, we'd end up with returning an intrinsic block-size
less than border_scrollbar_padding.BlockSum(), which is wrong and would
hit a DCHECK further down in the sizing machinery.

This might fix crbug.com/1289408 (but I didn't test - need to follow
some special steps in order to do that).

Bug: 1289408
Change-Id: I6d3d8c96828998553adb6e451e905a1aeb8f7b04

Reviewed-on: https://chromium-review.googlesource.com/3486499
WPT-Export-Revision: 7811ce6c4d313efe8beff6b053139b5c31893289

Component: web-platform-tests → Layout
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd586c0de91f
[wpt PR 32964] - Intrinsic block-size should be >= border+scrollbar+padding., a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.