diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/forms/input/checkbox | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/forms/input/checkbox')
30 files changed, 466 insertions, 0 deletions
diff --git a/layout/reftests/forms/input/checkbox/checkbox-baseline-ref.html b/layout/reftests/forms/input/checkbox/checkbox-baseline-ref.html new file mode 100644 index 0000000000..14af30f29a --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-baseline-ref.html @@ -0,0 +1,39 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> + <head> + <meta charset="utf-8"> + <title>Reference: baseline of checkbox/radio</title> + <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322698"> + <style> +body { font: 16px/1 monospace; } + +div { border: 1px dashed blue; } + +x { + display:inline-block; + margin: 20px; + border: 25px solid black; + width:0; + height:0; +} + + </style> + </head> + <body> + <div><x style="border:unset; outline: 10px solid"></x>Block</div> + <div><x style="border:unset; outline: 1px solid"></x>Block</div> + <div><x></x>Block</div> + <div><x></x>Block</div> + <div><x></x>Block</div> + <div><x></x>Block</div> + <div><x style="border:0; margin:0; width:20px; height:20px; background:pink"></x>Block</div> + <div><x style="border:0; margin:0; width:20px; height:20px; background:black"></x>Block</div> + <div><x style="border:0; margin:0; width:20px; height:20px; background:pink"></x>Block</div> + <div><x style="border:0; margin:0; width:20px; height:20px; background:black"></x>Block</div> + <div style="font-size:72px"><x style="border-width:3px"></x>Block</div> + </body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-baseline.html b/layout/reftests/forms/input/checkbox/checkbox-baseline.html new file mode 100644 index 0000000000..c133d703a8 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-baseline.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> + <head> + <meta charset="utf-8"> + <title>CSS Align Test: baseline of checkbox/radio</title> + <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322698"> + <link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-terms"> + <link rel="match" href="checkbox-baseline-ref.html"> + <style> +body { font: 16px/1 monospace; } + +div { border: 1px dashed blue; } + +.none { + -moz-appearance: none; appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + width:0px; + height:0px; +} +.intrinsic { width:unset; height:unset; } +.border { border: 25px solid black; } +input { margin: 20px; } + + </style> + </head> + <body> + <div><input class="none intrinsic" type="checkbox" style="background:pink; outline:10px solid black">Block</div> + <div><input class="none intrinsic" type="radio" style="background:pink; outline:1px solid black">Block</div> + <div><input class="none intrinsic border" type="checkbox">Block</div> + <div><input class="none intrinsic border" type="radio">Block</div> + <div><input class="none border" type="checkbox">Block</div> + <div><input class="none border" type="radio">Block</div> + <div><input class="none" style="margin:0; width:20px; height:20px; background-color:pink" type="checkbox" checked>Block</div> + <div><input class="none" style="margin:0; width:20px; height:20px; background-color:black" type="checkbox">Block</div> + <div><input class="none" style="margin:0; width:20px; height:20px; background-color:pink" type="radio" checked>Block</div> + <div><input class="none" style="margin:0; width:20px; height:20px; background-color:black" type="radio">Block</div> + <div style="font-size:72px"><input class="none border" type="checkbox" style="border-width:3px">Block</div> + </body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-clamp-01-ref.html b/layout/reftests/forms/input/checkbox/checkbox-clamp-01-ref.html new file mode 100644 index 0000000000..10489b1546 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-clamp-01-ref.html @@ -0,0 +1,13 @@ +<style> + div { + top: 50px; + line-height: 0px; + position: relative; + } +</style> + +<div> + <input type="checkbox"> + <input type="checkbox" checked> +</div> + diff --git a/layout/reftests/forms/input/checkbox/checkbox-clamp-01.html b/layout/reftests/forms/input/checkbox/checkbox-clamp-01.html new file mode 100644 index 0000000000..b88cba3baf --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-clamp-01.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> + <head> + <meta charset="utf-8"> + <title>Test clamping width/height of checkbox.</title> + <link rel="author" title="Louis Chang" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1400050"> + <link rel="match" href="checkbox-clamp-ref.html"> + </head> + <style> +div { + position: relative; + line-height: 0px; +} + </style> + <body> + <div> + <input type="checkbox"> + <input type="checkbox" checked> + </div> + <script> + // If we grow the checkbox vertically, horizontal size shouldn't change, + // instead it should be centered vertically. We grow it by a hundred + // pixels, and the reference positions it manually at 50px, which is where + // it should end up. + for (let input of document.querySelectorAll("input")) { + input.style.height = (100 + input.getBoundingClientRect().height) + "px"; + } + </script> + </body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-clamp-02-ref.html b/layout/reftests/forms/input/checkbox/checkbox-clamp-02-ref.html new file mode 100644 index 0000000000..c806075fb7 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-clamp-02-ref.html @@ -0,0 +1,37 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Testcase for bug 1405986</title> + <style type="text/css"> +html,body { + color: black; + background-color: white; + font: 16px/1 monospace; + padding: 0; + margin: 0; +} + +.grid { + display: inline-grid; + grid: 100px / 40px 40px; + border: 1px solid; + vertical-align: top; + justify-items: start; +} + +input { + margin: 0; +} + </style> +</head> +<body> + <div class="grid"> + <input type=checkbox style="align-self: center"> + <input type=checkbox checked style="align-self: center"> + </div> +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-clamp-02.html b/layout/reftests/forms/input/checkbox/checkbox-clamp-02.html new file mode 100644 index 0000000000..bc764e6ead --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-clamp-02.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Testcase for bug 1405986</title> + <style type="text/css"> +html,body { + color: black; + background-color: white; + font: 16px/1 monospace; + padding: 0; + margin: 0; +} + +.grid { + display: inline-grid; + grid: 100px / 40px 40px; + border: 1px solid; + vertical-align: top; + justify-items: start; +} + +input { + margin: 0; +} + </style> +</head> +<body> + <div class="grid"> + <input type=checkbox style="height: 100px"> + <input type=checkbox checked style="height: 100px"> + </div> +</body> +</html> + diff --git a/layout/reftests/forms/input/checkbox/checkbox-minimum-size-notref.html b/layout/reftests/forms/input/checkbox/checkbox-minimum-size-notref.html new file mode 100644 index 0000000000..bb32658de2 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-minimum-size-notref.html @@ -0,0 +1,2 @@ +<input type="checkbox"> +<input type="checkbox" checked> diff --git a/layout/reftests/forms/input/checkbox/checkbox-minimum-size.html b/layout/reftests/forms/input/checkbox/checkbox-minimum-size.html new file mode 100644 index 0000000000..667a6dce2d --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-minimum-size.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> + <head> + <meta charset="utf-8"> + <title>Test minimum size of checkbox.</title> + <link rel="author" title="Louise Chang" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1404770"> + <link rel="match" href="checkbox-minimum-size-ref.html"> + <style type="text/css"> +input { + height: 0px; +} + </style> + </head> + <body> + <input type="checkbox"> + <input type="checkbox" checked> + </body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-radio-auto-sized-ref.html b/layout/reftests/forms/input/checkbox/checkbox-radio-auto-sized-ref.html new file mode 100644 index 0000000000..d68a05c524 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-radio-auto-sized-ref.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Reference for bug 1344395</title> + <style type="text/css"> + +input { + width: 11px; + height: 11px; +} + + </style> +</head> +<body> + +<input type="checkbox"> +<input type="radio"> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-radio-color-ref.html b/layout/reftests/forms/input/checkbox/checkbox-radio-color-ref.html new file mode 100644 index 0000000000..bca16269d2 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-radio-color-ref.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Reference for bug 1338293</title> + <style type="text/css"> + +.none { + display:inline-block; + width:0; height:0; margin:0; +} + +.b { border: 20px solid; } +.o { outline: 20px solid; } + + </style> +</head> +<body> + +<span class="none b" type="checkbox"></span> +<span class="none o" type="checkbox"></span> + +<span class="none b" type="radio"></span> +<span class="none o" type="radio"></span> + +<div style="color:green"> +<span class="none b" type="checkbox"></span> +<span class="none o" type="checkbox"></span> + +<span class="none b" type="radio"></span> +<span class="none o" type="radio"></span> +</div> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checkbox-radio-color.html b/layout/reftests/forms/input/checkbox/checkbox-radio-color.html new file mode 100644 index 0000000000..f157874da4 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checkbox-radio-color.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Testcase for bug 1338293</title> + <style type="text/css"> + +.none { + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + width:0; height:0; margin:0; +} + +.b { border: 20px solid; } +.o { outline: 20px solid; } + + </style> +</head> +<body> + +<input class="none b" type="checkbox"> +<input class="none o" type="checkbox"> + +<input class="none b" type="radio"> +<input class="none o" type="radio"> + +<div style="color:green"> +<input class="none b" type="checkbox"> +<input class="none o" type="checkbox"> + +<input class="none b" type="radio"> +<input class="none o" type="radio"> +</div> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/checked-appearance-none.html b/layout/reftests/forms/input/checkbox/checked-appearance-none.html new file mode 100644 index 0000000000..b7d6511358 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checked-appearance-none.html @@ -0,0 +1,2 @@ +<!doctype html> +<input type="checkbox" style="-moz-appearance:none" checked> diff --git a/layout/reftests/forms/input/checkbox/checked-native-notref.html b/layout/reftests/forms/input/checkbox/checked-native-notref.html new file mode 100644 index 0000000000..921482afcd --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checked-native-notref.html @@ -0,0 +1,2 @@ +<!doctype html> +<input type="checkbox"> diff --git a/layout/reftests/forms/input/checkbox/checked-native.html b/layout/reftests/forms/input/checkbox/checked-native.html new file mode 100644 index 0000000000..50faa46d2d --- /dev/null +++ b/layout/reftests/forms/input/checkbox/checked-native.html @@ -0,0 +1,2 @@ +<!doctype html> +<input type="checkbox" checked> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-checked-notref.html b/layout/reftests/forms/input/checkbox/indeterminate-checked-notref.html new file mode 100644 index 0000000000..37ea176550 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-checked-notref.html @@ -0,0 +1 @@ +<input type="checkbox" checked style="-moz-appearance: none;"> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-checked.html b/layout/reftests/forms/input/checkbox/indeterminate-checked.html new file mode 100644 index 0000000000..7cecf09a04 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-checked.html @@ -0,0 +1 @@ +<input type="checkbox" id="s" checked style="-moz-appearance: none;"><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-native-checked-notref.html b/layout/reftests/forms/input/checkbox/indeterminate-native-checked-notref.html new file mode 100644 index 0000000000..cf16667cbf --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-native-checked-notref.html @@ -0,0 +1 @@ +<input type="checkbox" checked> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-native-checked.html b/layout/reftests/forms/input/checkbox/indeterminate-native-checked.html new file mode 100644 index 0000000000..91097098ce --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-native-checked.html @@ -0,0 +1 @@ +<input type="checkbox" id="s" checked><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked-notref.html b/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked-notref.html new file mode 100644 index 0000000000..74c06d2536 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked-notref.html @@ -0,0 +1 @@ +<input type="checkbox"> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked.html b/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked.html new file mode 100644 index 0000000000..11832f4779 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-native-unchecked.html @@ -0,0 +1 @@ +<input type="checkbox" id="s"><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-selector-ref.html b/layout/reftests/forms/input/checkbox/indeterminate-selector-ref.html new file mode 100644 index 0000000000..02266912a3 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-selector-ref.html @@ -0,0 +1,7 @@ +<style> +#s { + margin: 50px; +} +</style> + +<input type="checkbox" id="s"><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-selector.html b/layout/reftests/forms/input/checkbox/indeterminate-selector.html new file mode 100644 index 0000000000..eb23819f9d --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-selector.html @@ -0,0 +1,7 @@ +<style> +#s:indeterminate { + margin: 50px; +} +</style> + +<input type="checkbox" id="s"><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-unchecked-notref.html b/layout/reftests/forms/input/checkbox/indeterminate-unchecked-notref.html new file mode 100644 index 0000000000..1055cbef14 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-unchecked-notref.html @@ -0,0 +1 @@ +<input type="checkbox" style="-moz-appearance: none;"> diff --git a/layout/reftests/forms/input/checkbox/indeterminate-unchecked.html b/layout/reftests/forms/input/checkbox/indeterminate-unchecked.html new file mode 100644 index 0000000000..56a8d0955a --- /dev/null +++ b/layout/reftests/forms/input/checkbox/indeterminate-unchecked.html @@ -0,0 +1 @@ +<input type="checkbox" id="s" style="-moz-appearance: none;"><script>document.getElementById("s").indeterminate = true;</script> diff --git a/layout/reftests/forms/input/checkbox/label-dynamic-ref.html b/layout/reftests/forms/input/checkbox/label-dynamic-ref.html new file mode 100644 index 0000000000..3dbdc48d46 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/label-dynamic-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<style type="text/css"> + +#c3, #c4 { + display: none; +} + +label[for="c1"], +label[for="c3"] { + background-color: yellow; +} + +</style> + +</head> + +<body> + +<div><input type="checkbox" name="test" id="c1" checked><label for="c1">check #c1</label></div> +<div><input type="checkbox" name="test" id="c2"><label for="c2">check #c2</label></div> +<div><input type="checkbox" name="test" id="c3" checked><label for="c3">check #c3</label></div> +<div><input type="checkbox" name="test" id="c4"><label for="c4">check #c4</label></div> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/label-dynamic.html b/layout/reftests/forms/input/checkbox/label-dynamic.html new file mode 100644 index 0000000000..cbbce68177 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/label-dynamic.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> +<style type="text/css"> + +#c3, #c4 { + display: none; +} + +input:checked + label { + background-color: yellow; +} + +</style> + +<script type="text/javascript"> + +function toggleAllCheckboxes() +{ + for (var i = 1; i <= 4; ++i) { + var cb = document.getElementById('c'+i); + cb.checked = !cb.checked; + } +} + +</script> +</head> + +<body onload="toggleAllCheckboxes();"> + +<div><input type="checkbox" name="test" id="c1"><label for="c1">check #c1</label></div> +<div><input type="checkbox" name="test" id="c2" checked><label for="c2">check #c2</label></div> +<div><input type="checkbox" name="test" id="c3"><label for="c3">check #c3</label></div> +<div><input type="checkbox" name="test" id="c4" checked><label for="c4">check #c4</label></div> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/radio-stretched-ref.html b/layout/reftests/forms/input/checkbox/radio-stretched-ref.html new file mode 100644 index 0000000000..2f2532c0b4 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/radio-stretched-ref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<body> + +<form> + <input type="checkbox"/> + <input type="radio"/> +</form> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/radio-stretched.html b/layout/reftests/forms/input/checkbox/radio-stretched.html new file mode 100644 index 0000000000..159a2cc920 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/radio-stretched.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<body> + +<form> + <input type="checkbox" style="width: auto;"> + <input type="radio" style="width: auto;"> +</form> + +</body> +</html> diff --git a/layout/reftests/forms/input/checkbox/reftest.list b/layout/reftests/forms/input/checkbox/reftest.list new file mode 100644 index 0000000000..766d0efbbd --- /dev/null +++ b/layout/reftests/forms/input/checkbox/reftest.list @@ -0,0 +1,18 @@ +== label-dynamic.html label-dynamic-ref.html +== radio-stretched.html radio-stretched-ref.html # test for bug 464589 +!= checked-native.html checked-native-notref.html +== checked-appearance-none.html about:blank +== unchecked-appearance-none.html about:blank +!= checked-native.html about:blank +!= checked-native-notref.html about:blank +== indeterminate-checked.html about:blank +== indeterminate-checked-notref.html about:blank +== indeterminate-unchecked.html about:blank +!= indeterminate-native-checked.html indeterminate-native-checked-notref.html +!= indeterminate-native-unchecked.html indeterminate-native-unchecked-notref.html +== indeterminate-selector.html indeterminate-selector-ref.html +== checkbox-baseline.html checkbox-baseline-ref.html +== checkbox-radio-color.html checkbox-radio-color-ref.html +== checkbox-clamp-01.html checkbox-clamp-01-ref.html +== checkbox-clamp-02.html checkbox-clamp-02-ref.html +!= checkbox-minimum-size.html checkbox-minimum-size-notref.html diff --git a/layout/reftests/forms/input/checkbox/unchecked-appearance-none.html b/layout/reftests/forms/input/checkbox/unchecked-appearance-none.html new file mode 100644 index 0000000000..8e5b55cfb7 --- /dev/null +++ b/layout/reftests/forms/input/checkbox/unchecked-appearance-none.html @@ -0,0 +1,2 @@ +<!doctype html> +<input type="checkbox" style="-moz-appearance:none"> |