diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-01-28 16:29:35 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-01-30 15:07:29 +0100 |
commit | 966af0030a246dfa407d5d17a66020cd331f326d (patch) | |
tree | 43c64db6d1f04dd4f37dc1b4e4d472f712ce8c8f /components/style/selector_matching.rs | |
parent | 7359f99f201a359aaebf334a1787d1975c9fa7d4 (diff) | |
download | servo-966af0030a246dfa407d5d17a66020cd331f326d.tar.gz servo-966af0030a246dfa407d5d17a66020cd331f326d.zip |
Upgrade to rust-cssparser master.
* Use associated types
* Avoid mutation to gather parsing results.
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r-- | components/style/selector_matching.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 3809fd7f818..9b81f20060a 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -1166,16 +1166,12 @@ mod tests { /// Helper method to get some Rules from selector strings. /// Each sublist of the result contains the Rules for one StyleRule. fn get_mock_rules(css_selectors: &[&str]) -> Vec<Vec<Rule>> { - use namespaces::NamespaceMap; use selectors::parse_selector_list; use stylesheets::Origin; css_selectors.iter().enumerate().map(|(i, selectors)| { - let context = ParserContext { - stylesheet_origin: Origin::Author, - namespaces: NamespaceMap::new(), - base_url: &Url::parse("about:blank").unwrap(), - }; + let url = Url::parse("about:blank").unwrap(); + let context = ParserContext::new(Origin::Author, &url); parse_selector_list(&context, &mut Parser::new(*selectors)) .unwrap().into_iter().map(|s| { Rule { |