1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
3 <!--======================================================================-->
4 <!--= Copyright 2000, 2002 World Wide Web Consortium, (Massachusetts =-->
5 <!--= Institute of Technology, Institut National de Recherche en =-->
6 <!--= Informatique et en Automatique, Keio University). All Rights =-->
7 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
8 <!--======================================================================-->
9 <!-- =====================================================================-->
10 <!-- interact-bubble-BE-04.svg -->
11 <!-- renamed for 1.1 suite to interact-order-01-b.svg -->
12 <!-- Author : Jon Ferraiolo 06-Aug-2000 -->
13 <!-- 1.1 revision by Thomas DeWeese 5-Feb-2002 -->
14 <!--======================================================================-->
15 <svg version=
"1.1" baseProfile=
"basic" id=
"svg-root" width=
"100%" height=
"100%" viewBox=
"0 0 480 360" xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink">
16 <SVGTestCase xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/">
17 <OperatorScript version=
"$Revision: 1.2 $" testname=
"interact-order-01-b.svg">
19 Test event bubbling of event attributes, part a.
22 The two circles test whether event bubbling is occurring
23 to parents of the target object, and whether the target object
24 is able to prevent bubbling. The supplemental text next to
25 the circles describes what should occur.
29 <title id=
"test-title">interact-order-
01-b
</title>
30 <desc id=
"test-desc">Test event bubbling of event attributes.
</desc>
31 <!--===============================================================-->
32 <!--Content of Test Case follows... ==============-->
33 <!--===============================================================-->
34 <g id=
"test-body-content">
36 <script type=
"text/ecmascript"><![CDATA[
38 function bubbleYes(evt, color){
40 var target = evt.target;
41 target.setAttribute('fill', '' +color);
43 function bubbleNo(evt, color){
45 var target = evt.target;
46 target.setAttribute('fill', '' +color);
47 evt.stopPropagation();
53 <text font-family=
"Arial" font-size=
"40" x=
"60" y=
"45">Event bubbling - a
</text>
55 <rect fill=
"#EEE" stroke=
"#000" x=
"10" y=
"60" width=
"460" height=
"120"/>
56 <rect fill=
"#FFF" stroke=
"#000" x=
"10" y=
"180" width=
"460" height=
"120"/>
58 <g fill=
"#000" font-family=
"Arial" font-size=
"40">
59 <!-- Event bubbling (i.e., propagation) is not turned off, so
60 event if first processed by 'circle', but then processed by 'g',
61 with result that circle turns blue, but then instantaneously
63 <g onmouseover=
"bubbleYes(evt, '#F00')" onmouseout=
"bubbleYes(evt, 'inherit')">
64 <circle onmouseover=
"bubbleYes(evt, '#00F')" onmouseout=
"bubbleYes(evt, 'inherit')" cx=
"70" cy=
"120" r=
"50"/>
65 <circle onmouseover=
"bubbleNo(evt, '#00F')" onmouseout=
"bubbleNo(evt, 'inherit')" cx=
"70" cy=
"240" r=
"50"/>
67 <text x=
"150" y=
"110">
70 <text x=
"150" y=
"150">
73 <text x=
"150" y=
"230">
76 <text x=
"150" y=
"270">
81 <text id=
"revision" x=
"10" y=
"340" font-size=
"40" stroke=
"none" fill=
"black">$Revision:
1.2 $
</text>
82 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>