diff options
author | Cameron Zwarich <zwarich@mozilla.com> | 2014-09-27 01:12:44 -0700 |
---|---|---|
committer | Cameron Zwarich <zwarich@mozilla.com> | 2014-09-27 11:14:10 -0700 |
commit | b2a35190114e2232a99c6dc3fa19eb242e421246 (patch) | |
tree | a3b6276e2d0033e9a8a67887bc809dce3339174f /components/layout/construct.rs | |
parent | bf025e9b9ba6aa105dc2a7eba6752e7ece59a0f1 (diff) | |
download | servo-b2a35190114e2232a99c6dc3fa19eb242e421246.tar.gz servo-b2a35190114e2232a99c6dc3fa19eb242e421246.zip |
Remove the 'static lifetime parameters from TElement methods
This improves the static correctness of layout's use of DOM nodes.
Fixes #2595.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index a95caed9c9a..30df9591f5f 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1077,9 +1077,9 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> { } /// Methods for interacting with HTMLObjectElement nodes -trait ObjectElement { +trait ObjectElement<'a> { /// Returns None if this node is not matching attributes. - fn get_type_and_data(&self) -> (Option<&'static str>, Option<&'static str>); + fn get_type_and_data(&self) -> (Option<&'a str>, Option<&'a str>); /// Returns true if this node has object data that is correct uri. fn has_object_data(&self) -> bool; @@ -1088,8 +1088,8 @@ trait ObjectElement { fn get_object_data(&self) -> Option<Url>; } -impl<'ln> ObjectElement for ThreadSafeLayoutNode<'ln> { - fn get_type_and_data(&self) -> (Option<&'static str>, Option<&'static str>) { +impl<'ln> ObjectElement<'ln> for ThreadSafeLayoutNode<'ln> { + fn get_type_and_data(&self) -> (Option<&'ln str>, Option<&'ln str>) { let elem = self.as_element(); (elem.get_attr(&namespace::Null, "type"), elem.get_attr(&namespace::Null, "data")) } |