[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog ./configure.ac server/Movie.c...
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash ./ChangeLog ./configure.ac server/Movie.c... |
Date: |
Sat, 11 Feb 2006 01:57:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Rob Savoye <address@hidden> 06/02/11 01:57:03
Modified files:
. : ChangeLog configure.ac
server : Movie.cpp Object.cpp action.cpp action.h
button.cpp dlist.cpp gnash.h impl.h morph2.cpp
shape.cpp shape.h styles.h tesselate.cpp
tesselate.h text.cpp xml.cpp xml.h xmlnode.cpp
xmlnode.h
testsuite/actionscript.all: XML.as check.as
libbase : membuf.cpp
Added files:
testsuite/actionscript.all: dejagnu.as
Log message:
* testsuite/actionscript.all/dejagnu.as: Implement the DejaGnu
unit testing API for ActionScript.
* testsuite/actionscript.all/XML.as: Use new DejaGnu API for test
output.
* testsuite/actionscript.all/XMLNode.as: New test case for
XMLNode to test the methods and properties.
* server/xmlnode.h: Add prototypes for new methods.
* server/xmlnode.cpp: Implement appendChild() cloneNode()
methods, and nodeName, nodeValue, firstChild, lastChild,
previousSibling, nextSibling, parentNode properties.
* server/xml.h: Define properties correctly.
* server/xml.cpp: Add properties to a node as other operations
on the node are done.
* configure.ac: Disable the XMLReader by default.
* libbase/membuf.cpp: Free, don't delete the pointer in the
destructor.
* server/action.cpp: Define virtual destructor for
as_property_interface.
* server/gnash.h: Define virutal destructor for import_visitor.
* server/shape.{h,cpp}: Define destructor for tesselating_shape.
* server/styles.h: Define destructors for base_fill_style and
base_line_style.
* server/tesselate.{h,cpp}: Define destructor for
trapezoid_accepter.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.121&tr2=1.122&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/configure.ac.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Movie.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/Object.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.h.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/button.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/dlist.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/gnash.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/impl.h.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/morph2.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/shape.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/styles.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/tesselate.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/tesselate.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/text.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.cpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xml.h.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlnode.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/xmlnode.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/XML.as.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/check.as.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/dejagnu.as?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/membuf.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.121 gnash/ChangeLog:1.122
--- gnash/ChangeLog:1.121 Sat Feb 11 01:01:17 2006
+++ gnash/ChangeLog Sat Feb 11 01:57:02 2006
@@ -3,6 +3,31 @@
* doc/C/internals.xml: Add section on adding properties to an
ActionScript class.
+ * testsuite/actionscript.all/dejagnu.as: Implement the DejaGnu
+ unit testing API for ActionScript.
+ * testsuite/actionscript.all/XML.as: Use new DejaGnu API for test
+ output.
+ * testsuite/actionscript.all/XMLNode.as: New test case for
+ XMLNode to test the methods and properties.
+ * server/xmlnode.h: Add prototypes for new methods.
+ * server/xmlnode.cpp: Implement appendChild() cloneNode()
+ methods, and nodeName, nodeValue, firstChild, lastChild,
+ previousSibling, nextSibling, parentNode properties.
+ * server/xml.h: Define properties correctly.
+ * server/xml.cpp: Add properties to a node as other operations
+ on the node are done.
+ * configure.ac: Disable the XMLReader by default.
+ * libbase/membuf.cpp: Free, don't delete the pointer in the
+ destructor.
+ * server/action.cpp: Define virtual destructor for
+ as_property_interface.
+ * server/gnash.h: Define virutal destructor for import_visitor.
+ * server/shape.{h,cpp}: Define destructor for tesselating_shape.
+ * server/styles.h: Define destructors for base_fill_style and
+ base_line_style.
+ * server/tesselate.{h,cpp}: Define destructor for
+ trapezoid_accepter.
+
2006-02-10 Sandro Santilli <address@hidden>
* server/action.{cpp,h}: added doActionCallMethod,
Index: gnash/configure.ac
diff -u gnash/configure.ac:1.32 gnash/configure.ac:1.33
--- gnash/configure.ac:1.32 Sun Feb 5 05:42:02 2006
+++ gnash/configure.ac Sat Feb 11 01:57:02 2006
@@ -96,7 +96,7 @@
yes) reader=yes ;;
no) reader=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for enable-xmlreader option]) ;;
-esac])
+esac], reader=no)
if test x$reader = xyes; then
AC_DEFINE([USE_XMLREADER], [], [Use xmlReader parser])
@@ -132,9 +132,6 @@
fi
AM_CONDITIONAL(NET_CONN, test x$net_conn = xtrue)
-dnl Where are the Docbook stylesheets ?
-AC_PATH_FIREFOX
-
AC_PROG_CC
AC_PROG_CXX
AC_EXEEXT
@@ -143,6 +140,7 @@
GNASH_PATH_DMALLOC
AC_CHECK_FUNCS(mallinfo)
+AC_PATH_FIREFOX
AC_PATH_XTRA
AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
AC_CHECK_LIB(Xi, XInput_find_display)
@@ -226,9 +224,8 @@
if test x"$dmalloc" = x"yes"; then
echo " DMalloc support enabled"
echo " For a list of the command-line options enter: dmalloc --usage"
-
else
- echo " AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes) DMalloc
support disabled (default)"
+ echo " DMalloc support disabled (default)"
fi
if test x$enable_xml = xno; then
Index: gnash/libbase/membuf.cpp
diff -u gnash/libbase/membuf.cpp:1.1 gnash/libbase/membuf.cpp:1.2
--- gnash/libbase/membuf.cpp:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/membuf.cpp Sat Feb 11 01:57:03 2006
@@ -90,8 +90,9 @@
membuf::~membuf()
{
if (!m_read_only) {
- delete [] m_data;
+ tu_free(m_data, m_capacity);
}
+ m_capacity = 0;
m_data = NULL;
}
Index: gnash/server/Movie.cpp
diff -u gnash/server/Movie.cpp:1.3 gnash/server/Movie.cpp:1.4
--- gnash/server/Movie.cpp:1.3 Fri Feb 3 12:53:38 2006
+++ gnash/server/Movie.cpp Sat Feb 11 01:57:02 2006
@@ -706,6 +706,7 @@
void movie_root::display()
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
if (m_movie->get_visible() == false)
{
// Don't display.
Index: gnash/server/Object.cpp
diff -u gnash/server/Object.cpp:1.3 gnash/server/Object.cpp:1.4
--- gnash/server/Object.cpp:1.3 Sat Feb 11 00:16:46 2006
+++ gnash/server/Object.cpp Sat Feb 11 01:57:02 2006
@@ -30,9 +30,9 @@
bool
as_object::get_member(const tu_stringi& name, as_value* val)
{
- IF_VERBOSE_DEBUG(
- log_msg(" get member: %s (at %p) for object %p\n",
name.c_str(), val, this);
- );
+// IF_VERBOSE_DEBUG(
+// log_msg(" get member: %s (at %p) for object %p\n",
name.c_str(), val, this);
+// );
if (name == "__proto__")
{
val->set_as_object_interface(m_prototype);
@@ -43,10 +43,10 @@
if (m_members.get(name, &m) == false)
{
- IF_VERBOSE_DEBUG(log_msg(" not found on first
level\n"));
+// IF_VERBOSE_DEBUG(log_msg(" not found on first
level\n"));
if (m_prototype == NULL)
{
- IF_VERBOSE_DEBUG(log_msg(" no __proto__
(m_prototype) defined\n"));
+// IF_VERBOSE_DEBUG(log_msg(" no __proto__
(m_prototype) defined\n"));
return false;
}
else
@@ -55,7 +55,7 @@
return m_prototype->get_member(name, val);
}
} else {
- IF_VERBOSE_DEBUG(log_msg(" found on first level"));
+// IF_VERBOSE_DEBUG(log_msg(" found on first level"));
*val=m.get_member_value();
return true;
}
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.41 gnash/server/action.cpp:1.42
--- gnash/server/action.cpp:1.41 Sat Feb 11 00:16:46 2006
+++ gnash/server/action.cpp Sat Feb 11 01:57:02 2006
@@ -2064,7 +2064,7 @@
as_value& target = env->top(1);
as_object_interface* obj = target.to_object();
- IF_VERBOSE_DEBUG(log_msg(" doActionGetMember: target: %p\n",
obj));
+// IF_VERBOSE_DEBUG(log_msg(" doActionGetMember: target: %p\n",
obj));
// Special case: String has a member "length"
// @@ FIXME: we shouldn't have all this "special" cases --strk;
Index: gnash/server/action.h
diff -u gnash/server/action.h:1.16 gnash/server/action.h:1.17
--- gnash/server/action.h:1.16 Sat Feb 11 00:16:46 2006
+++ gnash/server/action.h Sat Feb 11 01:57:02 2006
@@ -231,6 +231,7 @@
struct as_property_interface
{
+ virtual ~as_property_interface() {}
virtual bool set_property(int index, const as_value& val) =
0;
};
Index: gnash/server/button.cpp
diff -u gnash/server/button.cpp:1.2 gnash/server/button.cpp:1.3
--- gnash/server/button.cpp:1.2 Tue Jan 24 01:33:02 2006
+++ gnash/server/button.cpp Sat Feb 11 01:57:03 2006
@@ -380,6 +380,8 @@
void display()
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
+
for (int i = 0; i < m_def->m_button_records.size(); i++)
{
button_record& rec =
m_def->m_button_records[i];
Index: gnash/server/dlist.cpp
diff -u gnash/server/dlist.cpp:1.2 gnash/server/dlist.cpp:1.3
--- gnash/server/dlist.cpp:1.2 Tue Jan 24 01:33:02 2006
+++ gnash/server/dlist.cpp Sat Feb 11 01:57:03 2006
@@ -516,6 +516,9 @@
// Display the referenced characters. Lower depths
// are obscured by higher depths.
{
+// printf("%s(%d): \n", __PRETTY_FUNCTION__, __LINE__);
+// printf(".");
+
bool masked = false;
int highest_masked_layer = 0;
Index: gnash/server/gnash.h
diff -u gnash/server/gnash.h:1.9 gnash/server/gnash.h:1.10
--- gnash/server/gnash.h:1.9 Fri Feb 3 12:51:45 2006
+++ gnash/server/gnash.h Sat Feb 11 01:57:03 2006
@@ -295,7 +295,8 @@
/// of each imported movie.
struct import_visitor
{
- virtual void visit(const char* imported_movie_filename) = 0;
+ virtual ~import_visitor() {}
+ virtual void visit(const char* imported_movie_filename) = 0;
};
virtual void visit_imported_movies(import_visitor* visitor) = 0;
Index: gnash/server/impl.h
diff -u gnash/server/impl.h:1.10 gnash/server/impl.h:1.11
--- gnash/server/impl.h:1.10 Wed Feb 1 23:52:44 2006
+++ gnash/server/impl.h Sat Feb 11 01:57:03 2006
@@ -423,7 +423,7 @@
// Accessors for basic display info.
int get_id() const { return m_id; }
movie* get_parent() const { return m_parent; }
- void set_parent(movie* parent) { m_parent = parent; } // for
extern movie
+ void set_parent(movie* parent) { m_parent = parent; } //
for extern movie
int get_depth() const { return m_depth; }
void set_depth(int d) { m_depth = d; }
const matrix& get_matrix() const { return m_matrix; }
Index: gnash/server/morph2.cpp
diff -u gnash/server/morph2.cpp:1.1 gnash/server/morph2.cpp:1.2
--- gnash/server/morph2.cpp:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/morph2.cpp Sat Feb 11 01:57:03 2006
@@ -27,6 +27,8 @@
void morph2_character_def::display(character* inst)
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
+
int i;
float ratio = inst->m_ratio;
Index: gnash/server/shape.cpp
diff -u gnash/server/shape.cpp:1.2 gnash/server/shape.cpp:1.3
--- gnash/server/shape.cpp:1.2 Sun Jan 29 10:19:51 2006
+++ gnash/server/shape.cpp Sat Feb 11 01:57:03 2006
@@ -27,7 +27,14 @@
namespace gnash {
- static float s_curve_max_pixel_error = 1.0f;
+
+ namespace tesselate {
+ tesselating_shape::~tesselating_shape()
+ {
+ }
+ }
+
+ static float s_curve_max_pixel_error = 1.0f;
void set_curve_max_pixel_error(float pixel_error)
{
@@ -1074,6 +1081,8 @@
void shape_character_def::display(character* inst)
// Draw the shape using our own inherent styles.
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
+
matrix mat = inst->get_world_matrix();
cxform cx = inst->get_world_cxform();
@@ -1248,6 +1257,8 @@
// override our default set of fill styles (e.g. when
// rendering text).
{
+ printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
+
// Compute the error tolerance in object-space.
float max_scale = mat.get_max_scale();
if (fabsf(max_scale) < 1e-6f)
Index: gnash/server/shape.h
diff -u gnash/server/shape.h:1.2 gnash/server/shape.h:1.3
--- gnash/server/shape.h:1.2 Sun Jan 29 10:19:51 2006
+++ gnash/server/shape.h Sat Feb 11 01:57:03 2006
@@ -20,6 +20,7 @@
namespace tesselate {
struct trapezoid_accepter;
struct tesselating_shape {
+ virtual ~tesselating_shape();
virtual void tesselate(float error_tolerance,
trapezoid_accepter *accepter)
const = 0;
};
Index: gnash/server/styles.h
diff -u gnash/server/styles.h:1.1 gnash/server/styles.h:1.2
--- gnash/server/styles.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/styles.h Sat Feb 11 01:57:03 2006
@@ -28,6 +28,7 @@
struct base_fill_style
{
+ virtual ~base_fill_style() {};
virtual void apply(int fill_side, float ratio) const = 0;
};
@@ -86,6 +87,7 @@
struct base_line_style
{
+ virtual ~base_line_style(){};
virtual void apply(float ratio) const = 0;
};
Index: gnash/server/tesselate.cpp
diff -u gnash/server/tesselate.cpp:1.1 gnash/server/tesselate.cpp:1.2
--- gnash/server/tesselate.cpp:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/tesselate.cpp Sat Feb 11 01:57:03 2006
@@ -84,7 +84,11 @@
static float s_tolerance = 1.0f;
static trapezoid_accepter* s_accepter = NULL;
- struct fill_segment
+ trapezoid_accepter::~trapezoid_accepter()
+ {
+ }
+
+ struct fill_segment
{
point m_begin;
point m_end;
Index: gnash/server/tesselate.h
diff -u gnash/server/tesselate.h:1.1 gnash/server/tesselate.h:1.2
--- gnash/server/tesselate.h:1.1 Tue Dec 20 21:01:18 2005
+++ gnash/server/tesselate.h Sat Feb 11 01:57:03 2006
@@ -28,6 +28,7 @@
// trapezoidation.
struct trapezoid_accepter
{
+ virtual ~trapezoid_accepter();
virtual void accept_trapezoid(int style, const
trapezoid& tr) = 0;
virtual void accept_line_strip(int style, const
point coords[], int coord_count) = 0;
};
Index: gnash/server/text.cpp
diff -u gnash/server/text.cpp:1.4 gnash/server/text.cpp:1.5
--- gnash/server/text.cpp:1.4 Tue Jan 31 16:45:38 2006
+++ gnash/server/text.cpp Sat Feb 11 01:57:03 2006
@@ -289,6 +289,7 @@
void text_character_def::display(character* inst)
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
display_glyph_records(m_matrix, inst,
m_text_glyph_records, m_root_def);
}
@@ -866,6 +867,8 @@
void
edit_text_character::display()
{
+// printf("%s(%d): ", __PRETTY_FUNCTION__, __LINE__);
+
if (m_def->m_border)
{
matrix mat = get_world_matrix();
Index: gnash/server/xml.cpp
diff -u gnash/server/xml.cpp:1.8 gnash/server/xml.cpp:1.9
--- gnash/server/xml.cpp:1.8 Thu Feb 9 02:33:53 2006
+++ gnash/server/xml.cpp Sat Feb 11 01:57:03 2006
@@ -716,18 +716,18 @@
XMLNode &
XML::cloneNode(XMLNode &newnode, bool deep)
{
+ log_msg("%s: deep is %d\n", __PRETTY_FUNCTION__, deep);
- if (deep) {
- newnode = _nodes;
- } else {
- newnode.nodeNameSet((char *)_nodes->nodeName());
- newnode.nodeValueSet((char *)_nodes->nodeValue());
- }
-
+ if (deep) {
+ newnode = _nodes;
+ } else {
+ newnode.nodeNameSet((char *)_nodes->nodeName());
+ newnode.nodeValueSet((char *)_nodes->nodeValue());
+ }
- return newnode;
+ return newnode;
- log_msg("%s:partially unimplemented \n", __PRETTY_FUNCTION__);
+ log_msg("%s:partially unimplemented \n", __PRETTY_FUNCTION__);
}
/// \brief create a new XML element
@@ -765,7 +765,6 @@
/// undefined or null, the node is added using the appendChild()
/// method. If beforeNode is not a child of my_xml, the insertion
/// fails.
-
void
XML::insertBefore(XMLNode *newnode, XMLNode *node)
{
@@ -1082,10 +1081,10 @@
xml_obj->set_member("send", &xml_send);
xml_obj->set_member("sendAndLoad", &xml_sendandload);
xml_obj->set_member("toString", &xml_tostring);
-#ifdef ENABLE_TESTING
- xml_obj->set_member("getname", &xml_nodename);
- xml_obj->set_member("getvalue", &xml_nodevalue);
-#endif
+ // Properties
+ xml_obj->set_member("nodeName", as_value(""));
+ xml_obj->set_member("nodevalue", as_value(""));
+
}
fn.result->set_as_object_interface(xml_obj);
@@ -1146,12 +1145,12 @@
bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool();
xml_obj = new xmlnode_as_object;
#ifdef ENABLE_TESTING
- xml_obj->set_member("nodeName", &xmlnode_nodename);
- xml_obj->set_member("nodeValue", &xmlnode_nodevalue);
+ xml_obj->set_member("nodeName", as_value(""));
+ xml_obj->set_member("nodeValue", as_value(""));
xml_obj->set_member("appendChild", &xmlnode_appendchild);
+#endif
ptr->obj.cloneNode(xml_obj->obj, deep);
fn.result->set_as_object_interface(xml_obj);
-#endif
} else {
log_msg("ERROR: no Depth paramater!\n");
}
@@ -1169,8 +1168,8 @@
text = fn.env->bottom(fn.first_arg_bottom_index).to_string();
xml_obj = new xmlnode_as_object;
#ifdef ENABLE_TESTING
- xml_obj->set_member("nodeName", &xmlnode_nodename);
- xml_obj->set_member("nodeValue", &xmlnode_nodevalue);
+ xml_obj->set_member("nodeName", as_value(text));
+ xml_obj->set_member("nodeValue", as_value(""));
xml_obj->set_member("appendChild", &xmlnode_appendchild);
#endif
xml_obj->obj.nodeNameSet((char *)text);
@@ -1194,8 +1193,8 @@
text = fn.env->bottom(fn.first_arg_bottom_index).to_string();
xml_obj = new xmlnode_as_object;
#ifdef ENABLE_TESTING
- xml_obj->set_member("nodeName", &xmlnode_nodename);
- xml_obj->set_member("nodeValue", &xmlnode_nodevalue);
+ xml_obj->set_member("nodeName", as_value(""));
+ xml_obj->set_member("nodeValue", as_value(text));
xml_obj->set_member("appendChild", &xmlnode_appendchild);
#endif
xml_obj->obj.nodeValueSet((char *)text);
Index: gnash/server/xml.h
diff -u gnash/server/xml.h:1.10 gnash/server/xml.h:1.11
--- gnash/server/xml.h:1.10 Thu Feb 9 02:33:53 2006
+++ gnash/server/xml.h Sat Feb 11 01:57:03 2006
@@ -133,7 +133,7 @@
void on_event_close() { on_event(gnash::event_id::SOCK_CLOSE); }
XMLNode *operator [] (int x);
-#if 1
+#if 0
XMLNode *operator = (XMLNode &node) {
gnash::log_msg("%s: copy element %s\n", __PRETTY_FUNCTION__,
node._name);
// _nodes = node.;
@@ -215,10 +215,7 @@
}
};
-#ifdef ENABLE_TESTING
-void xml_nodename(const fn_call& fn);
-void xml_nodevalue(const fn_call& fn);
-#endif
+
void xml_load(const fn_call& fn);
void xml_set_current(const fn_call& fn);
void xml_new(const fn_call& fn);
@@ -243,6 +240,11 @@
void xml_ondata(const fn_call& fn);
void xml_loaded(const fn_call& fn);
+// Properties
+void xml_nodename(const fn_call& fn);
+void xml_nodevalue(const fn_call& fn);
+
+
int memadjust(int x);
Index: gnash/server/xmlnode.cpp
diff -u gnash/server/xmlnode.cpp:1.1 gnash/server/xmlnode.cpp:1.2
--- gnash/server/xmlnode.cpp:1.1 Thu Feb 9 02:33:53 2006
+++ gnash/server/xmlnode.cpp Sat Feb 11 01:57:03 2006
@@ -51,7 +51,7 @@
XMLNode::XMLNode() :_name(0), _value(0), _type(XML_ELEMENT_NODE)
{
- //log_msg("%s: %p \n", __FUNCTION__, this);
+ //log_msg("%s: %p \n", __PRETTY_FUNCTION__, this);
#ifdef DEBUG_MEMORY_ALLOCATION
log_msg("\tCreating XMLNode data at %p \n", this);
#endif
@@ -62,29 +62,27 @@
XMLNode::~XMLNode()
{
unsigned int i;
- //log_msg("%s: %p \n", __FUNCTION__, this);
+ //log_msg("%s: %p \n", __PRETTY_FUNCTION__, this);
#ifdef DEBUG_MEMORY_ALLOCATION
log_msg("\tDeleting XMLNode data %s at %p\n", this->_name, this);
#endif
for (i=0; i<_children.size(); i++) {
-// if (_children[i]->_name) {
-// delete _children[i]->_name;
-// }
-// if (_children[i]->_value) {
-// delete _children[i]->_value;
-// }
- delete _children[i];
+ if (_children[i]->_name) {
+ delete _children[i]->_name;
+ }
+ if (_children[i]->_value) {
+ delete _children[i]->_value;
+ }
}
for (i=0; i<_attributes.size(); i++) {
- // if (_attributes[i]->_name) {
-// delete _attributes[i]->_name;
-// }
-// if (_attributes[i]->_value) {
-// delete _attributes[i]->_value;
-// }
- delete _attributes[i];
+ if (_attributes[i]->_name) {
+ delete _attributes[i]->_name;
+ }
+ if (_attributes[i]->_value) {
+ delete _attributes[i]->_value;
+ }
}
_children.clear();
@@ -143,43 +141,169 @@
return "unknown";
}
+/// \brief append a node the the XMLNode object
+///
+/// Method; appends the specified node to the XMLNode object's child
+/// list. This method operates directly on the node referenced by the
+/// childNode parameter; it does not append a copy of the node. If the
+/// node to be appended already exists in another tree structure,
+/// appending the node to the new location will remove it from its
+/// current location. If the childNode parameter refers to a node that
+/// already exists in another XMLNode tree structure, the appended child
+/// node is placed in the new tree structure after it is removed from
+/// its existing parent node.
void
-XMLNode::appendChild(XMLNode *node)
+XMLNode::appendChild(as_object *as, XMLNode *node)
{
- log_msg("%s: %p\n", __PRETTY_FUNCTION__, this);
- XMLNode *cur;
+// log_msg("%s: %p, as is %d, node is %d\n",
+// __PRETTY_FUNCTION__, this, _objects.size(), _children.size());
- switch (node->_type) {
- case XML_TEXT_NODE:
-// log_msg("%s: Text Node\n", __PRETTY_FUNCTION__);
- nodeValueSet(node->_value);
-// cur = _children.back();
-// cur->nodeValueSet(node->_value);
- break;
- case XML_ELEMENT_NODE:
-// log_msg("%s: Element Node\n", __PRETTY_FUNCTION__);
-// _children.push_back(node);
- break;
- default:
- break;
- }
-}
+ if (node) {
+ _children.push_back(node);
+ }
+
+ if (as) {
+ _objects.push_back(as);
+ }
+
+// log_msg("%s: partially unimplemented\n", __PRETTY_FUNCTION__);
+}
+
+/// \brief copy a node
+///
+/// Method; constructs and returns a new XML node of the same type,
+/// name, value, and attributes as the specified XML object. If deep
+/// is set to true, all child nodes are recursively cloned, resulting
+/// in an exact copy of the original object's document tree.
+XMLNode &
+XMLNode::cloneNode(XMLNode &newnode, bool deep)
+{
+ log_msg("%s: deep is %d\n", __PRETTY_FUNCTION__, deep);
+
+ if (deep) {
+// newnode = _nodes;
+ } else {
+ newnode.nodeNameSet(_name);
+ newnode.nodeValueSet(_value);
+ }
+
+ return newnode;
+
+ log_msg("%s: partially unimplemented \n", __PRETTY_FUNCTION__);
+}
+
+/// \brief insert a node before a node
+///
+/// Method; inserts a new child node into the XML object's child
+/// list, before the beforeNode node. If the beforeNode parameter is
+/// undefined or null, the node is added using the appendChild()
+/// method. If beforeNode is not a child of my_xml, the insertion
+/// fails.
+void
+XMLNode::insertBefore(XMLNode *newnode, XMLNode *node)
+{
+ log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+}
+/// \brief removes the specified XML object from its parent. Also
+/// deletes all descendants of the node.
+void
+XMLNode::removeNode()
+{
+ log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+}
+const char *
+XMLNode::toString()
+{
+ XMLNode *node;
+
+ vector<XMLNode *>::const_iterator it;
+ for (it = _children.begin(); it != _children.end(); it++) {
+ node = *it;
+// log_msg("Got something\n");
+ if (node->_name) {
+ log_msg("Node name is %s", node->_name);
+ }
+ if (node->_value) {
+ log_msg("Node value is %s", node->_name);
+ }
+ }
+
+ log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+ return "Hello World!";
+}
+
+as_object *
+XMLNode::previousSibling(int x)
+{
+ log_msg("%s: partially implemented. %d objects\n",
+ __PRETTY_FUNCTION__, _objects.size());
+ if (_objects.size() > 0) {
+ return _objects[x-1];
+ }
+}
+
+as_object *
+XMLNode::nextSibling(int x)
+{
+ log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+ if (x < _objects.size()) {
+ return _objects[x];
+ }
+}
void
xmlnode_new(const fn_call& fn)
{
- as_value inum;
xmlnode_as_object *xml_obj;
//const char *data;
- log_msg("%s: nargs=%d\n", __PRETTY_FUNCTION__, fn.nargs);
+// log_msg("%s\n", __PRETTY_FUNCTION__);
xml_obj = new xmlnode_as_object;
-#ifdef ENABLE_TESTING
- xml_obj->set_member("nodeName", &xmlnode_nodename);
- xml_obj->set_member("nodeValue", &xmlnode_nodevalue);
+ // Methods
xml_obj->set_member("appendChild", &xmlnode_appendchild);
-#endif
+ xml_obj->set_member("cloneNode", &xmlnode_clonenode);
+ xml_obj->set_member("hasChildNodes", &xmlnode_haschildnodes);
+ xml_obj->set_member("insertBefore", &xmlnode_insertbefore);
+ xml_obj->set_member("removeNode", &xmlnode_removenode);
+ xml_obj->set_member("toString", &xmlnode_tostring);
+
+ // Properties
+ xml_obj->set_member("nodeName", as_value(""));
+ xml_obj->set_member("nodeValue", as_value(""));
+
+ // FIXME: these need real values
+ // These two return an array of objects
+ xml_obj->set_member("attributes", as_value(""));
+ xml_obj->set_member("childNodes", as_value(""));
+
+ //These return a reference to an object
+
+ /// \fn MLNode::firstChild
+ /// \brief XMLNode::firstChild property
+ ///
+ /// Read-only property; evaluates the specified XML object and
+ /// references the first child in the parent node\ufffds child
+ /// list. This property is null if the node does not have
+ /// children. This property is undefined if the node is a text
+ /// node. This is a read-only property and cannot be used to
+ /// manipulate child nodes; use the appendChild(), insertBefore(),
+ /// and removeNode() methods to manipulate child nodes.
+
+ xml_obj->set_member("firstChild", as_value(""));
+ /// \fn MLNode::lastChild
+ /// \brief XMLNode::lastChild property
+ ///
+ /// Read-only property; an XMLNode value that references the last
+ /// child in the node's child list. The XML.lastChild property
+ /// is null if the node does not have children. This property cannot
+ /// be used to manipulate child nodes; use the appendChild(),
+ /// insertBefore(), and removeNode() methods to manipulate child
+ /// nodes.
+ xml_obj->set_member("lastChild", as_value(""));
+ xml_obj->set_member("nextSibling", as_value(""));
+ xml_obj->set_member("parentNode", as_value(""));
+ xml_obj->set_member("previousSibling", as_value(""));
fn.result->set_as_object_interface(xml_obj);
}
@@ -193,14 +317,81 @@
xmlnode_as_object *xml_obj =
(xmlnode_as_object*)fn.env->bottom(fn.first_arg_bottom_index).to_object();
// log_msg("%s: %p \n", __PRETTY_FUNCTION__, xml_obj);
- ptr->obj.appendChild(&(xml_obj->obj));
-// ptr->obj.nodeValueSet((char *)xml_obj->obj.nodeValue());
+ XMLNode *node = &(xml_obj->obj);
+ if (ptr->obj.hasChildNodes() == false) {
+ ptr->set_member("firstChild", xml_obj);
+ }
+ int length = ptr->obj.length();
+ if (length > 0) {
+ as_object *ass = xml_obj->obj.previousSibling(length);
+// FIXME: This shouldn't always be NULL
+// log_msg("%s: ASS is %p, length is %d\n", __PRETTY_FUNCTION__,
+// ass, length);
+ ptr->set_member("previousSibling", ass);
+// ptr->set_member("nextSibling",
xml_obj->obj.nextSibling(ptr->obj.length()));
+ }
+ ptr->obj.appendChild((as_object *)xml_obj, node);
+ // The last child in the list is always the one we just appended
+ ptr->set_member("lastChild", xml_obj);
+
+// ptr->obj.appendChild(&(xml_obj->obj));
+// ptr->obj.nodeValueSet((char *)xmlnode_obj->obj.nodeValue());
+}
+
+void xmlnode_clonenode(const fn_call& fn)
+{
+ log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
+ xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+ xmlnode_as_object *xmlnode_obj;
+ assert(ptr);
+
+ if (fn.nargs > 0) {
+ bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool();
+ xmlnode_obj = new xmlnode_as_object;
+ ptr->obj.cloneNode(xmlnode_obj->obj, deep);
+ fn.result->set_as_object_interface(xmlnode_obj);
+ } else {
+ log_msg("ERROR: no Depth paramater!\n");
+ }
+
+}
+
+void xmlnode_insertbefore(const fn_call& fn)
+{
+ xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+ assert(ptr);
+
+// fn.result->set_int(ptr->obj.getAllocated());
+// ptr->obj.insertBefore();
+ log_msg("%s:unimplemented \n", __PRETTY_FUNCTION__);
+}
+void xmlnode_removenode(const fn_call& fn)
+{
+ xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+ assert(ptr);
+
+// fn.result->set_int(ptr->obj.getAllocated());
+ ptr->obj.removeNode();
+}
+void xmlnode_tostring(const fn_call& fn)
+{
+ xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+ assert(ptr);
+
+ fn.result->set_string(ptr->obj.toString());
+}
+
+void xmlnode_haschildnodes(const fn_call& fn)
+{
+ xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
+ assert(ptr);
+ fn.result->set_bool(ptr->obj.hasChildNodes());
}
#ifdef ENABLE_TESTING
void xmlnode_nodevalue(const fn_call& fn)
{
- // log_msg("%s: \n", __PRETTY_FUNCTION__);
+ log_msg("%s: \n", __PRETTY_FUNCTION__);
xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
assert(ptr);
@@ -208,7 +399,7 @@
}
void xmlnode_nodename(const fn_call& fn)
{
- // log_msg("%s: \n", __PRETTY_FUNCTION__);
+ log_msg("%s: \n", __PRETTY_FUNCTION__);
xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr;
assert(ptr);
Index: gnash/server/xmlnode.h
diff -u gnash/server/xmlnode.h:1.1 gnash/server/xmlnode.h:1.2
--- gnash/server/xmlnode.h:1.1 Thu Feb 9 02:33:53 2006
+++ gnash/server/xmlnode.h Sat Feb 11 01:57:03 2006
@@ -46,6 +46,8 @@
XMLNode();
~XMLNode();
+
+
int length() { return _children.size(); }
const char *nodeName();
const char *nodeValue();
@@ -64,13 +66,9 @@
return false;
}
- XMLNode *firstChild() {
- return _children[0];
- }
+ XMLNode *firstChild() { return _children[0]; }
- std::vector<XMLNode *>childNodes() {
- return _children;
- }
+ std::vector<XMLNode *>childNodes() { return _children; }
XMLNode *operator [] (int x) {
gnash::log_msg("%s: get element %d\n", __PRETTY_FUNCTION__, x);
@@ -95,14 +93,22 @@
_attributes = node->_attributes;
return this;
}
-
- void appendChild(XMLNode *node);
-
+
+ as_object *previousSibling(int x);
+ as_object *nextSibling(int x);
+ XMLNode &cloneNode(XMLNode &newnode, bool deep);
+ void appendChild(as_object *as,XMLNode *node);
+ void insertBefore(XMLNode *newnode, XMLNode *node);
+ void removeNode();
+ const char *toString();
+
void change_stack_frame(int frame, gnash::as_object *xml,
gnash::as_environment *env);
+
char *_name;
char *_value;
xmlElementType _type;
+ std::vector<as_object *> _objects;
std::vector<XMLNode *> _children;
std::vector<XMLAttr *> _attributes;
};
@@ -111,7 +117,7 @@
struct xmlnode_as_object : public gnash::as_object
{
XMLNode obj;
- int _padding;
+// int _padding;
#ifdef DEBUG_MEMORY_ALLOCATION
xmlnode_as_object() {
@@ -125,19 +131,26 @@
};
void xmlnode_new(const fn_call& fn);
-void xmlnode_appendchild(const fn_call& fn);
+
#ifdef ENABLE_TESTING
+void xmlnode_haschildren(const fn_call& fn);
void xmlnode_nodename(const fn_call& fn);
void xmlnode_nodevalue(const fn_call& fn);
-void xmlnode_haschildren(const fn_call& fn);
#endif
+void xmlnode_appendchild(const fn_call& fn);
+void xmlnode_clonenode(const fn_call& fn);
+void xmlnode_haschildnodes(const fn_call& fn);
+void xmlnode_insertbefore(const fn_call& fn);
+void xmlnode_removenode(const fn_call& fn);
+void xmlnode_tostring(const fn_call& fn);
+
} // end of gnash namespace
#endif // HAVE_LIBXML
-#endif // __XML_NODE_H__
+#endif // __XMLNODE_NODE_H__
// Local Variables:
Index: gnash/testsuite/actionscript.all/XML.as
diff -u gnash/testsuite/actionscript.all/XML.as:1.3
gnash/testsuite/actionscript.all/XML.as:1.4
--- gnash/testsuite/actionscript.all/XML.as:1.3 Thu Feb 9 02:33:53 2006
+++ gnash/testsuite/actionscript.all/XML.as Sat Feb 11 01:57:03 2006
@@ -23,139 +23,141 @@
var tmp = new XML;
+#include "dejagnu.as"
+
// test the XML constuctor
if (tmp) {
- trace("PASSED: XML::XML() constructor");
+ pass("XML::XML() constructor");
} else {
- trace("FAILED: XML::XML()");
+ fail("XML::XML()");
}
// test the XML::addrequestheader method
if (tmp.addRequestHeader) {
- trace("PASSED: XML::addRequestHeader() exists");
+ pass("XML::addRequestHeader() exists");
} else {
- trace("FAILED: XML::addRequestHeader() doesn't exist");
+ fail("XML::addRequestHeader() doesn't exist");
}
// test the XML::appendchild method
if (tmp.appendChild) {
- trace("PASSED: XML::appendChild() exists");
+ pass("XML::appendChild() exists");
} else {
- trace("FAILED: XML::appendChild() doesn't exist");
+ fail("XML::appendChild() doesn't exist");
}
// test the XML::clonenode method
if (tmp.cloneNode) {
- trace("PASSED: XML::cloneNode() exists");
+ pass("XML::cloneNode() exists");
} else {
- trace("FAILED: XML::cloneNode() doesn't exist");
+ fail("XML::cloneNode() doesn't exist");
}
// test the XML::createelement method
if (tmp.createElement) {
- trace("PASSED: XML::createElement() exists");
+ pass("XML::createElement() exists");
} else {
- trace("FAILED: XML::createElement() doesn't exist");
+ fail("XML::createElement() doesn't exist");
}
// test the XML::createtextnode method
if (tmp.createTextNode) {
- trace("PASSED: XML::createTextNode() exists");
+ pass("XML::createTextNode() exists");
} else {
- trace("FAILED: XML::createTextNode() doesn't exist");
+ fail("XML::createTextNode() doesn't exist");
}
// test the XML::getbytesloaded method
if (tmp.getBytesLoaded) {
- trace("PASSED: XML::getBytesLoaded() exists");
+ pass("XML::getBytesLoaded() exists");
} else {
- trace("FAILED: XML::getBytesLoaded() doesn't exist");
+ fail("XML::getBytesLoaded() doesn't exist");
}
// test the XML::getbytestotal method
if (tmp.getBytesTotal) {
- trace("PASSED: XML::getBytesTotal() exists");
+ pass("XML::getBytesTotal() exists");
} else {
- trace("FAILED: XML::getBytesTotal() doesn't exist");
+ fail("XML::getBytesTotal() doesn't exist");
}
// test the XML::haschildnodes method
if (tmp.hasChildNodes) {
- trace("PASSED: XML::hasChildNodes() exists");
+ pass("XML::hasChildNodes() exists");
} else {
- trace("FAILED: XML::hasChildNodes() doesn't exist");
+ fail("XML::hasChildNodes() doesn't exist");
}
// test the XML::insertbefore method
if (tmp.insertBefore) {
- trace("PASSED: XML::insertBefore() exists");
+ pass("XML::insertBefore() exists");
} else {
- trace("FAILED: XML::insertBefore() doesn't exist");
+ fail("XML::insertBefore() doesn't exist");
}
// test the XML::load method
if (tmp.load) {
- trace("PASSED: XML::load() exists");
+ pass("XML::load() exists");
} else {
- trace("FAILED: XML::load() doesn't exist");
+ fail("XML::load() doesn't exist");
}
// test the XML::loaded method
if (tmp.loaded) {
- trace("PASSED: XML::loaded() exists");
+ pass("XML::loaded() exists");
} else {
- trace("FAILED: XML::loaded() doesn't exist");
+ fail("XML::loaded() doesn't exist");
}
// test the XML::parse method
if (tmp.parseXML) {
- trace("PASSED: XML::parseXML() exists");
+ pass("XML::parseXML() exists");
} else {
- trace("FAILED: XML::parseXML() doesn't exist");
+ fail("XML::parseXML() doesn't exist");
}
// test the XML::removenode method
if (tmp.removeNode) {
- trace("PASSED: XML::removeNode() exists");
+ pass("XML::removeNode() exists");
} else {
- trace("FAILED: XML::removeNode() doesn't exist");
+ fail("XML::removeNode() doesn't exist");
}
// test the XML::send method
if (tmp.send) {
- trace("PASSED: XML::send() exists");
+ pass("XML::send() exists");
} else {
- trace("FAILED: XML::send() doesn't exist");
+ fail("XML::send() doesn't exist");
}
// test the XML::sendandload method
if (tmp.sendAndLoad) {
- trace("PASSED: XML::sendAndLoad() exists");
+ pass("XML::sendAndLoad() exists");
} else {
- trace("FAILED: XML::sendAndLoad() doesn't exist");
+ fail("XML::sendAndLoad() doesn't exist");
}
// test the XML::tostring method
if (tmp.toString) {
- trace("PASSED: XML::toString() exists");
+ pass("XML::toString() exists");
} else {
- trace("FAILED: XML::toString() doesn't exist");
+ fail("XML::toString() doesn't exist");
}
// Load
if (tmp.load("testin.xml")) {
- trace("PASSED: XML::load() works");
+ pass("XML::load() works");
} else {
- trace("FAILED: XML::load() doesn't work");
+ fail("XML::load() doesn't work");
}
//
if (tmp.hasChildNodes() == true) {
- trace("PASSED: XML::hasChildNodes() works");
+ pass("XML::hasChildNodes() works");
} else {
- trace("FAILED: XML::hasChildNodes() doesn't work");
+ fail("XML::hasChildNodes() doesn't work");
}
if (tmp.getBytesLoaded() > 1) {
- trace("PASSED: XML::getBytesLoaded() works");
+ pass("XML::getBytesLoaded() works");
} else {
- trace("FAILED: XML::getBytesLoaded() doesn't work");
+ fail("XML::getBytesLoaded() doesn't work");
}
if (tmp.getBytesTotal() > 1) {
- trace("PASSED: XML::getBytesTotal() works");
+ pass("XML::getBytesTotal() works");
} else {
- trace("FAILED: XML::getBytesTotal() doesn't work");
+ fail("XML::getBytesTotal() doesn't work");
}
if (tmp.getBytesLoaded() == tmp.getBytesTotal()) {
- trace("PASSED: bytes count are the same");
+ pass("bytes count are the same");
} else {
- trace("FAILED: bytes counts are not the same");
+ fail("bytes counts are not the same");
}
myXML = new XML();
@@ -163,46 +165,48 @@
//trace(before);
getCourseElement = myXML.createElement("module");
+if (getCourseElement.nodename == "module") {
+ pass("XML::createElementNode() works");
+} else {
+ fail("XML::createElementNode() doesn't work");
+}
textElement = myXML.createTextNode("Hello World");
-nodevalue = textElement.nodeValue();
-
-//trace(nodevalue);
-if (nodevalue == "Hello World") {
- trace("PASSED: XML::createTextNode() works");
+if (textElement.nodevalue == "Hello World") {
+ pass("XML::createTextNode() works");
} else {
- trace("FAILED: XML::createTextNode() doesn't work");
+ fail("XML::createTextNode() doesn't work");
}
getCourseElement.appendChild(textElement);
-nodename = getCourseElement.nodeName();
+nodename = getCourseElement.nodeName;
//trace(nodename);
-nodevalue = getCourseElement.nodeValue();
+nodevalue = getCourseElement.nodeValue;
//trace(nodevalue);
-if ((nodename == "module") && (nodevalue == "Hello World")) {
- trace("PASSED: XML::createTextNode() works");
+if ((nodename == "module") && (nodevalue == "")) {
+ pass("XML::createTextNode() works");
} else {
- trace("FAILED: XML::createTextNode() doesn't work");
+ fail("XML::createTextNode() doesn't work");
}
-nodename = getCourseElement.nodeName();
+nodename = getCourseElement.nodeName;
myXML.appendChild(getCourseElement);
var after = myXML.hasChildNodes();
//trace(after);
if ((before == false) && (after == true) && (nodename == "module")) {
- trace("PASSED: XML::appendChild() works");
+ pass("XML::appendChild() works");
} else {
- trace("FAILED: XML::appendChild() doesn't work");
+ fail("XML::appendChild() doesn't work");
}
// trace(myXML.toString());
newnode = myXML.cloneNode(false);
-trace(newnode.nodeName());
-trace(newnode.nodeValue());
+trace(myXML.nodeName);
+trace(newnode.nodeValue);
// for (var i=0; i < valueArray.length; i++) {
@@ -224,3 +228,5 @@
// textElement = myXML.createTextNode(valueArray[i]);
// getvalueElement.appendChild(textElement);
// }
+
+totals();
Index: gnash/testsuite/actionscript.all/check.as
diff -u gnash/testsuite/actionscript.all/check.as:1.1
gnash/testsuite/actionscript.all/check.as:1.2
--- gnash/testsuite/actionscript.all/check.as:1.1 Thu Feb 9 00:37:25 2006
+++ gnash/testsuite/actionscript.all/check.as Sat Feb 11 01:57:03 2006
@@ -31,13 +31,10 @@
// Use check(<expression>)
// Make sure your expression doesn't contain single quotes
//
-
#define check(expr) \
if ( expr ) trace("PASSED: " + #expr + \
" [" + __FILE__ + ":" + __LINE__ + "]" ); \
else trace("FAILED: " + #expr + \
" [" + __FILE__ + ":" + __LINE__ + "]" ); \
-
-
#endif // _CHECK_AS_
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ./ChangeLog ./configure.ac server/Movie.c...,
Rob Savoye <=