Bug 1444940 [wpt PR 9866] - [css-writing-modes] test for max-height being clamped by the ICB, a=testonly

Automatic update from web-platform-testsMerge pull request #9866 from frivoal/wm-available-size

[css-writing-modes] test for max-height being clamped by the ICB

wpt-commits: 9d2222ff05a0d3bf3532d9242a14e7758df7f13b
wpt-pr: 9866
wpt-commits: 9d2222ff05a0d3bf3532d9242a14e7758df7f13b
wpt-pr: 9866
This commit is contained in:
Florian Rivoal 2018-03-26 15:09:53 +00:00 committed by James Graham
parent 098c814ace
commit 652c1b3f86
3 changed files with 69 additions and 2 deletions

View File

@ -152689,6 +152689,18 @@
{}
]
],
"css/css-writing-modes/available-size-019.html": [
[
"/css/css-writing-modes/available-size-019.html",
[
[
"/css/css-writing-modes/reference/available-size-002-ref.html",
"=="
]
],
{}
]
],
"css/css-writing-modes/background-position-vrl-018.xht": [
[
"/css/css-writing-modes/background-position-vrl-018.xht",
@ -524956,7 +524968,7 @@
"reftest"
],
"css/css-writing-modes/available-size-008.html": [
"b422cebb5c5839abfa11a049395702cda52a1459",
"ca5b879b261068dbf49246d1f1c9c602d5908236",
"reftest"
],
"css/css-writing-modes/available-size-009.html": [
@ -524999,6 +525011,10 @@
"ce16806681745f6904483d09d1954152605bf39b",
"reftest"
],
"css/css-writing-modes/available-size-019.html": [
"3cd3d22d4c43b8e577901f50647080802f007a03",
"reftest"
],
"css/css-writing-modes/background-position-vlr-003.xht": [
"c56c42d17b140be6868cc6f413f545dd6a5180e8",
"manual"

View File

@ -8,7 +8,7 @@
<meta name="flags" content="">
<style>
body { margin-top: 0; margin-bottom: 0; } /* Shouldn't matter, but in some browsers does. -007 tests this aspect specifically. */
div {
div div {
writing-mode: vertical-rl;
font-family: monospace;
font-size: 20px;
@ -46,5 +46,7 @@ section {
<p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
<section>
<div>
<div><aside id="red">0</aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside> <span>0</span></div>
</div>
</section>

View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Testing Available Space in Orthogonal Flows / ICB / tall max-height parent</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto">
<link rel="match" href="reference/available-size-002-ref.html">
<meta name="assert" content="When an orthogonal flow's parent doesn't have a definite block size, but has a max-height, but that max-height is than the ICB, use the ICB instead.">
<meta name="flags" content="">
<style>
body { margin-top: 0; margin-bottom: 0; } /* Shouldn't matter, but in some browsers does. -007 tests this aspect specifically. */
div {
writing-mode: vertical-rl;
font-family: monospace;
font-size: 20px;
position: relative; /* to be a container for #red*/
}
.spacer { /* using 5 spacers of 20vh each instead of a single large one, so
that the line would wrap between spacers if it ends up being
shorter thatn 100vh*/
display: inline-block;
height: calc(20vh - 0.1px); /*Using this instead of 20vh, to account for accumulation of rounding errors, that might make 5*20vh taller than 100vh in some browsers*/
}
span {
background: green;
display: inline-block; /* This should not change it's size or position, but makes the size of the background predictable*/
color: transparent;
}
#red { /* Not necessary when when comparing to the reference, but makes human judgement easier */
position: absolute;
background: red;
writing-mode: vertical-rl;
z-index: -1;
font-family: monospace;
font-size: 20px;
left: 0; top: 0;
}
section {
max-height: 120vh;
}
</style>
<p>Test passes if there is a <strong>green rectangle</strong> below and <strong>no red</strong>.
<section>
<div><aside id="red">0</aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside><aside class="spacer"></aside> <span>0</span></div>
</section>