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,8 +2,10 @@
* 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::InheritTypes::{DocumentFragmentDerived, NodeCast};
use dom::bindings::codegen::Bindings::DocumentFragmentBinding;
use dom::bindings::codegen::Bindings::DocumentFragmentBinding::DocumentFragmentMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::codegen::InheritTypes::{DocumentFragmentDerived, NodeCast};
use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::error::Fallible;
use dom::bindings::global::GlobalRef;
@ -14,7 +16,6 @@ use dom::eventtarget::{EventTarget, NodeTargetTypeId};
use dom::htmlcollection::HTMLCollection;
use dom::node::{DocumentFragmentNodeTypeId, Node, NodeHelpers, window_from_node};
use dom::nodelist::NodeList;
use dom::window::WindowMethods;
use servo_util::str::DOMString;
#[deriving(Encodable)]
@ -49,12 +50,6 @@ impl DocumentFragment {
}
}
pub trait DocumentFragmentMethods {
fn Children(&self) -> Temporary<HTMLCollection>;
fn QuerySelector(&self, selectors: DOMString) -> Fallible<Option<Temporary<Element>>>;
fn QuerySelectorAll(&self, selectors: DOMString) -> Fallible<Temporary<NodeList>>;
}
impl<'a> DocumentFragmentMethods for JSRef<'a, DocumentFragment> {
// http://dom.spec.whatwg.org/#dom-parentnode-children
fn Children(&self) -> Temporary<HTMLCollection> {