mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -25,20 +25,27 @@ impl RadioNodeList {
|
|||
#[allow(unrooted_must_root)]
|
||||
fn new_inherited(list_type: NodeListType) -> RadioNodeList {
|
||||
RadioNodeList {
|
||||
node_list: NodeList::new_inherited(list_type)
|
||||
node_list: NodeList::new_inherited(list_type),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window, list_type: NodeListType) -> DomRoot<RadioNodeList> {
|
||||
reflect_dom_object(Box::new(RadioNodeList::new_inherited(list_type)),
|
||||
window,
|
||||
RadioNodeListBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(RadioNodeList::new_inherited(list_type)),
|
||||
window,
|
||||
RadioNodeListBinding::Wrap,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn new_simple_list<T>(window: &Window, iter: T) -> DomRoot<RadioNodeList>
|
||||
where T: Iterator<Item=DomRoot<Node>> {
|
||||
RadioNodeList::new(window, NodeListType::Simple(iter.map(|r| Dom::from_ref(&*r)).collect()))
|
||||
where
|
||||
T: Iterator<Item = DomRoot<Node>>,
|
||||
{
|
||||
RadioNodeList::new(
|
||||
window,
|
||||
NodeListType::Simple(iter.map(|r| Dom::from_ref(&*r)).collect()),
|
||||
)
|
||||
}
|
||||
|
||||
// FIXME: This shouldn't need to be implemented here since NodeList (the parent of
|
||||
|
@ -81,15 +88,15 @@ impl RadioNodeListMethods for RadioNodeList {
|
|||
input.SetChecked(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
InputType::Radio => {
|
||||
// Step 2
|
||||
if input.Value() == value {
|
||||
input.SetChecked(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue