Remove incorrect nodeValues for non-text nodes. Resolves issue #747.

This commit is contained in:
Davide P. Cervone 2014-02-20 10:12:57 -05:00
parent 9bed669135
commit 4aa6fa613d

View File

@ -95,7 +95,7 @@
MML.mbase.Augment({ MML.mbase.Augment({
firstChild: null, firstChild: null,
lastChild: null, lastChild: null,
nodeValue: "", nodeValue: null,
nextSibling: null, nextSibling: null,
Init: function () { Init: function () {
var obj = MBASEINIT.apply(this,arguments) || this; var obj = MBASEINIT.apply(this,arguments) || this;
@ -117,7 +117,6 @@
if (!this.firstChild) {this.firstChild = node} if (!this.firstChild) {this.firstChild = node}
this.Append(node); this.Append(node);
this.lastChild = node; this.lastChild = node;
this.nodeValue += node.nodeValue;
} }
return node; return node;
}, },
@ -132,9 +131,6 @@
else {this.lastChild = this.childNodes[this.childNodes.length-1]} else {this.lastChild = this.childNodes[this.childNodes.length-1]}
} }
if (i) {this.childNodes[i-1].nextSibling = node.nextSibling} if (i) {this.childNodes[i-1].nextSibling = node.nextSibling}
this.nodeValue = "";
for (i = 0, m = this.childNodes.length; i < m; i++)
{this.nodeValue += this.childNodes[i].nodeValue}
node.nextSibling = node.parent = null; node.nextSibling = node.parent = null;
return node; return node;
}, },
@ -145,9 +141,6 @@
if (i) {this.childNodes[i-1].nextSibling = node} else {this.firstChild = node} if (i) {this.childNodes[i-1].nextSibling = node} else {this.firstChild = node}
if (i >= m-1) {this.lastChild = node} if (i >= m-1) {this.lastChild = node}
this.SetData(i,node); node.nextSibling = old.nextSibling; this.SetData(i,node); node.nextSibling = old.nextSibling;
this.nodeValue = "";
for (i = 0, m = this.childNodes.length; i < m; i++)
{this.nodeValue += this.childNodes[i].nodeValue}
old.nextSibling = old.parent = null; old.nextSibling = old.parent = null;
return old; return old;
}, },