diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-10-13 22:00:37 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-10-13 22:00:37 -0600 |
commit | f350879574194bb612eac88e21d0920e9827afa7 (patch) | |
tree | 7b6bd300a6338550f74d4bfc0d1f1808c6f4734c /components/script/dom/htmlobjectelement.rs | |
parent | d04733cf595edf8ed5f0eaa414355f9cdc3d9c10 (diff) | |
parent | cbe50f1f149943212aa722b411d275614fbe9a5d (diff) | |
download | servo-f350879574194bb612eac88e21d0920e9827afa7.tar.gz servo-f350879574194bb612eac88e21d0920e9827afa7.zip |
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.
Diffstat (limited to 'components/script/dom/htmlobjectelement.rs')
-rw-r--r-- | components/script/dom/htmlobjectelement.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 1d39c3a07f5..d7a073150ef 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -27,13 +27,14 @@ use url::Url; #[jstraceable] #[must_root] +#[privatize] pub struct HTMLObjectElement { - pub htmlelement: HTMLElement, + htmlelement: HTMLElement, } impl HTMLObjectElementDerived for EventTarget { fn is_htmlobjectelement(&self) -> bool { - self.type_id == NodeTargetTypeId(ElementNodeTypeId(HTMLObjectElementTypeId)) + *self.type_id() == NodeTargetTypeId(ElementNodeTypeId(HTMLObjectElementTypeId)) } } @@ -108,7 +109,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLObjectElement> { if "data" == name.as_slice() { let window = window_from_node(*self).root(); - self.process_data_url(window.image_cache_task.clone()); + self.process_data_url(window.image_cache_task().clone()); } } } |