aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorTim Taubert <tim@timtaubert.de>2014-10-12 18:53:31 +0200
committerTim Taubert <tim@timtaubert.de>2014-10-13 11:13:12 +0200
commit9a52bb8310eb9d479a5211b0048bb682da0ac123 (patch)
tree63d43b597057dd5d17e3bf57b7b351d8c1aa525e /components/script/dom/htmliframeelement.rs
parentacd98a73a4ea1aad96705c49ab960d9c87a38a28 (diff)
downloadservo-9a52bb8310eb9d479a5211b0048bb682da0ac123.tar.gz
servo-9a52bb8310eb9d479a5211b0048bb682da0ac123.zip
Privatize InheritTypes
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs29
1 files changed, 24 insertions, 5 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 94353173333..68ca275682f 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -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> {