summaryrefslogtreecommitdiffstats
path: root/layout/reftests/invalidation/mask-invalidation-1a.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/invalidation/mask-invalidation-1a.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.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/invalidation/mask-invalidation-1a.html')
-rw-r--r--layout/reftests/invalidation/mask-invalidation-1a.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/layout/reftests/invalidation/mask-invalidation-1a.html b/layout/reftests/invalidation/mask-invalidation-1a.html
new file mode 100644
index 0000000000..594cbbca8f
--- /dev/null
+++ b/layout/reftests/invalidation/mask-invalidation-1a.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Masking: mask invalidation.</title>
+ <style type="text/css">
+ div.outer {
+ background-color: purple;
+ position: absolute;
+ margin: 1px 2px 3px 4px;
+ border: solid purple;
+ width: 40px;
+ height: 20px;
+ }
+
+ div.mask {
+ mask-size: 100% 100%;
+ mask-origin: border-box;
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100%" height="50%" fill="blue" fill-opacity="1"/><rect x="0" y="50%" width="100%" height="50%" fill="blue" fill-opacity="0"/></svg>');
+ }
+
+ #d1 {
+ top: 10px;
+ left: 10px;
+ mask-clip: padding-box;
+ border-width: 10px;
+ padding: 0px;
+ }
+
+ #d2 {
+ top: 10px;
+ left: 110px;
+ mask-clip: padding-box;
+ border-width: 0px;
+ padding: 10px;
+ }
+
+ #d3 {
+ top: 15px;
+ left: 215px;
+ mask-clip: content-box;
+ border-width: 10px;
+ padding: 0px;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="d1" class="outer mask"></div>
+ <div id="d2" class="outer mask"></div>
+ <div id="d3" class="outer mask"></div>
+ <script type="text/javascript">
+ function invalidateMaskedElements()
+ {
+ // Shrink border area, thicken padding area. Keep ths size of this
+ // division unchanged.
+ document.getElementById("d1").style.borderWidth = "5px";
+ document.getElementById("d1").style.padding = "5px";
+
+ // Shrink padding area, thicken border area. Keep ths size of this
+ // division unchanged.
+ document.getElementById("d2").style.borderWidth = "5px";
+ document.getElementById("d2").style.padding = "5px";
+
+ // Shrink border area, thicken content area. Keep ths size of this
+ // division unchanged.
+ document.getElementById("d3").style.width = "50px";
+ document.getElementById("d3").style.height = "30px";
+ document.getElementById("d3").style.borderWidth = "0px";
+
+ document.documentElement.removeAttribute("class");
+ }
+
+ document.addEventListener("MozReftestInvalidate",
+ invalidateMaskedElements);
+ </script>
+ </body>
+</html>