mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Privatize InheritTypes
This commit is contained in:
parent
acd98a73a4
commit
9a52bb8310
80 changed files with 252 additions and 101 deletions
|
@ -41,10 +41,11 @@ enum SandboxAllowance {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct HTMLIFrameElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
pub size: Cell<Option<IFrameSize>>,
|
||||
pub sandbox: Cell<Option<u8>>,
|
||||
htmlelement: HTMLElement,
|
||||
size: Cell<Option<IFrameSize>>,
|
||||
sandbox: Cell<Option<u8>>,
|
||||
}
|
||||
|
||||
impl HTMLIFrameElementDerived for EventTarget {
|
||||
|
@ -54,9 +55,22 @@ impl HTMLIFrameElementDerived for EventTarget {
|
|||
}
|
||||
|
||||
#[jstraceable]
|
||||
#[privatize]
|
||||
pub struct IFrameSize {
|
||||
pub pipeline_id: PipelineId,
|
||||
pub subpage_id: SubpageId,
|
||||
pipeline_id: PipelineId,
|
||||
subpage_id: SubpageId,
|
||||
}
|
||||
|
||||
impl IFrameSize {
|
||||
#[inline]
|
||||
pub fn pipeline_id<'a>(&'a self) -> &'a PipelineId {
|
||||
&self.pipeline_id
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn subpage_id<'a>(&'a self) -> &'a SubpageId {
|
||||
&self.subpage_id
|
||||
}
|
||||
}
|
||||
|
||||
pub trait HTMLIFrameElementHelpers {
|
||||
|
@ -126,6 +140,11 @@ impl HTMLIFrameElement {
|
|||
let element = HTMLIFrameElement::new_inherited(localName, prefix, document);
|
||||
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn size(&self) -> Option<IFrameSize> {
|
||||
self.size.get()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> HTMLIFrameElementMethods for JSRef<'a, HTMLIFrameElement> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue