[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv... |
Date: |
Mon, 24 Sep 2007 10:07:07 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/24 10:07:07
Modified files:
. : ChangeLog
server : sprite_instance.cpp sprite_instance.h
Log message:
* server/sprite_instance.{cpp,h}: moved ActionScript object
construction into its own method. A change introduced by
this commit is that onClipConstruct/onConstruct will be
invoked
after tags of frame0. Our testsuite detected no changes (so we
need more). Youtube still works :)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4386&r2=1.4387
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.357&r2=1.358
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.141&r2=1.142
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4386
retrieving revision 1.4387
diff -u -b -r1.4386 -r1.4387
--- ChangeLog 24 Sep 2007 08:41:55 -0000 1.4386
+++ ChangeLog 24 Sep 2007 10:07:06 -0000 1.4387
@@ -1,3 +1,11 @@
+2007-09-24 Sandro Santilli <address@hidden>
+
+ * server/sprite_instance.{cpp,h}: moved ActionScript object
+ construction into its own method. A change introduced by
+ this commit is that onClipConstruct/onConstruct will be invoked
+ after tags of frame0. Our testsuite detected no changes (so we
+ need more). Youtube still works :)
+
2007-09-24 Zou Lunkai <address@hidden>
* testsuite/misc-swfc.all/action_execution_order_test10.sc: found a way
to
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.357
retrieving revision 1.358
diff -u -b -r1.357 -r1.358
--- server/sprite_instance.cpp 23 Sep 2007 08:48:18 -0000 1.357
+++ server/sprite_instance.cpp 24 Sep 2007 10:07:06 -0000 1.358
@@ -3251,15 +3251,6 @@
on_event(event_id::INITIALIZE);
- // Execute CONSTRUCT event immediately
- on_event(event_id::CONSTRUCT);
- if (isUnloaded())
- {
- log_debug("%s construct event handler unloaded self",
getTarget().c_str());
- // TODO: check if we should still execute frame tags (dlist
ones in particular)
- return;
- }
-
// Now execute frame tags and take care of queuing the LOAD event.
//
// DLIST tags are executed immediately while ACTION tags are queued.
@@ -3296,6 +3287,16 @@
execute_frame_tags(0, TAG_DLIST|TAG_ACTION);
}
+
+ // Construct as ActionScript object.
+ constructAsScriptObject();
+}
+
+/*private*/
+void
+sprite_instance::constructAsScriptObject()
+{
+ do {
if ( _name.empty() )
{
// instance name will be needed for properly setting up
@@ -3303,14 +3304,16 @@
// If the instance doesn't have a name, it will NOT be
// an ActionScript referenciable object so we don't have
// anything more to do.
-
- return;
+ break;
}
sprite_definition* def = dynamic_cast<sprite_definition*>(m_def.get());
// We won't "construct" top-level movies
- if ( ! def ) return;
+ if ( ! def )
+ {
+ break;
+ }
as_function* ctor = def->getRegisteredClass();
//log_msg(_("Attached sprite's registered class is %p"), (void*)ctor);
@@ -3345,6 +3348,17 @@
}
}
}
+ } while (0);
+
+ // Execute CONSTRUCT event
+ on_event(event_id::CONSTRUCT);
+ if (isUnloaded())
+ {
+ log_debug("%s construct event handler unloaded self",
getTarget().c_str());
+ // TODO: check if we should still execute frame tags (dlist
ones in particular)
+ return;
+ }
+
}
bool
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -b -r1.141 -r1.142
--- server/sprite_instance.h 21 Sep 2007 08:29:03 -0000 1.141
+++ server/sprite_instance.h 24 Sep 2007 10:07:07 -0000 1.142
@@ -388,11 +388,8 @@
///
/// The callback will also (known to be bogus):
//
- /// (1) Invoke the onClipConstruct and onConstruct handlers
- /// [ too early for handlers to refer to childs, should be queued
eventually ]
- /// (2) Invoke constructor of its associated class, either MovieClip
- /// or any user-specified one (see
sprite_definition::registerClass).
- /// [ too early, init actions might not have had a chance to call
registerClass ]
+ /// (1) Construct this instance as an ActionScript object.
+ /// See constructAsScriptObject() method.
///
virtual void stagePlacementCallback();
@@ -763,6 +760,15 @@
private:
+ /// Construct this instance as an ActionScript object
+ //
+ /// This method invokes the constructor associated with our
+ /// definition, either MovieClip or any user-speficied one
+ /// (see sprite_definition::registerClass).
+ /// It will also invoke the onClipConstruct and onConstruct handlers.
+ ///
+ void constructAsScriptObject();
+
/// Register this sprite as a listener of core broadcasters
//
/// This is currently only used for key events broadcaster
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/04
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/07
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/13
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/17
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/18
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv..., Sandro Santilli, 2007/09/19
- [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv...,
Sandro Santilli <=