summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/linebox
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/linebox')
-rw-r--r--testing/web-platform/tests/css/CSS2/linebox/vertical-align-122-ref.xht87
-rw-r--r--testing/web-platform/tests/css/CSS2/linebox/vertical-align-122.xht62
-rw-r--r--testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-006.xht1
-rw-r--r--testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-010.xht1
4 files changed, 151 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122-ref.xht b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122-ref.xht
new file mode 100644
index 0000000000..86b4856266
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122-ref.xht
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Reftest Reference</title>
+ <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"/>
+
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style type="text/css">
+ <![CDATA[
+ body {
+ position: relative;
+ font-size: 20px;
+ }
+ .person {
+ position: absolute;
+ width: 6em;
+ height: 8.9em;
+ }
+ .face {
+ position: relative;
+ height: 4.2em;
+ background: currentcolor;
+ }
+ .face > div {
+ position: absolute;
+ background: white;
+ }
+ .face > .mouth {
+ left: 2em;
+ top: 3em;
+ width: 2em;
+ height: .2em;
+ }
+ .face > .eye {
+ top: 1em;
+ width: 1em;
+ height: 1.2em;
+ }
+ .face > .eye.left {
+ left: 1em;
+ }
+ .face > .eye.right {
+ right: 1em;
+ }
+ .torso {
+ margin-top: 0.5em;
+ height: 2.2em;
+ border: 1em solid;
+ }
+ ]]>
+ </style>
+ </head>
+ <body>
+ <div class="person" style="left: 0em; top: 0em">
+ <div class="face">
+ <div class="eye left"></div>
+ <div class="eye right"></div>
+ <div class="mouth"></div>
+ </div>
+ <div class="torso"></div>
+ </div>
+ <div class="person" style="left: 7em; top: 0em">
+ <div class="face">
+ <div class="eye left"></div>
+ <div class="eye right"></div>
+ <div class="mouth"></div>
+ </div>
+ <div class="torso"></div>
+ </div>
+ <div class="person" style="left: 14em; top: .5em">
+ <div class="face">
+ <div class="eye left"></div>
+ <div class="eye right"></div>
+ <div class="mouth"></div>
+ </div>
+ <div class="torso"></div>
+ </div>
+ <div class="person" style="left: 21em; top: .5em">
+ <div class="face">
+ <div class="eye left"></div>
+ <div class="eye right"></div>
+ <div class="mouth"></div>
+ </div>
+ <div class="torso"></div>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122.xht b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122.xht
new file mode 100644
index 0000000000..1d7c180f19
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-122.xht
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: vertical-align on inline-block</title>
+ <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" />
+ <link rel="help" href="https://github.com/servo/servo/issues/31604" />
+ <link rel="help" href="https://github.com/servo/servo/issues/31634" />
+ <link rel="match" href="vertical-align-122-ref.xht" />
+ <meta name="assert" content="When vertical-align is used on an inline-block, it aligns the inline-block itself, not the contents inside it." />
+
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style type="text/css">
+ <![CDATA[
+ body {
+ font: 20px/1 Ahem;
+ }
+ .wrapper {
+ display: inline-block;
+ border: 1em solid;
+ }
+ .wrapper > div {
+ display: inline-block;
+ height: 2em;
+ width: 2em;
+ background: currentcolor;
+ }
+ .wrapper > canvas {
+ width: 4em;
+ height: 2em;
+ }
+ ]]>
+ </style>
+ </head>
+ <body>
+ <div class="wrapper" style="vertical-align: baseline">
+ X<div></div><span>X</span>
+ </div>
+ <div class="wrapper" style="vertical-align: top">
+ X<div></div><span>X</span>
+ </div>
+ <div class="wrapper" style="vertical-align: middle">
+ X<div></div><span>X</span>
+ </div>
+ <div class="wrapper" style="vertical-align: bottom">
+ X<div></div><span>X</span>
+ </div>
+ <br />
+ <div class="wrapper" style="vertical-align: baseline">
+ <canvas></canvas>
+ </div>
+ <div class="wrapper" style="vertical-align: top">
+ <canvas></canvas>
+ </div>
+ <div class="wrapper" style="vertical-align: middle">
+ <canvas></canvas>
+ </div>
+ <div class="wrapper" style="vertical-align: bottom">
+ <canvas></canvas>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-006.xht b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-006.xht
index 7d142e1794..f338379bbb 100644
--- a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-006.xht
+++ b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-006.xht
@@ -15,6 +15,7 @@
vertical-align: baseline;
}
</style>
+ <link rel="match" href="vertical-align-baseline-007-ref.xht" />
</head>
<body>
<p>Test passes if the bottoms of all the 'X's are aligned.</p>
diff --git a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-010.xht b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-010.xht
index 1e5a0df855..ffe3c8755b 100644
--- a/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-010.xht
+++ b/testing/web-platform/tests/css/CSS2/linebox/vertical-align-baseline-010.xht
@@ -17,6 +17,7 @@
vertical-align: baseline;
}
</style>
+ <link rel="match" href="vertical-align-baseline-007-ref.xht" />
</head>
<body>
<p>Test passes if the bottoms of all the 'X's are aligned.</p>