Auto merge of #7801 - aopicier:refactor_formcontrol, r=Manishearth

Refactor FormControl trait

The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.

Suggested by @Manishearth

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7801)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-09-30 19:06:18 -06:00
commit 94e85a5226
9 changed files with 24 additions and 54 deletions

View file

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