aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2016-06-30 14:15:20 -0700
committerBobby Holley <bobbyholley@gmail.com>2016-07-05 18:03:41 -0700
commit187a47d89d2a4187abca85690429f85293e618cd (patch)
tree762287ff3121993d51e3741e84a2a99ac93435ce /components/script
parent1d8d1cb9d90e163cfc10328ceed0a2347279eb78 (diff)
downloadservo-187a47d89d2a4187abca85690429f85293e618cd.tar.gz
servo-187a47d89d2a4187abca85690429f85293e618cd.zip
Remove get_attr from TElement. \o/
Diffstat (limited to 'components/script')
-rw-r--r--components/script/layout_wrapper.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 7f3aaf3f242..ebc2da9c529 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -395,13 +395,6 @@ impl<'le> TElement for ServoLayoutElement<'le> {
fn attr_equals(&self, namespace: &Namespace, attr: &Atom, val: &Atom) -> bool {
self.get_attr(namespace, attr).map_or(false, |x| x == val)
}
-
- #[inline]
- fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str> {
- unsafe {
- (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name)
- }
- }
}
@@ -412,6 +405,13 @@ impl<'le> ServoLayoutElement<'le> {
chain: PhantomData,
}
}
+
+ #[inline]
+ fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str> {
+ unsafe {
+ (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name)
+ }
+ }
}
fn as_element<'le>(node: LayoutJS<Node>) -> Option<ServoLayoutElement<'le>> {