Run absolute position reftests as part of test-wpt.

This commit is contained in:
Ms2ger 2015-04-30 17:44:39 +02:00
parent c55b52b69d
commit bbd7cac371
8 changed files with 76 additions and 4 deletions

View file

@ -27,6 +27,42 @@
"url": "/_mozilla/css/abs_float_pref_width.html"
}
],
"css/absolute_clipping_of_own_contents.html": [
{
"path": "css/absolute_clipping_of_own_contents.html",
"references": [
[
"/_mozilla/css/absolute_clipping_of_own_contents_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_clipping_of_own_contents.html"
}
],
"css/absolute_content_height.html": [
{
"path": "css/absolute_content_height.html",
"references": [
[
"/_mozilla/css/absolute_content_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_content_height.html"
}
],
"css/absolute_hypothetical_float.html": [
{
"path": "css/absolute_hypothetical_float.html",
"references": [
[
"/_mozilla/css/absolute_hypothetical_float_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_hypothetical_float.html"
}
],
"css/class-namespaces.html": [
{
"path": "css/class-namespaces.html",
@ -548,6 +584,42 @@
"url": "/_mozilla/css/abs_float_pref_width.html"
}
],
"css/absolute_clipping_of_own_contents.html": [
{
"path": "css/absolute_clipping_of_own_contents.html",
"references": [
[
"/_mozilla/css/absolute_clipping_of_own_contents_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_clipping_of_own_contents.html"
}
],
"css/absolute_content_height.html": [
{
"path": "css/absolute_content_height.html",
"references": [
[
"/_mozilla/css/absolute_content_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_content_height.html"
}
],
"css/absolute_hypothetical_float.html": [
{
"path": "css/absolute_hypothetical_float.html",
"references": [
[
"/_mozilla/css/absolute_hypothetical_float_ref.html",
"=="
]
],
"url": "/_mozilla/css/absolute_hypothetical_float.html"
}
],
"css/class-namespaces.html": [
{
"path": "css/class-namespaces.html",
@ -566,4 +638,4 @@
"rev": null,
"url_base": "/_mozilla/",
"version": 2
}
}

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that clipping is preserved properly for nested `position: absolute` elements. -->
<link rel=match href=absolute_clipping_of_own_contents_ref.html>
<style>
body, html {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 256px;
background: lightblue;
overflow: hidden;
}
#outer {
position: absolute;
left: -128px;
top: -128px;
}
#inner {
position: absolute;
background: navy;
width: 256px;
height: 256px;
left: 128px;
top: 0;
}
</style>
</head>
<body>
<div id=map>
<div id=outer>
<div id=inner></div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that clipping is preserved properly for nested `position: absolute` elements. -->
<style>
body, html {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 256px;
background: lightblue;
}
#outer {
position: absolute;
left: -128px;
top: -128px;
}
#inner {
position: absolute;
background: navy;
width: 256px;
height: 256px;
left: 128px;
top: 0;
}
</style>
</head>
<body>
<div id=map>
<div id=outer>
<div id=inner></div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<link rel=match href=absolute_content_height_ref.html>
<style>
section {
position: absolute;
background: peachpuff;
top: 0;
left: 0;
padding: 3em 0 0;
width: 10em;
height: auto;
}
</style>
</head>
<body>
<section>XXXXX</section>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
section {
background: peachpuff;
padding: 3em 0 0;
width: 10em;
height: auto;
}
</style>
</head>
<body>
<section>XXXXX</section>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel=match href=absolute_hypothetical_float_ref.html>
<style>
#a {
float: right;
width: 250px;
}
#b {
background: blue;
position: absolute;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div id=a><div id=b>asdf</div></div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style>
#a {
float: right;
width: 250px;
}
#b {
background: blue;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div id=a><div id=b>asdf</div></div>
</body>
</html>