diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-09-30 19:06:18 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-09-30 19:06:18 -0600 |
commit | 94e85a5226fe5b18bde40a2d5f6727b717bd148f (patch) | |
tree | c4ac4972811867509d341485c7216865e30b698d /components/script/dom/htmlobjectelement.rs | |
parent | bb7742eecf00dd4cb5bfcbafcae36d928a5b8b89 (diff) | |
parent | b46243c00bda362df9891895d5496ace599971ea (diff) | |
download | servo-94e85a5226fe5b18bde40a2d5f6727b717bd148f.tar.gz servo-94e85a5226fe5b18bde40a2d5f6727b717bd148f.zip |
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 -->
Diffstat (limited to 'components/script/dom/htmlobjectelement.rs')
-rw-r--r-- | components/script/dom/htmlobjectelement.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index e197f1d60c4..fb6c7a39860 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -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 {} |