mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #3666 : ttaubert/servo/issue/3644-privatize-dom, r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field. All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.
This commit is contained in:
commit
f350879574
131 changed files with 803 additions and 381 deletions
|
@ -104,6 +104,7 @@ enum SyncOrAsync<'a> {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct XMLHttpRequest {
|
||||
eventtarget: XMLHttpRequestEventTarget,
|
||||
ready_state: Cell<XMLHttpRequestState>,
|
||||
|
@ -679,7 +680,7 @@ impl Reflectable for XMLHttpRequest {
|
|||
|
||||
impl XMLHttpRequestDerived for EventTarget {
|
||||
fn is_xmlhttprequest(&self) -> bool {
|
||||
match self.type_id {
|
||||
match *self.type_id() {
|
||||
XMLHttpRequestTargetTypeId(XMLHttpRequestTypeId) => true,
|
||||
_ => false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue