mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove the 'static lifetime parameters from TElement methods
This improves the static correctness of layout's use of DOM nodes. Fixes #2595.
This commit is contained in:
parent
bf025e9b9b
commit
b2a3519011
4 changed files with 18 additions and 18 deletions
|
@ -401,11 +401,11 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn get_attr(&self, namespace: &Namespace, name: &str) -> Option<&'static str> {
|
||||
fn get_attr(&self, namespace: &Namespace, name: &str) -> Option<&'le str> {
|
||||
unsafe { self.element.get_attr_val_for_layout(namespace, name) }
|
||||
}
|
||||
|
||||
fn get_link(&self) -> Option<&'static str> {
|
||||
fn get_link(&self) -> Option<&'le str> {
|
||||
// FIXME: This is HTML only.
|
||||
match self.element.node.type_id_for_layout() {
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html#
|
||||
|
@ -791,7 +791,7 @@ pub struct ThreadSafeLayoutElement<'le> {
|
|||
|
||||
impl<'le> ThreadSafeLayoutElement<'le> {
|
||||
#[inline]
|
||||
pub fn get_attr(&self, namespace: &Namespace, name: &str) -> Option<&'static str> {
|
||||
pub fn get_attr(&self, namespace: &Namespace, name: &str) -> Option<&'le str> {
|
||||
unsafe { self.element.get_attr_val_for_layout(namespace, name) }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue