1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/svg/foreignObject-move-repaint-01.svg Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<svg xmlns="http://www.w3.org/2000/svg" 1.9 + xmlns:html="http://www.w3.org/1999/xhtml" 1.10 + class="reftest-wait"> 1.11 + 1.12 + <title>Testcase for repaint of the area previously covered by a foreignObject</title> 1.13 + 1.14 + <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=369992 --> 1.15 + 1.16 + <script type="application/javascript"> 1.17 + 1.18 +// The green rect is initially covered by the red div. After the div 1.19 +// has rendered the foreignObject (and thus div) is moved out 1.20 +// of the viewport which should then be filled by the green rect as a result. 1.21 + 1.22 + document.addEventListener("MozReftestInvalidate", doTest, false); 1.23 + setTimeout(doTest, 4000); // fallback for running outside reftest 1.24 + 1.25 + function doTest() { 1.26 + document.getElementById('fo').setAttribute('y', '100%'); 1.27 + 1.28 + document.documentElement.removeAttribute('class'); 1.29 + } 1.30 + </script> 1.31 + 1.32 + <rect width="100%" height="100%" fill="red"/> 1.33 + 1.34 + <!-- Create the "pass" rect using a foreignObject so the testcase doesn't 1.35 + seem to pass if foreignObject is not supported --> 1.36 + <foreignObject width="100%" height="100%"> 1.37 + <html:div style="display:block;width:100%;height:100%;background:lime;"/> 1.38 + </foreignObject> 1.39 + 1.40 + <foreignObject id="fo" width="100%" height="100%"> 1.41 + <html:div style="display:block;width:100%;height:100%;background:red;"/> 1.42 + </foreignObject> 1.43 + 1.44 +</svg>