gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-220-g212629c
Date: Fri, 08 Apr 2011 17:46:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  212629c7f400e2c37d9cf918ec2f888b349364d0 (commit)
       via  72d66411d7180ffa365dab3d2882ceb9343539f1 (commit)
       via  5ad34c431379b48032c01c5a6328195002a0f410 (commit)
       via  abef8ce62dc77821d0a68ce795f1b639c13779d3 (commit)
       via  797c913001c4b2ab31d80f2c95e22fb220516078 (commit)
       via  bab4bcf5745189286c5792bbb8baec3b54da41f4 (commit)
      from  93c31711dc5e88a307cb7b9c4c995fb717bc5dab (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=212629c7f400e2c37d9cf918ec2f888b349364d0


commit 212629c7f400e2c37d9cf918ec2f888b349364d0
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 19:31:12 2011 +0200

    Improvements to XML and XMLNode
    
    Const correction and get closer to passing swfdec tests.

diff --git a/libcore/asobj/XMLNode_as.cpp b/libcore/asobj/XMLNode_as.cpp
index b821c7b..5dd8e8a 100644
--- a/libcore/asobj/XMLNode_as.cpp
+++ b/libcore/asobj/XMLNode_as.cpp
@@ -176,21 +176,21 @@ XMLNode_as::hasChildNodes()
 }
 
 XMLNode_as*
-XMLNode_as::firstChild()
+XMLNode_as::firstChild() const
 {
     if (_children.empty()) return 0;
     return _children.front();
 }
 
 XMLNode_as*
-XMLNode_as::cloneNode(bool deep)
+XMLNode_as::cloneNode(bool deep) const
 {
     XMLNode_as* newnode = new XMLNode_as(*this, deep);
     return newnode;
 }
 
 XMLNode_as*
-XMLNode_as::lastChild()
+XMLNode_as::lastChild() const
 {
        if (_children.empty()) {
         return 0;
@@ -241,8 +241,8 @@ XMLNode_as::insertBefore(XMLNode_as* newnode, XMLNode_as* 
pos)
     updateChildNodes();
 }
 
-XMLNode_as *
-XMLNode_as::previousSibling()
+XMLNode_as*
+XMLNode_as::previousSibling() const
 {
     if (!_parent) return 0;
        if (_parent->_children.size() <= 1) return 0;
@@ -259,8 +259,8 @@ XMLNode_as::previousSibling()
     return 0;
 }
 
-XMLNode_as *
-XMLNode_as::nextSibling()
+XMLNode_as*
+XMLNode_as::nextSibling() const
 {
 
     if (!_parent) return 0;
@@ -403,11 +403,10 @@ XMLNode_as::stringify(const XMLNode_as& xml, 
std::ostream& xmlout, bool encode)
             nodeValue, xml._attributes.size(), xml._children.size());
 #endif
 
-    // Create the beginning of the tag
     if (!nodeName.empty()) {
 
         xmlout << "<" << nodeName;
-    
+
         // Process the attributes, if any
         StringPairs attrs;
         enumerateAttributes(xml, attrs);
@@ -420,16 +419,15 @@ XMLNode_as::stringify(const XMLNode_as& xml, 
std::ostream& xmlout, bool encode)
             }
         }
 
-       // If the node has no content, just close the tag now
-       if (nodeValue.empty() && xml._children.empty()) {
-               xmlout << " />";
+        // 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 as_value first, then children
@@ -455,7 +453,7 @@ XMLNode_as::stringify(const XMLNode_as& xml, std::ostream& 
xmlout, bool encode)
     }
 
     if (!nodeName.empty()) {
-           xmlout << "</" << nodeName << ">";
+        xmlout << "</" << nodeName << ">";
     }
 }
 
diff --git a/libcore/asobj/XMLNode_as.h b/libcore/asobj/XMLNode_as.h
index 9e1dee7..50e9400 100644
--- a/libcore/asobj/XMLNode_as.h
+++ b/libcore/asobj/XMLNode_as.h
@@ -115,16 +115,16 @@ public:
     ///  returns false.
     bool hasChildNodes();
 
-    XMLNode_as* firstChild();
-    XMLNode_as* lastChild();
+    XMLNode_as* firstChild() const;
+    XMLNode_as* lastChild() const;
     
     // Use a list for quick erasing
     typedef std::list<XMLNode_as*> Children;
 
     as_object* childNodes();
 
-    XMLNode_as* previousSibling();
-    XMLNode_as* nextSibling();
+    XMLNode_as* previousSibling() const;
+    XMLNode_as* nextSibling() const;
 
     /// Copy a node
     //  
@@ -132,7 +132,7 @@ public:
     /// 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_as* cloneNode(bool deep);
+    XMLNode_as* cloneNode(bool deep) const;
 
     /// Append a child node to this XML object
     //
diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index 6b073cc..e365845 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -461,14 +461,14 @@ XML_as::parseCData(XMLNode_as* node, xml_iterator& it,
 void
 XML_as::parseXML(const std::string& xml)
 {
+    // Clear current data
+    clear(); 
+
     if (xml.empty()) {
         log_error(_("XML data is empty"));
         return;
     }
 
-    // Clear current data
-    clear(); 
-
     xml_iterator it = xml.begin();
     const xml_iterator end = xml.end();
     XMLNode_as* node = this;
@@ -715,21 +715,18 @@ xml_escape(const fn_call& fn)
 as_value
 xml_createElement(const fn_call& fn)
 {
-    
-    if (fn.nargs > 0)
-    {
-        const std::string& text = fn.arg(0).to_string();
-        XMLNode_as *xml_obj = new XMLNode_as(getGlobal(fn));
-        xml_obj->nodeNameSet(text);
-        xml_obj->nodeTypeSet(XMLNode_as::Text);
-
-        return as_value(xml_obj->object());
-        
-    }
-    else {
-        log_error(_("no text for element creation"));
+    if (!fn.nargs || fn.arg(0).is_undefined()) {
+        return as_value();
     }
-    return as_value();
+
+    const as_value& arg = fn.arg(0);
+
+    const std::string& text = arg.to_string(getSWFVersion(fn));
+    XMLNode_as *xml_obj = new XMLNode_as(getGlobal(fn));
+    xml_obj->nodeNameSet(text);
+    if (!text.empty()) xml_obj->nodeTypeSet(XMLNode_as::Text);
+
+    return as_value(xml_obj->object());
 }
 
 
@@ -762,18 +759,19 @@ xml_createTextNode(const fn_call& fn)
 as_value
 xml_parseXML(const fn_call& fn)
 {
-
     XML_as* ptr = ensure<ThisIsNative<XML_as> >(fn);
 
-    if (fn.nargs < 1)
-    {
+    if (fn.nargs < 1) {
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror("XML.parseXML() needs one argument");
         );
         return as_value();
     }
 
-    const std::string& text = fn.arg(0).to_string();
+    const as_value arg = fn.arg(0);
+    if (arg.is_undefined()) return as_value();
+
+    const std::string& text = arg.to_string(getSWFVersion(fn));
     ptr->parseXML(text);
     
     return as_value();

http://git.savannah.gnu.org/cgit//commit/?id=72d66411d7180ffa365dab3d2882ceb9343539f1


commit 72d66411d7180ffa365dab3d2882ceb9343539f1
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 18:10:36 2011 +0200

    Update NEWS.

diff --git a/NEWS b/NEWS
index cb16b3c..15b6b3b 100644
--- a/NEWS
+++ b/NEWS
@@ -5,8 +5,9 @@ Improvements since 0.8.9 release are:
 
  * Qt4 GUI supports mouse wheel, clipboard, and screen resolution.
  * Enhanced UI support for script limits (abort popups, user prefs)
- * BitmapData functions copyPixels(), copyChannel, and noise() 
+ * BitmapData functions copyPixels(), copyChannel(), and noise() 
    implemented.
+ * Node id mapping in ActionScript XML class implemented (XML.idMap).
 
 Gnash 0.8.9
 2011/03/19

http://git.savannah.gnu.org/cgit//commit/?id=5ad34c431379b48032c01c5a6328195002a0f410


commit 5ad34c431379b48032c01c5a6328195002a0f410
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 18:04:32 2011 +0200

    Cleanup and expect swfdec passes.

diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index 43aed23..6b073cc 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -67,6 +67,9 @@ namespace {
             const std::string& match, bool advance = true);
     bool parseNodeWithTerminator( xml_iterator& it, xml_iterator end,
             const std::string& terminator, std::string& content);
+
+    void setIdMap(as_object& xml, XMLNode_as& childNode,
+            const std::string& val);
        
        
     typedef std::map<std::string, std::string> Entities;
@@ -345,37 +348,14 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
         // Do nothing more if there was an error in attributes parsing.
         if (_status != XML_OK) return;
 
+        // testsuite/swfdec/xml-id-map.as tests that the node is appended
+        // first.
         node->appendChild(childNode);
 
         for (Attributes::const_reverse_iterator i = attributes.rbegin(),
                 e = attributes.rend(); i != e; ++i) {
-
             childNode->setAttribute(i->first, i->second);
-
-            if (i->first == "id") {
-                VM& vm = getVM(*object());
-                const ObjectURI& id = getURI(vm, "idMap");
-
-                if (getSWFVersion(*object()) > 7) {
-                    as_value im;
-                    as_object* idMap;
-                    if (object()->get_member(id, &im)) {
-                        idMap = toObject(im, vm);
-                        if (!idMap) {
-                            // If it's present but not an object just ignore it
-                            // and carry on.
-                            continue;
-                        }
-                    }
-                    else {
-                        // If it's not there at all create it.
-                        idMap = new as_object(getGlobal(*object()));
-                        object()->set_member(id, idMap);
-                    }
-                    idMap->set_member(getURI(vm, i->second), 
childNode->object());
-                }
-                else object()->set_member(getURI(vm, i->second), 
childNode->object());
-            }
+            if (i->first == "id") setIdMap(*object(), *childNode, i->second);
         }
 
         if (*it == '/') ++it;
@@ -702,8 +682,12 @@ as_value
 xml_ignoreWhite(const fn_call& fn)
 {
     XML_as* ptr = ensure<ThisIsNative<XML_as> >(fn);
-    if (!fn.nargs) return as_value(ptr->ignoreWhite());
+    if (!fn.nargs) {
+        // Getter
+        return as_value(ptr->ignoreWhite());
+    }
 
+    // Setter
     if (fn.arg(0).is_undefined()) return as_value();
     ptr->ignoreWhite(toBool(fn.arg(0), getVM(fn)));
     return as_value();
@@ -930,6 +914,39 @@ parseNodeWithTerminator(xml_iterator& it, const 
xml_iterator end,
     return true;
 }
 
+
+void
+setIdMap(as_object& xml, XMLNode_as& childNode, const std::string& val)
+{
+    VM& vm = getVM(xml);
+
+    const ObjectURI& id = getURI(vm, "idMap");
+
+    if (getSWFVersion(xml) < 8) {
+        // In version 7 or below, properties are added to the XML object.
+        xml.set_member(getURI(vm, val), childNode.object());
+        return;
+    }
+
+    // In version 8 or above, properties are added to an idMap member.
+    as_value im;
+    as_object* idMap;
+    if (xml.get_member(id, &im)) {
+        // If it's present but not an object just ignore it
+        // and carry on.
+        if (!im.is_object()) return;
+
+        idMap = toObject(im, vm);
+        assert(idMap);
+    }
+    else {
+        // If it's not there at all create it.
+        idMap = new as_object(getGlobal(xml));
+        xml.set_member(id, idMap);
+    }
+    idMap->set_member(getURI(vm, val), childNode.object());
+}
+
 const Entities&
 getEntities()
 {
diff --git a/testsuite/swfdec/PASSING b/testsuite/swfdec/PASSING
index b123d98..bb7668d 100644
--- a/testsuite/swfdec/PASSING
+++ b/testsuite/swfdec/PASSING
@@ -1517,6 +1517,10 @@ xml-errors-8.swf:321a6535952813fadeaef64c99fa467d
 xml-escape-6.swf:302349505514bd60239c7019355f6ab8
 xml-escape-7.swf:31cca7515723685cf0384bf7e059e8ac
 xml-escape-8.swf:cbd1f724a3dc3e73697535468443171d
+xml-id-map-5.swf:cbc2a3b106ee7eafea7a058bb59bfcbf
+xml-id-map-6.swf:42fd72c065f4d14f459a8b3e8f2ba8d8
+xml-id-map-7.swf:49df5d26cdb5c3d1008d28d23ec46ad0
+xml-id-map-8.swf:1901f3cda027e9b3e6cd0b1b372dba12
 xml-init-5.swf:2ba1da174f2b1958749fede5667a60c4
 xml-init-5.swf:bb54cac64e38396084a147266f7d9711
 xml-init-6.swf:d82535b95268d2f426800229232697fd

http://git.savannah.gnu.org/cgit//commit/?id=abef8ce62dc77821d0a68ce795f1b639c13779d3


commit abef8ce62dc77821d0a68ce795f1b639c13779d3
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 16:46:38 2011 +0200

    Fix other idmap tests.

diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index cb6f79d..43aed23 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -356,22 +356,25 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
                 VM& vm = getVM(*object());
                 const ObjectURI& id = getURI(vm, "idMap");
 
-                as_value im;
-                as_object* idMap;
-                if (object()->get_member(id, &im)) {
-                    idMap = toObject(im, vm);
-                    if (!idMap) {
-                        // If it's present but not an object just ignore it
-                        // and carry on.
-                        continue;
+                if (getSWFVersion(*object()) > 7) {
+                    as_value im;
+                    as_object* idMap;
+                    if (object()->get_member(id, &im)) {
+                        idMap = toObject(im, vm);
+                        if (!idMap) {
+                            // If it's present but not an object just ignore it
+                            // and carry on.
+                            continue;
+                        }
                     }
+                    else {
+                        // If it's not there at all create it.
+                        idMap = new as_object(getGlobal(*object()));
+                        object()->set_member(id, idMap);
+                    }
+                    idMap->set_member(getURI(vm, i->second), 
childNode->object());
                 }
-                else {
-                    // If it's not there at all create it.
-                    idMap = new as_object(getGlobal(*object()));
-                    object()->set_member(id, idMap);
-                }
-                idMap->set_member(getURI(vm, i->second), childNode->object());
+                else object()->set_member(getURI(vm, i->second), 
childNode->object());
             }
         }
 

http://git.savannah.gnu.org/cgit//commit/?id=797c913001c4b2ab31d80f2c95e22fb220516078


commit 797c913001c4b2ab31d80f2c95e22fb220516078
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 16:42:45 2011 +0200

    Append node before setting attributes.
    
    This passes a clever but very nitpicky swfdec test.

diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index 74a6029..cb6f79d 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -345,6 +345,8 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
         // Do nothing more if there was an error in attributes parsing.
         if (_status != XML_OK) return;
 
+        node->appendChild(childNode);
+
         for (Attributes::const_reverse_iterator i = attributes.rbegin(),
                 e = attributes.rend(); i != e; ++i) {
 
@@ -373,7 +375,6 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
             }
         }
 
-        node->appendChild(childNode);
         if (*it == '/') ++it;
         else node = childNode;
 

http://git.savannah.gnu.org/cgit//commit/?id=bab4bcf5745189286c5792bbb8baec3b54da41f4


commit bab4bcf5745189286c5792bbb8baec3b54da41f4
Author: Benjamin Wolsey <address@hidden>
Date:   Fri Apr 8 16:24:41 2011 +0200

    Fixes to XML properties.
    
    Test and fix ignoreWhite(), add an incomplete implementation of idMap.

diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index c43948a..74a6029 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -58,6 +58,7 @@ namespace {
     as_value xml_escape(const fn_call& fn);
     as_value xml_loaded(const fn_call& fn);
     as_value xml_status(const fn_call& fn);
+    as_value xml_ignoreWhite(const fn_call& fn);
 
     typedef XML_as::xml_iterator xml_iterator;
 
@@ -81,7 +82,8 @@ XML_as::XML_as(as_object& object)
     :
     XMLNode_as(getGlobal(object)),
     _loaded(XML_LOADED_UNDEFINED), 
-    _status(XML_OK)
+    _status(XML_OK),
+    _ignoreWhite(false)
 {
     setObject(&object);
 }
@@ -91,7 +93,8 @@ XML_as::XML_as(as_object& object, const std::string& xml)
     :
     XMLNode_as(getGlobal(object)),
     _loaded(XML_LOADED_UNDEFINED), 
-    _status(XML_OK)
+    _status(XML_OK),
+    _ignoreWhite(false)
 {
     setObject(&object);
     parseXML(xml);
@@ -344,7 +347,30 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
 
         for (Attributes::const_reverse_iterator i = attributes.rbegin(),
                 e = attributes.rend(); i != e; ++i) {
+
             childNode->setAttribute(i->first, i->second);
+
+            if (i->first == "id") {
+                VM& vm = getVM(*object());
+                const ObjectURI& id = getURI(vm, "idMap");
+
+                as_value im;
+                as_object* idMap;
+                if (object()->get_member(id, &im)) {
+                    idMap = toObject(im, vm);
+                    if (!idMap) {
+                        // If it's present but not an object just ignore it
+                        // and carry on.
+                        continue;
+                    }
+                }
+                else {
+                    // If it's not there at all create it.
+                    idMap = new as_object(getGlobal(*object()));
+                    object()->set_member(id, idMap);
+                }
+                idMap->set_member(getURI(vm, i->second), childNode->object());
+            }
         }
 
         node->appendChild(childNode);
@@ -392,14 +418,14 @@ XML_as::parseTag(XMLNode_as*& node, xml_iterator& it,
 
 void
 XML_as::parseText(XMLNode_as* node, xml_iterator& it,
-        const xml_iterator end)
+        const xml_iterator end, bool iw)
 {
     xml_iterator ourend = std::find(it, end, '<');
     std::string content(it, ourend);
     
     it = ourend;
 
-    if (ignoreWhite() && 
+    if (iw && 
         content.find_first_not_of("\t\r\n ") == std::string::npos) return;
 
     XMLNode_as* childNode = new XMLNode_as(_global);
@@ -451,7 +477,6 @@ XML_as::parseCData(XMLNode_as* node, xml_iterator& it,
 void
 XML_as::parseXML(const std::string& xml)
 {
-
     if (xml.empty()) {
         log_error(_("XML data is empty"));
         return;
@@ -464,6 +489,8 @@ XML_as::parseXML(const std::string& xml)
     const xml_iterator end = xml.end();
     XMLNode_as* node = this;
 
+    const bool iw = ignoreWhite();
+
     while (it != end && _status == XML_OK)
     {
         if (*it == '<')
@@ -491,7 +518,7 @@ XML_as::parseXML(const std::string& xml)
             }
             else parseTag(node, it, end);
         }
-        else parseText(node, it, end);
+        else parseText(node, it, end, iw);
     }
 
     // If everything parsed correctly, check that we've got back to the
@@ -512,23 +539,6 @@ XML_as::clear()
     _status = XML_OK;
 }
 
-bool
-XML_as::ignoreWhite() 
-{
-
-    // TODO: use NSV:
-    const ObjectURI& propnamekey =
-        getURI(getVM(_global), "ignoreWhite");
-    as_value val;
-
-    as_object* obj = object();
-
-    if (!obj->get_member(propnamekey, &val)) {
-        return false;
-    }
-    return toBool(val, getVM(*obj));
-}
-
 // XML.prototype is assigned after the class has been constructed, so it
 // replaces the original prototype and does not have a 'constructor'
 // property.
@@ -570,7 +580,6 @@ namespace {
 void
 attachXMLProperties(as_object& o)
 {
-
     as_object* proto = o.get_prototype();
     if (!proto) return;
     const int flags = 0;
@@ -578,11 +587,10 @@ attachXMLProperties(as_object& o)
             flags);
     proto->init_property("docTypeDecl", &xml_docTypeDecl, &xml_docTypeDecl,
             flags);
-    proto->init_member("ignoreWhite", false, flags);
+    proto->init_property("ignoreWhite", xml_ignoreWhite, xml_ignoreWhite, 
flags);
     proto->init_property("loaded", xml_loaded, xml_loaded);
     proto->init_property("status", xml_status, xml_status, flags);
     proto->init_property("xmlDecl", &xml_xmlDecl, &xml_xmlDecl, flags);
-
 }
 
 
@@ -685,6 +693,17 @@ xml_status(const fn_call& fn)
     ptr->setStatus(static_cast<XML_as::ParseStatus>(int(status)));
     return as_value();
 }
+    
+as_value
+xml_ignoreWhite(const fn_call& fn)
+{
+    XML_as* ptr = ensure<ThisIsNative<XML_as> >(fn);
+    if (!fn.nargs) return as_value(ptr->ignoreWhite());
+
+    if (fn.arg(0).is_undefined()) return as_value();
+    ptr->ignoreWhite(toBool(fn.arg(0), getVM(fn)));
+    return as_value();
+}
 
 /// Only available as ASnative.
 as_value
diff --git a/libcore/asobj/XML_as.h b/libcore/asobj/XML_as.h
index 9aba77c..b400008 100644
--- a/libcore/asobj/XML_as.h
+++ b/libcore/asobj/XML_as.h
@@ -131,6 +131,17 @@ public:
     void setLoaded(LoadStatus st) {
         _loaded = st;
     }
+  
+    /// \brief
+    /// Return true if ignoreWhite property was set to anything evaluating
+    /// to true.
+    bool ignoreWhite() const {
+        return _ignoreWhite;
+    }
+
+    void ignoreWhite(bool ignore) {
+        _ignoreWhite = ignore;
+    }
 
 private:
 
@@ -143,7 +154,8 @@ private:
 
     void parseDocTypeDecl( xml_iterator& it, xml_iterator end);
 
-    void parseText(XMLNode_as* node, xml_iterator& it, xml_iterator end);
+    void parseText(XMLNode_as* node, xml_iterator& it, xml_iterator end,
+            bool ignoreWhite);
 
     void parseXMLDecl(xml_iterator& it, xml_iterator end);
 
@@ -156,11 +168,6 @@ private:
     /// This removes all children, resets doctype and xml decls, and
     /// sets status to XML.
     void clear();
-  
-    /// \brief
-    /// Return true if ignoreWhite property was set to anything evaluating
-    /// to true.
-    bool ignoreWhite();
 
     // -1 if never asked to load anything
     //  0 if asked to load but not yet loaded (or failure)
@@ -173,6 +180,7 @@ private:
 
     std::string _xmlDecl;
 
+    bool _ignoreWhite;
 };
 
 
diff --git a/testsuite/actionscript.all/XML.as 
b/testsuite/actionscript.all/XML.as
index 9a8af1d..8c464c4 100644
--- a/testsuite/actionscript.all/XML.as
+++ b/testsuite/actionscript.all/XML.as
@@ -910,12 +910,12 @@ myxml.onLoad = function(success)
 #endif
        {
 #if OUTPUT_VERSION < 6
-               check_totals(429);
+               check_totals(431);
 #else
 # if OUTPUT_VERSION < 8
-               check_totals(466);
+               check_totals(468);
 # else
-               check_totals(447);
+               check_totals(449);
 # endif
 #endif
                play();
@@ -1006,6 +1006,12 @@ myxml2.ignoreWhite = true;
 myxml2.parseXML("<X1> t </X1>");
 check_equals(myxml2.toString(), "<X1> t </X1>"); 
 
+myxml2.ignoreWhite = 8;
+check_equals(myxml2.ignoreWhite, true);
+
+myxml2.ignoreWhite = 0;
+check_equals(myxml2.ignoreWhite, false);
+
 /// Check various malformed XMLs
 
 h = new XML("<open>");

-----------------------------------------------------------------------

Summary of changes:
 NEWS                              |    3 +-
 libcore/asobj/XMLNode_as.cpp      |   28 ++++----
 libcore/asobj/XMLNode_as.h        |   10 ++--
 libcore/asobj/XML_as.cpp          |  132 ++++++++++++++++++++++++-------------
 libcore/asobj/XML_as.h            |   20 ++++--
 testsuite/actionscript.all/XML.as |   12 +++-
 testsuite/swfdec/PASSING          |    4 +
 7 files changed, 132 insertions(+), 77 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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