Handle doctype.textContent correctly.

I confused Doctype and DocumentFragment nodes when implementing.
This commit is contained in:
Ms2ger 2013-09-09 13:02:20 +02:00
parent 2d3a4d7e1d
commit fe46fb231a

View file

@ -524,7 +524,7 @@ impl Node<ScriptView> {
pub fn GetTextContent(&self) -> DOMString { pub fn GetTextContent(&self) -> DOMString {
match self.type_id { match self.type_id {
DoctypeNodeTypeId | ElementNodeTypeId(*) => { ElementNodeTypeId(*) => {
let mut content = ~""; let mut content = ~"";
for node in self.abstract.unwrap().traverse_preorder() { for node in self.abstract.unwrap().traverse_preorder() {
if node.is_text() { if node.is_text() {
@ -541,6 +541,9 @@ impl Node<ScriptView> {
characterdata.Data() characterdata.Data()
} }
} }
DoctypeNodeTypeId => {
null_string
}
} }
} }