aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-07-03 22:56:17 -0600
committerbors-servo <metajack+bors@gmail.com>2015-07-03 22:56:17 -0600
commit0298c92670bee90c06f98fac2e8469d1238d1bd4 (patch)
treebecd5403312b7b956ae4877a7dc7e4effba23cc3 /components/script/dom
parentf5f64dab749d0851ef82be3cdc7fb2bd1cb09956 (diff)
parent2f88b84e070ba0690e1d64074817f3b0e45133eb (diff)
downloadservo-0298c92670bee90c06f98fac2e8469d1238d1bd4.tar.gz
servo-0298c92670bee90c06f98fac2e8469d1238d1bd4.zip
Auto merge of #6549 - Ms2ger:from_actual, r=nox
Remove *Cast::from_actual. Since JSRef was removed, from_actual duplicates from_ref. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6549) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py7
-rw-r--r--components/script/dom/htmliframeelement.rs4
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())