diff options
Diffstat (limited to 'layout/reftests/writing-mode/abspos')
234 files changed, 15856 insertions, 0 deletions
diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1-ref.html new file mode 100644 index 000000000..fc6e6b5af --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + writing-mode: vertical-lr; position: absolute; left: 0; top: 0; } +.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +img { position: absolute; left: 0; top: 34px; + width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1a.html new file mode 100644 index 000000000..e3a9f414d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1b.html new file mode 100644 index 000000000..12e79285d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr rel"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1c.html new file mode 100644 index 000000000..234d9b86f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr"> + <div class="test rel"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2-ref.html new file mode 100644 index 000000000..69f635771 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + writing-mode: vertical-lr; position: absolute; left: 0; top: 0; } +.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +img { position: absolute; left: 0; top: 34px; + background: green; border: 5px solid yellow; } +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2a.html new file mode 100644 index 000000000..26a039659 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2b.html new file mode 100644 index 000000000..d5960f00f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr rel"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2c.html new file mode 100644 index 000000000..37798c920 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vlr"> + <div class="test rel"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3-ref.html new file mode 100644 index 000000000..87e0c4e8f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vlr { writing-mode: vertical-lr; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { margin: 0; padding: 2px; border: 2px solid green; inline-size: -moz-fit-content; } +</style> +<body> +<div> + <div class="vlr"><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3a.html new file mode 100644 index 000000000..2231ad7bd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3a.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vlr"> + <div><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3b.html new file mode 100644 index 000000000..f75b01b1a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3b.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vlr rel"> + <div><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3c.html new file mode 100644 index 000000000..d2a1511d6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3c.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vlr"> + <div class="rel"><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4-ref.html new file mode 100644 index 000000000..4a6eda999 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + position: absolute; right: 0; top: 0; } +.test { writing-mode: vertical-rl; background: #aaa; + position: absolute; right: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +img { position: absolute; right: 0; top: 34px; + width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4a.html new file mode 100644 index 000000000..5c7ecab70 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4b.html new file mode 100644 index 000000000..1e51065b7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl rel"> + <div class="test"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4c.html new file mode 100644 index 000000000..edc8b870e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl"> + <div class="test rel"><span class="abc">abc</span><img src=""></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5-ref.html new file mode 100644 index 000000000..cf0b18aca --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + position: absolute; right: 0; top: 0; } +.test { writing-mode: vertical-rl; background: #aaa; + position: absolute; right: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +img { position: absolute; right: 0; top: 34px; + background: green; border: 5px solid yellow; } +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5a.html new file mode 100644 index 000000000..fd7e3cead --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5b.html new file mode 100644 index 000000000..2b48fcaa8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl rel"> + <div class="test"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5c.html new file mode 100644 index 000000000..3923017a4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +img { position: absolute; background: green; border: 5px solid yellow; } +</style> +<body> +<div class="vrl"> + <div class="test rel"><span class="abc">abc</span><img src="blue-32x32.png"></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6-ref.html new file mode 100644 index 000000000..c68151004 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vrl { writing-mode: vertical-rl; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { margin: 0; padding: 2px; border: 2px solid green; inline-size: -moz-fit-content; } +</style> +<body> +<div class="vrl"> + <div><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6a.html new file mode 100644 index 000000000..41f6681c9 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6a.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vrl"> + <div><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6b.html new file mode 100644 index 000000000..d768e575c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6b.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vrl rel"> + <div><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6c.html new file mode 100644 index 000000000..111443acf --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6c.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; } +p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; } +</style> +<body> +<div class="vrl"> + <div class="rel"><span>abc def</span><p>xyzzy</p></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7-ref.html new file mode 100644 index 000000000..77ad9c15b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + writing-mode: vertical-lr; position: absolute; left: 0; top: 0; } +.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +iframe { + position: absolute; left: 0; top: 34px; + background: yellow; border: 5px solid green; + width: 300px; height: 150px; +} +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7a.html new file mode 100644 index 000000000..906757ae9 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vlr"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7b.html new file mode 100644 index 000000000..9056e75cb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vlr rel"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7c.html new file mode 100644 index 000000000..d21dbaa1e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vlr { writing-mode: vertical-lr; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vlr"> + <div class="test rel"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8-ref.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8-ref.html new file mode 100644 index 000000000..33e90d3f8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; + writing-mode: vertical-rl; position: absolute; right: 0; top: 0; } +.test { background: #aaa; position: absolute; right: 0; top: 0; width: 2em; height: 100%; } +.rel { position: relative; } +iframe { + position: absolute; right: 0; top: 34px; + background: yellow; border: 5px solid green; + width: 300px; height: 150px; +} +</style> +<body> +<div class="rel"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8a.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8a.html new file mode 100644 index 000000000..ccca0406c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8a.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vrl"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8b.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8b.html new file mode 100644 index 000000000..948c0ee09 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8b.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vrl rel"> + <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8c.html b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8c.html new file mode 100644 index 000000000..c8b95701b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8c.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<style> +body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } +.abc { display: inline-block; border: 2px solid red; inline-size: 30px; } +.test { background: #aaa; width: 2em; } +.vrl { writing-mode: vertical-rl; } +.rel { position: relative; } +iframe { position: absolute; background: yellow; border: 5px solid green; } +</style> +<body> +<div class="vrl"> + <div class="test rel"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> +</div> diff --git a/layout/reftests/writing-mode/abspos/blue-32x32.png b/layout/reftests/writing-mode/abspos/blue-32x32.png Binary files differnew file mode 100644 index 000000000..deefd19b2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/blue-32x32.png diff --git a/layout/reftests/writing-mode/abspos/reftest-stylo.list b/layout/reftests/writing-mode/abspos/reftest-stylo.list new file mode 100644 index 000000000..8874e96ef --- /dev/null +++ b/layout/reftests/writing-mode/abspos/reftest-stylo.list @@ -0,0 +1,130 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# This directory contains tests for position:absolute and vertical writing modes. +# They require the vertical-text pref to be true, otherwise lots of them will fail. +# (See bug 1079151 for the origin of these testcases by Gérard Talbot.) + + +# All of these are fuzzy-if on skia content on OS X due to subpixel text positioning. +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-003.xht s71-abs-pos-non-replaced-vlr-003.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-005.xht s71-abs-pos-non-replaced-vlr-005.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-007.xht s71-abs-pos-non-replaced-vlr-007.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-009.xht s71-abs-pos-non-replaced-vlr-009.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-011.xht s71-abs-pos-non-replaced-vlr-011.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-013.xht s71-abs-pos-non-replaced-vlr-013.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-015.xht s71-abs-pos-non-replaced-vlr-015.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-017.xht s71-abs-pos-non-replaced-vlr-017.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-019.xht s71-abs-pos-non-replaced-vlr-019.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-021.xht s71-abs-pos-non-replaced-vlr-021.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-023.xht s71-abs-pos-non-replaced-vlr-023.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-025.xht s71-abs-pos-non-replaced-vlr-025.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-027.xht s71-abs-pos-non-replaced-vlr-027.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-029.xht s71-abs-pos-non-replaced-vlr-029.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-031.xht s71-abs-pos-non-replaced-vlr-031.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-033.xht s71-abs-pos-non-replaced-vlr-033.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-035.xht s71-abs-pos-non-replaced-vlr-035.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-037.xht s71-abs-pos-non-replaced-vlr-037.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-039.xht s71-abs-pos-non-replaced-vlr-039.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-041.xht s71-abs-pos-non-replaced-vlr-041.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-043.xht s71-abs-pos-non-replaced-vlr-043.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-045.xht s71-abs-pos-non-replaced-vlr-045.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-047.xht s71-abs-pos-non-replaced-vlr-047.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-049.xht s71-abs-pos-non-replaced-vlr-049.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-051.xht s71-abs-pos-non-replaced-vlr-051.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-053.xht s71-abs-pos-non-replaced-vlr-053.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-055.xht s71-abs-pos-non-replaced-vlr-055.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-057.xht s71-abs-pos-non-replaced-vlr-057.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-059.xht s71-abs-pos-non-replaced-vlr-059.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-061.xht s71-abs-pos-non-replaced-vlr-061.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-063.xht s71-abs-pos-non-replaced-vlr-063.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-065.xht s71-abs-pos-non-replaced-vlr-065.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-067.xht s71-abs-pos-non-replaced-vlr-067.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-069.xht s71-abs-pos-non-replaced-vlr-069.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-071.xht s71-abs-pos-non-replaced-vlr-071.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vlr-073.xht s71-abs-pos-non-replaced-vlr-073.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-075.xht s71-abs-pos-non-replaced-vlr-075.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-077.xht s71-abs-pos-non-replaced-vlr-077.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-079.xht s71-abs-pos-non-replaced-vlr-079.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-081.xht s71-abs-pos-non-replaced-vlr-081.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-083.xht s71-abs-pos-non-replaced-vlr-083.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-085.xht s71-abs-pos-non-replaced-vlr-085.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-087.xht s71-abs-pos-non-replaced-vlr-087.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-089.xht s71-abs-pos-non-replaced-vlr-089.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-091.xht s71-abs-pos-non-replaced-vlr-091.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-093.xht s71-abs-pos-non-replaced-vlr-093.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-095.xht s71-abs-pos-non-replaced-vlr-095.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-097.xht s71-abs-pos-non-replaced-vlr-097.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-002.xht s71-abs-pos-non-replaced-vrl-002.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-004.xht s71-abs-pos-non-replaced-vrl-004.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-006.xht s71-abs-pos-non-replaced-vrl-006.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-008.xht s71-abs-pos-non-replaced-vrl-008.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-010.xht s71-abs-pos-non-replaced-vrl-010.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-012.xht s71-abs-pos-non-replaced-vrl-012.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-014.xht s71-abs-pos-non-replaced-vrl-014.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-016.xht s71-abs-pos-non-replaced-vrl-016.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-018.xht s71-abs-pos-non-replaced-vrl-018.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-020.xht s71-abs-pos-non-replaced-vrl-020.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-022.xht s71-abs-pos-non-replaced-vrl-022.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-024.xht s71-abs-pos-non-replaced-vrl-024.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-026.xht s71-abs-pos-non-replaced-vrl-026.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-028.xht s71-abs-pos-non-replaced-vrl-028.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-030.xht s71-abs-pos-non-replaced-vrl-030.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-032.xht s71-abs-pos-non-replaced-vrl-032.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-034.xht s71-abs-pos-non-replaced-vrl-034.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-036.xht s71-abs-pos-non-replaced-vrl-036.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-038.xht s71-abs-pos-non-replaced-vrl-038.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-040.xht s71-abs-pos-non-replaced-vrl-040.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-042.xht s71-abs-pos-non-replaced-vrl-042.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-044.xht s71-abs-pos-non-replaced-vrl-044.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-046.xht s71-abs-pos-non-replaced-vrl-046.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-048.xht s71-abs-pos-non-replaced-vrl-048.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-050.xht s71-abs-pos-non-replaced-vrl-050.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-052.xht s71-abs-pos-non-replaced-vrl-052.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-054.xht s71-abs-pos-non-replaced-vrl-054.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-056.xht s71-abs-pos-non-replaced-vrl-056.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-058.xht s71-abs-pos-non-replaced-vrl-058.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-060.xht s71-abs-pos-non-replaced-vrl-060.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-062.xht s71-abs-pos-non-replaced-vrl-062.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-064.xht s71-abs-pos-non-replaced-vrl-064.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-066.xht s71-abs-pos-non-replaced-vrl-066.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-068.xht s71-abs-pos-non-replaced-vrl-068.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-070.xht s71-abs-pos-non-replaced-vrl-070.xht +fails fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) == s71-abs-pos-non-replaced-vrl-072.xht s71-abs-pos-non-replaced-vrl-072.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-074.xht s71-abs-pos-non-replaced-vrl-074.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-076.xht s71-abs-pos-non-replaced-vrl-076.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-078.xht s71-abs-pos-non-replaced-vrl-078.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-080.xht s71-abs-pos-non-replaced-vrl-080.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-082.xht s71-abs-pos-non-replaced-vrl-082.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-084.xht s71-abs-pos-non-replaced-vrl-084.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-086.xht s71-abs-pos-non-replaced-vrl-086.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-088.xht s71-abs-pos-non-replaced-vrl-088.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-090.xht s71-abs-pos-non-replaced-vrl-090.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-092.xht s71-abs-pos-non-replaced-vrl-092.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-094.xht s71-abs-pos-non-replaced-vrl-094.xht +fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vrl-096.xht s71-abs-pos-non-replaced-vrl-096.xht + +== 1183431-orthogonal-modes-1a.html 1183431-orthogonal-modes-1a.html +== 1183431-orthogonal-modes-1b.html 1183431-orthogonal-modes-1b.html +== 1183431-orthogonal-modes-1c.html 1183431-orthogonal-modes-1c.html +== 1183431-orthogonal-modes-2a.html 1183431-orthogonal-modes-2a.html +== 1183431-orthogonal-modes-2b.html 1183431-orthogonal-modes-2b.html +== 1183431-orthogonal-modes-2c.html 1183431-orthogonal-modes-2c.html +== 1183431-orthogonal-modes-3a.html 1183431-orthogonal-modes-3a.html +== 1183431-orthogonal-modes-3b.html 1183431-orthogonal-modes-3b.html +== 1183431-orthogonal-modes-3c.html 1183431-orthogonal-modes-3c.html +== 1183431-orthogonal-modes-4a.html 1183431-orthogonal-modes-4a.html +== 1183431-orthogonal-modes-4b.html 1183431-orthogonal-modes-4b.html +== 1183431-orthogonal-modes-4c.html 1183431-orthogonal-modes-4c.html +== 1183431-orthogonal-modes-5a.html 1183431-orthogonal-modes-5a.html +== 1183431-orthogonal-modes-5b.html 1183431-orthogonal-modes-5b.html +== 1183431-orthogonal-modes-5c.html 1183431-orthogonal-modes-5c.html +== 1183431-orthogonal-modes-6a.html 1183431-orthogonal-modes-6a.html +# bug 1191801 +== 1183431-orthogonal-modes-6b.html 1183431-orthogonal-modes-6b.html +== 1183431-orthogonal-modes-6c.html 1183431-orthogonal-modes-6c.html +== 1183431-orthogonal-modes-7a.html 1183431-orthogonal-modes-7a.html +== 1183431-orthogonal-modes-7b.html 1183431-orthogonal-modes-7b.html +== 1183431-orthogonal-modes-7c.html 1183431-orthogonal-modes-7c.html +== 1183431-orthogonal-modes-8a.html 1183431-orthogonal-modes-8a.html +# bug 1191801 +== 1183431-orthogonal-modes-8b.html 1183431-orthogonal-modes-8b.html +== 1183431-orthogonal-modes-8c.html 1183431-orthogonal-modes-8c.html diff --git a/layout/reftests/writing-mode/abspos/reftest.list b/layout/reftests/writing-mode/abspos/reftest.list new file mode 100644 index 000000000..204ab825a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/reftest.list @@ -0,0 +1,128 @@ +# This directory contains tests for position:absolute and vertical writing modes. +# (See bug 1079151 for the origin of these testcases by Gérard Talbot.) + +# All of these are fuzzy-if on skia content on OS X due to subpixel text positioning. +# Frequent Windows 7 load failed: timed out waiting for test to complete (waiting for onload scripts to complete), bug 1167155 and friends +# Even though the whole reftest.list here is skipped, it doesn't actually work because reftests match the last +# **-if, which means even though we tried to skip this list,the fuzzy-if still matched forcing us to run the test. +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-003.xht s71-abs-pos-non-replaced-vlr-003-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-005.xht s71-abs-pos-non-replaced-vlr-005-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-007.xht s71-abs-pos-non-replaced-vlr-007-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-009.xht s71-abs-pos-non-replaced-vlr-009-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-011.xht s71-abs-pos-non-replaced-vlr-011-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-013.xht s71-abs-pos-non-replaced-vlr-013-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-015.xht s71-abs-pos-non-replaced-vlr-015-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-017.xht s71-abs-pos-non-replaced-vlr-017-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-019.xht s71-abs-pos-non-replaced-vlr-019-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-021.xht s71-abs-pos-non-replaced-vlr-021-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-023.xht s71-abs-pos-non-replaced-vlr-023-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-025.xht s71-abs-pos-non-replaced-vlr-025-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-027.xht s71-abs-pos-non-replaced-vlr-027-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-029.xht s71-abs-pos-non-replaced-vlr-029-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-031.xht s71-abs-pos-non-replaced-vlr-031-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-033.xht s71-abs-pos-non-replaced-vlr-033-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-035.xht s71-abs-pos-non-replaced-vlr-035-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-037.xht s71-abs-pos-non-replaced-vlr-037-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-039.xht s71-abs-pos-non-replaced-vlr-039-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-041.xht s71-abs-pos-non-replaced-vlr-041-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-043.xht s71-abs-pos-non-replaced-vlr-043-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-045.xht s71-abs-pos-non-replaced-vlr-045-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-047.xht s71-abs-pos-non-replaced-vlr-047-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-049.xht s71-abs-pos-non-replaced-vlr-049-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-051.xht s71-abs-pos-non-replaced-vlr-051-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-053.xht s71-abs-pos-non-replaced-vlr-053-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-055.xht s71-abs-pos-non-replaced-vlr-055-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-057.xht s71-abs-pos-non-replaced-vlr-057-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-059.xht s71-abs-pos-non-replaced-vlr-059-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-061.xht s71-abs-pos-non-replaced-vlr-061-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-063.xht s71-abs-pos-non-replaced-vlr-063-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-065.xht s71-abs-pos-non-replaced-vlr-065-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-067.xht s71-abs-pos-non-replaced-vlr-067-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-069.xht s71-abs-pos-non-replaced-vlr-069-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-071.xht s71-abs-pos-non-replaced-vlr-071-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-073.xht s71-abs-pos-non-replaced-vlr-073-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-075.xht s71-abs-pos-non-replaced-vlr-075-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-077.xht s71-abs-pos-non-replaced-vlr-077-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-079.xht s71-abs-pos-non-replaced-vlr-079-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-081.xht s71-abs-pos-non-replaced-vlr-081-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-083.xht s71-abs-pos-non-replaced-vlr-083-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-085.xht s71-abs-pos-non-replaced-vlr-085-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-087.xht s71-abs-pos-non-replaced-vlr-087-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-089.xht s71-abs-pos-non-replaced-vlr-089-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-091.xht s71-abs-pos-non-replaced-vlr-091-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-093.xht s71-abs-pos-non-replaced-vlr-093-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-095.xht s71-abs-pos-non-replaced-vlr-095-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vlr-097.xht s71-abs-pos-non-replaced-vlr-097-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-002.xht s71-abs-pos-non-replaced-vrl-002-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-004.xht s71-abs-pos-non-replaced-vrl-004-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-006.xht s71-abs-pos-non-replaced-vrl-006-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-008.xht s71-abs-pos-non-replaced-vrl-008-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-010.xht s71-abs-pos-non-replaced-vrl-010-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-012.xht s71-abs-pos-non-replaced-vrl-012-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-014.xht s71-abs-pos-non-replaced-vrl-014-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-016.xht s71-abs-pos-non-replaced-vrl-016-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-018.xht s71-abs-pos-non-replaced-vrl-018-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-020.xht s71-abs-pos-non-replaced-vrl-020-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-022.xht s71-abs-pos-non-replaced-vrl-022-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-024.xht s71-abs-pos-non-replaced-vrl-024-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-026.xht s71-abs-pos-non-replaced-vrl-026-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-028.xht s71-abs-pos-non-replaced-vrl-028-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-030.xht s71-abs-pos-non-replaced-vrl-030-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-032.xht s71-abs-pos-non-replaced-vrl-032-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-034.xht s71-abs-pos-non-replaced-vrl-034-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-036.xht s71-abs-pos-non-replaced-vrl-036-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-038.xht s71-abs-pos-non-replaced-vrl-038-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-040.xht s71-abs-pos-non-replaced-vrl-040-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-042.xht s71-abs-pos-non-replaced-vrl-042-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-044.xht s71-abs-pos-non-replaced-vrl-044-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-046.xht s71-abs-pos-non-replaced-vrl-046-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-048.xht s71-abs-pos-non-replaced-vrl-048-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-050.xht s71-abs-pos-non-replaced-vrl-050-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-052.xht s71-abs-pos-non-replaced-vrl-052-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-054.xht s71-abs-pos-non-replaced-vrl-054-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-056.xht s71-abs-pos-non-replaced-vrl-056-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-058.xht s71-abs-pos-non-replaced-vrl-058-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-060.xht s71-abs-pos-non-replaced-vrl-060-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-062.xht s71-abs-pos-non-replaced-vrl-062-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-064.xht s71-abs-pos-non-replaced-vrl-064-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-066.xht s71-abs-pos-non-replaced-vrl-066-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-068.xht s71-abs-pos-non-replaced-vrl-068-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-070.xht s71-abs-pos-non-replaced-vrl-070-ref.xht +fuzzy-if(cocoaWidget,118,242) fuzzy-if(winWidget,116,240) fuzzy-if(skiaContent,154,320) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-072.xht s71-abs-pos-non-replaced-vrl-072-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-074.xht s71-abs-pos-non-replaced-vrl-074-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-076.xht s71-abs-pos-non-replaced-vrl-076-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-078.xht s71-abs-pos-non-replaced-vrl-078-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-080.xht s71-abs-pos-non-replaced-vrl-080-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-082.xht s71-abs-pos-non-replaced-vrl-082-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-084.xht s71-abs-pos-non-replaced-vrl-084-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-086.xht s71-abs-pos-non-replaced-vrl-086-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-088.xht s71-abs-pos-non-replaced-vrl-088-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-090.xht s71-abs-pos-non-replaced-vrl-090-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-092.xht s71-abs-pos-non-replaced-vrl-092-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-094.xht s71-abs-pos-non-replaced-vrl-094-ref.xht +fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == s71-abs-pos-non-replaced-vrl-096.xht s71-abs-pos-non-replaced-vrl-096-ref.xht + +== 1183431-orthogonal-modes-1a.html 1183431-orthogonal-modes-1-ref.html +== 1183431-orthogonal-modes-1b.html 1183431-orthogonal-modes-1-ref.html +== 1183431-orthogonal-modes-1c.html 1183431-orthogonal-modes-1-ref.html +== 1183431-orthogonal-modes-2a.html 1183431-orthogonal-modes-2-ref.html +== 1183431-orthogonal-modes-2b.html 1183431-orthogonal-modes-2-ref.html +== 1183431-orthogonal-modes-2c.html 1183431-orthogonal-modes-2-ref.html +== 1183431-orthogonal-modes-3a.html 1183431-orthogonal-modes-3-ref.html +== 1183431-orthogonal-modes-3b.html 1183431-orthogonal-modes-3-ref.html +== 1183431-orthogonal-modes-3c.html 1183431-orthogonal-modes-3-ref.html +== 1183431-orthogonal-modes-4a.html 1183431-orthogonal-modes-4-ref.html +== 1183431-orthogonal-modes-4b.html 1183431-orthogonal-modes-4-ref.html +== 1183431-orthogonal-modes-4c.html 1183431-orthogonal-modes-4-ref.html +== 1183431-orthogonal-modes-5a.html 1183431-orthogonal-modes-5-ref.html +== 1183431-orthogonal-modes-5b.html 1183431-orthogonal-modes-5-ref.html +== 1183431-orthogonal-modes-5c.html 1183431-orthogonal-modes-5-ref.html +fails == 1183431-orthogonal-modes-6a.html 1183431-orthogonal-modes-6-ref.html # bug 1191801 +== 1183431-orthogonal-modes-6b.html 1183431-orthogonal-modes-6-ref.html +== 1183431-orthogonal-modes-6c.html 1183431-orthogonal-modes-6-ref.html +== 1183431-orthogonal-modes-7a.html 1183431-orthogonal-modes-7-ref.html +== 1183431-orthogonal-modes-7b.html 1183431-orthogonal-modes-7-ref.html +== 1183431-orthogonal-modes-7c.html 1183431-orthogonal-modes-7-ref.html +fails == 1183431-orthogonal-modes-8a.html 1183431-orthogonal-modes-8-ref.html # bug 1191801 +== 1183431-orthogonal-modes-8b.html 1183431-orthogonal-modes-8-ref.html +== 1183431-orthogonal-modes-8c.html 1183431-orthogonal-modes-8-ref.html diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht new file mode 100644 index 000000000..c301c0c10 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht new file mode 100644 index 000000000..8d310eeb0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-003.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht new file mode 100644 index 000000000..8b7840656 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht new file mode 100644 index 000000000..492f8b863 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-005.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto', then set 'left' to the static position, the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht new file mode 100644 index 000000000..ed3c87a81 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007-ref.xht @@ -0,0 +1,57 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht new file mode 100644 index 000000000..ab3234854 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-007.xht @@ -0,0 +1,125 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht new file mode 100644 index 000000000..ec7fafe59 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht new file mode 100644 index 000000000..0787fb621 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-009.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht new file mode 100644 index 000000000..6299224f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht new file mode 100644 index 000000000..7a5bf63c4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-011.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto', then set 'right' to the static position, the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto: set to static position + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto: set to static position + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht new file mode 100644 index 000000000..a05914e70 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht new file mode 100644 index 000000000..7d098c917 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-013.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht new file mode 100644 index 000000000..f1e1acad9 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht new file mode 100644 index 000000000..d69a507aa --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-015.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' are 'auto' and bottom is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht new file mode 100644 index 000000000..733b9a04b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht new file mode 100644 index 000000000..b2408a91f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-017.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 2em; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht new file mode 100644 index 000000000..f90551d4c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019-ref.xht @@ -0,0 +1,57 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht new file mode 100644 index 000000000..49a8929d8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-019.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht new file mode 100644 index 000000000..d29d7f4d0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht new file mode 100644 index 000000000..1a0d096d2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-021.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht new file mode 100644 index 000000000..3d3d2af3f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht new file mode 100644 index 000000000..b3e430fb0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-023.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 2em; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht new file mode 100644 index 000000000..86f4555e8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht new file mode 100644 index 000000000..9b1288566 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-025.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' are 'auto' and bottom is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht new file mode 100644 index 000000000..0c725e83a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + color: transparent; + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht new file mode 100644 index 000000000..df3640a6f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-027.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht new file mode 100644 index 000000000..dd7458329 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht new file mode 100644 index 000000000..63ab36c27 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-029.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'left' to the static position and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht new file mode 100644 index 000000000..c9b7f5ed5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031-ref.xht @@ -0,0 +1,57 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht new file mode 100644 index 000000000..209aec746 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-031.xht @@ -0,0 +1,101 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht new file mode 100644 index 000000000..5342e9c3d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht new file mode 100644 index 000000000..5e4be1bf0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-033.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht new file mode 100644 index 000000000..91a8a0263 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht new file mode 100644 index 000000000..5ae49beb3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-035.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'right' to the static position and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht new file mode 100644 index 000000000..81debc1f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht new file mode 100644 index 000000000..da548931e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-037.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht new file mode 100644 index 000000000..82ea1a041 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht new file mode 100644 index 000000000..15570b21a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-039.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht new file mode 100644 index 000000000..13c6d126f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht new file mode 100644 index 000000000..fcc17fe5d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-041.xht @@ -0,0 +1,111 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 80px : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht new file mode 100644 index 000000000..44d3b928e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht new file mode 100644 index 000000000..11c90eaa3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-043.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht new file mode 100644 index 000000000..b3a420fc3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht new file mode 100644 index 000000000..090e26a86 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-045.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht new file mode 100644 index 000000000..8434ecf3a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht new file mode 100644 index 000000000..9cafed71d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-047.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht new file mode 100644 index 000000000..be5d151be --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht new file mode 100644 index 000000000..044c563c2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-049.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht new file mode 100644 index 000000000..0bde1b19e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht new file mode 100644 index 000000000..a038a9003 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-051.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht new file mode 100644 index 000000000..53a92cddc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht new file mode 100644 index 000000000..973798a09 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-053.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 1em; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed left value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht new file mode 100644 index 000000000..8ad2c61a4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht new file mode 100644 index 000000000..d0da9d3c2 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-055.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht new file mode 100644 index 000000000..367d88847 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht new file mode 100644 index 000000000..e951bafb0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-057.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht new file mode 100644 index 000000000..ddb9b1f9b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht new file mode 100644 index 000000000..d2ea5fc06 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-059.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left', then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 1em; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +4.'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed left value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht new file mode 100644 index 000000000..2a4e3e845 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht new file mode 100644 index 000000000..45c8e0dc6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-061.xht @@ -0,0 +1,101 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht new file mode 100644 index 000000000..d19612ac3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht new file mode 100644 index 000000000..600a84523 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-063.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht new file mode 100644 index 000000000..3a7b02a8e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht new file mode 100644 index 000000000..ecfd274cb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-065.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + height: 1em; + left: 2em; + position: absolute; + right: 1em; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (solve) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right: auto + ===================== + 320px : width of containing block + +And so computed width value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht new file mode 100644 index 000000000..d40647476 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht new file mode 100644 index 000000000..f84cb9075 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-067.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht new file mode 100644 index 000000000..0b0d583d1 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht new file mode 100644 index 000000000..150f7dbf6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-069.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht new file mode 100644 index 000000000..d088c8ee0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht new file mode 100644 index 000000000..b92e70f1e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-071.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + height: 1em; + left: 2em; + position: absolute; + right: 1em; + width: auto; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (solve) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed width value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht new file mode 100644 index 000000000..f82d8e3ef --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht new file mode 100644 index 000000000..844d3dfde --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-073.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht new file mode 100644 index 000000000..a058a2c79 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht new file mode 100644 index 000000000..34afe6930 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-075.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht new file mode 100644 index 000000000..0ebbc59ee --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht new file mode 100644 index 000000000..7680949ae --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-077.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht new file mode 100644 index 000000000..808cdb1a6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht new file mode 100644 index 000000000..689863c43 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-079.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht new file mode 100644 index 000000000..9af8baad5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht new file mode 100644 index 000000000..4605260c7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-081.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht new file mode 100644 index 000000000..646241b50 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht new file mode 100644 index 000000000..f98e85320 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-083.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'" /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht new file mode 100644 index 000000000..1f1afd43d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht new file mode 100644 index 000000000..774e54dbc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-085.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht new file mode 100644 index 000000000..e9cdcfce1 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht new file mode 100644 index 000000000..c12bda239 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-087.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-003-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht new file mode 100644 index 000000000..9ba99e984 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht new file mode 100644 index 000000000..c5367dbbe --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-089.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained), then ignore 'right' and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 2em; + margin-left: 0em; + margin-right: 0em; + position: absolute; + right: 2em; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + 160px : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht new file mode 100644 index 000000000..61be51411 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht new file mode 100644 index 000000000..0217c3d48 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-091.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-007-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht new file mode 100644 index 000000000..9248a251e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht new file mode 100644 index 000000000..97d9ea47e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-093.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht new file mode 100644 index 000000000..f89ea7b47 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht new file mode 100644 index 000000000..d8f913f9d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-095.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are not 'auto' and if the values are overconstrained, then ignore 'left' and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 2em; + margin-left: 0em; + margin-right: 0em; + position: absolute; + right: 2em; + width: 1em; + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + +/* +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht new file mode 100644 index 000000000..54c01741a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht new file mode 100644 index 000000000..1c6055fbb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vlr-097.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-013-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-lr; + -webkit-writing-mode: vertical-lr; + writing-mode: tb-lr; /* IE11 */ + writing-mode: vertical-lr; + } + + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht new file mode 100644 index 000000000..fd594c18e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht new file mode 100644 index 000000000..b8f23b411 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-002.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 160px : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht new file mode 100644 index 000000000..3c242a069 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004-ref.xht @@ -0,0 +1,49 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title> + + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht new file mode 100644 index 000000000..a261ae81a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-004.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are 'auto', then set 'left' to the static position, the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht new file mode 100644 index 000000000..0db069725 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht new file mode 100644 index 000000000..80e097a70 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-006.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are 'auto', then set 'top' to the static position, the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht new file mode 100644 index 000000000..01f86da91 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht new file mode 100644 index 000000000..b24e2703b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-008.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht new file mode 100644 index 000000000..6299224f3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht new file mode 100644 index 000000000..e9afe99c0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-010.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are 'auto', then set 'right' to the static position, the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto: set to static position + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto: set to static position + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht new file mode 100644 index 000000000..f2a3e2453 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht new file mode 100644 index 000000000..0deb42565 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-012.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto', then set 'bottom' to the static position, the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If all three of 'left', 'width', and 'right' are 'auto': First set any 'auto' values for 'margin-left' and 'margin-right' to 0. Then, if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position and apply rule number three below; otherwise, set 'right' to the static position and apply rule number one below. + +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht new file mode 100644 index 000000000..0891c22a0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht new file mode 100644 index 000000000..b8ae0f1c7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-014.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' are 'auto' and bottom is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht new file mode 100644 index 000000000..733b9a04b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht new file mode 100644 index 000000000..fa57900a5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-016.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 2em; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht new file mode 100644 index 000000000..bb5775c58 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht new file mode 100644 index 000000000..da299956d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-018.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht new file mode 100644 index 000000000..a0efd3188 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht new file mode 100644 index 000000000..a49d25445 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-020.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht new file mode 100644 index 000000000..3d3d2af3f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht new file mode 100644 index 000000000..29fbe27c5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-022.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width becomes shrink-to-fit and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 2em; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht new file mode 100644 index 000000000..686407dc3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht new file mode 100644 index 000000000..d55f12573 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-024.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content and then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: auto; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +1. 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht new file mode 100644 index 000000000..2133c6f33 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht new file mode 100644 index 000000000..df66a1e66 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-026.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht new file mode 100644 index 000000000..dd7458329 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht new file mode 100644 index 000000000..0a2cea204 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-028.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'left' to the static position and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 160px : left: auto: set to static position + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht new file mode 100644 index 000000000..87e733bb7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht new file mode 100644 index 000000000..df20ebeee --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-030.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top: auto: set to static position + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht new file mode 100644 index 000000000..74a173cae --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht new file mode 100644 index 000000000..c721a93be --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-032.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht new file mode 100644 index 000000000..91a8a0263 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht new file mode 100644 index 000000000..f0fb04539 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-034.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' and 'right' are 'auto' and 'width' is not 'auto', then set 'right' to the static position and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right: auto: set to static position + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht new file mode 100644 index 000000000..25bbb01fe --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht new file mode 100644 index 000000000..c4569c581 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-036.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' and 'bottom' are 'auto' and 'height' is not 'auto', then set 'top' to static position and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +2. 'left' and 'right' are 'auto' and 'width' is not 'auto', then if the 'direction' property of the element establishing the static-position containing block is 'ltr' set 'left' to the static position, otherwise set 'right' to the static position. Then solve for 'left' (if 'direction is 'rtl') or 'right' (if 'direction' is 'ltr'). +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom: auto: set to static position + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht new file mode 100644 index 000000000..cc9fbebec --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht new file mode 100644 index 000000000..62e9059a6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-038.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht new file mode 100644 index 000000000..13c6d126f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht new file mode 100644 index 000000000..13ffffc5b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-040.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 80px : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht new file mode 100644 index 000000000..203611921 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht new file mode 100644 index 000000000..a20a1c8b6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-042.xht @@ -0,0 +1,122 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht new file mode 100644 index 000000000..daaaab6bb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht new file mode 100644 index 000000000..9dc62d894 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-044.xht @@ -0,0 +1,118 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht new file mode 100644 index 000000000..8434ecf3a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht new file mode 100644 index 000000000..27d388d8e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-046.xht @@ -0,0 +1,110 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width becomes shrink-to-fit and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +gives us: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : (shrink-to-fit) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht new file mode 100644 index 000000000..259199912 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht new file mode 100644 index 000000000..3bf09d48e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-048.xht @@ -0,0 +1,123 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the height is based on the content and then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: auto; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit . Then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +gives us: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : (based on the content) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht new file mode 100644 index 000000000..8d8a4f938 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht new file mode 100644 index 000000000..44a10f668 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-050.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht new file mode 100644 index 000000000..53a92cddc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht new file mode 100644 index 000000000..2ef2c95cf --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-052.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 1em; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed left value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht new file mode 100644 index 000000000..8abe49109 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht new file mode 100644 index 000000000..e2baabfd3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-054.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht new file mode 100644 index 000000000..15ecf8331 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht new file mode 100644 index 000000000..00d2d7223 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-056.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht new file mode 100644 index 000000000..ddb9b1f9b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht new file mode 100644 index 000000000..81392b524 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-058.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left', then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: auto; + position: absolute; + right: 1em; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +4.'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + (solve) : left: auto + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed left value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht new file mode 100644 index 000000000..35d6b307a --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht new file mode 100644 index 000000000..ff2f8bc7e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-060.xht @@ -0,0 +1,101 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top' is 'auto' and 'height' and 'bottom' are not 'auto', then solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 1em; + color: green; + height: 1em; + position: absolute; + top: auto; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +4. 'left' is 'auto', 'width' and 'right' are not 'auto', then solve for 'left' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + (solve) : top: auto + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 160px . +*/ + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht new file mode 100644 index 000000000..ce2cf8b47 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht new file mode 100644 index 000000000..2fbfbfa53 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-062.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht new file mode 100644 index 000000000..3a7b02a8e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht new file mode 100644 index 000000000..6b747031b --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-064.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + height: 1em; + left: 2em; + position: absolute; + right: 1em; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (solve) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed width value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht new file mode 100644 index 000000000..dbb96bd05 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht new file mode 100644 index 000000000..1c5a37ceb --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-066.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht new file mode 100644 index 000000000..f40e41b05 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht new file mode 100644 index 000000000..071ce34d7 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-068.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht new file mode 100644 index 000000000..d088c8ee0 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht new file mode 100644 index 000000000..469b3c4f8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-070.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + height: 1em; + left: 2em; + position: absolute; + right: 1em; + width: auto; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + (solve) : width: auto + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 80px : right + ===================== + 320px : width of containing block + +And so computed width value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht new file mode 100644 index 000000000..d164df55f --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht new file mode 100644 index 000000000..1092601e4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-072.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then solve for 'height'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: green; + bottom: 1em; + height: auto; + position: absolute; + top: 2em; + width: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + (solve) : height: auto + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 80px : bottom + ===================== + 320px : height of containing block + +And so computed height value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span></span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht new file mode 100644 index 000000000..ffffeddf8 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht new file mode 100644 index 000000000..5e9d9588d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-074.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht new file mode 100644 index 000000000..0ebbc59ee --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht new file mode 100644 index 000000000..b64c33c91 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-076.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht new file mode 100644 index 000000000..85972a314 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht new file mode 100644 index 000000000..824f438dc --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-078.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht new file mode 100644 index 000000000..ab013a575 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht new file mode 100644 index 000000000..ed644247c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-080.xht @@ -0,0 +1,96 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht new file mode 100644 index 000000000..646241b50 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht new file mode 100644 index 000000000..22e8ddfe6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-082.xht @@ -0,0 +1,88 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right'" /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 1em; + position: absolute; + right: auto; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 80px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right: auto + ===================== + 320px : width of containing block + +And so computed right value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht new file mode 100644 index 000000000..a733a84e3 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht new file mode 100644 index 000000000..9a4129279 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-084.xht @@ -0,0 +1,100 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto'</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'bottom' is 'auto' and 'top' and 'height' are not 'auto', then solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: auto; + color: green; + height: 1em; + position: absolute; + top: 1em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +6. 'right' is 'auto', 'left' and 'width' are not 'auto', then solve for 'right' +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 80px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom: auto + ===================== + 320px : height of containing block + +And so computed bottom value must be 160px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht new file mode 100644 index 000000000..92ac87b32 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht new file mode 100644 index 000000000..6b45920bd --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-086.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-002-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht new file mode 100644 index 000000000..9ba99e984 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht new file mode 100644 index 000000000..2c959917d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-088.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'left', 'width' and 'right' are not 'auto' (overconstrained), then ignore 'right' and then solve for 'right'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 2em; + margin-left: 0em; + margin-right: 0em; + position: absolute; + right: 2em; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + 160px : left + + + 0px : margin-left + + + 0px : border-left-width + + + 0px : padding-left + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + (solve) : right + ===================== + 320px : width of containing block + +And so computed right value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht new file mode 100644 index 000000000..6fa438f0c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 2em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht new file mode 100644 index 000000000..e3671d95c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-090.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-006-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'ltr' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'bottom' and solve for 'bottom'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-3row-320x320.png"); + color: transparent; + direction: ltr; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + (solve) : bottom + ===================== + 320px : height of containing block + +And so computed bottom value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht new file mode 100644 index 000000000..328354de5 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht new file mode 100644 index 000000000..ff547dc1c --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-092.xht @@ -0,0 +1,120 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-004-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht new file mode 100644 index 000000000..f89ea7b47 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094-ref.xht @@ -0,0 +1,48 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 1em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht new file mode 100644 index 000000000..581b2962d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-094.xht @@ -0,0 +1,112 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'left', 'width' and 'right' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vlr-009-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'left', 'width' and 'right' are not 'auto' and if the values are overconstrained, then ignore 'left' and then solve for 'left'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + div#containing-block + { + background: red url("support/bg-red-2col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + left: 2em; + margin-left: 0em; + margin-right: 0em; + position: absolute; + right: 2em; + width: 1em; + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + +/* +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block + +So: + + 160px : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +gives us: + + (solve) : left + + + 0px : margin-left + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : width + + + 0px : padding-right + + + 0px : border-right-width + + + 0px : margin-right + + + 160px : right + ===================== + 320px : width of containing block + +And so computed left value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht new file mode 100644 index 000000000..165a00e35 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096-ref.xht @@ -0,0 +1,56 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto'</title> + + + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + -ah-writing-mode: initial; + -webkit-writing-mode: initial; + writing-mode: initial; + direction: ltr; + color: transparent; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + color: green; + position: absolute; + left: 2em; top: 1em; + } + + + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht new file mode 100644 index 000000000..9d426e20d --- /dev/null +++ b/layout/reftests/writing-mode/abspos/s71-abs-pos-non-replaced-vrl-096.xht @@ -0,0 +1,124 @@ +<!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 Writing Modes Test: absolutely positioned non-replaced element - 'direction: rtl' and 'top', 'height' and 'bottom' are not 'auto' (overconstrained)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" /> + <link rel="match" href="s71-abs-pos-non-replaced-vrl-012-ref.xht" /> + + <meta name="flags" content="ahem image" /> + <meta name="assert" content="When 'direction' is 'rtl' and 'top', 'height' and 'bottom' are not 'auto' and if the values are overconstrained, then ignore 'top' and solve for 'top'." /> + + <link type="text/css" rel="stylesheet" href="support/ahem.css" /> + + <style type="text/css"><![CDATA[ + html + { + -ah-writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; + writing-mode: tb-rl; /* IE11 */ + writing-mode: vertical-rl; + } + + div#containing-block + { + background: red url("support/bg-red-3col-2row-320x320.png"); + color: transparent; + direction: rtl; + font: 80px/1 Ahem; + height: 320px; + position: relative; + width: 320px; + } + + div#containing-block > span + { + background-color: red; + bottom: 2em; + color: green; + height: 1em; + margin-bottom: 0em; + margin-top: 0em; + position: absolute; + top: 2em; + } + +/* +" +Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes. +" +7.1 Principles of Layout in Vertical Writing Modes +http://www.w3.org/TR/css-writing-modes-3/#vertical-layout + +So here, *-top and *-bottom properties are input into the §10.3.7 algorithms where *-top properties refer to *-left properties in the layout rules and where *-bottom properties refer to *-right properties in the layout rules. + +" +If none of the three is 'auto': If both 'margin-left' and 'margin-right' are 'auto', solve the equation under the extra constraint that the two margins get equal values, unless this would make them negative, in which case when direction of the containing block is 'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and solve for 'margin-right' ('margin-left'). If one of 'margin-left' or 'margin-right' is 'auto', solve the equation for that value. If the values are over-constrained, ignore the value for 'left' (in case the 'direction' property of the containing block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for that value. +" + +'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block + +So: + + 160px : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +gives us: + + (solve) : top + + + 0px : margin-top + + + 0px : border-top-width + + + 0px : padding-top + + + 80px : height + + + 0px : padding-bottom + + + 0px : border-bottom-width + + + 0px : margin-bottom + + + 160px : bottom + ===================== + 320px : height of containing block + +And so computed top value must be 80px . +*/ + + ]]></style> + + </head> + + <body> + + <p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p> + + <div id="containing-block">1 2 34<span>X</span></div> + + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/writing-mode/abspos/support/Ahem.ttf b/layout/reftests/writing-mode/abspos/support/Ahem.ttf Binary files differnew file mode 100644 index 000000000..ac81cb031 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/Ahem.ttf diff --git a/layout/reftests/writing-mode/abspos/support/ahem.css b/layout/reftests/writing-mode/abspos/support/ahem.css new file mode 100644 index 000000000..2d07a1d56 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/ahem.css @@ -0,0 +1,4 @@ +@font-face { + font-family: Ahem; + src: url("Ahem.ttf"); +} diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png Binary files differnew file mode 100644 index 000000000..4f354e935 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/bg-red-2col-2row-320x320.png diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png Binary files differnew file mode 100644 index 000000000..6eded69a4 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/bg-red-2col-3row-320x320.png diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png Binary files differnew file mode 100644 index 000000000..5f4b53c46 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/bg-red-3col-2row-320x320.png diff --git a/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png b/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png Binary files differnew file mode 100644 index 000000000..4c2f6c8e6 --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/bg-red-3col-3row-320x320.png diff --git a/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png b/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png Binary files differnew file mode 100644 index 000000000..15fd6065e --- /dev/null +++ b/layout/reftests/writing-mode/abspos/support/pass-cdts-abs-pos-non-replaced.png |