servo: Merge #3666 - Privatize DOM (fixes #3644) (from ttaubert: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.

Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7
This commit is contained in:
Tim Taubert
2014-10-13 22:00:37 -06:00
parent bf9dd8e95a
commit e87471af27
131 changed files with 803 additions and 381 deletions

View File

@@ -20,13 +20,14 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DocumentFragment {
pub node: Node,
node: Node,
}
impl DocumentFragmentDerived for EventTarget {
fn is_documentfragment(&self) -> bool {
self.type_id == NodeTargetTypeId(DocumentFragmentNodeTypeId)
*self.type_id() == NodeTargetTypeId(DocumentFragmentNodeTypeId)
}
}