gecko-dev/testing/web-platform/tests/css/CSS2/floats/zero-width-floats-positioning.tentative.html
Ian Kilpatrick 27f6240606 Bug 1582661 [wpt PR 19179] - [LayoutNG] Ignore margins when determining if a new-fc will fit in a layout opportunity., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Ignore margins when determining if a new-fc will fit in a layout opportunity.

Previously we calculated layout opportunities by shrinking the available
child space by the child's margins.

This resulted in layout opportunities which were too small, and would
push the new formatting context down to the next opportunity.

This logic now allows margins to "overhang" a layout opportunity.

At the same time I refactored a lot of the code, as we were
adding/subtracting margins for different calculations. Hopefully this
is more readable!

Bug: 1003193
Change-Id: I6c05b050332afe9880ca7d9a5b426b4b94fde3f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808661
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698954}

--

wpt-commits: 3a5b1d12606ad979bc063ad1902fd44046cb7f10
wpt-pr: 19179
2019-09-26 20:26:03 +00:00

11 lines
690 B
HTML

<!DOCTYPE html>
<title>Zero width floats, and positioning with negative margins</title>
<link rel="author" title="Ian Kilpatrick" href="ikilpatrick@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#float-width" title="10.3.5 Floating, non-replaced elements">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<p>Test passes if there is a filled green square.</p>
<div style="width: 125px;">
<div style="float: left; width: 0px; height: 50px;"></div>
<div style="float: right; clear: left; width: 25px; height: 50px;"></div>
<div style="overflow: hidden; margin-left: -50px; height: 100px; background: green;"></div>
</div>