summaryrefslogtreecommitdiffstats
path: root/layout/reftests/image-element/mozsetimageelement-02.html
blob: d8ec098fcb6ecfb5c5d6ba985d6f95238b4e4abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/licenses/publicdomain/

     Test that document.mozSetImageElement() after a paint causes a repaint.
-->
<!DOCTYPE html>
<html class="reftest-wait">
<body style="background-image: -moz-element(#e)">

<div style="overflow:hidden; height:0;">
  <div id="e" style="width: 50px; height: 50px; background: red;"></div>
  <div id="white" style="width: 50px; height: 50px; background: white;"></div>
</div>

<script>

window.addEventListener("MozReftestInvalidate", function () {
  document.mozSetImageElement("e", document.getElementById("white"));
  document.documentElement.className = "";
});

</script>
</body>
</html>