mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -21,19 +21,27 @@ pub struct HTMLLIElement {
|
|||
}
|
||||
|
||||
impl HTMLLIElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLLIElement {
|
||||
fn new_inherited(
|
||||
local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
) -> HTMLLIElement {
|
||||
HTMLLIElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> DomRoot<HTMLLIElement> {
|
||||
Node::reflect_node(Box::new(HTMLLIElement::new_inherited(local_name, prefix, document)),
|
||||
document,
|
||||
HTMLLIElementBinding::Wrap)
|
||||
pub fn new(
|
||||
local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
) -> DomRoot<HTMLLIElement> {
|
||||
Node::reflect_node(
|
||||
Box::new(HTMLLIElement::new_inherited(local_name, prefix, document)),
|
||||
document,
|
||||
HTMLLIElementBinding::Wrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +61,10 @@ impl VirtualMethods for HTMLLIElement {
|
|||
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&local_name!("value") => AttrValue::from_i32(value.into(), 0),
|
||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||
_ => self
|
||||
.super_type()
|
||||
.unwrap()
|
||||
.parse_plain_attribute(name, value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue