CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/11/26 10:39:36
Modified files: . : ChangeLog server : dlist.cpp dlist.h testsuite/misc-ming.all: goto_frame_test.c Log message: * server/dlist.h: testInvariant(), dlist.cpp: reinsertRemovedCharacter(), allow duplicated depths in removed zone. * testsuite/misc-ming.all/goto_frame_test.c: xcheck->check. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4962&r2=1.4963 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.102&r2=1.103 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.8&r2=1.9 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4962 retrieving revision 1.4963 diff -u -b -r1.4962 -r1.4963 --- ChangeLog 26 Nov 2007 08:47:04 -0000 1.4962 +++ ChangeLog 26 Nov 2007 10:39:35 -0000 1.4963 @@ -1,5 +1,11 @@ 2007-11-26 Zou Lunkai <[EMAIL PROTECTED]> + * server/dlist.h: testInvariant(), dlist.cpp: reinsertRemovedCharacter(), + allow duplicated depths in removed zone. + * testsuite/misc-ming.all/goto_frame_test.c: xcheck->check. + +2007-11-26 Zou Lunkai <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/goto_frame_test.c: cleanups and tests for timeline control. new tests are disabled by default, otherwise DisplayList::testInvariant() would abort. Index: server/dlist.cpp =================================================================== RCS file: /sources/gnash/gnash/server/dlist.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -u -b -r1.102 -r1.103 --- server/dlist.cpp 6 Nov 2007 12:38:57 -0000 1.102 +++ server/dlist.cpp 26 Nov 2007 10:39:35 -0000 1.103 @@ -1037,18 +1037,8 @@ container_type::iterator it = find_if( _charsByDepth.begin(), _charsByDepth.end(), DepthGreaterOrEqual(newDepth)); - if ( it == _charsByDepth.end() || (*it)->get_depth() != newDepth ) - { - // add the new char - _charsByDepth.insert(it, DisplayItem(ch)); - } - else - { - // the character should not be in the displaylist already ! - assert(it->get() != ch.get()); - log_error("DisplayList::insertCharacter: target depth (%d) is occupied, and we don't know what we're supposed to do - we'll avoid inserting the character for now", newDepth); - } + _charsByDepth.insert(it, DisplayItem(ch)); testInvariant(); } @@ -1065,7 +1055,8 @@ DisplayList::const_iterator DisplayList::beginNonRemoved(const container_type& c) { - return std::find_if(c.begin(), c.end(), DepthGreaterOrEqual(character::removedDepthOffset+1)); + return std::find_if(c.begin(), c.end(), + DepthGreaterOrEqual(character::removedDepthOffset - character::staticDepthOffset)); } void Index: server/dlist.h =================================================================== RCS file: /sources/gnash/gnash/server/dlist.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- server/dlist.h 17 Oct 2007 11:14:17 -0000 1.55 +++ server/dlist.h 26 Nov 2007 10:39:35 -0000 1.56 @@ -57,9 +57,9 @@ { #ifndef NDEBUG DisplayList sorted = *this; - // check no duplicated depths in list + // check no duplicated depths above non-removed zone. std::set<int> depths; - for (const_iterator it=_charsByDepth.begin(), itEnd=_charsByDepth.end(); it!=itEnd; ++it) + for (const_iterator it=beginNonRemoved(_charsByDepth), itEnd=_charsByDepth.end(); it!=itEnd; ++it) { boost::intrusive_ptr<character> ch = *it; int depth = ch->get_depth(); Index: testsuite/misc-ming.all/goto_frame_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- testsuite/misc-ming.all/goto_frame_test.c 26 Nov 2007 08:57:28 -0000 1.8 +++ testsuite/misc-ming.all/goto_frame_test.c 26 Nov 2007 10:39:36 -0000 1.9 @@ -145,8 +145,6 @@ check_equals(mo, "_root.asOrder", "'0+1+2+3+4+5+6+7+'"); SWFMovie_nextFrame(mo); //6th frame -// disable by default, otherwise segfault with NDEBUG undefined -#if 0 // // test2: test forward gotoFrame // @@ -180,9 +178,9 @@ check_equals(mo, "mc1.getDepth()", "-16485"); check_equals(mo, "mc1._name", "'mc1'"); - xcheck_equals(mo, "mc2.getDepth()", "-16485"); - xcheck_equals(mo, "mc2._name", "'mc2'"); -#endif + check_equals(mo, "mc2.getDepth()", "-16485"); + check_equals(mo, "mc2._name", "'mc2'"); + add_actions(mo, "totals(); stop();"); SWFMovie_nextFrame(mo); // 12th frame _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit