SVG 1.1 19.3 proposed testcase for script and DOM

SVG 1.1
19.3 Animation using the SVG DOM
states:
If scripts are modifying the same attributes or properties that are 
being animated by SVG's animation elements, the scripts modify the 
base value for the animation. If a base value is modified while an 
animation element is animating the corresponding attribute or 
property, the animations are required to adjust dynamically to the new 
base value.
http://www.w3.org/TR/SVG/animate.html#DOMAnimationExample
No testcase is currently linked,
Please find attached a proposed testcase.
In my tests with recent builds of Mozilla Opera and Safari all three 
failed.
Is there a problem with the implementations or is it the testcase?
DSK-303683@bugs.opera.com
https://bugzilla.mozilla.org/show_bug.cgi?id=574603
https://bugs.webkit.org/show_bug.cgi?id=41203
please note in each case the alert message reported the fill was red, 
but appearance is green.
regards
Jonathan Chetwynd
where animation is not implemented fakesmile was used via <script 
type='text/ecmascript' xlink:href='smil.user.js' />
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 width="100%"
 height="100%"
 >
	<title>Script should over-ride set attributeName="fill" testcase</ 
title>
 <text x="20" y="20" >Click the green rectangle, then the circle. 
Refresh and start with the red circle</text>
<g id="neutral" fill="#cca" >
<set attributeName="fill" to="green" begin="fillGreen.click" />
 <rect x="16" y="38" width="150" height="21" rx='4' ry='4'/>
</g>
 <rect x="176" y="38" width="50" height="21" rx='4' ry='4' 
fill="green" pointer-events="fill" cursor="pointer" id="fillGreen"/>
<g id="scriptFillRed" >
 <text x="241" y="78" stroke="#f00" text-anchor="middle" >></text>
 <circle stroke-width="2" stroke="#f00" fill="none" r="9" cx="240" 
cy="75" pointer-events="fill" cursor="pointer" onmousedown="fill()" />
</g>
<script type="text/ecmascript" ><![CDATA[
<!--
function fill() {
 document.getElementById("neutral").setAttributeNS(null, 
'fill', 'red');
alert(document.getElementById("neutral").getAttributeNS(null, 'fill'));
}
--> ]]></script>
</svg>

Received on Friday, 25 June 2010 09:28:35 UTC

AltStyle によって変換されたページ (->オリジナル) /