зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1313811 - [css-flexbox] Tweak reftests due to change in baseline alignment of empty flex containers in inline-level alignment context.
This commit is contained in:
Родитель
043abe72aa
Коммит
888ef8dd4c
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference: Synthesized flex container baseline.</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1313811">
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
.ib {
|
||||
display: inline-block;
|
||||
}
|
||||
.ig {
|
||||
display: inline-grid;
|
||||
}
|
||||
.ib, .ig {
|
||||
border-style: solid;
|
||||
border-width: 3px 1px 5px 1px;
|
||||
padding: 7px 10px 3px 8px;
|
||||
margin: 5px 3px 2px 1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head><body>
|
||||
|
||||
<pre>Inline-level context:</pre>
|
||||
Flexbox:<div class="ib"></div>
|
||||
Block:<div class="ig"></div>
|
||||
|
||||
<pre>Grid-level context:</pre>
|
||||
<div style="display:inline-grid; grid-auto-flow:column; align-items:baseline; justify-items:start">
|
||||
Flexbox:<div class="ib"></div>
|
||||
Block:<div class="ig"></div>
|
||||
</div>
|
||||
|
||||
<pre>Flexbox-level context:</pre>
|
||||
<div style="display:inline-flex; align-items:baseline; justify-items:start">
|
||||
Flexbox:<div class="ib" style="margin-bottom:0"></div>
|
||||
Block:<div class="ig"></div>
|
||||
</div>
|
||||
|
||||
</body></html>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexbox Test: Synthesized flex container baseline.</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1313811">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-baselines">
|
||||
<link rel="match" href="flexbox-empty-container-synthesized-baseline-001.html">
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
.ib {
|
||||
display: inline-block;
|
||||
}
|
||||
.if {
|
||||
display: inline-flex;
|
||||
}
|
||||
.ib, .if {
|
||||
border-style: solid;
|
||||
border-width: 3px 1px 5px 1px;
|
||||
padding: 7px 10px 3px 8px;
|
||||
margin: 5px 3px 2px 1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head><body>
|
||||
|
||||
<pre>Inline-level context:</pre>
|
||||
Flexbox:<div class="if"></div>
|
||||
Block:<div class="ib"></div>
|
||||
|
||||
<pre>Grid-level context:</pre>
|
||||
<div style="display:inline-grid; grid-auto-flow:column; align-items:baseline; justify-items:start">
|
||||
Flexbox:<div class="if"></div>
|
||||
Block:<div class="ib" style="margin-bottom:0"></div>
|
||||
</div>
|
||||
|
||||
<pre>Flexbox-level context:</pre>
|
||||
<div style="display:inline-flex; align-items:baseline; justify-items:start">
|
||||
Flexbox:<div class="if"></div>
|
||||
Block:<div class="ib" style="margin-bottom:0"></div>
|
||||
</div>
|
||||
|
||||
</body></html>
|
|
@ -59,6 +59,7 @@ fuzzy-if(skiaContent,3,10) == flexbox-dyn-insertAroundSpan-3.xhtml flexbox-dyn-i
|
|||
# Tests for empty flexboxes (with no flex items)
|
||||
== flexbox-empty-1a.xhtml flexbox-empty-1-ref.xhtml
|
||||
== flexbox-empty-1b.xhtml flexbox-empty-1-ref.xhtml
|
||||
== flexbox-empty-container-synthesized-baseline-001.html flexbox-empty-container-synthesized-baseline-001-ref.html
|
||||
|
||||
# Tests for handling of floated elements inside a flexbox
|
||||
== flexbox-float-1a.xhtml flexbox-float-1-ref.xhtml
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!-- In this reference case, we have inline-blocks instead of inline
|
||||
flex containers. We stick an Ahem whitespace character in each
|
||||
inline-block, with a customized line-height to make the baseline
|
||||
end up at the bottom of the inline-block's content-box. -->
|
||||
flex containers. Otherwise it's the same. -->
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Reftest Reference</title>
|
||||
|
@ -21,13 +19,6 @@
|
|||
display: inline-block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
/* Each inline-block's baseline will be the baseline of the single Ahem
|
||||
character that it contains. We want to set up that char such that its
|
||||
baseline is at the bottom of the container's content box (since that's
|
||||
the corresponding flex container's baseline). So, we use a line-height
|
||||
of 20px, which gives us a baseline of 20px * 0.8 = 16px, which is the
|
||||
bottom of the container's content-box -- awesome. */
|
||||
line-height: 20px;
|
||||
background: purple;
|
||||
border: 0px dotted black;
|
||||
/* (Elements that want a border will set their border-width.) */
|
||||
|
@ -36,13 +27,11 @@
|
|||
</head>
|
||||
<body>
|
||||
A
|
||||
<!-- We have to include a character in the inline-blocks in order for them
|
||||
to baseline-align; otherwise, they align the bottom of their
|
||||
border-boxes. -->
|
||||
<div class="flexContainer"> </div>
|
||||
<div class="flexContainer" style="padding-bottom: 20px"> </div>
|
||||
<div class="flexContainer" style="padding: 10px"> </div>
|
||||
<div class="flexContainer" style="border-width: 3px"> </div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px"> </div>
|
||||
<div class="flexContainer"></div>
|
||||
<div class="flexContainer" style="padding-bottom: 20px"></div>
|
||||
<div class="flexContainer" style="padding: 10px"></div>
|
||||
<div class="flexContainer" style="border-width: 3px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px; margin: 2px"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
<!-- Testcase for how we compute the baseline of a horizontal flex container
|
||||
with no flex items. This is the main-axis baseline. The spec says this
|
||||
about this case:
|
||||
https://drafts.csswg.org/css-flexbox/#flex-baselines
|
||||
"Otherwise, the flex container has no first/last main-axis baseline set,
|
||||
and one is synthesized if needed according to the rules of its alignment context."
|
||||
|
||||
The flex container's main-axis baseline is synthesized
|
||||
from ... the flex container's content box.
|
||||
|
||||
I'm taking that to mean the baseline is the bottom of the content box.
|
||||
The alignment context in this case is inline-level so the margin-box
|
||||
should be used to synthesize the baseline.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
@ -41,5 +42,6 @@
|
|||
<div class="flexContainer" style="padding: 10px"></div>
|
||||
<div class="flexContainer" style="border-width: 3px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px; margin: 2px"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
<!-- Testcase for how we compute the baseline of a vertical flex container
|
||||
with no flex items. This is the cross-axis baseline. The spec says this
|
||||
about this case:
|
||||
https://drafts.csswg.org/css-flexbox/#flex-baselines
|
||||
"Otherwise, the flex container has no first/last main-axis baseline set,
|
||||
and one is synthesized if needed according to the rules of its alignment context."
|
||||
|
||||
...the flex container's cross-axis baseline is synthesized
|
||||
from ... the flex container's content box.
|
||||
|
||||
I'm taking that to mean the baseline is the bottom of the content box.
|
||||
The alignment context in this case is inline-level so the margin-box
|
||||
should be used to synthesize the baseline.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
@ -42,5 +43,6 @@
|
|||
<div class="flexContainer" style="padding: 10px"></div>
|
||||
<div class="flexContainer" style="border-width: 3px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px"></div>
|
||||
<div class="flexContainer" style="border-bottom-width: 4px; margin: 2px"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче