mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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 {
|
||||
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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue