diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-logical/reference | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-logical/reference')
5 files changed, 218 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html new file mode 100644 index 0000000000..0dac4c29b1 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<style> +body > div { width: 20em; margin: 1em; padding: 2px; border: 1px solid silver; } +div > div { margin: .5em; padding: .5em; background: yellow; } +.left { float: left; } +.right { float: right; } +.ltr { direction: ltr; } +.rtl { direction: rtl; } +</style> + +<body> +<div class="ltr"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. + <div class="left">Inline-start</div> + Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. + <div class="right">Inline-end</div> + Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +</div> + +<div class="rtl"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. + <div class="right">Inline-start</div> + Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. + <div class="left">Inline-end</div> + Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +</div> diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html new file mode 100644 index 0000000000..82bfcd2d36 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<style> +html { writing-mode: vertical-rl; } +body > div { height: 20em; margin: 1em; padding: 2px; border: 1px solid silver; } +div > div { margin: .5em; padding: .5em; background: yellow; } +.left { float: left; } +.right { float: right; } +.ltr { direction: ltr; } +.rtl { direction: rtl; } +</style> + +<body> +<div class="ltr"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. + <div class="left">Inline-start</div> + Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. + <div class="right">Inline-end</div> + Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +</div> + +<div class="rtl"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. + <div class="right">Inline-start</div> + Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. + <div class="left">Inline-end</div> + Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +</div> diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html new file mode 100644 index 0000000000..654afd856f --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<style> +body > div { width: 15em; height: 10em; margin: 1em; padding: 2px; border: 1px solid silver; } +div > div { margin: .5em; padding: .5em; background: yellow; } +.a { clear: left; } +.b { clear: right; } +.fl { float: left; height: 4em; } +.fr { float: right; height: 2em; } +.fl2 { float: left; height: 2em; } +.fr4 { float: right; height: 4em; } +.ltr { direction: ltr; } +.rtl { direction: rtl; } +</style> + +<body> +<div class="ltr"> + <div class="fl">Start</div> + <div class="fr">End</div> + <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p> +</div> + +<div class="ltr"> + <div class="fl">Start</div> + <div class="fr">End</div> + <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p> +</div> + +<div class="rtl"> + <div class="fl2">End</div> + <div class="fr4">Start</div> + <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p> +</div> + +<div class="rtl"> + <div class="fl2">End</div> + <div class="fr4">Start</div> + <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p> +</div> diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html new file mode 100644 index 0000000000..0c2065b3e9 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<style> +html { writing-mode: vertical-rl; } +body > div { height: 15em; width: 10em; margin: 1em; padding: 2px; border: 1px solid silver; } +div > div { margin: .5em; padding: .5em; background: yellow; } +.a { clear: left; } +.b { clear: right; } +.fl { float: left; width: 4em; } +.fr { float: right; width: 2em; } +.fl2 { float: left; width: 2em; } +.fr4 { float: right; width: 4em; } +.ltr { direction: ltr; } +.rtl { direction: rtl; } +</style> + +<body> +<div class="ltr"> + <div class="fl">Start</div> + <div class="fr">End</div> + <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start</p> +</div> + +<div class="ltr"> + <div class="fl">Start</div> + <div class="fr">End</div> + <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end</p> +</div> + +<div class="rtl"> + <div class="fl2">End</div> + <div class="fr4">Start</div> + <p class="b">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start</p> +</div> + +<div class="rtl"> + <div class="fl2">End</div> + <div class="fr4">Start</div> + <p class="a">a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end</p> +</div> diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html new file mode 100644 index 0000000000..28c275ebb3 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>CSS Reftest Reference</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" /> +<style> +.test { + display: block; + overflow: hidden; + width: 300px; +} +.inline { + display: inline; +} +.float, .clear { + display: block; + overflow: hidden; + height: 3px; + width: 100px; + background: #f0f; +} +.clear { + background: #0ff; +} +</style> +<body> +<script> +function physicalValue(value, containerDirection) { + return ((value === "inline-start") === (containerDirection === "ltr")) ? "left" : "right"; +} +const sides = ["inline-start", "inline-end"]; +const directions = ["ltr", "rtl"]; +for (const floatSide of sides) { + for (const clearSide of sides) { + for (const containerDirection of directions) { + for (const inlineParentDirection of [null, ...directions]) { + for (const floatDirection of directions) { + for (const clearDirection of directions) { + const containerEl = document.createElement("div"); + containerEl.className = "test"; + containerEl.style.direction = containerDirection; + const floatEl = document.createElement("div"); + floatEl.className = "float"; + floatEl.style.direction = floatDirection; + floatEl.style.float = physicalValue(floatSide, containerDirection); + const clearEl = document.createElement("div"); + clearEl.className = "clear"; + clearEl.style.direction = floatDirection; + clearEl.style.clear = physicalValue(clearSide, containerDirection); + if (inlineParentDirection) { + const inlineParent = document.createElement("div"); + inlineParent.className = "inline"; + inlineParent.style.direction = inlineParentDirection; + inlineParent.appendChild(floatEl); + inlineParent.appendChild(clearEl); + containerEl.appendChild(inlineParent); + } else { + containerEl.appendChild(floatEl); + containerEl.appendChild(clearEl); + } + document.body.appendChild(containerEl); + } + } + } + } + } +} +</script> +</body> |