gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/Error.cpp server/a...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/Error.cpp server/a...
Date: Thu, 11 Jan 2007 11:26:50 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/11 11:26:50

Modified files:
        .              : ChangeLog 
        server/asobj   : Error.cpp Global.cpp LoadVars.cpp 
        testsuite/actionscript.all: Error.as LoadVars.as 

Log message:
                * testsuite/actionscript.all/: Error.as, LoadVars.as:
                  fix tests taking SWF version and case into account.
                * server/asobj/LoadVars.cpp: fix method case.
                * server/asobj/Error.cpp: tostring => toString
                * server/asobj/Global.cpp: moved most classes to appropriate
                  versioned SWF section.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2079&r2=1.2080
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Error.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LoadVars.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Error.as?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/LoadVars.as?cvsroot=gnash&r1=1.6&r2=1.7

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2079
retrieving revision 1.2080
diff -u -b -r1.2079 -r1.2080
--- ChangeLog   11 Jan 2007 09:58:04 -0000      1.2079
+++ ChangeLog   11 Jan 2007 11:26:50 -0000      1.2080
@@ -1,5 +1,11 @@
 2007-01-11 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/: Error.as, LoadVars.as:
+         fix tests taking SWF version and case into account.
+       * server/asobj/LoadVars.cpp: fix method case.
+       * server/asobj/Error.cpp: tostring => toString
+       * server/asobj/Global.cpp: moved most classes to appropriate
+         versioned SWF section.
        * configure.ac: reverted a change in FLTK lib detection
          committed by accident.
 

Index: server/asobj/Error.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Error.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/asobj/Error.cpp      20 Nov 2006 21:38:11 -0000      1.3
+++ server/asobj/Error.cpp      11 Jan 2007 11:26:50 -0000      1.4
@@ -35,7 +35,7 @@
 static void
 attachErrorInterface(as_object& o)
 {
-       o.set_member("tostring", &error_tostring);
+       o.set_member("toString", &error_tostring);
 }
 
 static as_object*

Index: server/asobj/Global.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/asobj/Global.cpp     10 Jan 2007 00:09:56 -0000      1.28
+++ server/asobj/Global.cpp     11 Jan 2007 11:26:50 -0000      1.29
@@ -18,7 +18,7 @@
 
 // Implementation of the Global ActionScript Object
 
-/* $Id: Global.cpp,v 1.28 2007/01/10 00:09:56 strk Exp $ */
+/* $Id: Global.cpp,v 1.29 2007/01/11 11:26:50 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -408,35 +408,18 @@
        // Unclassified - TODO: move to appropriate section
        //-------------------------------------------------
 
-       set_member("System", as_value(system_new)); // isn't this a duplicate 
of system_class_init ?
        // ASSetPropFlags
        set_member("ASSetPropFlags", as_global_assetpropflags);
-       // unescape
-       set_member("unescape", as_global_unescape);
-       // parseFloat
-       set_member("parseFloat", as_global_parsefloat);
-       // parseInt
-       set_member("parseInt", as_global_parseint);
-       // isNan
-       set_member("isNaN", as_global_isnan);
-       // isFinite
-       set_member("isFinite", as_global_isfinite);
 
-       movieclip_class_init(*this);
+       // See: http://sephiroth.it/reference.php?id=717&cat=1
        textsnapshot_class_init(*this);
-       stage_class_init(*this);
-       sharedobject_class_init(*this);
-       mouse_class_init(*this);
-       loadvars_class_init(*this);
-       error_class_init(*this);
-       customactions_class_init(*this);
-       contextmenu_class_init(*this);
-       moviecliploader_class_init(*this);
-       object_class_init(*this);
-       number_class_init(*this); 
-       string_class_init(*this); 
-       array_class_init(*this);
-       function_class_init(*this);
+
+       if ( vm.getSWFVersion() < 3 ) goto extscan;
+       //-----------------------
+       // SWF3
+       //-----------------------
+
+       movieclip_class_init(*this);
 
        if ( vm.getSWFVersion() < 4 ) goto extscan;
        //-----------------------
@@ -462,6 +445,21 @@
        set_member("XMLNode", as_value(xmlnode_new));
        set_member("XMLSocket", as_value(xmlsocket_new));
        set_member("Date", as_value(date_new));
+       mouse_class_init(*this);
+       object_class_init(*this);
+       number_class_init(*this); 
+       string_class_init(*this); 
+       array_class_init(*this);
+       // unescape
+       set_member("unescape", as_global_unescape);
+       // parseFloat
+       set_member("parseFloat", as_global_parsefloat);
+       // parseInt
+       set_member("parseInt", as_global_parseint);
+       // isNan
+       set_member("isNaN", as_global_isnan);
+       // isFinite
+       set_member("isFinite", as_global_isfinite);
 
        if ( vm.getSWFVersion() < 6 ) goto extscan;
        //-----------------------
@@ -475,6 +473,11 @@
        video_class_init(*this); // Video
        camera_class_init(*this); // Camera
        microphone_class_init(*this); // Microphone
+       stage_class_init(*this);
+       sharedobject_class_init(*this);
+       loadvars_class_init(*this);
+       customactions_class_init(*this);
+       function_class_init(*this);
 
        if ( vm.getSWFVersion() < 7 ) goto extscan;
        //-----------------------
@@ -483,6 +486,12 @@
 
        set_member("NetConnection", as_value(netconnection_new));
        set_member("NetStream", as_value(netstream_new));
+       contextmenu_class_init(*this);
+       moviecliploader_class_init(*this);
+       // sephiroth.it refers this to be introduced in SWF7
+       // but empirical checks seem to confirm it's also avaiable in SWF6
+       // if player is >= 7
+       error_class_init(*this);
 
        if ( vm.getSWFVersion() < 8 ) goto extscan;
        //-----------------------

Index: server/asobj/LoadVars.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LoadVars.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/asobj/LoadVars.cpp   20 Nov 2006 21:38:11 -0000      1.3
+++ server/asobj/LoadVars.cpp   11 Jan 2007 11:26:50 -0000      1.4
@@ -42,14 +42,14 @@
 static void
 attachLoadVarsInterface(as_object& o)
 {
-       o.set_member("addrequestheader", &loadvars_addrequestheader);
+       o.set_member("addRequestHeader", &loadvars_addrequestheader);
        o.set_member("decode", &loadvars_decode);
-       o.set_member("getbytesloaded", &loadvars_getbytesloaded);
-       o.set_member("getbytestotal", &loadvars_getbytestotal);
+       o.set_member("getBytesLoaded", &loadvars_getbytesloaded);
+       o.set_member("getBytesTotal", &loadvars_getbytestotal);
        o.set_member("load", &loadvars_load);
        o.set_member("send", &loadvars_send);
-       o.set_member("sendandload", &loadvars_sendandload);
-       o.set_member("tostring", &loadvars_tostring);
+       o.set_member("sendAndLoad", &loadvars_sendandload);
+       o.set_member("toString", &loadvars_tostring);
 }
 
 static as_object*

Index: testsuite/actionscript.all/Error.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Error.as,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/actionscript.all/Error.as 5 Nov 2006 00:45:27 -0000       1.6
+++ testsuite/actionscript.all/Error.as 11 Jan 2007 11:26:50 -0000      1.7
@@ -20,14 +20,15 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: Error.as,v 1.6 2006/11/05 00:45:27 rsavoye Exp $";
+rcsid="$Id: Error.as,v 1.7 2007/01/11 11:26:50 strk Exp $";
 
 #include "check.as"
 
 var errorObj = new Error;
 
 // test the Error constuctor
-check (errorObj != undefined);
+check_equals (typeof(errorObj), 'object');
 
 // test the Error::tostring method
-check (errorObj.tostring != undefined);
+check_equals (typeof(errorObj.toString), 'function');
+

Index: testsuite/actionscript.all/LoadVars.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/LoadVars.as,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/actionscript.all/LoadVars.as      5 Nov 2006 00:45:27 -0000       
1.6
+++ testsuite/actionscript.all/LoadVars.as      11 Jan 2007 11:26:50 -0000      
1.7
@@ -20,28 +20,43 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: LoadVars.as,v 1.6 2006/11/05 00:45:27 rsavoye Exp $";
+rcsid="$Id: LoadVars.as,v 1.7 2007/01/11 11:26:50 strk Exp $";
 
 #include "check.as"
 
+#if OUTPUT_VERSION < 6
+
+xcheck_equals(typeof(LoadVars), 'function');
+
 var loadvarsObj = new LoadVars;
 
 // test the LoadVars constuctor
-check (loadvarsObj != undefined);
+xcheck_equals (typeof(loadvarsObj), 'object');
+
+#else // OUTPUT_VERSION >= 6
+
+check_equals(typeof(LoadVars), 'function');
+
+var loadvarsObj = new LoadVars;
+
+// test the LoadVars constuctor
+check_equals (typeof(loadvarsObj), 'object');
 
 // test the LoadVars::addrequestheader method
-check (loadvarsObj.addrequestheader != undefined);
+check_equals (typeof(loadvarsObj.addRequestHeader), 'function');
 // test the LoadVars::decode method
-check (loadvarsObj.decode != undefined);
+check_equals (typeof(loadvarsObj.decode), 'function');
 // test the LoadVars::getbytesloaded method
-check (loadvarsObj.getbytesloaded != undefined);
+check_equals (typeof(loadvarsObj.getBytesLoaded), 'function');
 // test the LoadVars::getbytestotal method
-check (loadvarsObj.getbytestotal != undefined);
+check_equals (typeof(loadvarsObj.getBytesTotal), 'function');
 // test the LoadVars::load method
-check (loadvarsObj.load != undefined);
+check_equals (typeof(loadvarsObj.load), 'function');
 // test the LoadVars::send method
-check (loadvarsObj.send != undefined);
+check_equals (typeof(loadvarsObj.send), 'function');
 // test the LoadVars::sendandload method
-check (loadvarsObj.sendandload != undefined);
+check_equals (typeof(loadvarsObj.sendAndLoad), 'function');
 // test the LoadVars::tostring method
-check (loadvarsObj.tostring != undefined);
+check_equals (typeof(loadvarsObj.toString), 'function');
+
+#endif //  OUTPUT_VERSION >= 6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]