mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -4,11 +4,10 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLOutputElementDerived;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::document::Document;
|
||||
use dom::element::{Element, ElementTypeId};
|
||||
use dom::element::ElementTypeId;
|
||||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::htmlformelement::{FormControl, HTMLFormElement};
|
||||
|
@ -61,8 +60,4 @@ impl HTMLOutputElementMethods for HTMLOutputElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FormControl<'a> for &'a HTMLOutputElement {
|
||||
fn to_element(self) -> &'a Element {
|
||||
ElementCast::from_ref(self)
|
||||
}
|
||||
}
|
||||
impl FormControl for HTMLOutputElement {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue