mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
a72d7a4f52
commit
bae4abd388
9 changed files with 24 additions and 54 deletions
|
@ -10,7 +10,7 @@ use dom::bindings::codegen::InheritTypes::HTMLObjectElementDerived;
|
|||
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast};
|
||||
use dom::bindings::js::Root;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element, ElementTypeId};
|
||||
use dom::element::{AttributeMutation, ElementTypeId};
|
||||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::htmlformelement::{FormControl, HTMLFormElement};
|
||||
|
@ -119,8 +119,4 @@ impl VirtualMethods for HTMLObjectElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FormControl<'a> for &'a HTMLObjectElement {
|
||||
fn to_element(self) -> &'a Element {
|
||||
ElementCast::from_ref(self)
|
||||
}
|
||||
}
|
||||
impl FormControl for HTMLObjectElement {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue