[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnash-commit
Subject:    [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp server/...
From:       Sandro Santilli <strk () keybit ! net>
Date:       2007-02-28 23:24:45
Message-ID: E1HMYA9-0001is-KG () savannah ! gnu ! org
[Download RAW message or body]

CVSROOT:	/sources/gnash
Module name:	gnash
Changes by:	Sandro Santilli <strk>	07/02/28 23:24:45

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

Log message:
	        * server/asobj/Global.cpp: register Stage object always.
	        * server/asobj/Stage.cpp: don't register addListener
	          and removeListener if SWF < 6.
	        * testsuite/actionscript.all/Stage.a: update after fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2501&r2=1.2502
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Stage.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Stage.as?cvsroot=gnash&r1=1.7&r2=1.8

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2501
retrieving revision 1.2502
diff -u -b -r1.2501 -r1.2502
--- ChangeLog	28 Feb 2007 22:53:24 -0000	1.2501
+++ ChangeLog	28 Feb 2007 23:24:45 -0000	1.2502
@@ -1,3 +1,10 @@
+2007-03-01 Sandro Santilli <strk@keybit.net>
+
+	* server/asobj/Global.cpp: register Stage object always.
+	* server/asobj/Stage.cpp: don't register addListener
+	  and removeListener if SWF < 6.
+	* testsuite/actionscript.all/Stage.a: update after fix.
+
 2007-02-28 Sandro Santilli <strk@keybit.net>
 
 	* libgeometry/Range2d.h (scale): allow the scaled range to be

Index: server/asobj/Global.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- server/asobj/Global.cpp	27 Feb 2007 22:55:29 -0000	1.48
+++ server/asobj/Global.cpp	28 Feb 2007 23:24:45 -0000	1.49
@@ -18,7 +18,7 @@
 
 // Implementation of the Global ActionScript Object
 
-/* $Id: Global.cpp,v 1.48 2007/02/27 22:55:29 martinwguy Exp $ */
+/* $Id: Global.cpp,v 1.49 2007/02/28 23:24:45 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -374,6 +374,10 @@
 	system_class_init(*this); // System and System.capabilities
 	function_class_init(*this);
 
+	// I find Stage object used in SWF5 movies, don't
+	// see a good reason not to enable this always
+	stage_class_init(*this);
+
 	if ( vm.getSWFVersion() < 3 ) goto extscan;
 	//-----------------------
 	// SWF3
@@ -430,7 +434,6 @@
 	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);

Index: server/asobj/Stage.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Stage.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/asobj/Stage.cpp	18 Jan 2007 22:53:21 -0000	1.5
+++ server/asobj/Stage.cpp	28 Feb 2007 23:24:45 -0000	1.6
@@ -26,6 +26,7 @@
 #include "fn_call.h"
 #include "smart_ptr.h" // for boost intrusive_ptr
 #include "builtin_function.h" // need builtin_function
+#include "VM.h"
 
 namespace gnash {
 
@@ -36,8 +37,11 @@
 static void
 attachStageInterface(as_object& o)
 {
+	if ( VM::get().getSWFVersion() > 5 )
+	{
 	o.init_member("addListener", &stage_addlistener);
 	o.init_member("removeListener", &stage_removelistener);
+	}
 }
 
 static as_object*

Index: testsuite/actionscript.all/Stage.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Stage.as,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/actionscript.all/Stage.as	11 Jan 2007 12:47:26 -0000	1.7
+++ testsuite/actionscript.all/Stage.as	28 Feb 2007 23:24:45 -0000	1.8
@@ -20,15 +20,11 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: Stage.as,v 1.7 2007/01/11 12:47:26 strk Exp $";
+rcsid="$Id: Stage.as,v 1.8 2007/02/28 23:24:45 strk Exp $";
 
 #include "check.as"
 
-#if OUTPUT_VERSION > 5
 check_equals (typeof(Stage), 'object');
-#else // Gnash doesn't register a Stage object if SWF < 6 !
-xcheck_equals (typeof(Stage), 'object');
-#endif
 
 var stageObj = new Stage;
 check_equals (typeof(stageObj), 'undefined');



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic