Auto merge of #14121 - upsuper:medialist, r=Wafflespeanut

Rename media_queries::MediaQueryList to MediaList

<!-- Please describe your changes on the following line: -->
`MediaList` is the name of the interface for "collection of media queries" used in [CSSOM spec](https://drafts.csswg.org/cssom/#the-medialist-interface), `MediaQueryList` happens to mean something different in [CSSOM View spec](https://drafts.csswg.org/cssom-view/#the-mediaquerylist-interface), which also leads to naming conflict in dom code. So I think it's better renaming it to `MediaList`.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14121)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-08 01:46:40 -06:00 committed by GitHub
commit 56b4065ee8
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 {