gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/asobj/xmlnode.cpp testsu...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/xmlnode.cpp testsu...
Date: Mon, 14 May 2007 14:52:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/14 14:52:53

Modified files:
        .              : ChangeLog 
        server/asobj   : xmlnode.cpp 
        testsuite/actionscript.all: XML.as 

Log message:
                * server/asobj/xmlnode.cpp (stringify): represent empty nodes 
with the
                  "<openclose />" format.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3199&r2=1.3200
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?cvsroot=gnash&r1=1.30&r2=1.31

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3199
retrieving revision 1.3200
diff -u -b -r1.3199 -r1.3200
--- ChangeLog   14 May 2007 14:37:37 -0000      1.3199
+++ ChangeLog   14 May 2007 14:52:52 -0000      1.3200
@@ -1,5 +1,7 @@
 2007-05-14 Sandro Santilli <address@hidden>
 
+       * server/asobj/xmlnode.cpp (stringify): represent empty nodes with the
+         "<openclose />" format.
        * server/asobj/xml.{cpp,h}: parseDoc made private; add clear()
          method for dropping childs and attibutes; clear() on parseXML() or
          load() calls.

Index: server/asobj/xmlnode.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- server/asobj/xmlnode.cpp    18 Apr 2007 14:07:32 -0000      1.33
+++ server/asobj/xmlnode.cpp    14 May 2007 14:52:52 -0000      1.34
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: xmlnode.cpp,v 1.33 2007/04/18 14:07:32 jgilmore Exp $ */
+/* $Id: xmlnode.cpp,v 1.34 2007/05/14 14:52:52 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -310,9 +310,20 @@
             xmlout << " " << xa.name() << "=\"" << xa.value() << "\"";
         }
 
+       // If the node has no content, just close the tag now
+       if ( nodevalue.empty() && xml._children.empty() )
+       {
+               xmlout << " />";
+               return;
+       }
+       else
+       {
+               // Will use a closing tag later
         xmlout << ">";
     }
 
+    }
+
     // Node value first, then children
     if ( type == tText )
     {

Index: testsuite/actionscript.all/XML.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XML.as,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- testsuite/actionscript.all/XML.as   14 May 2007 14:37:38 -0000      1.30
+++ testsuite/actionscript.all/XML.as   14 May 2007 14:52:52 -0000      1.31
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: XML.as,v 1.30 2007/05/14 14:37:38 strk Exp $";
+rcsid="$Id: XML.as,v 1.31 2007/05/14 14:52:52 strk Exp $";
 
 #include "dejagnu.as"
 #include "utils.as"
@@ -702,7 +702,7 @@
 xcheck_equals(myxml2.toString(), xmlin);  // gnash fails discarding newlines 
and tabs I think..
 myxml2.parseXML(xmlin2); // parsing twice doesn't append !
 check_equals(myxml2.childNodes.length, 1);  
-xcheck_equals(myxml2.toString(), xmlin2_out); 
+check_equals(myxml2.toString(), xmlin2_out); 
 
 myxml2.ignoreWhite = true; // doesn't work w/out load ?
 myxml2.parseXML(xmlin);




reply via email to

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