layout/reftests/svg/foreignObject-move-repaint-01.svg

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <!--
michael@0 2 Any copyright is dedicated to the Public Domain.
michael@0 3 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 4 -->
michael@0 5 <svg xmlns="http://www.w3.org/2000/svg"
michael@0 6 xmlns:html="http://www.w3.org/1999/xhtml"
michael@0 7 class="reftest-wait">
michael@0 8
michael@0 9 <title>Testcase for repaint of the area previously covered by a foreignObject</title>
michael@0 10
michael@0 11 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=369992 -->
michael@0 12
michael@0 13 <script type="application/javascript">
michael@0 14
michael@0 15 // The green rect is initially covered by the red div. After the div
michael@0 16 // has rendered the foreignObject (and thus div) is moved out
michael@0 17 // of the viewport which should then be filled by the green rect as a result.
michael@0 18
michael@0 19 document.addEventListener("MozReftestInvalidate", doTest, false);
michael@0 20 setTimeout(doTest, 4000); // fallback for running outside reftest
michael@0 21
michael@0 22 function doTest() {
michael@0 23 document.getElementById('fo').setAttribute('y', '100%');
michael@0 24
michael@0 25 document.documentElement.removeAttribute('class');
michael@0 26 }
michael@0 27 </script>
michael@0 28
michael@0 29 <rect width="100%" height="100%" fill="red"/>
michael@0 30
michael@0 31 <!-- Create the "pass" rect using a foreignObject so the testcase doesn't
michael@0 32 seem to pass if foreignObject is not supported -->
michael@0 33 <foreignObject width="100%" height="100%">
michael@0 34 <html:div style="display:block;width:100%;height:100%;background:lime;"/>
michael@0 35 </foreignObject>
michael@0 36
michael@0 37 <foreignObject id="fo" width="100%" height="100%">
michael@0 38 <html:div style="display:block;width:100%;height:100%;background:red;"/>
michael@0 39 </foreignObject>
michael@0 40
michael@0 41 </svg>

mercurial