Rename media_queries::MediaQueryList to MediaList

This commit is contained in:
Xidorn Quan 2016-11-08 12:11:21 +11:00
parent d8ac5100e8
commit 2733ec3bdc
6 changed files with 24 additions and 27 deletions

View file

@ -24,7 +24,7 @@ impl ParseErrorReporter for CSSErrorReporterTest {
}
}
fn test_media_rule<F>(css: &str, callback: F) where F: Fn(&MediaQueryList, &str) {
fn test_media_rule<F>(css: &str, callback: F) where F: Fn(&MediaList, &str) {
let url = Url::parse("http://localhost").unwrap();
let stylesheet = Stylesheet::from_str(css, url, Origin::Author, Box::new(CSSErrorReporterTest),
ParserContextExtraData::default());
@ -36,7 +36,7 @@ fn test_media_rule<F>(css: &str, callback: F) where F: Fn(&MediaQueryList, &str)
assert!(rule_count > 0);
}
fn media_queries<F>(rules: &[CSSRule], f: &mut F) where F: FnMut(&MediaQueryList) {
fn media_queries<F>(rules: &[CSSRule], f: &mut F) where F: FnMut(&MediaList) {
for rule in rules {
rule.with_nested_rules_and_mq(|rules, mq| {
if let Some(mq) = mq {