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 /layout/reftests/stylesheet-cloning | |
parent | Initial commit. (diff) | |
download | firefox-upstream/124.0.1.tar.xz firefox-upstream/124.0.1.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
11 files changed, 106 insertions, 0 deletions
diff --git a/layout/reftests/stylesheet-cloning/counter-style-rule-clone.html b/layout/reftests/stylesheet-cloning/counter-style-rule-clone.html new file mode 100644 index 0000000000..ed3ec81e74 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/counter-style-rule-clone.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }"> +<link rel="stylesheet" href="data:text/css,@counter-style a { system: fixed; symbols: A B C D; suffix: '' }"> +<link rel="stylesheet" href="test-common.css"> +<ol style="list-style-type: a"> + <li><li><li><li><li> +</ol> +<script> + onload = function() { + var links = document.getElementsByTagName("link"); + links[0].sheet.cssRules[0].symbols = "\u25F0 \u25F1 \u25F2 \u25F3"; + } +</script>
\ No newline at end of file diff --git a/layout/reftests/stylesheet-cloning/glyphs-ref.html b/layout/reftests/stylesheet-cloning/glyphs-ref.html new file mode 100644 index 0000000000..f8acbd27d3 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/glyphs-ref.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<link rel="stylesheet" href="ref-common.css"> +<!-- list-style-type: a --> +<div>A</div> +<div>B</div> +<div>C</div> +<div>D</div> +<div>5</div> diff --git a/layout/reftests/stylesheet-cloning/importrule.css b/layout/reftests/stylesheet-cloning/importrule.css new file mode 100644 index 0000000000..25ccf7a26a --- /dev/null +++ b/layout/reftests/stylesheet-cloning/importrule.css @@ -0,0 +1 @@ +@import url(chrome:///browser/skin/); diff --git a/layout/reftests/stylesheet-cloning/insert-after-clone.html b/layout/reftests/stylesheet-cloning/insert-after-clone.html new file mode 100644 index 0000000000..e47a389f7d --- /dev/null +++ b/layout/reftests/stylesheet-cloning/insert-after-clone.html @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<title>Test insert rule after clone</title> +<link rel=stylesheet href="importrule.css"> +<link id="two" rel=stylesheet href="importrule.css"> +<body onload="run()"> +<script> +function run() { + document.getElementById("two").sheet.insertRule("div { color: green}", 1); +} +</script> +<div>This should be green</div> diff --git a/layout/reftests/stylesheet-cloning/media-rule-clone.html b/layout/reftests/stylesheet-cloning/media-rule-clone.html new file mode 100644 index 0000000000..b7a3264083 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/media-rule-clone.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}"> +<link rel="stylesheet" href="data:text/css,@media all {div { color: green; }}"> +<div>This should be green</div> +<script> + onload = function() { + var links = document.getElementsByTagName("link"); + links[0].sheet.cssRules[0].cssRules[0].style.color = "red"; + } +</script> diff --git a/layout/reftests/stylesheet-cloning/ref-common.css b/layout/reftests/stylesheet-cloning/ref-common.css new file mode 100644 index 0000000000..92d77de0e5 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/ref-common.css @@ -0,0 +1,12 @@ +body { + /* to match ua.css, see bug 1020143 */ + font-variant-numeric: tabular-nums; +} +div, p { + padding: 0; margin: 0; + line-height: 150%; + float: left; +} +p { + padding-right: .5em; +} diff --git a/layout/reftests/stylesheet-cloning/reftest.list b/layout/reftests/stylesheet-cloning/reftest.list new file mode 100644 index 0000000000..08c4c515d1 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/reftest.list @@ -0,0 +1,6 @@ +== counter-style-rule-clone.html glyphs-ref.html # passes trivially +# because "Dynamic change on @counter-style not yet supported" +== media-rule-clone.html shouldbegreen-ref.html +== insert-after-clone.html shouldbegreen-ref.html +== style-rule-clone.html shouldbegreen-ref.html +== supports-rule-clone.html shouldbegreen-ref.html diff --git a/layout/reftests/stylesheet-cloning/shouldbegreen-ref.html b/layout/reftests/stylesheet-cloning/shouldbegreen-ref.html new file mode 100644 index 0000000000..cd4a755bb7 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/shouldbegreen-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<style> +div { + color: green; +} +</style> +<div>This should be green</div> diff --git a/layout/reftests/stylesheet-cloning/style-rule-clone.html b/layout/reftests/stylesheet-cloning/style-rule-clone.html new file mode 100644 index 0000000000..898199e5b5 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/style-rule-clone.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="stylesheet" href="data:text/css,div { color: green }"> +<link rel="stylesheet" href="data:text/css,div { color: green }"> +<div>This should be green</div> +<script> + onload = function() { + var links = document.getElementsByTagName("link"); + links[0].sheet.cssRules[0].style.color = "red"; + } +</script> diff --git a/layout/reftests/stylesheet-cloning/supports-rule-clone.html b/layout/reftests/stylesheet-cloning/supports-rule-clone.html new file mode 100644 index 0000000000..6edaee2b6d --- /dev/null +++ b/layout/reftests/stylesheet-cloning/supports-rule-clone.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}"> +<link rel="stylesheet" href="data:text/css,@supports (color: green) {div { color: green; }}"> +<div>This should be green</div> +<script> + onload = function() { + var links = document.getElementsByTagName("link"); + links[0].sheet.cssRules[0].cssRules[0].style.color = "red"; + } +</script> diff --git a/layout/reftests/stylesheet-cloning/test-common.css b/layout/reftests/stylesheet-cloning/test-common.css new file mode 100644 index 0000000000..dcbf4e1e02 --- /dev/null +++ b/layout/reftests/stylesheet-cloning/test-common.css @@ -0,0 +1,18 @@ +body { + /* to match ua.css, see bug 1020143 */ + font-variant-numeric: tabular-nums; +} +ol, ul, section, p { + padding: 0; margin: 0; + line-height: 150%; +} +ol, ul { + list-style-position: inside; +} +li, p { + float: left; + padding: 0; +} +p { + padding-right: .5em; +} |