mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
auto merge of #4542 : servo/servo/pre-rustup_20141221, r=saneyuki
In particular, this contains changes to qualify enums where rust will require it, and to stop using some features that will be removed.
This commit is contained in:
commit
ba8cf6b0e6
63 changed files with 445 additions and 439 deletions
|
@ -1396,7 +1396,7 @@ impl<'a> style::TElement<'a> for JSRef<'a, Element> {
|
|||
}
|
||||
|
||||
pub trait ActivationElementHelpers<'a> {
|
||||
fn as_maybe_activatable(&'a self) -> Option<&'a Activatable + 'a>;
|
||||
fn as_maybe_activatable(&'a self) -> Option<&'a (Activatable + 'a)>;
|
||||
fn click_in_progress(self) -> bool;
|
||||
fn set_click_in_progress(self, click: bool);
|
||||
fn nearest_activable_element(self) -> Option<Temporary<Element>>;
|
||||
|
@ -1404,12 +1404,12 @@ pub trait ActivationElementHelpers<'a> {
|
|||
}
|
||||
|
||||
impl<'a> ActivationElementHelpers<'a> for JSRef<'a, Element> {
|
||||
fn as_maybe_activatable(&'a self) -> Option<&'a Activatable + 'a> {
|
||||
fn as_maybe_activatable(&'a self) -> Option<&'a (Activatable + 'a)> {
|
||||
let node: JSRef<Node> = NodeCast::from_ref(*self);
|
||||
match node.type_id() {
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement)) => {
|
||||
let element: &'a JSRef<'a, HTMLInputElement> = HTMLInputElementCast::to_borrowed_ref(self).unwrap();
|
||||
Some(element as &'a Activatable + 'a)
|
||||
Some(element as &'a (Activatable + 'a))
|
||||
},
|
||||
_ => {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue