Add an extra lifetime parameter to TElement / TNode

This isn't used for anything yet, but it's easier to propagate this
change in a separate commit.
This commit is contained in:
Cameron Zwarich 2014-09-26 20:10:14 -07:00
parent a2220f1ea4
commit 61ae80e186
5 changed files with 33 additions and 27 deletions

View file

@ -948,7 +948,7 @@ impl<'a> VirtualMethods for JSRef<'a, Element> {
}
}
impl<'a> style::TElement for JSRef<'a, Element> {
impl<'a> style::TElement<'a> for JSRef<'a, Element> {
fn get_attr(&self, namespace: &Namespace, attr: &str) -> Option<&'static str> {
self.get_attribute(namespace.clone(), attr).root().map(|attr| {
unsafe { mem::transmute(attr.deref().value().as_slice()) }

View file

@ -2033,7 +2033,7 @@ impl<'a> VirtualMethods for JSRef<'a, Node> {
}
}
impl<'a> style::TNode<JSRef<'a, Element>> for JSRef<'a, Node> {
impl<'a> style::TNode<'a, JSRef<'a, Element>> for JSRef<'a, Node> {
fn parent_node(&self) -> Option<JSRef<'a, Node>> {
(self as &NodeHelpers).parent_node().map(|node| *node.root())
}