Auto merge of #10608 - KiChjang:parse-double, r=nox

Add parsing of double values in style attributes

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10608)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-26 11:59:25 -07:00
commit ccba2d6841
11 changed files with 132 additions and 14 deletions

View file

@ -150,8 +150,8 @@ pub fn parse_legacy_font_size(mut input: &str) -> Option<&'static str> {
// Steps 6, 7, 8
let mut value = match read_numbers(input_chars) {
Some(v) => v,
None => return None,
(Some(v), _) => v,
(None, _) => return None,
};
// Step 9

View file

@ -410,7 +410,7 @@ impl VirtualMethods for HTMLTableElement {
}
atom!("cellspacing") => {
self.cellspacing.set(mutation.new_value(attr).and_then(|value| {
parse_unsigned_integer(value.chars())
parse_unsigned_integer(value.chars()).ok()
}));
},
_ => {},