layout/reftests/svg/dynamic-switch-01.svg

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <?xml version="1.0"?>
     2 <!--
     3      Any copyright is dedicated to the Public Domain.
     4      http://creativecommons.org/publicdomain/zero/1.0/
     5 -->
     6 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" onload="m();">
     7 	<title>Testcase for dynamic switch changes</title>
     8 	<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=409383 -->
     9 	<script>
    10 		function m() {
    11 		var svgns = "http://www.w3.org/2000/svg";
    13 		var rect1 = document.getElementById("rect1");
    14 		rect1.parentNode.removeChild(rect1);
    16 		var rect2a = document.createElementNS(svgns, "rect");
    17 		rect2a.setAttribute("x", "200");
    18 		rect2a.setAttribute("y", "100");
    19 		rect2a.setAttribute("width", "50");
    20 		rect2a.setAttribute("height", "50")
    21 		rect2a.setAttribute("fill", "lime");
    22 		var rect2b = document.getElementById("rect2b");
    23 		rect2b.parentNode.insertBefore(rect2a, rect2b);
    25 		var rect3a = document.getElementById("rect3a");
    26 		var rect3b = document.getElementById("rect3b");
    27 		rect3a.parentNode.insertBefore(rect3a, rect3b);
    29 		var rect4a = document.getElementById("rect4a");
    30 		rect4a.setAttribute("systemLanguage", "foo");
    31 		}
    32 	</script>
    34 	<rect width="100%" height="100%" fill="lime"/>
    36 	<switch>
    37         <!-- test removing first child -->
    38 		<rect id="rect1" x="50" y="100" width="50" height="50" fill="red"/>
    39 		<rect x="50" y="100" width="50" height="50" fill="lime"/>
    40 		<rect x="50" y="100" width="50" height="50" fill="red"/>
    41 	</switch>
    42 	<switch>
    43 		<!-- test adding first child -->
    44 		<rect id="rect2b" x="200" y="100" width="50" height="50" fill="red"/>
    45 	</switch>
    46 	<switch>
    47 		<!-- test change child order -->
    48 		<rect id="rect3b" x="50" y="200" width="50" height="50" fill="red"/>
    49 		<rect id="rect3a" x="50" y="200" width="50" height="50" fill="lime"/>
    50 	</switch>
    51 	<switch>
    52 		<!-- test change child attribute -->
    53 		<rect id="rect4a" x="200" y="200" width="50" height="50" fill="red"/>
    54 		<rect x="200" y="200" width="50" height="50" fill="lime"/>
    55 	</switch>
    56 </svg>

mercurial