This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9648 - typo in dom_animate.svg
Summary: typo in dom_animate.svg
Status: NEW
Alias: None
Product: SVG
Classification: Unclassified
Component: Animation (show other bugs)
Version: SVG 1.2 Tiny
Hardware: PC Linux
: P2 normal
Target Milestone: Test Suite
Assignee: Doug Schepers
QA Contact: SVG Public List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 14:06 UTC by Damien Lespiau
Modified: 2010-05-03 15:35 UTC (History)
0 users

See Also:


Attachments

Description Damien Lespiau 2010-05-03 14:06:34 UTC
A "mytimer" variable is defined, but some other, undefined, variable "someTimer" is used in the script. Spotted thanks to the JavaScript interpreter I use (SpiderMonkey) which, configured in a strict mode, will issue a "someTimer is not defined" warning.

A "diff -u" patch is given to illustrate a possible fix.

diff --git a/tests/dom_animate.svg b/tests/dom_animate.svg
index 0997baf..77b7b44 100644
--- a/tests/dom_animate.svg
+++ b/tests/dom_animate.svg
@@ -10,7 +10,8 @@
     var maxTime = 5000;
     var textElement;
     var svgRoot;
-    var mytimer;
+    var someTimer;

     // A listener for the timer
     function someListener(evt) {
        showAndGrowElement();
Comment 1 Damien Lespiau 2010-05-03 15:35:16 UTC
In the same file but a little further (I reached that point now that my SVGTimer implementation actually does something), another variable is not defined:

diff --git a/tests/dom_animate.svg b/tests/dom_animate.svg
index 77b7b44..ee2d33f 100644
--- a/tests/dom_animate.svg
+++ b/tests/dom_animate.svg
@@ -33,7 +33,7 @@
     function showAndGrowElement() {
        timeValue += timerIncrement;
        // Scale the text string gradually until it is 20 times larger
-       scalefactor = (timeValue * 20) / maxTime;
+       var scalefactor = (timeValue * 20) / maxTime;
        var matrix = svgRoot.createSVGMatrixComponents(scalefactor, 0, 0, scalef
        textElement.setMatrixTrait("transform", matrix);
        // Make the string more opaque