mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -31,13 +31,14 @@ use url::form_urlencoded::serialize;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct HTMLFormElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
htmlelement: HTMLElement,
|
||||
}
|
||||
|
||||
impl HTMLFormElementDerived for EventTarget {
|
||||
fn is_htmlformelement(&self) -> bool {
|
||||
self.type_id == NodeTargetTypeId(ElementNodeTypeId(HTMLFormElementTypeId))
|
||||
*self.type_id() == NodeTargetTypeId(ElementNodeTypeId(HTMLFormElementTypeId))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,8 +218,8 @@ impl<'a> HTMLFormElementHelpers for JSRef<'a, HTMLFormElement> {
|
|||
}
|
||||
|
||||
// This is wrong. https://html.spec.whatwg.org/multipage/forms.html#planned-navigation
|
||||
let ScriptChan(ref script_chan) = win.script_chan;
|
||||
script_chan.send(TriggerLoadMsg(win.page.id, load_data));
|
||||
let ScriptChan(ref script_chan) = *win.script_chan();
|
||||
script_chan.send(TriggerLoadMsg(win.page().id, load_data));
|
||||
}
|
||||
|
||||
fn get_form_dataset(self, _submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue