Open Bug 1767217 Opened 2 years ago Updated 2 years ago

Investigate wrapping inconsistencies between "width:auto" and "width:-moz-available" (aka "stretch"), alongside floats

Categories

(Core :: Layout: Floats, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(1 file)

In writing tests for bug 1745310, I noticed that we treat moz-available widths differently from "auto" widths, when deciding whether a BFC will fit alongside a float.

This feels like it might be a bug. --> Filing this bug to track this inconsistency. (And I'll use this in a test-failure annotation for a test that I'm adding in bug 1745310.)

Summary: Investigate moz-available (aka "stretch") sizes alongside floats → Investigate wrapping inconsistencies between "width:auto" and "width:-moz-available" (aka "stretch"), alongside floats
Attached file testcase 1

Here's a testcase that reproduces this issue, independent of the changes in bug 1745310 (they don't come into play here at all).

This testcase just has two copies of the same markup, with the first aqua box having (default) width:auto and the second having width:-moz-available (and equivalent -webkit-fill-available and current spec proposal stretch)

EXPECTED RESULTS (tentative):
Both boxes in this test should look the same. (They do in Chrome, FWIW.)

ACTUAL RESULTS:
The first aqua box is alongside its pink float. The second aqua box is wrapped to below its pink float (and larger as a result of having wrapped & consequently getting the full width).

WebKit matches our behavior here, FWIW (on testcase 1 at least); so it's possible there's a good reason for what we're doing. Or maybe we just both have the same bug.

(Probably we both have the same bug. iank notes in bug 1745310 comment 31 (plus typo-fix in his next comment) that Chrome folks considered this situation when working on their LayoutNG rewrite, and they came to the conclusion that auto and -webkit-fill-available should behave identically in this situation, which matches my intuition and my EXPECTED RESULTS in comment 0 here.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: