mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Merge RawLayoutElementHelpers into LayoutElementHelpers
This commit is contained in:
parent
3b504148d5
commit
0bda174823
17 changed files with 86 additions and 97 deletions
|
@ -14,7 +14,7 @@ use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
|
|||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::domtokenlist::DOMTokenList;
|
||||
use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
|
||||
use crate::dom::element::{AttributeMutation, Element, LayoutElementHelpers};
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
|
@ -502,7 +502,7 @@ impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
|
|||
#[allow(unsafe_code)]
|
||||
fn get_width(self) -> LengthOrPercentageOrAuto {
|
||||
unsafe {
|
||||
(*self.upcast::<Element>().unsafe_get())
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("width"))
|
||||
.map(AttrValue::as_dimension)
|
||||
.cloned()
|
||||
|
@ -513,7 +513,7 @@ impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
|
|||
#[allow(unsafe_code)]
|
||||
fn get_height(self) -> LengthOrPercentageOrAuto {
|
||||
unsafe {
|
||||
(*self.upcast::<Element>().unsafe_get())
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("height"))
|
||||
.map(AttrValue::as_dimension)
|
||||
.cloned()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue