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:
@@ -15,13 +15,14 @@ use servo_util::str::DOMString;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct HTMLTableDataCellElement {
|
||||
pub htmltablecellelement: HTMLTableCellElement,
|
||||
htmltablecellelement: HTMLTableCellElement,
|
||||
}
|
||||
|
||||
impl HTMLTableDataCellElementDerived for EventTarget {
|
||||
fn is_htmltabledatacellelement(&self) -> bool {
|
||||
self.type_id == NodeTargetTypeId(ElementNodeTypeId(HTMLTableDataCellElementTypeId))
|
||||
*self.type_id() == NodeTargetTypeId(ElementNodeTypeId(HTMLTableDataCellElementTypeId))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user