mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
commit
56d1b16d1b
131 changed files with 289 additions and 794 deletions
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
|
|||
use dom::bindings::error::Error;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JSRef, Temporary};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[repr(uint)]
|
||||
|
@ -62,15 +62,15 @@ impl DOMErrorName {
|
|||
|
||||
#[dom_struct]
|
||||
pub struct DOMException {
|
||||
reflector_: Reflector,
|
||||
code: DOMErrorName,
|
||||
reflector_: Reflector
|
||||
}
|
||||
|
||||
impl DOMException {
|
||||
fn new_inherited(code: DOMErrorName) -> DOMException {
|
||||
DOMException {
|
||||
reflector_: Reflector::new(),
|
||||
code: code,
|
||||
reflector_: Reflector::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,12 +83,6 @@ impl DOMException {
|
|||
}
|
||||
}
|
||||
|
||||
impl Reflectable for DOMException {
|
||||
fn reflector<'a>(&'a self) -> &'a Reflector {
|
||||
&self.reflector_
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> DOMExceptionMethods for JSRef<'a, DOMException> {
|
||||
// http://dom.spec.whatwg.org/#dom-domexception-code
|
||||
fn Code(self) -> u16 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue