aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2016-06-23 14:06:19 -0700
committerBobby Holley <bobbyholley@gmail.com>2016-07-05 18:03:35 -0700
commit7947afc6991f0ba8db73d23014e8264534d801a8 (patch)
tree4d0120146622e49f3f56772047d1d840a16642bf /components/script/layout_wrapper.rs
parenta0c425fbef3f1db45a392b27b1cc869e8fca3bc3 (diff)
downloadservo-7947afc6991f0ba8db73d23014e8264534d801a8.tar.gz
servo-7947afc6991f0ba8db73d23014e8264534d801a8.zip
Remove get_attrs from TElement.
This should just be a helper.
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 7085fcae002..46f5f1f9e63 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -392,13 +392,6 @@ impl<'le> TElement for ServoLayoutElement<'le> {
(*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name)
}
}
-
- #[inline]
- fn get_attrs(&self, name: &Atom) -> Vec<&str> {
- unsafe {
- (*self.element.unsafe_get()).get_attr_vals_for_layout(name)
- }
- }
}
@@ -561,7 +554,10 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
self.get_attr(ns, name).map_or(false, |attr| test(attr))
},
NamespaceConstraint::Any => {
- self.get_attrs(name).iter().any(|attr| test(*attr))
+ let attrs = unsafe {
+ (*self.element.unsafe_get()).get_attr_vals_for_layout(name)
+ };
+ attrs.iter().any(|attr| test(*attr))
}
}
}