mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make HTMLIFrameElementLayoutMethods methods take self
This commit is contained in:
parent
668ef35612
commit
1504f35031
1 changed files with 8 additions and 8 deletions
|
@ -480,27 +480,27 @@ impl HTMLIFrameElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait HTMLIFrameElementLayoutMethods {
|
pub trait HTMLIFrameElementLayoutMethods {
|
||||||
fn pipeline_id(&self) -> Option<PipelineId>;
|
fn pipeline_id(self) -> Option<PipelineId>;
|
||||||
fn browsing_context_id(&self) -> Option<BrowsingContextId>;
|
fn browsing_context_id(self) -> Option<BrowsingContextId>;
|
||||||
fn get_width(&self) -> LengthOrPercentageOrAuto;
|
fn get_width(self) -> LengthOrPercentageOrAuto;
|
||||||
fn get_height(&self) -> LengthOrPercentageOrAuto;
|
fn get_height(self) -> LengthOrPercentageOrAuto;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
|
impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
fn pipeline_id(&self) -> Option<PipelineId> {
|
fn pipeline_id(self) -> Option<PipelineId> {
|
||||||
unsafe { (*self.unsafe_get()).pipeline_id.get() }
|
unsafe { (*self.unsafe_get()).pipeline_id.get() }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unsafe_code)]
|
#[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() }
|
unsafe { (*self.unsafe_get()).browsing_context_id.get() }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
fn get_width(&self) -> LengthOrPercentageOrAuto {
|
fn get_width(self) -> LengthOrPercentageOrAuto {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.upcast::<Element>().unsafe_get())
|
(*self.upcast::<Element>().unsafe_get())
|
||||||
.get_attr_for_layout(&ns!(), &local_name!("width"))
|
.get_attr_for_layout(&ns!(), &local_name!("width"))
|
||||||
|
@ -511,7 +511,7 @@ impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
fn get_height(&self) -> LengthOrPercentageOrAuto {
|
fn get_height(self) -> LengthOrPercentageOrAuto {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.upcast::<Element>().unsafe_get())
|
(*self.upcast::<Element>().unsafe_get())
|
||||||
.get_attr_for_layout(&ns!(), &local_name!("height"))
|
.get_attr_for_layout(&ns!(), &local_name!("height"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue