diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-12-17 18:45:49 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-12-17 18:45:49 -0700 |
commit | fbf42c951b2f53d91e2f32f8035484a07ea83493 (patch) | |
tree | 1d7bfb30cbddebba633fe1f2c8844cf4133aabc1 /components/script/dom/htmlserializer.rs | |
parent | b8900782b0fcb409f37189bdc08eb7f8b3564a5f (diff) | |
parent | 1a9be88a1d1f9138287f5b1ee04300b7e1bd7025 (diff) | |
download | servo-fbf42c951b2f53d91e2f32f8035484a07ea83493.tar.gz servo-fbf42c951b2f53d91e2f32f8035484a07ea83493.zip |
auto merge of #4405 : servo/servo/rustup_20141124, r=jdm
Diffstat (limited to 'components/script/dom/htmlserializer.rs')
-rw-r--r-- | components/script/dom/htmlserializer.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/components/script/dom/htmlserializer.rs b/components/script/dom/htmlserializer.rs index 8a04fa717a1..bc6740658b0 100644 --- a/components/script/dom/htmlserializer.rs +++ b/components/script/dom/htmlserializer.rs @@ -11,10 +11,7 @@ use dom::characterdata::CharacterData; use dom::comment::Comment; use dom::documenttype::DocumentType; use dom::element::{Element, ElementHelpers}; -use dom::node::{Node, NodeIterator}; -use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, CommentNodeTypeId}; -use dom::node::{DocumentNodeTypeId, ElementNodeTypeId, ProcessingInstructionNodeTypeId}; -use dom::node::{TextNodeTypeId, NodeHelpers}; +use dom::node::{Node, NodeHelpers, NodeTypeId, NodeIterator}; use dom::processinginstruction::ProcessingInstruction; use dom::text::Text; @@ -30,29 +27,29 @@ pub fn serialize(iterator: &mut NodeIterator) -> String { html.push_str(">"); } match node.type_id() { - ElementNodeTypeId(..) => { + NodeTypeId::Element(..) => { let elem: JSRef<Element> = ElementCast::to_ref(node).unwrap(); serialize_elem(elem, &mut open_elements, &mut html) } - CommentNodeTypeId => { + NodeTypeId::Comment => { let comment: JSRef<Comment> = CommentCast::to_ref(node).unwrap(); serialize_comment(comment, &mut html) } - TextNodeTypeId => { + NodeTypeId::Text => { let text: JSRef<Text> = TextCast::to_ref(node).unwrap(); serialize_text(text, &mut html) } - DoctypeNodeTypeId => { + NodeTypeId::DocumentType => { let doctype: JSRef<DocumentType> = DocumentTypeCast::to_ref(node).unwrap(); serialize_doctype(doctype, &mut html) } - ProcessingInstructionNodeTypeId => { + NodeTypeId::ProcessingInstruction => { let processing_instruction: JSRef<ProcessingInstruction> = ProcessingInstructionCast::to_ref(node).unwrap(); serialize_processing_instruction(processing_instruction, &mut html) } - DocumentFragmentNodeTypeId => {} - DocumentNodeTypeId => { + NodeTypeId::DocumentFragment => {} + NodeTypeId::Document => { panic!("It shouldn't be possible to serialize a document node") } } |