mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Don't shadow lifetimes in script.
This commit is contained in:
parent
cc2523eed5
commit
f8ac1777ff
29 changed files with 30 additions and 30 deletions
|
@ -636,7 +636,7 @@ impl<'a, T: Reflectable> JSRef<'a, T> {
|
|||
}
|
||||
|
||||
impl<'a, T: Reflectable> Reflectable for JSRef<'a, T> {
|
||||
fn reflector<'a>(&'a self) -> &'a Reflector {
|
||||
fn reflector<'b>(&'b self) -> &'b Reflector {
|
||||
(**self).reflector()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ impl DOMTokenList {
|
|||
|
||||
trait PrivateDOMTokenListHelpers {
|
||||
fn attribute(self) -> Option<Temporary<Attr>>;
|
||||
fn check_token_exceptions<'a>(self, token: &'a str) -> Fallible<Atom>;
|
||||
fn check_token_exceptions(self, token: &str) -> Fallible<Atom>;
|
||||
}
|
||||
|
||||
impl<'a> PrivateDOMTokenListHelpers for JSRef<'a, DOMTokenList> {
|
||||
|
@ -53,7 +53,7 @@ impl<'a> PrivateDOMTokenListHelpers for JSRef<'a, DOMTokenList> {
|
|||
element.r().get_attribute(ns!(""), &self.local_name)
|
||||
}
|
||||
|
||||
fn check_token_exceptions<'a>(self, token: &'a str) -> Fallible<Atom> {
|
||||
fn check_token_exceptions(self, token: &str) -> Fallible<Atom> {
|
||||
match token {
|
||||
"" => Err(Syntax),
|
||||
slice if slice.find(HTML_SPACE_CHARACTERS).is_some() => Err(InvalidCharacter),
|
||||
|
|
|
@ -1155,7 +1155,7 @@ pub fn get_attribute_parts<'a>(name: &'a str) -> (Option<&'a str>, &'a str) {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, Element> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let node: &JSRef<Node> = NodeCast::from_borrowed_ref(self);
|
||||
Some(node as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ impl<'a> EventTargetMethods for JSRef<'a, EventTarget> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, EventTarget> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ impl<'a> PrivateHTMLAnchorElementHelpers for JSRef<'a, HTMLAnchorElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ impl HTMLAreaElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLAreaElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ impl HTMLBodyElementHelpers for HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(element as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLButtonElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ impl<'a> HTMLCanvasElementMethods for JSRef<'a, HTMLCanvasElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(element as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let element: &JSRef<Element> = ElementCast::from_borrowed_ref(self);
|
||||
Some(element as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ impl<'a> HTMLFieldSetElementMethods for JSRef<'a, HTMLFieldSetElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLFieldSetElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ impl<'a> HTMLIFrameElementMethods for JSRef<'a, HTMLIFrameElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLIFrameElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ impl<'a> HTMLImageElementMethods for JSRef<'a, HTMLImageElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -395,7 +395,7 @@ impl<'a> HTMLInputElementHelpers for JSRef<'a, HTMLInputElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLInputElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ fn is_stylesheet(value: &Option<String>) -> bool {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLObjectElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ impl<'a> HTMLOptGroupElementMethods for JSRef<'a, HTMLOptGroupElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ impl<'a> HTMLOptionElementMethods for JSRef<'a, HTMLOptionElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLOptionElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLScriptElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLSelectElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ impl<'a> StyleElementHelpers for JSRef<'a, HTMLStyleElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLStyleElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ impl HTMLTableCellElementHelpers for HTMLTableCellElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTableCellElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ impl HTMLTableElementHelpers for HTMLTableElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ impl HTMLTableRowElementHelpers for HTMLTableRowElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTableRowElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ impl HTMLTableSectionElementHelpers for HTMLTableSectionElement {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTableSectionElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ impl<'a> PrivateHTMLTextAreaElementHelpers for JSRef<'a, HTMLTextAreaElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTextAreaElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ impl<'a> HTMLTitleElementMethods for JSRef<'a, HTMLTitleElement> {
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTitleElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -2223,7 +2223,7 @@ pub fn window_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Temporary
|
|||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, Node> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let eventtarget: &JSRef<EventTarget> = EventTargetCast::from_borrowed_ref(self);
|
||||
Some(eventtarget as &VirtualMethods)
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ use string_cache::Atom;
|
|||
pub trait VirtualMethods {
|
||||
/// Returns self as the superclass of the implementation for this trait,
|
||||
/// if any.
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods>;
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods>;
|
||||
|
||||
/// Called when changing or adding attributes, after the attribute's value
|
||||
/// has been updated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue