layout/reftests/svg/outer-svg-border-and-padding-01.svg

Thu, 15 Jan 2015 21:13:52 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:13:52 +0100
branch
TOR_BUG_9701
changeset 12
7540298fafa1
permissions
-rw-r--r--

Remove forgotten relic of ABI crash risk averse overloaded method change.

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" version="1.1" class="reftest-wait"
michael@0 6 style="border: 10px solid lime; padding: 10px; background: lime;">
michael@0 7 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=490003 -->
michael@0 8 <title>Test that invalidation takes account of outer-&lt;svg&gt; border/padding</title>
michael@0 9 <desc>
michael@0 10 This test checks that SVG implementations take account of border and
michael@0 11 padding on outer &lt;svg&gt; when doing invalidation.
michael@0 12 </desc>
michael@0 13
michael@0 14 <filter id="identity">
michael@0 15 <feColorMatrix type="saturate" in="SourceGraphic"/>
michael@0 16 </filter>
michael@0 17
michael@0 18 <script type="text/javascript">//<![CDATA[
michael@0 19
michael@0 20 function hide_red_rects()
michael@0 21 {
michael@0 22 var background = document.getElementById("background");
michael@0 23
michael@0 24 document.getElementById('r').setAttribute('opacity','0');
michael@0 25 document.getElementById('f').setAttribute('opacity','0');
michael@0 26
michael@0 27 <!-- top left -->
michael@0 28 document.elementFromPoint(121, 121).setAttribute('opacity','0');
michael@0 29 <!-- bottom right -->
michael@0 30 document.elementFromPoint(269, 169).setAttribute('opacity','0');
michael@0 31
michael@0 32 <!-- outside top left -->
michael@0 33 if (document.elementFromPoint(119, 119) != background) {
michael@0 34 background.setAttribute("fill", "red");
michael@0 35 }
michael@0 36 <!-- outside bottom right -->
michael@0 37 if (document.elementFromPoint(271, 171) != background) {
michael@0 38 background.setAttribute("fill", "purple");
michael@0 39 }
michael@0 40
michael@0 41 document.documentElement.removeAttribute('class');
michael@0 42 }
michael@0 43
michael@0 44 document.addEventListener("MozReftestInvalidate", hide_red_rects, false);
michael@0 45 setTimeout(hide_red_rects, 4000); // fallback for running outside reftest
michael@0 46
michael@0 47 //]]>
michael@0 48 </script>
michael@0 49
michael@0 50 <!-- to catch misses-->
michael@0 51 <rect id="background" width="100%" height="100%" fill="lime"/>
michael@0 52
michael@0 53 <rect id="r" width="50" height="50" fill="red"/>
michael@0 54 <rect id="f" y="100" width="50" height="50" fill="red"/>
michael@0 55
michael@0 56 <rect x="100" y="100" width="50" height="50" fill="red"/>
michael@0 57 <rect x="200" y="100" width="50" height="50" fill="red"/>
michael@0 58 </svg>

mercurial