540247-1.xul 1009 B

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0"?>
  2. <window id="Test for bug 540247" title="Testcase" class="reftest-wait"
  3. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  4. <script><![CDATA[
  5. document.addEventListener("MozReftestInvalidate", runtest, false);
  6. function runtest() {
  7. // Make sure that the effects of the scroll are painted to the screen before
  8. // shrinking the size of the scrolled frame.
  9. window.addEventListener("MozAfterPaint", finish, false);
  10. var sbo = document.getElementById('s').boxObject;
  11. sbo.scrollTo(0, 1000);
  12. }
  13. function finish() {
  14. document.getElementById('b').height = '100';
  15. document.documentElement.className = "";
  16. }
  17. ]]>
  18. </script>
  19. <scrollbox id="s" height="200" style="overflow: scroll;">
  20. <vbox>
  21. <vbox height="150" width="200" style="background: red;" id="b"/>
  22. <vbox height="150" width="200" style="background: green;"/>
  23. <vbox height="150" width="200" style="background: blue;"/>
  24. <label value="a"/>
  25. </vbox>
  26. </scrollbox>
  27. </window>