aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablecellelement.rs
diff options
context:
space:
mode:
authorrohan.prinja <rohan.prinja@samsung.com>2015-11-03 19:01:23 +0900
committerrohan.prinja <rohan.prinja@samsung.com>2015-11-03 19:01:23 +0900
commit6e774ea6eb6d719b98f924ab5bd0629d92fb27d0 (patch)
treefa48b89bb313a2e9514124b556bbcff5ed526a0f /components/script/dom/htmltablecellelement.rs
parent7032a5d1dee9bb2ba0bee45f1fda984dadfa0609 (diff)
parent4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5 (diff)
downloadservo-6e774ea6eb6d719b98f924ab5bd0629d92fb27d0.tar.gz
servo-6e774ea6eb6d719b98f924ab5bd0629d92fb27d0.zip
merge from master
Diffstat (limited to 'components/script/dom/htmltablecellelement.rs')
-rw-r--r--components/script/dom/htmltablecellelement.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index c0d04f6f77d..d95d663ffee 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -53,7 +53,7 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement {
make_uint_getter!(ColSpan, "colspan", DEFAULT_COLSPAN);
// https://html.spec.whatwg.org/multipage/#dom-tdth-colspan
- make_uint_setter!(SetColSpan, "colspan");
+ make_uint_setter!(SetColSpan, "colspan", DEFAULT_COLSPAN);
// https://html.spec.whatwg.org/multipage/#dom-tdth-cellindex
fn CellIndex(&self) -> i32 {
@@ -107,18 +107,18 @@ impl VirtualMethods for HTMLTableCellElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
},
- &atom!(colspan) => {
+ atom!(colspan) => {
self.colspan.set(mutation.new_value(attr).map(|value| {
max(DEFAULT_COLSPAN, value.as_uint())
}));
},
- &atom!(width) => {
+ atom!(width) => {
let width = mutation.new_value(attr).map(|value| {
str::parse_length(&value)
});
@@ -129,8 +129,8 @@ impl VirtualMethods for HTMLTableCellElement {
}
fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
- match local_name {
- &atom!("colspan") => AttrValue::from_u32(value, DEFAULT_COLSPAN),
+ match *local_name {
+ atom!("colspan") => AttrValue::from_u32(value, DEFAULT_COLSPAN),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}