mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
commit
94e85a5226
9 changed files with 24 additions and 54 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue