mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Complete implementation of keyword sizes for block layout (#34641)
Adds support for min-content, max-content, fit-content and stretch, for the case that was missing from #34568: block-level elements that establish an independent formatting context, when there are floats. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
53740fdd16
commit
3d816d6d24
4 changed files with 165 additions and 78 deletions
13
tests/wpt/meta/MANIFEST.json
vendored
13
tests/wpt/meta/MANIFEST.json
vendored
|
@ -243225,6 +243225,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"bfc-next-to-float-2.html": [
|
||||
"9683f92d49c11c2a436a023a0f758ae30c76da54",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-height-003.tentative.html": [
|
||||
"a469f8d5df2968f8e8ebfb68593563447bf11a10",
|
||||
[
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
[grid-container-percentage-001.html]
|
||||
[.grid 3]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 4]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 5]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 8]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 9]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 10]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 13]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 14]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 15]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 18]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 19]
|
||||
expected: FAIL
|
||||
|
||||
[.grid 20]
|
||||
expected: FAIL
|
41
tests/wpt/tests/css/css-sizing/stretch/bfc-next-to-float-2.html
vendored
Normal file
41
tests/wpt/tests/css/css-sizing/stretch/bfc-next-to-float-2.html
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Oriol Brufau" href="obrufau@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing">
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4028">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/#floats">
|
||||
<meta name="assert" content="The border box of a block-level element that
|
||||
establishes an independent formatting context can't overlap the margin box
|
||||
of any float in the same block formatting context.
|
||||
The stretch size needs to respect that.
|
||||
">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
|
||||
<style>
|
||||
#reference-overlapped-red {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
z-index: -1;
|
||||
}
|
||||
.stretch {
|
||||
display: flow-root;
|
||||
height: 25px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div id="reference-overlapped-red"></div>
|
||||
|
||||
<div style="width:200px; margin-left: -100px;">
|
||||
<div style="float: left; width: 100px; height: 75px;"></div>
|
||||
<div class="stretch" style="width: 0; min-width: stretch"></div>
|
||||
<div class="stretch" style="width: 1000px; max-width: stretch"></div>
|
||||
<div class="stretch" style="width: stretch; padding: 0 10px; border: solid green; border-width: 0 10px; margin-left: 10px"></div>
|
||||
</div>
|
||||
<div style="width:250px; margin-left: -150px;">
|
||||
<div style="float: left; clear: left; width: 100px; height: 1px;"></div>
|
||||
<div style="float: left; clear: left; width: 150px; height: 1px;"></div>
|
||||
<div style="float: left; clear: left; width: 125px; height: 1px;"></div>
|
||||
<div class="stretch" style="width: stretch"></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue