diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-03-30 10:56:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 10:56:35 -0400 |
commit | 236762880c48263f8fa2c5a4deb9cf8f7746013c (patch) | |
tree | b651381f3a88b9a46c56018946377bd8b879e737 /components/script/dom/htmliframeelement.rs | |
parent | fd6f9140f79a855b9db5fe4e305f8ca8b6c1a84f (diff) | |
parent | 02fb5a68e6285d86c0a091e4c6ac36a7d436d3f1 (diff) | |
download | servo-236762880c48263f8fa2c5a4deb9cf8f7746013c.tar.gz servo-236762880c48263f8fa2c5a4deb9cf8f7746013c.zip |
Auto merge of #26058 - servo:layout-2020-improvements, r=SimonSapin
Make many improvements to the layout/script comms story
Now `LayoutDom<'dom, T>` is a mere wrapper around a `&'dom T`.
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 16c5c1433b6..7b8c89bebf9 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -480,27 +480,27 @@ impl HTMLIFrameElement { } pub trait HTMLIFrameElementLayoutMethods { - fn pipeline_id(&self) -> Option<PipelineId>; - fn browsing_context_id(&self) -> Option<BrowsingContextId>; - fn get_width(&self) -> LengthOrPercentageOrAuto; - fn get_height(&self) -> LengthOrPercentageOrAuto; + fn pipeline_id(self) -> Option<PipelineId>; + fn browsing_context_id(self) -> Option<BrowsingContextId>; + fn get_width(self) -> LengthOrPercentageOrAuto; + fn get_height(self) -> LengthOrPercentageOrAuto; } impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> { #[inline] #[allow(unsafe_code)] - fn pipeline_id(&self) -> Option<PipelineId> { + fn pipeline_id(self) -> Option<PipelineId> { unsafe { (*self.unsafe_get()).pipeline_id.get() } } #[inline] #[allow(unsafe_code)] - fn browsing_context_id(&self) -> Option<BrowsingContextId> { + fn browsing_context_id(self) -> Option<BrowsingContextId> { unsafe { (*self.unsafe_get()).browsing_context_id.get() } } #[allow(unsafe_code)] - fn get_width(&self) -> LengthOrPercentageOrAuto { + fn get_width(self) -> LengthOrPercentageOrAuto { unsafe { (*self.upcast::<Element>().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("width")) @@ -511,7 +511,7 @@ impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> { } #[allow(unsafe_code)] - fn get_height(&self) -> LengthOrPercentageOrAuto { + fn get_height(self) -> LengthOrPercentageOrAuto { unsafe { (*self.upcast::<Element>().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("height")) |