layout/reftests/svg/text/dynamic-multiple-x.svg

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     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" class="reftest-wait" style="font: 16px sans-serif">
     6   <text x="100 150 200 250" y="50"><tspan>12</tspan>34</text>
     7   <text x="100 150 200 250" y="100"><tspan display="none">12</tspan>34</text>
     8   <text x="100 150 200 250" y="150">34</text>
     9   <text x="100 150 200 250" y="200">34</text>
    10   <text x="100 150 200 250 300 350" y="250"><tspan>12</tspan>56</text>
    11   <text x="100 150 200 250 300 350" y="300"><tspan>12</tspan>56</text>
    12   <text x="100 150 200 250" y="350"><tspan display="none"/>34</text>
    14   <script>
    15     function newTSpan(s) {
    16       var e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
    17       e.textContent = s;
    18       return e;
    19     }
    21     function f() {
    22       window.removeEventListener("MozAfterPaint", f);
    24       var t = document.getElementsByTagName("text");
    25       var e;
    27       t[0].removeChild(t[0].firstChild);
    29       t[1].removeChild(t[1].firstChild);
    31       e = newTSpan("12");
    32       t[2].insertBefore(e, t[2].firstChild);
    34       e = newTSpan("12");
    35       e.setAttribute("display", "none");
    36       t[3].insertBefore(e, t[3].firstChild);
    38       e = newTSpan("34");
    39       t[4].firstChild.appendChild(e);
    41       e = newTSpan("34");
    42       e.setAttribute("display", "none");
    43       t[5].firstChild.appendChild(e);
    45       e = newTSpan("12");
    46       t[6].firstChild.appendChild(e);
    48       setTimeout(function() {
    49         document.documentElement.removeAttribute("class");
    50       }, 0);
    51     }
    53     window.addEventListener("MozAfterPaint", f, false);
    54   </script>
    55 </svg>

mercurial