mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01: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
|
@ -10,7 +10,7 @@ use servo_util::atom::Atom;
|
|||
use servo_util::namespace::Namespace;
|
||||
|
||||
|
||||
pub trait TNode<E:TElement> : Clone {
|
||||
pub trait TNode<'a, E: TElement<'a>> : Clone {
|
||||
fn parent_node(&self) -> Option<Self>;
|
||||
/// Name is prefixed to avoid a conflict with TLayoutNode.
|
||||
fn tnode_first_child(&self) -> Option<Self>;
|
||||
|
@ -23,7 +23,7 @@ pub trait TNode<E:TElement> : Clone {
|
|||
fn is_html_element_in_html_document(&self) -> bool;
|
||||
}
|
||||
|
||||
pub trait TElement {
|
||||
pub trait TElement<'a> {
|
||||
fn get_attr(&self, namespace: &Namespace, attr: &str) -> Option<&'static str>;
|
||||
fn get_link(&self) -> Option<&'static str>;
|
||||
fn get_local_name<'a>(&'a self) -> &'a Atom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue