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

@ -191,11 +191,7 @@ impl VirtualMethods for HTMLButtonElement {
}
}
impl<'a> FormControl<'a> for &'a HTMLButtonElement {
fn to_element(self) -> &'a Element {
ElementCast::from_ref(self)
}
}
impl FormControl for HTMLButtonElement {}
impl<'a> Activatable for &'a HTMLButtonElement {
fn as_element<'b>(&'b self) -> &'b Element {