From fe46fb231ab787770dccebfb9389067868fbb0a3 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 9 Sep 2013 13:02:20 +0200 Subject: [PATCH] Handle doctype.textContent correctly. I confused Doctype and DocumentFragment nodes when implementing. --- src/components/script/dom/node.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index 0c564cd4223..c7e291dfdf2 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -524,7 +524,7 @@ impl Node { pub fn GetTextContent(&self) -> DOMString { match self.type_id { - DoctypeNodeTypeId | ElementNodeTypeId(*) => { + ElementNodeTypeId(*) => { let mut content = ~""; for node in self.abstract.unwrap().traverse_preorder() { if node.is_text() { @@ -541,6 +541,9 @@ impl Node { characterdata.Data() } } + DoctypeNodeTypeId => { + null_string + } } }