diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 7 | ||||
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 4bfc1d7b8eb..46be7290187 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -5736,7 +5736,7 @@ class GlobalGenRoots(): impl ${selfName} for ${baseName} { #[inline] fn ${fname}(&self) -> bool { - let base: &${parentName} = ${parentName}Cast::from_actual(self); + let base: &${parentName} = ${parentName}Cast::from_ref(self); base.${fname}() } } @@ -5805,11 +5805,6 @@ impl ${name}Cast { pub fn from_root<T: ${fromBound}+Reflectable>(derived: Root<T>) -> Root<${name}> { unsafe { mem::transmute(derived) } } - - #[inline] - pub fn from_actual<'a, T: ${fromBound}+Reflectable>(derived: &'a T) -> &'a ${name} { - unsafe { mem::transmute(derived) } - } } """).substitute({'checkFn': 'is_' + name.lower(), 'name': name, diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 81440e6b556..99af406790b 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -180,7 +180,7 @@ impl RawHTMLIFrameElementHelpers for HTMLIFrameElement { #[allow(unsafe_code)] fn get_width(&self) -> LengthOrPercentageOrAuto { unsafe { - element::get_attr_for_layout(ElementCast::from_actual(&*self), + element::get_attr_for_layout(ElementCast::from_ref(&*self), &ns!(""), &atom!("width")).map(|attribute| { str::parse_length(&**attribute.value_for_layout()) @@ -191,7 +191,7 @@ impl RawHTMLIFrameElementHelpers for HTMLIFrameElement { #[allow(unsafe_code)] fn get_height(&self) -> LengthOrPercentageOrAuto { unsafe { - element::get_attr_for_layout(ElementCast::from_actual(&*self), + element::get_attr_for_layout(ElementCast::from_ref(&*self), &ns!(""), &atom!("height")).map(|attribute| { str::parse_length(&**attribute.value_for_layout()) |