diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-display/support | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-display/support')
-rw-r--r-- | testing/web-platform/tests/css/css-display/support/acid.css | 59 | ||||
-rw-r--r-- | testing/web-platform/tests/css/css-display/support/red-square.html | 5 | ||||
-rw-r--r-- | testing/web-platform/tests/css/css-display/support/swatch-orange.png | bin | 0 -> 84 bytes | |||
-rw-r--r-- | testing/web-platform/tests/css/css-display/support/util.js | 23 |
4 files changed, 87 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-display/support/acid.css b/testing/web-platform/tests/css/css-display/support/acid.css new file mode 100644 index 0000000000..62d1aca2e5 --- /dev/null +++ b/testing/web-platform/tests/css/css-display/support/acid.css @@ -0,0 +1,59 @@ +html, body { + color: black; + background-color: white; + font-size: 16px; + padding: 0; + margin: 0; +} + +body { color: red; } + +.table { + display: table; + border-collapse: collapse; + border: blue solid 1pt; +} + +.itable { display: inline-table; } +.caption { display: table-caption; } +.cell { + display: table-cell; + border: inherit; +} +.row { + display: table-row; + border: green dashed 1pt; +} +.rowg { display: table-row-group; } +.head { display: table-header-group; } +.foot { display: table-footer-group; } +.col { display: table-column; } +.colg { display: table-column-group; } +.flex { display: flex; } +.iflex { display: inline-flex; } +.li { display: list-item; } +.ib { display: inline-block; } +.inline { display: inline; } +.columns { columns: 2; height: 4em; } +.contents { + display: contents; + align-items: inherit; + justify-items:inherit; +} +.c1 { color: lime; } +.c2 { background: blue; color: pink; } +.c3 { color: teal; } +.c4 { color: green; } +.c5 { color: silver; } +.c6 { color: cyan; } +.c7 { color: magenta; } +.c8 { color: yellow; } +.c9 { color: grey; } +.c10{ color: black; } +.b { background: inherit; } + +/** This is the only difference between references and non-reference styles */ +.ref .c2 { background: transparent; } +.ref .b { background:blue; } +.ref div.contents { display: block; } +.ref span.contents { display: inline; } diff --git a/testing/web-platform/tests/css/css-display/support/red-square.html b/testing/web-platform/tests/css/css-display/support/red-square.html new file mode 100644 index 0000000000..e4e48ccfdc --- /dev/null +++ b/testing/web-platform/tests/css/css-display/support/red-square.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<style> + body { margin:0; } +</style> +<div id="square" style="width:100px; height:100px; background:red;"></div> diff --git a/testing/web-platform/tests/css/css-display/support/swatch-orange.png b/testing/web-platform/tests/css/css-display/support/swatch-orange.png Binary files differnew file mode 100644 index 0000000000..d3cd498b52 --- /dev/null +++ b/testing/web-platform/tests/css/css-display/support/swatch-orange.png diff --git a/testing/web-platform/tests/css/css-display/support/util.js b/testing/web-platform/tests/css/css-display/support/util.js new file mode 100644 index 0000000000..08024b52d5 --- /dev/null +++ b/testing/web-platform/tests/css/css-display/support/util.js @@ -0,0 +1,23 @@ +function eachDisplayContentsElementIn(document, window, callbackDo, callbackUndo) { + var elements = []; + + document.body.offsetHeight; + + // NOTE: Doing qsa('*') and getComputedStyle is just for the + // test's sake, since it's easier to mess it up when + // getComputedStyle is involved. + var all = document.querySelectorAll('*'); + for (var i = 0; i < all.length; ++i) { + if (window.getComputedStyle(all[i]).display === "contents") { + callbackDo(all[i]); + elements.push(all[i]); + } + } + + document.body.offsetHeight; + + for (var i = 0; i < elements.length; ++i) + callbackUndo(elements[i]); + + document.body.offsetHeight; +} |