CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/12/24 10:08:32
Modified files: . : ChangeLog server : sprite_instance.cpp testsuite/misc-mtasc.all: level99.as Log message: Have _root and "/" element of path evaluated using get_root (relative root). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5250&r2=1.5251 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.419&r2=1.420 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level99.as?cvsroot=gnash&r1=1.9&r2=1.10 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5250 retrieving revision 1.5251 diff -u -b -r1.5250 -r1.5251 --- ChangeLog 24 Dec 2007 05:33:43 -0000 1.5250 +++ ChangeLog 24 Dec 2007 10:08:31 -0000 1.5251 @@ -1,3 +1,12 @@ +2007-12-24 Sandro Santilli <[EMAIL PROTECTED]> + + * server/sprite_instance.cpp (get_member): use get_root() to evaluate + the _root member. This is to get relative url rather then absolute, + more correct in swf6 and should be easier to handle _lockroot for + SWF7. + * testsuite/misc-mtasc.all/level99.as: add test for "_root" and + '/path' resolution in levels. + 2007-12-24 Zou Lunkai <[EMAIL PROTECTED]> * server/as_value.{h, cpp}: ~as_value(), don't inline the destructor. Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.419 retrieving revision 1.420 diff -u -b -r1.419 -r1.420 --- server/sprite_instance.cpp 23 Dec 2007 22:29:57 -0000 1.419 +++ server/sprite_instance.cpp 24 Dec 2007 10:08:32 -0000 1.420 @@ -1850,16 +1850,9 @@ { //if ( isUnloaded() ) return false; // see movieclip_destruction_test3.sc - // TODO: handle lockroot - // - // get_root() would return relative root of this instance - // VM::getRoot().getRootMovie() would return _level0 or something - // like that (check dox) - // - // If _lockroot is true we should return the relative root, otherwise - // we should return the absolute one (_level0?) - // - val->set_as_object( VM::get().getRoot().getRootMovie() ); + // Let ::get_root() take care of _lockroot + val->set_as_object( get_root() ); + return true; } if (name.compare(0, 6, "_level") == 0 && name.find_first_not_of("0123456789", 7) == string::npos ) Index: testsuite/misc-mtasc.all/level99.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/level99.as,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- testsuite/misc-mtasc.all/level99.as 23 Dec 2007 22:29:57 -0000 1.9 +++ testsuite/misc-mtasc.all/level99.as 24 Dec 2007 10:08:32 -0000 1.10 @@ -48,6 +48,12 @@ // Check our depth check_equals(mc.getDepth(), -16285); + // _root is relative. TODO: check _lockroot effect ! + check_equals(mc._root, _level99); + check_equals(_root, _level99); + // "/" in path is relative ! + check_equals(eval("/ch"), _level99.ch); + // The ""+ is there to force conversion to a string check_equals(""+mc, "_level99"); @@ -118,7 +124,7 @@ // - sane swapping between to levels, // - swapping & removing _level0 // - check_totals(44); + check_totals(47); Dejagnu.done(); delete this.onEnterFrame; } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit