Call the generated rather than the hand-written traits (fixes #2936).

This commit is contained in:
Ms2ger 2014-07-27 20:22:13 +02:00
parent 38a658d561
commit 944d8b00b0
116 changed files with 126 additions and 765 deletions

View file

@ -2,20 +2,23 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use dom::bindings::codegen::Bindings::DOMImplementationBinding;
use dom::bindings::codegen::Bindings::DOMImplementationBinding::DOMImplementationMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::InheritTypes::NodeCast;
use dom::bindings::error::{Fallible, InvalidCharacter, NamespaceError};
use dom::bindings::global::Window;
use dom::bindings::js::{JS, JSRef, Root, Temporary, OptionalRootable};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
use dom::bindings::utils::{QName, Name, InvalidXMLName, xml_name_type};
use dom::document::{Document, HTMLDocument, NonHTMLDocument, DocumentMethods};
use dom::document::{Document, HTMLDocument, NonHTMLDocument};
use dom::documenttype::DocumentType;
use dom::htmlbodyelement::HTMLBodyElement;
use dom::htmlheadelement::HTMLHeadElement;
use dom::htmlhtmlelement::HTMLHtmlElement;
use dom::htmltitleelement::HTMLTitleElement;
use dom::node::{Node, NodeMethods};
use dom::node::Node;
use dom::text::Text;
use servo_util::str::DOMString;
@ -47,13 +50,6 @@ impl Reflectable for DOMImplementation {
}
}
pub trait DOMImplementationMethods {
fn CreateDocumentType(&self, qname: DOMString, pubid: DOMString, sysid: DOMString) -> Fallible<Temporary<DocumentType>>;
fn CreateDocument(&self, namespace: Option<DOMString>, qname: DOMString,
mut maybe_doctype: Option<JSRef<DocumentType>>) -> Fallible<Temporary<Document>>;
fn CreateHTMLDocument(&self, title: Option<DOMString>) -> Temporary<Document>;
}
// http://dom.spec.whatwg.org/#domimplementation
impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
// http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype