aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorzakorgyula <gyula.zakor@gmail.com>2016-02-16 08:01:39 +0100
committerzakorgyula <gyula.zakor@gmail.com>2016-02-17 07:05:39 +0100
commit43d527fcc84efd76a42dd85a7cb6331f391ad005 (patch)
treed79f1ddd0c4262b2b51228323f33923e1323f133 /components/script/dom
parentf0d4c03bd9c9e181aa1225aec978c2f539e9aeb0 (diff)
downloadservo-43d527fcc84efd76a42dd85a7cb6331f391ad005.tar.gz
servo-43d527fcc84efd76a42dd85a7cb6331f391ad005.zip
Move parse_integer and parse_unsigned_integer from util::str to style::attr
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmltableelement.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index c2a2e31d2b7..94c0b6dc986 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -18,7 +18,8 @@ use dom::node::{Node, document_from_node};
use dom::virtualmethods::VirtualMethods;
use std::cell::Cell;
use string_cache::Atom;
-use util::str::{self, DOMString, LengthOrPercentageOrAuto};
+use style::attr::parse_unsigned_integer;
+use util::str::{DOMString, LengthOrPercentageOrAuto};
#[dom_struct]
pub struct HTMLTableElement {
@@ -176,12 +177,12 @@ impl VirtualMethods for HTMLTableElement {
atom!("border") => {
// According to HTML5 § 14.3.9, invalid values map to 1px.
self.border.set(mutation.new_value(attr).map(|value| {
- str::parse_unsigned_integer(value.chars()).unwrap_or(1)
+ parse_unsigned_integer(value.chars()).unwrap_or(1)
}));
}
atom!("cellspacing") => {
self.cellspacing.set(mutation.new_value(attr).and_then(|value| {
- str::parse_unsigned_integer(value.chars())
+ parse_unsigned_integer(value.chars())
}));
},
_ => {},