Basic support for Document::contentType

Spec:
http://dom.spec.whatwg.org/#dom-document-contenttype

This is a subtask for #1428, #1510 and #1526.
This commit is contained in:
Bruno de Oliveira Abinader 2014-01-21 11:18:53 -04:00
parent 539cf58f73
commit 1067da7df8
7 changed files with 49 additions and 14 deletions

View file

@ -62,16 +62,13 @@ impl DOMImplementation {
// http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
pub fn CreateHTMLDocument(&self, title: Option<DOMString>) -> AbstractDocument {
// Step 1.
// Step 1-2.
let abstract_doc = HTMLDocument::new(self.owner);
assert!(abstract_doc.document().doctype == HTML);
let abstract_node = AbstractNode::from_document(abstract_doc);
assert!(abstract_node.type_id() == DocumentNodeTypeId(HTMLDocumentTypeId));
// Step 2.
// FIXME: https://github.com/mozilla/servo/pull/1519
{
// Step 3.
let doc_type = DocumentType::new(~"html", None, None, abstract_doc);