diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-04 12:55:01 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-04 12:55:01 +0200 |
commit | 2f88b84e070ba0690e1d64074817f3b0e45133eb (patch) | |
tree | fcbdcc720b62ff07ed64f11a31ca18b5a06ad522 /components/script/dom | |
parent | 02d84a13470271d18198af118d4f25ee45fe6917 (diff) | |
download | servo-2f88b84e070ba0690e1d64074817f3b0e45133eb.tar.gz servo-2f88b84e070ba0690e1d64074817f3b0e45133eb.zip |
Remove *Cast::from_actual.
Since JSRef was removed, from_actual duplicates from_ref.
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()) |