Allow mutation of CssRules

This commit is contained in:
Manish Goregaokar 2016-11-14 15:37:48 -08:00
parent 71a2b379c8
commit 2fe390e237
5 changed files with 11 additions and 10 deletions

View file

@ -29,7 +29,7 @@ fn test_media_rule<F>(css: &str, callback: F) where F: Fn(&MediaList, &str) {
let stylesheet = Stylesheet::from_str(css, url, Origin::Author, Box::new(CSSErrorReporterTest),
ParserContextExtraData::default());
let mut rule_count = 0;
media_queries(&stylesheet.rules.0, &mut |mq| {
media_queries(&stylesheet.rules.0.read(), &mut |mq| {
rule_count += 1;
callback(mq, css);
});