aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablecellelement.rs
diff options
context:
space:
mode:
authorchansuke <chansuke@georepublic.de>2018-09-18 23:24:15 +0900
committerJosh Matthews <josh@joshmatthews.net>2018-09-19 17:40:47 -0400
commitc37a345dc9f4dda6ea29c42f96f6c7201c42cbac (patch)
tree1f05b49bac02318455a59d5b143c186fd872bdb9 /components/script/dom/htmltablecellelement.rs
parent2ca7a134736bb4759ff209c1bc0b6dc3cc1984c9 (diff)
downloadservo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.tar.gz
servo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.zip
Format script component
Diffstat (limited to 'components/script/dom/htmltablecellelement.rs')
-rw-r--r--components/script/dom/htmltablecellelement.rs26
1 files changed, 15 insertions, 11 deletions
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index b3197d7f67e..5b9d8aa7748 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -28,10 +28,11 @@ pub struct HTMLTableCellElement {
}
impl HTMLTableCellElement {
- pub fn new_inherited(tag_name: LocalName,
- prefix: Option<Prefix>,
- document: &Document)
- -> HTMLTableCellElement {
+ pub fn new_inherited(
+ tag_name: LocalName,
+ prefix: Option<Prefix>,
+ document: &Document,
+ ) -> HTMLTableCellElement {
HTMLTableCellElement {
htmlelement: HTMLElement::new_inherited(tag_name, prefix, document),
}
@@ -74,13 +75,13 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement {
_ => return -1,
};
- parent_children.filter(|c| c.is::<HTMLTableCellElement>())
- .position(|c| &*c == self_node)
- .map_or(-1, |p| p as i32)
+ parent_children
+ .filter(|c| c.is::<HTMLTableCellElement>())
+ .position(|c| &*c == self_node)
+ .map_or(-1, |p| p as i32)
}
}
-
pub trait HTMLTableCellElementLayoutHelpers {
fn get_background_color(&self) -> Option<RGBA>;
fn get_colspan(&self) -> Option<u32>;
@@ -142,7 +143,7 @@ impl VirtualMethods for HTMLTableCellElement {
}
}
attr
- }
+ },
local_name!("rowspan") => {
let mut attr = AttrValue::from_u32(value.into(), DEFAULT_ROWSPAN);
if let AttrValue::UInt(ref mut s, ref mut val) = attr {
@@ -157,10 +158,13 @@ impl VirtualMethods for HTMLTableCellElement {
}
}
attr
- }
+ },
local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()),
local_name!("width") => AttrValue::from_nonzero_dimension(value.into()),
- _ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
+ _ => self
+ .super_type()
+ .unwrap()
+ .parse_plain_attribute(local_name, value),
}
}
}