aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-04-05 04:04:34 -0400
committerbors-servo <release+servo@mozilla.com>2014-04-05 04:04:34 -0400
commit2a5f82a76453aebe1ce07f0e0c5b78bead93ed0c (patch)
treed869c9a3f2a65b8f1108c9934bb19cb13b6f1c4a /src/components/script/dom/htmlcollection.rs
parent0f0b0b33bf7375d834138a3bd3af9ba1921d390d (diff)
parentc451b1c9dc31e91381f10d0cadd1d1377162367f (diff)
downloadservo-2a5f82a76453aebe1ce07f0e0c5b78bead93ed0c.tar.gz
servo-2a5f82a76453aebe1ce07f0e0c5b78bead93ed0c.zip
auto merge of #2032 : brunoabinader/servo/html-whitespace, r=Ms2ger
Specs: http://dom.spec.whatwg.org/#concept-ordered-set-parser http://encoding.spec.whatwg.org/#ascii-whitespace This PR implements the HTMLSpaceCharSplits iterator, used to split a string in a subset of strings separated by valid HTML space characters. Its first usage is upon splitting ```class``` attribute values. Closes #1840.
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r--src/components/script/dom/htmlcollection.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/script/dom/htmlcollection.rs b/src/components/script/dom/htmlcollection.rs
index eb56ebac542..e88aedd02db 100644
--- a/src/components/script/dom/htmlcollection.rs
+++ b/src/components/script/dom/htmlcollection.rs
@@ -10,7 +10,7 @@ use dom::element::{Element, AttributeHandlers};
use dom::node::{Node, NodeHelpers};
use dom::window::Window;
use servo_util::namespace::Namespace;
-use servo_util::str::DOMString;
+use servo_util::str::{DOMString, split_html_space_chars};
use serialize::{Encoder, Encodable};
@@ -100,7 +100,7 @@ impl HTMLCollection {
}
}
let filter = ClassNameFilter {
- classes: classes.split(' ').map(|class| class.into_owned()).to_owned_vec()
+ classes: split_html_space_chars(classes).map(|class| class.into_owned()).to_owned_vec()
};
HTMLCollection::create(window, root, ~filter)
}