Skip to content

Commit

Permalink
AttrValue's s/from_tokenlist/from_serialized_tokenlist/
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader committed Dec 26, 2014
1 parent 0e6304d commit eb3678f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/attr.rs
Expand Up @@ -37,7 +37,7 @@ pub enum AttrValue {
}

impl AttrValue {
pub fn from_tokenlist(tokens: DOMString) -> AttrValue {
pub fn from_serialized_tokenlist(tokens: DOMString) -> AttrValue {
let atoms = split_html_space_chars(tokens.as_slice())
.map(|token| Atom::from_slice(token)).collect();
AttrValue::TokenList(tokens, atoms)
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/element.rs
Expand Up @@ -848,7 +848,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {

fn set_tokenlist_attribute(self, name: &Atom, value: DOMString) {
assert!(name.as_slice() == name.as_slice().to_ascii_lower().as_slice());
self.set_attribute(name, AttrValue::from_tokenlist(value));
self.set_attribute(name, AttrValue::from_serialized_tokenlist(value));
}

fn get_uint_attribute(self, name: &Atom) -> u32 {
Expand Down Expand Up @@ -1290,7 +1290,7 @@ impl<'a> VirtualMethods for JSRef<'a, Element> {
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
&atom!("id") => AttrValue::from_atomic(value),
&atom!("class") => AttrValue::from_tokenlist(value),
&atom!("class") => AttrValue::from_serialized_tokenlist(value),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/htmlanchorelement.rs
Expand Up @@ -93,7 +93,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {

fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
&atom!("rel") => AttrValue::from_tokenlist(value),
&atom!("rel") => AttrValue::from_serialized_tokenlist(value),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/htmlareaelement.rs
Expand Up @@ -58,7 +58,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLAreaElement> {

fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
&atom!("rel") => AttrValue::from_tokenlist(value),
&atom!("rel") => AttrValue::from_serialized_tokenlist(value),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/htmllinkelement.rs
Expand Up @@ -94,7 +94,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {

fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
&atom!("rel") => AttrValue::from_tokenlist(value),
&atom!("rel") => AttrValue::from_serialized_tokenlist(value),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}
Expand Down

0 comments on commit eb3678f

Please sign in to comment.