Skip to content

Commit

Permalink
Bug 1615457 [wpt PR 21790] - Move contain-intrinsic-size tests to WPT…
Browse files Browse the repository at this point in the history
…, a=testonly

Automatic update from web-platform-tests
Move contain-intrinsic-size tests to WPT

The CSSWG has approved a resolution to update the spec; these tests
match that resolution: w3c/csswg-drafts#4531

R=vmpstrchromium.org

Bug: 991096
Change-Id: I021e5fb2b14eb5049cf7077e06c79810fd60e622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055740
Reviewed-by: vmpstr <vmpstrchromium.org>
Commit-Queue: vmpstr <vmpstrchromium.org>
Commit-Queue: Christian Biesinger <cbiesingerchromium.org>
Auto-Submit: Christian Biesinger <cbiesingerchromium.org>
Cr-Commit-Position: refs/heads/master{#741254}

--

wpt-commits: c8671a2d15e8c57b652915956312b94a0236a974
wpt-pr: 21790

UltraBlame original commit: 2f7fd98465df8529ec6bc6531b6386304b48e359
  • Loading branch information
marco-c committed Feb 19, 2020
1 parent 40d8d1d commit 8d8e17a
Show file tree
Hide file tree
Showing 56 changed files with 1,498 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: unsized div</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#target {
background: lightblue;
height: 222px;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: unsized div</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-001-ref.html">
<meta name="assert" content="contain-intrinsic-size is used to size the div as if it had a single child of this size">

<style>
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: div with max-content parent</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#border {
width: max-content;
border: 1px solid black;
}
#target {
background: lightblue;
width: 111px;
height: 222px;
}
</style>

<div id=border>
<div id=target></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: div with max-content parent</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-002-ref.html">
<meta name="assert" content="contain-intrinsic-size is used to size the div, with parent's max-content width respecting it">

<style>
#border {
width: max-content;
border: 1px solid black;
}
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
}
</style>

<div id=border>
<div id=target></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width specified</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#target {
background: lightblue;
width: 50px;
height: 222px;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width specified</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-003-ref.html">
<meta name="assert" content="contain-intrinsic-size's width is ignored if width is specified">

<style>
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
width: 50px;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width is min-content</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#target {
background: lightblue;
width: 111px;
height: 222px;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width is min-content</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-004-ref.html">
<meta name="assert" content="div is sized to intrinsic-width if width is min-content">

<style>
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
width: min-content;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width is max-content</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#target {
background: lightblue;
width: 111px;
height: 222px;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: width is max-content</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-004-ref.html">
<meta name="assert" content="div is sized to intrinsic-width if width is max-content">

<style>
#target {
background: lightblue;
contain-intrinsic-size: 111px 222px;
contain: size;
width: max-content;
}
</style>

<div id=target></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: unsized div, intrinsic-size is small</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#target {
background: lightblue;
height: 6px;
contain: size;
}
</style>

<div id=target>Lorem ipsum</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: unsized div, intrinsic-size is small</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-006-ref.html">
<meta name="assert" content="content dimensions are ignored if intrinsic-size is specified">

<style>
#target {
background: lightblue;
contain-intrinsic-size: 5px 6px;
contain: size;
}
</style>

<div id=target>Lorem ipsum</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: div with border</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
#border {
border: 1px solid blue;
width: max-content;
}

#target {
background: lightblue;
box-sizing: content-box;
width: 55px;
height: 66px;

border-style: solid;
border-color: black;
border-width: 2px 3px 5px 7px;
}
</style>

<div id=border>
<div id=target></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: div with border</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-007-ref.html">
<meta name="assert" content="contain-intrinsic-size sizes the content box, not the border box">

<style>
#border {
border: 1px solid blue;
width: max-content;
}

#target {
background: lightblue;
contain-intrinsic-size: 55px 66px;
contain: size;
border-style: solid;
border-color: black;
border-width: 2px 3px 5px 7px;
}
</style>

<div id=border>
<div id=target></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: writing modes</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
.border {
border: 1px solid blue;
width: max-content;
margin: 5px;
}

.box {
background: lightblue;
box-sizing: content-box;
width: 55px;
height: 66px;
border-style: solid;
border-color: black;
border-width: 2px 3px 5px 7px;
padding: 11px 13px 17px 19px;
}
.verticalrl {
writing-mode: vertical-rl;
}
.verticallr {
writing-mode: vertical-lr;
}
.horizontaltb {
writing-mode: horizontal-tb;
}
</style>

<div class=border><div class="box verticalrl">Lorem</div></div>
<div class=border><div class="box verticallr">Ipsum</div></div>
<div class=border><div class="box horizontaltb">Dolor</div></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: writing modes</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">
<link rel="match" href="contain-intrinsic-size-008-ref.html">
<meta name="assert" content="contain-intrinsic-size specifies physical dimensions, and respects writing modes">

<style>
.border {
border: 1px solid blue;
width: max-content;
margin: 5px;
}

.box {
background: lightblue;
contain-intrinsic-size: 55px 66px;
contain: size;
border-style: solid;
border-color: black;
border-width: 2px 3px 5px 7px;
padding: 11px 13px 17px 19px;
}
.verticalrl {
writing-mode: vertical-rl;
}
.verticallr {
writing-mode: vertical-lr;
}
.horizontaltb {
writing-mode: horizontal-tb;
}
</style>

<div class=border><div class="box verticalrl">Lorem</div></div>
<div class=border><div class="box verticallr">Ipsum</div></div>
<div class=border><div class="box horizontaltb">Dolor</div></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset="utf8">
<title>CSS contain-intrinsic-size: select multiple</title>
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override">

<style>
.border {
border: 1px solid blue;
width: max-content;
margin: 5px;
}

select {
background: lightblue;
box-sizing: content-box;
width: 55px;
height: 66px;
overflow: visible;
}
</style>

<select multiple></select>
Loading

0 comments on commit 8d8e17a

Please sign in to comment.