dynamic-viewBox-change-02.svg 821 B

12345678910111213141516171819202122232425
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait"
  6. id="target" viewBox="-50 -50 20 20"
  7. preserveAspectRatio="none">
  8. <script>
  9. function doTest() {
  10. var target = document.getElementById("target");
  11. target.setAttribute("viewBox", "");
  12. document.documentElement.removeAttribute("class");
  13. }
  14. document.addEventListener("MozReftestInvalidate", doTest, false);
  15. </script>
  16. <!-- Lime background to match pass.svg -->
  17. <rect height="100%" width="100%" fill="lime"/>
  18. <!-- Offscreen red rect - the initial |viewBox| makes this visible,
  19. but it shouldn't be visible after we clear that attribute: -->
  20. <rect x="-50" y="-50" width="20" height="20" fill="red"/>
  21. </svg>