Refactor FormControl trait

The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.
This commit is contained in:
Philipp Hartwig 2015-09-30 22:02:56 +02:00
parent a72d7a4f52
commit bae4abd388
9 changed files with 24 additions and 54 deletions

View file

@ -5,7 +5,7 @@
use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, HTMLLegendElementDerived};
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLLegendElementDerived};
use dom::bindings::codegen::InheritTypes::{HTMLFieldSetElementDerived, NodeCast};
use dom::bindings::js::{Root, RootedReference};
use dom::document::Document;
@ -157,8 +157,4 @@ impl VirtualMethods for HTMLFieldSetElement {
}
}
impl<'a> FormControl<'a> for &'a HTMLFieldSetElement {
fn to_element(self) -> &'a Element {
ElementCast::from_ref(self)
}
}
impl FormControl for HTMLFieldSetElement {}