Bug 1649121: part 48) Rename `MakeEmpty` in `ContentIteratorBase::InitInternal`....
[gecko.git] / layout / reftests / svg / dynamic-use-04.svg
blob71f96472f38c901eef72d1f9d7aca17d8ac27db2
1 <!--
2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
4 -->
5 <svg xmlns="http://www.w3.org/2000/svg"
6 xmlns:xlink="http://www.w3.org/1999/xlink"
7 style="background: red;" class="reftest-wait">
8 <defs>
9 <rect fill="lime" width="100%" height="100%" id="r"/>
10 </defs>
11 <use id="u" xlink:href="#r" width="0" />
12 <script type="text/javascript">
13 <![CDATA[
15 document.addEventListener("MozReftestInvalidate", doTest, false);
16 setTimeout(doTest, 4000); // fallback for running outside reftest
18 function doTest() {
19 // Since the <use> does not reference an <svg> or <symbol>, the value
20 // of its 'width' attribute is ignored except to disable/enable its
21 // rendering by setting it to zero/non-zero. Setting it to a non-zero
22 // value here should show the entire referenced <rect>. See
23 // http://www.w3.org/TR/SVG11/struct.html#UseElement
24 var u = document.getElementById("u");
25 u.setAttribute("width", "1");
26 document.documentElement.removeAttribute('class');
29 ]]>
30 </script>
31 </svg>