gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...
Date: Sat, 29 Mar 2008 22:50:54 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/03/29 22:50:54

Modified files:
        .              : ChangeLog 
        server         : video_stream_instance.cpp 
                         video_stream_instance.h 
        testsuite/actionscript.all: Video.as 

Log message:
        Don't attach character properties to user-instantiated Video objects.
        Fixes other swfdec testsuite crashes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6086&r2=1.6087
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.h?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Video.as?cvsroot=gnash&r1=1.15&r2=1.16

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6086
retrieving revision 1.6087
diff -u -b -r1.6086 -r1.6087
--- ChangeLog   29 Mar 2008 22:13:03 -0000      1.6086
+++ ChangeLog   29 Mar 2008 22:50:53 -0000      1.6087
@@ -1,5 +1,13 @@
 2008-03-29 Sandro Santilli <address@hidden>
 
+       * server/video_stream_instance.{cpp,h}: don't attach character
+         properties if it's not a character (a user-created Video instance).
+         Fixes more crashes in swfdec testsuite.
+       * testsuite/actionscript.all/Video.as: test that a user-defined Video
+         instance doesn't have character properties.
+
+2008-03-29 Sandro Santilli <address@hidden>
+
        * testsuite/libamf.all/Makefile.am: add libnet include
        * server/as_function.cpp (constructInstance): don't assume a class
          will always have a prototype defined. Fixes leftover crashes

Index: server/video_stream_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- server/video_stream_instance.cpp    6 Mar 2008 15:29:57 -0000       1.49
+++ server/video_stream_instance.cpp    29 Mar 2008 22:50:54 -0000      1.50
@@ -163,11 +163,13 @@
 {
        //log_debug("video_stream_instance %p ctor", (void*)this);
 
-       if ( m_def ) _embeddedStream = true;
+       if ( m_def )
+       {
+               _embeddedStream = true;
+               attachVideoProperties(*this);
+       }
 
        set_prototype(getVideoInterface());
-                       
-       attachVideoProperties(*this);
 }
 
 video_stream_instance::~video_stream_instance()
@@ -283,6 +285,18 @@
        global.init_member("Video", cl.get());
 }
 
+geometry::Range2d<float>
+video_stream_instance::getBounds() const
+{
+       if (_embeddedStream) return m_def->get_bound().getRange();
+
+       geometry::Range2d<float> bounds; // null bounds..
+
+       // TODO: return the bounds of the dynamically
+       //       loaded video if not embedded ?
+       return bounds;
+}
+
 #ifdef GNASH_USE_GC
 void
 video_stream_instance::markReachableResources() const

Index: server/video_stream_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/video_stream_instance.h      14 Mar 2008 17:30:35 -0000      1.28
+++ server/video_stream_instance.h      29 Mar 2008 22:50:54 -0000      1.29
@@ -56,12 +56,7 @@
                return pointInBounds(x, y);
        }
 
-       geometry::Range2d<float> getBounds() const
-       {
-               // TODO: return the bounds of the dynamically
-               //       loaded video if not embedded ?
-               return m_def->get_bound().getRange();
-       }
+       geometry::Range2d<float> getBounds() const;
 
        /// We use the call to ::advance to properly set invalidated status
        virtual void    advance();

Index: testsuite/actionscript.all/Video.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Video.as,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- testsuite/actionscript.all/Video.as 11 Mar 2008 19:31:48 -0000      1.15
+++ testsuite/actionscript.all/Video.as 29 Mar 2008 22:50:54 -0000      1.16
@@ -21,12 +21,13 @@
 // execute it like this gnash -1 -r 0 -v out.swf
 
 
-rcsid="$Id: Video.as,v 1.15 2008/03/11 19:31:48 strk Exp $";
+rcsid="$Id: Video.as,v 1.16 2008/03/29 22:50:54 strk Exp $";
 #include "check.as"
 
 #if OUTPUT_VERSION < 6
 
 check_equals(Video, undefined);
+check_totals(1);
 
 #else
 
@@ -43,8 +44,21 @@
 check_equals (typeof(videoObj), 'object');
 check_equals (typeof(videoObj.attachVideo), 'function');
 check_equals (typeof(videoObj.clear), 'function');
+check_equals (typeof(videoObj._x), 'undefined');
+check_equals (typeof(videoObj._y), 'undefined');
+check_equals (typeof(videoObj._width), 'undefined');
+check_equals (typeof(videoObj._height), 'undefined');
+check_equals (typeof(videoObj._xscale), 'undefined');
+check_equals (typeof(videoObj._yscale), 'undefined');
+check_equals (typeof(videoObj._xmouse), 'undefined');
+check_equals (typeof(videoObj._ymouse), 'undefined');
+check_equals (typeof(videoObj._alpha), 'undefined');
+check_equals (typeof(videoObj._rotation), 'undefined');
+check_equals (typeof(videoObj._target), 'undefined');
+check_equals (typeof(videoObj._parent), 'undefined');
 
 // TODO: test other properties !
 
+check_totals(21);
+
 #endif
-totals();




reply via email to

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