auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister

Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
This commit is contained in:
bors-servo 2014-12-27 22:12:45 -07:00
commit 56d1b16d1b
131 changed files with 289 additions and 794 deletions

View file

@ -11,7 +11,6 @@ use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::InheritTypes::HTMLAnchorElementDerived;
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, NodeCast};
use dom::bindings::js::{MutNullableJS, JSRef, Temporary, OptionalRootable};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::document::{Document, DocumentHelpers};
use dom::domtokenlist::DOMTokenList;
use dom::element::{Element, AttributeHandlers, ElementTypeId};
@ -99,12 +98,6 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {
}
}
impl Reflectable for HTMLAnchorElement {
fn reflector<'a>(&'a self) -> &'a Reflector {
self.htmlelement.reflector()
}
}
impl<'a> HTMLAnchorElementMethods for JSRef<'a, HTMLAnchorElement> {
fn Text(self) -> DOMString {
let node: JSRef<Node> = NodeCast::from_ref(self);