mask-invalidation-2a.html (1009B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Masking: mask invalidation.</title> 6 <style type="text/css"> 7 div.outer { 8 position: absolute; 9 background-color: purple; 10 border: solid purple; 11 width: 10px; 12 height: 10px; 13 transform: scale(20); 14 transform-origin: top left; 15 } 16 17 div.mask { 18 mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 10 10"><rect x="10" y="10" width="5" height="5" fill="black"/></svg>'); 19 } 20 21 </style> 22 </head> 23 <body> 24 <div id="d1" class="outer mask"></div> 25 <script type="text/javascript"> 26 function changeTransform() 27 { 28 document.getElementById("d1").style.transform = "scale(10)"; 29 document.documentElement.removeAttribute("class"); 30 } 31 32 document.addEventListener("MozReftestInvalidate", 33 changeTransform); 34 </script> 35 </body> 36 </html>