aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-10-29 23:36:24 +0100
committerMs2ger <ms2ger@gmail.com>2014-10-30 18:03:19 +0100
commit82216fd5c0b188d237a972e83cd7bd2ee03bb316 (patch)
tree4049383832b009cfc7717f650afb5cb947d23bd7 /components/script/dom/node.rs
parentf9b84fd8704e249682cc12dfeb2da61b39a88d92 (diff)
downloadservo-82216fd5c0b188d237a972e83cd7bd2ee03bb316.tar.gz
servo-82216fd5c0b188d237a972e83cd7bd2ee03bb316.zip
Move build_element_from_tag out of the HTML parser.
This function is not particular to the parser, so should live in the DOM.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 4b4a574a07a..2375037eeac 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -33,7 +33,7 @@ use dom::comment::Comment;
use dom::document::{Document, DocumentHelpers, HTMLDocument, NonHTMLDocument, NotFromParser};
use dom::documentfragment::DocumentFragment;
use dom::documenttype::DocumentType;
-use dom::element::{AttributeHandlers, Element, ElementTypeId};
+use dom::element::{AttributeHandlers, Element, ScriptCreated, ElementTypeId};
use dom::element::{HTMLAnchorElementTypeId, HTMLButtonElementTypeId, ElementHelpers};
use dom::element::{HTMLInputElementTypeId, HTMLSelectElementTypeId};
use dom::element::{HTMLTextAreaElementTypeId, HTMLOptGroupElementTypeId};
@@ -45,7 +45,6 @@ use dom::text::Text;
use dom::virtualmethods::{VirtualMethods, vtable_for};
use dom::window::Window;
use geom::rect::Rect;
-use parse::html::{build_element_from_tag, ScriptCreated};
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC,
LayoutChan, ReapLayoutDataMsg};
use devtools_traits::NodeInfo;
@@ -1520,7 +1519,7 @@ impl Node {
ns: element.namespace().clone(),
local: element.local_name().clone()
};
- let element = build_element_from_tag(name,
+ let element = Element::create(name,
Some(element.prefix().as_slice().to_string()), *document, ScriptCreated);
NodeCast::from_temporary(element)
},