aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-09-30 19:06:18 -0600
committerbors-servo <metajack+bors@gmail.com>2015-09-30 19:06:18 -0600
commit94e85a5226fe5b18bde40a2d5f6727b717bd148f (patch)
treec4ac4972811867509d341485c7216865e30b698d /components/script/dom/htmltextareaelement.rs
parentbb7742eecf00dd4cb5bfcbafcae36d928a5b8b89 (diff)
parentb46243c00bda362df9891895d5496ace599971ea (diff)
downloadservo-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/htmltextareaelement.rs')
-rw-r--r--components/script/dom/htmltextareaelement.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 9c20b4ad2b2..c2231b070b7 100644
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -15,7 +15,7 @@ use dom::bindings::global::GlobalRef;
use dom::bindings::js::{LayoutJS, Root};
use dom::bindings::refcounted::Trusted;
use dom::document::Document;
-use dom::element::{AttributeMutation, Element, ElementTypeId};
+use dom::element::{AttributeMutation, ElementTypeId};
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::{EventTarget, EventTargetTypeId};
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
@@ -363,11 +363,7 @@ impl VirtualMethods for HTMLTextAreaElement {
}
}
-impl<'a> FormControl<'a> for &'a HTMLTextAreaElement {
- fn to_element(self) -> &'a Element {
- ElementCast::from_ref(self)
- }
-}
+impl FormControl for HTMLTextAreaElement {}
pub struct ChangeEventRunnable {
element: Trusted<HTMLTextAreaElement>,