mirror of
https://github.com/servo/servo.git
synced 2025-06-18 13:24:29 +00:00
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:
parent
a2220f1ea4
commit
61ae80e186
5 changed files with 33 additions and 27 deletions
|
@ -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()) }
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue