From 7d6ea834790445d2ea71ca186484ef59ac2ac268 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 28 Sep 2015 01:07:32 +0200 Subject: Explicitly customise flags of new nodes where needed Given codegen now generates the various TypeId enums, it seems pointless to still have to write their respective values in every DOM struct inheriting from Node just to set the initial IS_IN_DOC flag in Document and IN_ENABLED_STATE in form controls. --- components/script/dom/comment.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'components/script/dom/comment.rs') diff --git a/components/script/dom/comment.rs b/components/script/dom/comment.rs index fc0982a4e36..3bed2a647dd 100644 --- a/components/script/dom/comment.rs +++ b/components/script/dom/comment.rs @@ -4,7 +4,6 @@ use dom::bindings::codegen::Bindings::CommentBinding; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; -use dom::bindings::codegen::InheritTypes::CharacterDataTypeId; use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; @@ -22,7 +21,7 @@ pub struct Comment { impl Comment { fn new_inherited(text: DOMString, document: &Document) -> Comment { Comment { - characterdata: CharacterData::new_inherited(CharacterDataTypeId::Comment, text, document) + characterdata: CharacterData::new_inherited(text, document) } } -- cgit v1.2.3