diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/css/CSS2/abspos | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/abspos')
33 files changed, 536 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001-ref.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001-ref.xht new file mode 100644 index 0000000000..cafe2bd45c --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001-ref.xht @@ -0,0 +1,22 @@ +<!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: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<style type="text/css"> +body { margin:0; } +.pos { position:absolute; width:100px; height:100px; } +</style> +</head> +<body> +<div style="height:10000px; margin:0; margin:10px; border:20px solid black; padding:30px;"></div> +<script type="text/javascript"> +window.scrollTo(0,50); +</script> +<div style="top:0; left:60px; background:yellow;" class="pos"></div> +<div style="right:0; top:60px; background:orange;" class="pos"></div> +<div style="bottom:0; left:60px; background:brown;" class="pos"></div> +<div style="left:0; top:60px; background:pink;" class="pos"></div> + + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001.xht new file mode 100644 index 0000000000..3cdcc3f35b --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-001.xht @@ -0,0 +1,25 @@ +<!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: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-001-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +<meta name="flags" content="dom" /> +<style type="text/css"> +html { margin:10px; border:20px solid black; padding:30px; } +body { height:10000px; margin:0; } +div { position:absolute; width:100px; height:100px; } +</style> +</head> +<body> +<script type="text/javascript"> +window.scrollTo(0,50); +</script> +<div style="top:0; background:yellow;"></div> +<div style="right:0; background:orange;"></div> +<div style="bottom:0; background:brown;"></div> +<div style="left:0; background:pink;"></div> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004-ref.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004-ref.xht new file mode 100644 index 0000000000..5a810a8f15 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004-ref.xht @@ -0,0 +1,9 @@ +<!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" style="background:yellow;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +</head><body> +<div style="position:absolute; top:100px; left:100px; width:100px; height:100px; + border:10px solid black;"></div> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004a.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004a.xht new file mode 100644 index 0000000000..2c5e72c28d --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004a.xht @@ -0,0 +1,11 @@ +<!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" style="position:absolute; left:100px; top:100px; width:100px; height:100px; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004b.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004b.xht new file mode 100644 index 0000000000..1af1e5431c --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004b.xht @@ -0,0 +1,11 @@ +<!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" style="position:fixed; left:100px; top:100px; width:100px; height:100px; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004c.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004c.xht new file mode 100644 index 0000000000..ceebc031b0 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004c.xht @@ -0,0 +1,11 @@ +<!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" style="position:absolute; left:100px; top:100px; width:100px; height:100px; + background:yellow; border:10px solid black; display:table;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004d.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004d.xht new file mode 100644 index 0000000000..b310443483 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004d.xht @@ -0,0 +1,11 @@ +<!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" style="position:fixed; left:100px; top:100px; width:100px; height:100px; + background:yellow; border:10px solid black; display:table"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004e.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004e.xht new file mode 100644 index 0000000000..7fd8543dce --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004e.xht @@ -0,0 +1,11 @@ +<!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" style="display:table"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body style="position:absolute; left:100px; top:100px; width:100px; height:100px; border:10px solid black; + background:yellow; margin:0"> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004f.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004f.xht new file mode 100644 index 0000000000..d4268eaf64 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-004f.xht @@ -0,0 +1,11 @@ +<!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" style="display:table"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-004-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body style="position:fixed; left:100px; top:100px; width:100px; height:100px; border:10px solid black; + background:yellow; margin:0"> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005-ref.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005-ref.xht new file mode 100644 index 0000000000..6aa89cdc2d --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005-ref.xht @@ -0,0 +1,8 @@ +<!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" style="background:yellow;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +</head><body style="margin:0"> +<div style="border:10px solid black; width:100px; height:100px;"></div> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005a.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005a.xht new file mode 100644 index 0000000000..f8ebb1a885 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005a.xht @@ -0,0 +1,11 @@ +<!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" style="position:absolute; width:100px; height:100px; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-005-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005b.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005b.xht new file mode 100644 index 0000000000..150f866435 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005b.xht @@ -0,0 +1,11 @@ +<!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" style="position:absolute; width:100px; height:100px; display:table; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-005-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005c.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005c.xht new file mode 100644 index 0000000000..dcbbe77840 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005c.xht @@ -0,0 +1,11 @@ +<!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" style="position:fixed; width:100px; height:100px; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-005-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005d.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005d.xht new file mode 100644 index 0000000000..0da42db807 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-005d.xht @@ -0,0 +1,11 @@ +<!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" style="position:fixed; width:100px; height:100px; display:table; + background:yellow; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-005-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007-ref.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007-ref.xht new file mode 100644 index 0000000000..3a78c0d70c --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007-ref.xht @@ -0,0 +1,10 @@ +<!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: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +</head><body style="margin:0;"> +<div style="position:relative; top:100px; left:100px; height:100px; border:10px solid black;"> + <div style="position:absolute; bottom:0; height:30px; border:10px solid orange;"> + </div> + + +</div></body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht new file mode 100644 index 0000000000..5adbb6daf4 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht @@ -0,0 +1,10 @@ +<!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" style="position:relative; top:100px; left:100px; height:100px; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-007-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body style="position:absolute; margin:0; bottom:0; height:30px; border:10px solid orange;"> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009-ref.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009-ref.xht new file mode 100644 index 0000000000..11e2e946ea --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009-ref.xht @@ -0,0 +1,8 @@ +<!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: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +</head><body style="margin:0"> +<div style="position:fixed; width:50%; height:50%; left:50px; top:50px; border:10px solid black;"></div> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009a.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009a.xht new file mode 100644 index 0000000000..b7f8daf636 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009a.xht @@ -0,0 +1,8 @@ +<!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" style="width:50%; height:50%; margin:50px; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-009-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009b.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009b.xht new file mode 100644 index 0000000000..8bbd8487af --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009b.xht @@ -0,0 +1,8 @@ +<!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" style="position:absolute; left:50px; top:50px; width:50%; height:50%; border:10px solid black;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-009-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body> +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009e.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009e.xht new file mode 100644 index 0000000000..c392d2c153 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009e.xht @@ -0,0 +1,10 @@ +<!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: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-009-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body style="position:absolute; width:50%; height:50%; top:50px; left:50px; margin:0; border:10px solid black;"> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009f.xht b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009f.xht new file mode 100644 index 0000000000..11cb450270 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-containing-block-initial-009f.xht @@ -0,0 +1,10 @@ +<!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" style="position:relative; height:50%;"><head><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title> +<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> +<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> +<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" /> +<link rel="match" href="abspos-containing-block-initial-009-ref.xht"/> +<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block." /> +</head><body style="position:absolute; width:50%; top:50px; left:50px; height:100%; margin:0; border:10px solid black;"> + + +</body></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/CSS2/abspos/abspos-in-block-in-inline-in-relpos-inline.html b/testing/web-platform/tests/css/CSS2/abspos/abspos-in-block-in-inline-in-relpos-inline.html new file mode 100644 index 0000000000..478251bcf1 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/abspos-in-block-in-inline-in-relpos-inline.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#containing-block-details"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level"> +<style> + body { margin: 0px;} + .rel { position:relative; } + .inline-block { display:inline-block; width:100px; height:1px; } + .inline-block.large { width:200px; } + #target { position:absolute; width:100%; height:100px; background:green; } + #target-fixed { position:fixed; width:100%; height:100px; background:yellow; } +</style> +<p>There should be a green square, and a yellow rectangle below.</p> +<div style="height:200px;"> + <span class="rel" id="notContainingBlockOfTarget"> + <div class="large inline-block"></div> + <br> + <span id="containingBlockOfTarget" class="rel"> + <div class="inline-block"></div> + <span> + <div> + <div id="target-fixed"></div> + <div id="target"></div> + </div> + </span> + <div class="inline-block"></div></span><br> + <div class="large inline-block"></div> + </span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + assert_equals(document.getElementById("target").offsetWidth, + // `offsetWidth` is not interoperable for block-in-inline. + // Use the size of ".inline-block" to avoid this. + document.querySelector("#containingBlockOfTarget .inline-block").offsetWidth); + }, "position:absolute should be sized by the right ancestor"); + test(()=> { + assert_equals(document.getElementById("target-fixed").offsetWidth, + document.body.offsetWidth); + }, "position:fixed should be sized by the right ancestor"); +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-in-inline-that-had-block.html b/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-in-inline-that-had-block.html new file mode 100644 index 0000000000..1859ff8300 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-in-inline-that-had-block.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#containing-block-details"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level"> +<p>There should be a green square below, and no red.</p> +<div style="position:relative; width:100px; height:100px; background:red;"> + <span> + <span id="posMe"> + <div id="removeMe"></div> + </span> + </span> + <span> + <div> + <div id="target" style="position:absolute; width:100%; height:100%; background:green;"></div> + </div> + </span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + document.body.offsetTop; + removeMe.style.display = "none"; + document.body.offsetTop; + posMe.style.position = "relative"; + assert_equals(document.getElementById("target").offsetWidth, 100); + assert_equals(document.getElementById("target").offsetHeight, 100); + assert_equals(document.getElementById("target").offsetLeft, 0); + assert_equals(document.getElementById("target").offsetTop, 0); + }, "Make sure that we're sized by the right ancestor"); +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-that-had-block.html b/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-that-had-block.html new file mode 100644 index 0000000000..293b88f520 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/adjacent-to-relpos-inline-that-had-block.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#containing-block-details"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level"> +<p>There should be a green square below, and no red.</p> +<div style="position:relative; width:100px; height:100px; background:red;"> + <span id="posMe"> + <div id="removeMe"></div> + </span> + <span> + <div> + <div id="target" style="position:absolute; width:100%; height:100%; background:green;"></div> + </div> + </span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + document.body.offsetTop; + removeMe.style.display = "none"; + document.body.offsetTop; + posMe.style.position = "relative"; + assert_equals(document.getElementById("target").offsetWidth, 100); + assert_equals(document.getElementById("target").offsetHeight, 100); + assert_equals(document.getElementById("target").offsetLeft, 0); + assert_equals(document.getElementById("target").offsetTop, 0); + }, "Make sure that we're sized by the right ancestor"); +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/between-float-and-text.html b/testing/web-platform/tests/css/CSS2/abspos/between-float-and-text.html new file mode 100644 index 0000000000..b4c933e8d8 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/between-float-and-text.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<title>Auto-positioned abspos after text, before float</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements"> +<link rel="match" href="../../reference/ref-filled-green-200px-square.html"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="line-height:20px; margin-top:-20px;"> + + <div style="position:absolute; width:200px; height:200px; background:green;"></div> + <div style="float:left; margin-top:20px; width:200px; height:200px; background:red;"></div> +</div> diff --git a/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic-ref.html b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic-ref.html new file mode 100644 index 0000000000..feb01b0515 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic-ref.html @@ -0,0 +1,23 @@ +<!doctype html> +<title>CSS Test Reference</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<style> + div { + font: 16px / 1 monospace; + text-align: center; + margin: 5px; + position: relative; + min-height: 30px; + } + span { + position: absolute; + } +</style> +<p>Should see two words at the same horizontal position below:</p> +<div> + <span>Foo</span> +</div> +<div> + <span>Foo</span> +</div> diff --git a/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic.html b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic.html new file mode 100644 index 0000000000..7c7348727b --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-box-dynamic.html @@ -0,0 +1,37 @@ +<!doctype html> +<html class="reftest-wait"> +<title>Layout is correctly updated when the hypothetical display of an element changes, even though the final computed display doesn't</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements"> +<link rel="match" href="hypothetical-box-dynamic-ref.html"> +<style> + div { + font: 16px / 1 monospace; + text-align: center; + margin: 5px; + position: relative; + min-height: 30px; + } + span { + position: absolute; + } + .block { + display: block; + } +</style> +<p>Should see two words at the same horizontal position below:</p> +<div> + <span class="block">Foo</span> +</div> +<div> + <span>Foo</span> +</div> +<script> +onload = function() { + requestAnimationFrame(() => requestAnimationFrame(() => { + document.querySelector(".block").className = ""; + document.documentElement.className = ""; + })); +} +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line-ref.html b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line-ref.html new file mode 100644 index 0000000000..1ceebb0f7e --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<p>The second line should be just below the first line.</p> +<div style="padding-left:100px;"> + Line 1<br> + Line 2 +</div> diff --git a/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line.html b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line.html new file mode 100644 index 0000000000..b06c54f69c --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/hypothetical-inline-alone-on-second-line.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<title>Auto-positioned out-of-flow positioned box that would have been the sole piece of content on a second line, had it not been out-of-flow positioned</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements"> +<link rel="match" href="hypothetical-inline-alone-on-second-line-ref.html" /> +<p>The second line should be just below the first line.</p> +<span style="padding-left:100px;"> + Line 1<br> + <span style="position:absolute; padding-left:100px;">Line 2</span> +</span> diff --git a/testing/web-platform/tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html b/testing/web-platform/tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html new file mode 100644 index 0000000000..977f063bca --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/remove-block-between-inline-and-abspos.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<title>Removing block between inline and float should put the two on the same line</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#absolute-positioning" title="9.6 Absolute positioning"> +<link rel="match" href="../../reference/ref-filled-green-200px-square.html"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<!-- This is a block with block children, so inlines need to be wrapped inside + anonymous blocks. A float and out-of-flow positioned box is neutral here, + in that it can either live among block children OR among inline + children. If it is (or becomes) sibling of an inline child, though, it + should be wrapped inside the same anonymous block as the inline, or layout + will be wrong. --> +<div style="width:200px; background:red;"> + <div style="height:50px; background:green;"></div> + <div style="display:inline-block; vertical-align:top; width:100px; height:150px; background:green;"></div> + <div id="removeMe" style="height:100px;"></div> + <span style="position:absolute; width:100px; height:150px; background:green;"></span> +</div> +<script> + document.body.offsetTop; // Trigger layout. + document.getElementById("removeMe").style.display = "none"; +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/static-inside-table-cell.html b/testing/web-platform/tests/css/CSS2/abspos/static-inside-table-cell.html new file mode 100644 index 0000000000..712bfbaf1e --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/static-inside-table-cell.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>Static position inside table cell</title> +<link rel="author" title="Aleks Totic" href="atotic@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="container" style="position:relative;"> + <div id="changeMe" style="height:100px;"></div> + <div style="display:table-cell;"> + <div style="position:absolute; width:100px; height:100px; background:green;"></div> + <div style="width:100px; height:100px; background:red;"></div> + </div> +</div> +<script> + document.body.offsetTop; + document.querySelector('#changeMe').style.height = "auto"; +</script> diff --git a/testing/web-platform/tests/css/CSS2/abspos/table-caption-is-containing-block-001.html b/testing/web-platform/tests/css/CSS2/abspos/table-caption-is-containing-block-001.html new file mode 100644 index 0000000000..9e6eeb0c7a --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/table-caption-is-containing-block-001.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#model"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="relpos caption is containing block for abspos child" /> +<title> +Captions and abspos descendants +</title> + +<style> +caption, div { + height:100px; + width:50px; + background:green; +} +#redSquare { + height: 100px; + width: 100px; + background-color: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="redSquare"></div> + +<table> + <caption style="position:relative"> + <div style="position:absolute; left:50px;"> + </div> + </caption> +</table> diff --git a/testing/web-platform/tests/css/CSS2/abspos/table-caption-passes-abspos-up-001.html b/testing/web-platform/tests/css/CSS2/abspos/table-caption-passes-abspos-up-001.html new file mode 100644 index 0000000000..008c07d455 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/abspos/table-caption-passes-abspos-up-001.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="David Grogan" href="dgrogan@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#model"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="non-containing block caption passes abspos child to its parent" /> +<title> +Captions and abspos descendants +</title> + +<style> +caption, div { + height:100px; + width:50px; + background:green; +} +#redSquare { + height: 100px; + width: 100px; + background-color: red; + position: absolute; + z-index: -1; +} +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="redSquare"></div> + +<table style="position:relative"> + <caption> + <div style="position:absolute; left:50px;"> + </div> + </caption> +</table> |