mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -10,7 +10,7 @@ use dom::bindings::error::Fallible;
|
|||
use dom::bindings::error::Error::FailureUnknown;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::document::{Document, DocumentHelpers, IsHTMLDocument};
|
||||
use dom::document::DocumentSource;
|
||||
use dom::window::Window;
|
||||
|
@ -19,15 +19,15 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[dom_struct]
|
||||
pub struct DOMParser {
|
||||
reflector_: Reflector,
|
||||
window: JS<Window>, //XXXjdm Document instead?
|
||||
reflector_: Reflector
|
||||
}
|
||||
|
||||
impl DOMParser {
|
||||
fn new_inherited(window: JSRef<Window>) -> DOMParser {
|
||||
DOMParser {
|
||||
reflector_: Reflector::new(),
|
||||
window: JS::from_rooted(window),
|
||||
reflector_: Reflector::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,8 +74,3 @@ impl<'a> DOMParserMethods for JSRef<'a, DOMParser> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Reflectable for DOMParser {
|
||||
fn reflector<'a>(&'a self) -> &'a Reflector {
|
||||
&self.reflector_
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue