aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ref/basic.list12
-rw-r--r--src/test/ref/overflow_position_abs_inside_normal_a.html32
-rw-r--r--src/test/ref/overflow_position_abs_inside_normal_b.html17
-rw-r--r--src/test/ref/overflow_position_abs_simple_a.html24
-rw-r--r--src/test/ref/overflow_position_abs_simple_b.html15
-rw-r--r--src/test/ref/overflow_simple_a.html22
-rw-r--r--src/test/ref/overflow_simple_b.html15
-rw-r--r--src/test/ref/position_abs_cb_with_non_cb_kid_a.html38
-rw-r--r--src/test/ref/position_abs_cb_with_non_cb_kid_b.html32
-rw-r--r--src/test/ref/position_abs_static_y_a.html31
-rw-r--r--src/test/ref/position_abs_static_y_b.html28
-rw-r--r--src/test/ref/position_fixed_static_y_a.html40
-rw-r--r--src/test/ref/position_fixed_static_y_b.html35
13 files changed, 339 insertions, 2 deletions
diff --git a/src/test/ref/basic.list b/src/test/ref/basic.list
index c6713e02f90..f30a45531e2 100644
--- a/src/test/ref/basic.list
+++ b/src/test/ref/basic.list
@@ -21,13 +21,11 @@
# inline_text_align_a.html inline_text_align_b.html
== font_size_em.html font_size_em_ref.html
== font_size_percentage.html font_size_em_ref.html
-== position_fixed_a.html position_fixed_b.html
== img_size_a.html img_size_b.html
== img_dynamic_remove.html img_dynamic_remove_ref.html
== upper_id_attr.html upper_id_attr_ref.html
# inline_border_a.html inline_border_b.html
== anon_block_inherit_a.html anon_block_inherit_b.html
-== position_relative_a.html position_relative_b.html
== attr_exists_selector.html attr_exists_selector_ref.html
== data_img_a.html data_img_b.html
== background_style_attr.html background_ref.html
@@ -36,3 +34,13 @@
# == simple_iframe.html simple_iframe_ref.html -- disabled due to iframe crashiness
== object_element_a.html object_element_b.html
== height_compute_reset.html height_compute.html
+# Positioning tests
+== position_abs_cb_with_non_cb_kid_a.html position_abs_cb_with_non_cb_kid_b.html
+== position_abs_height_width_a.html position_abs_height_width_b.html
+== position_abs_left_a.html position_abs_left_b.html
+== position_abs_static_y_a.html position_abs_static_y_b.html
+== position_abs_width_percentage_a.html position_abs_width_percentage_b.html
+== position_fixed_a.html position_fixed_b.html
+== position_fixed_simple_a.html position_fixed_simple_b.html
+== position_fixed_static_y_a.html position_fixed_static_y_b.html
+== position_relative_a.html position_relative_b.html
diff --git a/src/test/ref/overflow_position_abs_inside_normal_a.html b/src/test/ref/overflow_position_abs_inside_normal_a.html
new file mode 100644
index 00000000000..aa9a3f11b7b
--- /dev/null
+++ b/src/test/ref/overflow_position_abs_inside_normal_a.html
@@ -0,0 +1,32 @@
+<html>
+ <title>
+ `overflow: hidden` on #second has no effect on #abs because its CB is #first.
+ </title>
+ <head>
+ <style>
+ #first {
+ position: relative;
+ }
+ #second {
+ height: 100px;
+ width: 100px;
+ background: red;
+ overflow: hidden;
+ }
+ #abs {
+ position: absolute;
+ height: 200px;
+ width: 200px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div id="second">
+ <div id="abs">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/overflow_position_abs_inside_normal_b.html b/src/test/ref/overflow_position_abs_inside_normal_b.html
new file mode 100644
index 00000000000..6d0bb81e4be
--- /dev/null
+++ b/src/test/ref/overflow_position_abs_inside_normal_b.html
@@ -0,0 +1,17 @@
+<html>
+ <title>
+ `overflow: hidden` on #second has no effect on #abs because its CB is #first.
+ </title>
+ <head>
+ <style>
+ #first {
+ height: 200px;
+ width: 200px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first"></div>
+ </body>
+</html>
diff --git a/src/test/ref/overflow_position_abs_simple_a.html b/src/test/ref/overflow_position_abs_simple_a.html
new file mode 100644
index 00000000000..315b48bf8db
--- /dev/null
+++ b/src/test/ref/overflow_position_abs_simple_a.html
@@ -0,0 +1,24 @@
+<html>
+ <head>
+ <style>
+ #first {
+ height: 100px;
+ width: 100px;
+ overflow: hidden;
+ position: relative;
+ }
+ #second {
+ position: absolute;
+ height: 100px;
+ width: 200px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div id="second">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/overflow_position_abs_simple_b.html b/src/test/ref/overflow_position_abs_simple_b.html
new file mode 100644
index 00000000000..d899d1f950c
--- /dev/null
+++ b/src/test/ref/overflow_position_abs_simple_b.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <style>
+ #first {
+ height: 100px;
+ width: 100px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/overflow_simple_a.html b/src/test/ref/overflow_simple_a.html
new file mode 100644
index 00000000000..9b8b53eff89
--- /dev/null
+++ b/src/test/ref/overflow_simple_a.html
@@ -0,0 +1,22 @@
+<html>
+ <head>
+ <style>
+ #first {
+ height: 100px;
+ width: 100px;
+ overflow: hidden;
+ }
+ #second {
+ height: 100px;
+ width: 200px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div id="second">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/overflow_simple_b.html b/src/test/ref/overflow_simple_b.html
new file mode 100644
index 00000000000..d899d1f950c
--- /dev/null
+++ b/src/test/ref/overflow_simple_b.html
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ <style>
+ #first {
+ height: 100px;
+ width: 100px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_abs_cb_with_non_cb_kid_a.html b/src/test/ref/position_abs_cb_with_non_cb_kid_a.html
new file mode 100644
index 00000000000..6eb85991133
--- /dev/null
+++ b/src/test/ref/position_abs_cb_with_non_cb_kid_a.html
@@ -0,0 +1,38 @@
+<html>
+ <title>Absolute Containing Blocks with an absolute child and a non-CB child which contains an absolute flow.</title>
+ <head>
+ <style>
+ .cb {
+ position: relative;
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ #second {
+ width: 30px;
+ height: 30px;
+ }
+ #abs {
+ position: absolute;
+ left: 30px;
+ right: 30px;
+ height: 20px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first-cb" class="cb">
+ <div id="second">
+ </div>
+ <div id="abs">
+ </div>
+ <div id="non-cb-2">
+ <div id="second">
+ </div>
+ <div id="abs">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_abs_cb_with_non_cb_kid_b.html b/src/test/ref/position_abs_cb_with_non_cb_kid_b.html
new file mode 100644
index 00000000000..fb7007bf644
--- /dev/null
+++ b/src/test/ref/position_abs_cb_with_non_cb_kid_b.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <style>
+ #first {
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ .row {
+ width: 90px;
+ height: 30px;
+ }
+ .center {
+ margin-left: 30px;
+ height: 20px;
+ width: 30px;
+ background: green;
+ }
+ #row2 {
+ height: 10px;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div class="row"></div>
+ <div class="center"></div>
+ <div class="row" id="row2"></div>
+ <div class="center"></div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_abs_static_y_a.html b/src/test/ref/position_abs_static_y_a.html
new file mode 100644
index 00000000000..de14db70dc3
--- /dev/null
+++ b/src/test/ref/position_abs_static_y_a.html
@@ -0,0 +1,31 @@
+<html>
+ <head>
+ <style>
+ #first {
+ position: relative;
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ #second {
+ width: 30px;
+ height: 30px;
+ }
+ #abs {
+ position: absolute;
+ left: 30px;
+ right: 30px;
+ height: 20px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div id="second">
+ </div>
+ <div id="abs">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_abs_static_y_b.html b/src/test/ref/position_abs_static_y_b.html
new file mode 100644
index 00000000000..7b149c7433d
--- /dev/null
+++ b/src/test/ref/position_abs_static_y_b.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <style>
+ #first {
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ .row {
+ width: 90px;
+ height: 30px;
+ }
+ .center {
+ margin-left: 30px;
+ height: 20px;
+ width: 30px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div class="row"></div>
+ <div class="center">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_fixed_static_y_a.html b/src/test/ref/position_fixed_static_y_a.html
new file mode 100644
index 00000000000..5d44f77006f
--- /dev/null
+++ b/src/test/ref/position_fixed_static_y_a.html
@@ -0,0 +1,40 @@
+<html>
+ <head>
+ <style>
+ html, body {
+ margin-left: 0px;
+ margin-right: 0px;
+ }
+ body {
+ margin-top: 100px;
+ }
+ #first {
+ position: relative;
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ #second {
+ width: 30px;
+ height: 30px;
+ }
+ #fixed {
+ position: fixed;
+ left: 30px;
+ right: 30px;
+ width: 100px;
+ height: 20px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div id="second">
+ </div>
+ <!-- This should be at its static y position (inside #first, after #second) -->
+ <div id="fixed">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/test/ref/position_fixed_static_y_b.html b/src/test/ref/position_fixed_static_y_b.html
new file mode 100644
index 00000000000..0b9ab5568ef
--- /dev/null
+++ b/src/test/ref/position_fixed_static_y_b.html
@@ -0,0 +1,35 @@
+<html>
+ <head>
+ <style>
+ html, body {
+ margin-left: 0px;
+ margin-right: 0px;
+ }
+ body {
+ margin-top: 100px;
+ }
+ #first {
+ width: 90px;
+ height: 90px;
+ border: solid 1px;
+ }
+ .row {
+ width: 90px;
+ height: 30px;
+ }
+ .center {
+ margin-left: 29px;
+ height: 20px;
+ width: 100px;
+ background: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="first">
+ <div class="row"></div>
+ <div class="center">
+ </div>
+ </div>
+ </body>
+</html>