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

@ -16,7 +16,7 @@ use dom::bindings::error::Error::{Network, Syntax, Security, Abort, Timeout};
use dom::bindings::global::{GlobalField, GlobalRef, GlobalRoot};
use dom::bindings::js::{MutNullableJS, JS, JSRef, Temporary, OptionalRootedRootable};
use dom::bindings::str::ByteString;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::utils::{Reflectable, reflect_dom_object};
use dom::document::Document;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::{EventTarget, EventTargetHelpers, EventTargetTypeId};
@ -240,7 +240,6 @@ impl XMLHttpRequest {
}
}
macro_rules! notify_error_and_return(
($err:expr) => ({
notify_partial_progress(fetch_type, XHRProgress::Errored(gen_id, $err));
@ -759,11 +758,6 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
}
}
impl Reflectable for XMLHttpRequest {
fn reflector<'a>(&'a self) -> &'a Reflector {
self.eventtarget.reflector()
}
}
impl XMLHttpRequestDerived for EventTarget {
fn is_xmlhttprequest(&self) -> bool {