aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index a936e783ad4..095a54d6e2c 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -711,7 +711,7 @@ pub trait AttributeHandlers {
fn get_tokenlist_attribute(self, local_name: &Atom) -> Vec<Atom>;
fn set_tokenlist_attribute(self, local_name: &Atom, value: DOMString);
fn set_atomic_tokenlist_attribute(self, local_name: &Atom, tokens: Vec<Atom>);
- fn get_uint_attribute(self, local_name: &Atom) -> u32;
+ fn get_uint_attribute(self, local_name: &Atom, default: u32) -> u32;
fn set_uint_attribute(self, local_name: &Atom, value: u32);
}
@@ -966,7 +966,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {
self.set_attribute(local_name, AttrValue::from_atomic_tokens(tokens));
}
- fn get_uint_attribute(self, local_name: &Atom) -> u32 {
+ fn get_uint_attribute(self, local_name: &Atom, default: u32) -> u32 {
assert!(local_name.chars().all(|ch| {
!ch.is_ascii() || ch.to_ascii_lowercase() == ch
}));
@@ -979,7 +979,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {
implement parse_plain_attribute"),
}
}
- None => 0,
+ None => default,
}
}
fn set_uint_attribute(self, local_name: &Atom, value: u32) {