mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Remove document::DocumentType (fixes #1730).
This commit is contained in:
parent
e2617a6396
commit
5ede84fa46
5 changed files with 53 additions and 83 deletions
|
@ -8,7 +8,7 @@ use dom::bindings::js::JS;
|
|||
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
|
||||
use dom::bindings::utils::{Fallible, InvalidCharacter, NamespaceError};
|
||||
use dom::bindings::utils::{QName, Name, InvalidXMLName, xml_name_type};
|
||||
use dom::document::{Document, HTML, HTMLDocumentTypeId};
|
||||
use dom::document::{Document, HTMLDocumentTypeId};
|
||||
use dom::documenttype::DocumentType;
|
||||
use dom::htmlbodyelement::HTMLBodyElement;
|
||||
use dom::htmlheadelement::HTMLHeadElement;
|
||||
|
@ -66,9 +66,7 @@ impl DOMImplementation {
|
|||
// http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
|
||||
pub fn CreateHTMLDocument(&self, title: Option<DOMString>) -> JS<Document> {
|
||||
// Step 1-2.
|
||||
let doc = Document::new(&self.owner, None, HTML, None);
|
||||
assert!(doc.get().doctype == HTML);
|
||||
|
||||
let doc = Document::new(&self.owner, None, HTMLDocumentTypeId, None);
|
||||
let mut doc_node: JS<Node> = NodeCast::from(&doc);
|
||||
assert!(doc_node.type_id() == DocumentNodeTypeId(HTMLDocumentTypeId));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue